[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/registe...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/registe... |
Date: |
Sat, 03 Feb 2007 22:27:37 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/02/03 22:27:37
Modified files:
. : ChangeLog
testsuite/misc-ming.all: registerClassTest.c
registerClassTestRunner.cpp
Log message:
* testsuite/misc-ming.all/: registerClassTest.c,
registerClassTestRunner.cpp: add new tests, a fix
for gnash will follow shortly.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2242&r2=1.2243
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/registerClassTest.c?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/registerClassTestRunner.cpp?cvsroot=gnash&r1=1.3&r2=1.4
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2242
retrieving revision 1.2243
diff -u -b -r1.2242 -r1.2243
--- ChangeLog 3 Feb 2007 22:14:56 -0000 1.2242
+++ ChangeLog 3 Feb 2007 22:27:36 -0000 1.2243
@@ -1,5 +1,8 @@
2007-02-03 Sandro Santilli <address@hidden>
+ * testsuite/misc-ming.all/: registerClassTest.c,
+ registerClassTestRunner.cpp: add new tests, a fix
+ for gnash will follow shortly.
* server/parser/sprite_definition.h: add getRegisteredClass()
method.
Index: testsuite/misc-ming.all/registerClassTest.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/registerClassTest.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- testsuite/misc-ming.all/registerClassTest.c 1 Feb 2007 16:32:29 -0000
1.2
+++ testsuite/misc-ming.all/registerClassTest.c 3 Feb 2007 22:27:36 -0000
1.3
@@ -24,8 +24,10 @@
* 2) attach it to main timeline
* 3) register a custom class to it
* 4) attach it again (expected to have the custom class interface)
- * 4) register another custom class to it, this time deriving from MovieClip
- * 5) attach it again (expected to be both instance of custom class and
instance of MovieClip)
+ * 5) register another custom class to it, this time deriving from MovieClip
+ * 6) attach it again (expected to be both instance of custom class and
instance of MovieClip)
+ * 7) call registerClass again, this time with an *single* argument
+ * 8) attach it again (expected to be instance of of MovieClip)
*
* run as ./registerClass
*/
@@ -146,6 +148,20 @@
SWFMovie_nextFrame(mo); /* end of frame4 */
+ add_actions(mo,
+ "Object.registerClass('redsquare');"
+ );
+
+ add_actions(mo,
+ "var name4 = 'square'+counter;"
+ "attachMovie('redsquare', name4, 70+counter);"
+ "var clip4 = this[name4];"
+ "clip4._x = 240;"
+ "counter++;"
+ );
+
+ SWFMovie_nextFrame(mo); /* end of frame5 */
+
check_equals(mo, "typeof(clip1)", "'movieclip'");
check(mo, "clip1 instanceOf MovieClip");
check_equals(mo, "clip1._x", "0");
@@ -153,14 +169,19 @@
check_equals(mo, "typeof(clip2)", "'movieclip'");
check(mo, "clip2 instanceOf CustomClass");
- xcheck_equals(mo, "clip2._x", "80");
+ check_equals(mo, "clip2._x", "80");
+ check_equals(mo, "typeof(clip2.lineTo)", "'undefined'");
check(mo, "! clip2 instanceOf MovieClip");
check_equals(mo, "typeof(clip3)", "'movieclip'");
- xcheck_equals(mo, "clip3._x", "160");
+ check_equals(mo, "clip3._x", "160");
check(mo, "clip3 instanceOf CustomClass2");
check(mo, "clip3 instanceOf MovieClip");
+ check_equals(mo, "typeof(clip4)", "'movieclip'");
+ check_equals(mo, "clip4._x", "240");
+ check(mo, "clip4 instanceOf MovieClip");
+
add_actions(mo,
"totals();"
"stop();"
Index: testsuite/misc-ming.all/registerClassTestRunner.cpp
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-ming.all/registerClassTestRunner.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- testsuite/misc-ming.all/registerClassTestRunner.cpp 1 Feb 2007 16:32:29
-0000 1.3
+++ testsuite/misc-ming.all/registerClassTestRunner.cpp 3 Feb 2007 22:27:36
-0000 1.4
@@ -45,7 +45,7 @@
sprite_instance* root = tester.getRootMovie();
assert(root);
- check_equals(root->get_frame_count(), 5);
+ check_equals(root->get_frame_count(), 6);
check_equals(root->get_play_state(), sprite_instance::PLAY);
check_equals(root->get_current_frame(), 0);
@@ -75,7 +75,7 @@
tester.movePointerTo(30, 30);
check(tester.isMouseOverMouseEntity());
tester.movePointerTo(100, 30);
- xcheck(tester.isMouseOverMouseEntity());
+ check(tester.isMouseOverMouseEntity());
tester.advance();
check_equals(root->get_current_frame(), 3);
@@ -87,14 +87,26 @@
tester.movePointerTo(30, 30);
check(tester.isMouseOverMouseEntity());
tester.movePointerTo(100, 30);
- xcheck(tester.isMouseOverMouseEntity());
+ check(tester.isMouseOverMouseEntity());
tester.movePointerTo(170, 30);
- xcheck(tester.isMouseOverMouseEntity());
+ check(tester.isMouseOverMouseEntity());
tester.advance();
check_equals(root->get_current_frame(), 4);
+ tester.movePointerTo(30, 30);
+ check(tester.isMouseOverMouseEntity());
+ tester.movePointerTo(100, 30);
+ check(tester.isMouseOverMouseEntity());
+ tester.movePointerTo(170, 30);
+ check(tester.isMouseOverMouseEntity());
+ tester.movePointerTo(240, 30);
+ check(tester.isMouseOverMouseEntity());
+
+ tester.advance();
+ check_equals(root->get_current_frame(), 5);
+
tester.advance();
- check_equals(root->get_current_frame(), 4); // we should be in stop mode
+ check_equals(root->get_current_frame(), 5); // we should be in stop mode
}