[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/get_fra...
From: |
Zou Lunkai |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/get_fra... |
Date: |
Mon, 16 Apr 2007 09:43:13 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Zou Lunkai <zoulunkai> 07/04/16 09:43:13
Modified files:
. : ChangeLog
testsuite/misc-ming.all: get_frame_number_test.c
Log message:
more tests about frame labels
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2884&r2=1.2885
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/get_frame_number_test.c?cvsroot=gnash&r1=1.1&r2=1.2
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2884
retrieving revision 1.2885
diff -u -b -r1.2884 -r1.2885
--- ChangeLog 16 Apr 2007 09:08:38 -0000 1.2884
+++ ChangeLog 16 Apr 2007 09:43:13 -0000 1.2885
@@ -15,7 +15,9 @@
2007-04-16 Zou Lunkai <address@hidden>
* testsuite/misc-ming.all/frame_label_test.c:
- a new testcase
+ a new testcase.
+ * testsuite/misc-ming.all/get_frame_number_test.c:
+ more tests.
* server/sprite_instance.cpp:
update call_frame_actions();
* server/vm/ASHandlers.cpp:
Index: testsuite/misc-ming.all/get_frame_number_test.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/get_frame_number_test.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/misc-ming.all/get_frame_number_test.c 8 Apr 2007 08:37:07
-0000 1.1
+++ testsuite/misc-ming.all/get_frame_number_test.c 16 Apr 2007 09:43:13
-0000 1.2
@@ -64,7 +64,10 @@
SWFMovie_labelFrame(mo, "aa");
SWFMovie_nextFrame(mo); /* 4th frame*/
- check_equals(mo, "_currentframe", "5");
+ SWFMovie_labelFrame(mo, "4.8");
+ SWFMovie_nextFrame(mo); /* 5th frame*/
+
+ check_equals(mo, "_currentframe", "6");
add_actions(mo, " gotoAndStop('8'); "); // ActionGotoLabel
check_equals(mo, "_currentframe", "2");
add_actions(mo, " gotoAndStop('xxxxxxxx'); "); // ActionGotoLabel
@@ -79,8 +82,14 @@
add_actions(mo, " x = -1; "
" gotoAndStop(x); "); // ActionGotoExpression
check_equals(mo, "_currentframe", "2");
- add_actions(mo, " gotoAndStop(6); "); // ActionGotoFrame
- SWFMovie_nextFrame(mo); /* 5th frame */
+ add_actions(mo, " x = 4.8; " // valid frame label
+ " gotoAndStop(x); "); // ActionGotoExpression
+ xcheck_equals(mo, "_currentframe", "5");
+ add_actions(mo, " x = 6.1; " // invalid frame number
+ " gotoAndStop(x); "); // ActionGotoExpression
+ xcheck_equals(mo, "_currentframe", "5");
+ add_actions(mo, " gotoAndStop(7); "); // ActionGotoFrame
+ SWFMovie_nextFrame(mo); /* 6th frame */
add_actions(mo, "function func1() {}"
"func1.prototype.toString = function() { return '8'; };"
@@ -93,11 +102,17 @@
"function func3() {}"
"func3.prototype.toString = function() { return '8'; }; "
"func3.prototype.valueOf = function() { return 8;};"
- "x3 = new func3();" );
+ "x3 = new func3();"
+
+ "function func4() {}"
+ "func4.prototype.toString = function() { return '4.8'; }; "
+ "func4.prototype.valueOf = function() { return '4.8';};"
+ "x4 = new func4();");
add_actions(mo, " x = '8'; gotoAndStop(x); "); // ActionGotoExpression
- check_equals(mo, "_currentframe", "6");
+ /* reach the last frame */
+ check_equals(mo, "_currentframe", "7");
add_actions(mo, " x = '8a'; gotoAndStop(x); "); // ActionGotoExpression
check_equals(mo, "_currentframe", "3");
@@ -106,20 +121,25 @@
check_equals(mo, "_currentframe", "4");
add_actions(mo, " gotoAndStop(x1); "); // ActionGotoExpression
- /* reach the last frame */
- check_equals(mo, "_currentframe", "6");
+ /* reach the last frame, toString invoked */
+ check_equals(mo, "_currentframe", "7");
/* reset _currentframe to 1 */
add_actions(mo, " gotoAndStop(1); ");
+
add_actions(mo, " gotoAndStop(x2); "); // ActionGotoExpression
check_equals(mo, "_currentframe", "1");
add_actions(mo, " gotoAndStop(x3); "); // ActionGotoExpression
/* reach the last frame */
- check_equals(mo, "_currentframe", "6");
+ check_equals(mo, "_currentframe", "7");
+
+ add_actions(mo, " gotoAndStop(x4); "); // ActionGotoExpression
+ /* "4.8" is a valid frame label, toString() invoked */
+ xcheck_equals(mo, "_currentframe", "5");
add_actions(mo, " _root.totals(); stop(); ");
- SWFMovie_nextFrame(mo); /* 6th frame */
+ SWFMovie_nextFrame(mo); /* 7th frame */
//Output movie
puts("Saving " OUTPUT_FILENAME );
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/get_fra...,
Zou Lunkai <=