[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: |
Tue, 17 Apr 2007 01:26:03 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Zou Lunkai <zoulunkai> 07/04/17 01:26:03
Modified files:
. : ChangeLog
testsuite/misc-ming.all: get_frame_number_test.c
Log message:
more insane tests
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2891&r2=1.2892
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/get_frame_number_test.c?cvsroot=gnash&r1=1.3&r2=1.4
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2891
retrieving revision 1.2892
diff -u -b -r1.2891 -r1.2892
--- ChangeLog 16 Apr 2007 18:23:05 -0000 1.2891
+++ ChangeLog 17 Apr 2007 01:26:03 -0000 1.2892
@@ -1,3 +1,8 @@
+2007-04-17 Zou Lunkai <address@hidden>
+
+ * testsuite/misc-ming.all/get_frame_number_test.c:
+ more tests.
+
2007-04-16 Sandro Santilli <address@hidden>
* server/as_environment.cpp, server/as_value.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.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- testsuite/misc-ming.all/get_frame_number_test.c 16 Apr 2007 12:31:02
-0000 1.3
+++ testsuite/misc-ming.all/get_frame_number_test.c 17 Apr 2007 01:26:03
-0000 1.4
@@ -107,7 +107,13 @@
"function func4() {}"
"func4.prototype.toString = function() { return '4.8'; }; "
"func4.prototype.valueOf = function() { return '4.8';};"
- "x4 = new func4();");
+ "x4 = new func4();"
+
+ "x5 = new Number(3);"
+ "Number.prototype.toString = function () { return '4'; }; "
+
+ "x6 = new String('3');"
+ "String.prototype.toString = function () { return '4'; }; "
);
add_actions(mo, " x = '8'; gotoAndStop(x); "); // ActionGotoExpression
@@ -121,7 +127,7 @@
check_equals(mo, "_currentframe", "4");
add_actions(mo, " gotoAndStop(x1); "); // ActionGotoExpression
- /* reach the last frame, toString invoked */
+ /* reach the last frame, toString() invoked */
check_equals(mo, "_currentframe", "7");
/* reset _currentframe to 1 */
@@ -131,13 +137,35 @@
check_equals(mo, "_currentframe", "1");
add_actions(mo, " gotoAndStop(x3); "); // ActionGotoExpression
- /* reach the last frame */
+ /* reach the last frame, toString() invoked */
check_equals(mo, "_currentframe", "7");
add_actions(mo, " gotoAndStop(x4); "); // ActionGotoExpression
/* "4.8" is a valid frame label, toString() invoked */
check_equals(mo, "_currentframe", "5");
+ check_equals(mo, "_root.x5", "3");
+ check_equals(mo, "_root.x5.toString()", "'4'");
+ check_equals(mo, "_root.x5.toString()", "4");
+ add_actions(mo, " gotoAndStop(x5); "); // ActionGotoExpression
+ /* toString() invoked again for Number Object */
+ check_equals(mo, "_currentframe", "4");
+
+ /* reset _currentframe to 1 */
+ add_actions(mo, " gotoAndStop(1); ");
+
+ check_equals(mo, "_root.x6", "'3'");
+ check_equals(mo, "_root.x6.toString()", "'4'");
+ check_equals(mo, "_root.x6.toString()", "4");
+ add_actions(mo, " gotoAndStop(x6); "); // ActionGotoExpression
+ /* toString() not invoked for String Object ??? */
+ xcheck_equals(mo, "_currentframe", "3");
+
+ /* This ensure the movie stop at the last frame,
+ * and the actions in last frame will not be pushed again
+ */
+ add_actions(mo, " gotoAndStop(10000); "); // ActionGotoFrame
+ check_equals(mo, "_currentframe", "7");
add_actions(mo, " _root.totals(); stop(); ");
SWFMovie_nextFrame(mo); /* 7th frame */