[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10879: Minor cleanups, add tests.
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10879: Minor cleanups, add tests. |
Date: |
Mon, 18 May 2009 14:00:59 +0200 |
User-agent: |
Bazaar (1.13.1) |
------------------------------------------------------------
revno: 10879
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Mon 2009-05-18 14:00:59 +0200
message:
Minor cleanups, add tests.
modified:
libcore/vm/Machine.cpp
libcore/vm/Machine.h
testsuite/misc-haxe.all/AddChild.hx
------------------------------------------------------------
revno: 10874.1.3
committer: Benjamin Wolsey <address@hidden>
branch nick: test
timestamp: Mon 2009-05-18 11:55:06 +0200
message:
Minor cleanups (line breaks), correct typo.
modified:
libcore/vm/Machine.cpp
libcore/vm/Machine.h
------------------------------------------------------------
revno: 10874.1.4
committer: Benjamin Wolsey <address@hidden>
branch nick: test
timestamp: Mon 2009-05-18 13:06:31 +0200
message:
Improve testing for addChild.
modified:
testsuite/misc-haxe.all/AddChild.hx
=== modified file 'libcore/vm/Machine.cpp'
--- a/libcore/vm/Machine.cpp 2009-05-14 08:00:05 +0000
+++ b/libcore/vm/Machine.cpp 2009-05-18 09:55:06 +0000
@@ -1660,7 +1660,7 @@
as_value nameValue = pop_stack();
name = mST.find(nameValue.to_string());
}
- else{
+ else {
name = a.getGlobalName();
}
@@ -1669,8 +1669,8 @@
as_object* object = object_val.to_object().get();
if (!object) {
IF_VERBOSE_ASCODING_ERRORS(
- log_aserror(_("Can't get a property of a value that
doesn't cast to an object (%s)."),
- object_val);
+ log_aserror(_("Can't get a property of a value that
doesn't "
+ "cast to an object (%s)."), object_val);
)
}
else{
@@ -2849,7 +2849,8 @@
}
}
- log_abc("Cannot find property in scope stack. Trying again using
as_environment.");
+ log_abc("Cannot find property in scope stack. Trying again using "
+ "as_environment.");
as_object *target = NULL;
as_environment env = as_environment(_vm);
std::string name = mPoolObject->stringPoolAt(multiname.getABCName());
=== modified file 'libcore/vm/Machine.h'
--- a/libcore/vm/Machine.h 2009-05-14 08:00:05 +0000
+++ b/libcore/vm/Machine.h 2009-05-18 09:55:06 +0000
@@ -283,7 +283,7 @@
as_value pop_stack(){
as_value value = mStack.pop();
- log_abc("Poping value %s off the stack.",value.toDebugString());
+ log_abc("Popping value %s off the
stack.",value.toDebugString());
return value;
}
=== modified file 'testsuite/misc-haxe.all/AddChild.hx'
--- a/testsuite/misc-haxe.all/AddChild.hx 2008-11-13 19:14:56 +0000
+++ b/testsuite/misc-haxe.all/AddChild.hx 2009-05-18 11:06:31 +0000
@@ -5,6 +5,9 @@
class PP_AddChild {
static function main()
{
+
+ var thisObject = flash.Lib.current;
+
var tf = new flash.text.TextField();
var tf2 = flash.Lib.current.addChild(tf);
check_equals(tf, tf2);
@@ -29,12 +32,17 @@
check_equals(tf7, tf6);
check_equals(tf7, tf5);
- // TODO: check depths, add a MovieClip child,
- // find a way to do some checks on the
- // actual stage content !
+ // Check that this MovieClip has 2 children.
+ xcheck_equals(thisObject.numChildren, 2);
+
+ // Check that the parent of both children is this MovieClip.
+ xcheck_equals(thisObject.getChildAt(1).parent, thisObject);
+ xcheck_equals(thisObject.getChildAt(0).parent, thisObject);
+
+ // TODO: check depths, add a MovieClip child.
// Check number of tests run (for consistency)
- check_totals(13);
+ check_totals(16);
// Call this after finishing all tests. It prints out the totals.
Dejagnu.done();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10879: Minor cleanups, add tests.,
Benjamin Wolsey <=