[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/enum...
From: |
Zou Lunkai |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/enum... |
Date: |
Thu, 21 Jun 2007 07:22:28 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Zou Lunkai <zoulunkai> 07/06/21 07:22:28
Modified files:
. : ChangeLog
testsuite/actionscript.all: enumerate.as
Log message:
more tests
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3591&r2=1.3592
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/enumerate.as?cvsroot=gnash&r1=1.1&r2=1.2
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3591
retrieving revision 1.3592
diff -u -b -r1.3591 -r1.3592
--- ChangeLog 21 Jun 2007 05:09:12 -0000 1.3591
+++ ChangeLog 21 Jun 2007 07:22:27 -0000 1.3592
@@ -1,5 +1,9 @@
2007-06-21 Zou Lunkai <address@hidden>
+ * testsuite/actionscript.all/enumerate.as: more tests.
+
+2007-06-21 Zou Lunkai <address@hidden>
+
* testsuite/misc-ming.all/key_event_test4.c, key_event_test4runner.cpp,
Makefile.am:
new testcase for "this" context in a user defined key event handler.
* server/movie_root.cpp: correctly set the context.
Index: testsuite/actionscript.all/enumerate.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/enumerate.as,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/actionscript.all/enumerate.as 21 Jun 2007 02:03:47 -0000
1.1
+++ testsuite/actionscript.all/enumerate.as 21 Jun 2007 07:22:28 -0000
1.2
@@ -26,36 +26,70 @@
#if OUTPUT_VERSION > 5
-// Create a recorder and init it.
-recorder = new Array(10);
-for(i=0; i<10; i++){
+//
+// enumerate characters of a sprite
+//
+{
+ // Create a recorder and init it.
+ recorder = new Array(10);
+ for(i=0; i<10; i++){
recorder[i] = 0;
-}
+ }
-// Create six characters
-for(i=0; i<6; i++)
-{
+ // Create six characters
+ for(i=0; i<6; i++){
_root.createEmptyMovieClip("mc"+i, i+1);
-}
+ }
-// Use the recorder to record the enumerated results in _root
-i = 0;
-for (var j in _root)
-{
+ // Use the recorder to record the enumerated results in _root
+ i = 0;
+ for (var j in _root){
recorder[i] = _root[j];
i++;
+ }
+
+ // Test what we got in the above step. Tests show that characters were also
got enumerated!
+ // Note: don't use clip names for testing here, the order in enumerating is
not defined.
+ // However, the tests bellow are dependent on enumerating order!
+ // Since recorder[0] and recorder[1] and recorder[2] might not be movieclips.
+ // TODO: find a proper way to test this.
+ xcheck_equals(typeof(recorder[3]), 'movieclip');
+ xcheck_equals(typeof(recorder[4]), 'movieclip');
+ xcheck_equals(typeof(recorder[5]), 'movieclip');
+ xcheck_equals(typeof(recorder[6]), 'movieclip');
+ xcheck_equals(typeof(recorder[7]), 'movieclip');
+ xcheck_equals(typeof(recorder[8]), 'movieclip');
+
+ delete recorder;
}
-// Test what we got in the above step. Tests show that characters were also
got enumerated!
-// Note: don't use clip names for testing here, the order in enumerating is
not defined.
-// However, the tests bellow are dependent on enumerating order!
-// Since recorder[0] and recorder[1] and recorder[2] might not be movieclips.
-// TODO: find a proper way to test this.
-xcheck_equals(typeof(recorder[3]), 'movieclip');
-xcheck_equals(typeof(recorder[4]), 'movieclip');
-xcheck_equals(typeof(recorder[5]), 'movieclip');
-xcheck_equals(typeof(recorder[6]), 'movieclip');
-xcheck_equals(typeof(recorder[7]), 'movieclip');
-xcheck_equals(typeof(recorder[8]), 'movieclip');
+//
+// enumerate properties of an AS object
+//
+{
+ recorder = new Array(10);
+
+ // initialize the recorder
+ for(i=0; i<10; i++){
+ recorder[i] = 0;
+ }
+
+ obj = new Object();
+ obj.x1 = function () {};
+ obj.x2 = obj.x1;
+ obj.x3 = obj.x2;
+
+ i = 0;
+ for (var j in obj){
+ recorder[i] = obj[j];
+ i++;
+ }
+
+ check_equals(typeof(recorder[0]), 'function');
+ check_equals(typeof(recorder[1]), 'function');
+ check_equals(typeof(recorder[2]), 'function');
+
+ delete recorder;
+}
#endif // OUTPUT_VERSION > 5
\ No newline at end of file