[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: |
Fri, 22 Jun 2007 01:16:56 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Zou Lunkai <zoulunkai> 07/06/22 01:16:56
Modified files:
. : ChangeLog
testsuite/actionscript.all: enumerate.as
Log message:
cleanups, tests are not dependent on enumeration order now
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3595&r2=1.3596
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/enumerate.as?cvsroot=gnash&r1=1.2&r2=1.3
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3595
retrieving revision 1.3596
diff -u -b -r1.3595 -r1.3596
--- ChangeLog 21 Jun 2007 23:47:46 -0000 1.3595
+++ ChangeLog 22 Jun 2007 01:16:55 -0000 1.3596
@@ -1,3 +1,8 @@
+2007-06-21 Zou Lunkai <address@hidden>
+
+ * testsuite/actionscript.all/enumerate.as: cleanups, tests are not
+ dependent on enumeration order now.
+
2007-06-22 Markus Gothe <address@hidden>
* libgeometry/Makefile.am: Fixed building issue on Darwin.
Index: testsuite/actionscript.all/enumerate.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/enumerate.as,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- testsuite/actionscript.all/enumerate.as 21 Jun 2007 07:22:28 -0000
1.2
+++ testsuite/actionscript.all/enumerate.as 22 Jun 2007 01:16:56 -0000
1.3
@@ -33,32 +33,28 @@
// Create a recorder and init it.
recorder = new Array(10);
for(i=0; i<10; i++){
- recorder[i] = 0;
+ recorder['mc'+i] = 0;
}
// Create six characters
for(i=0; i<6; i++){
- _root.createEmptyMovieClip("mc"+i, i+1);
+ _root.createEmptyMovieClip('mc'+i, i+1);
}
// Use the recorder to record the enumerated results in _root
i = 0;
for (var j in _root){
- recorder[i] = _root[j];
+ recorder[j.toString()] = _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');
+ xcheck_equals(typeof(recorder['mc0']), 'movieclip');
+ xcheck_equals(typeof(recorder['mc1']), 'movieclip');
+ xcheck_equals(typeof(recorder['mc2']), 'movieclip');
+ xcheck_equals(typeof(recorder['mc3']), 'movieclip');
+ xcheck_equals(typeof(recorder['mc4']), 'movieclip');
+ xcheck_equals(typeof(recorder['mc5']), 'movieclip');
delete recorder;
}
@@ -71,23 +67,24 @@
// initialize the recorder
for(i=0; i<10; i++){
- recorder[i] = 0;
+ recorder['x'+i] = 0;
}
obj = new Object();
obj.x1 = function () {};
- obj.x2 = obj.x1;
- obj.x3 = obj.x2;
+ obj.x2 = 1;
+ obj.x3 = Array();
i = 0;
for (var j in obj){
- recorder[i] = obj[j];
+ // equivalent to recorder[j.toString()] = obj[j.toString()];
+ recorder[j.toString()] = obj[j];
i++;
}
- check_equals(typeof(recorder[0]), 'function');
- check_equals(typeof(recorder[1]), 'function');
- check_equals(typeof(recorder[2]), 'function');
+ check_equals(typeof(recorder['x1']), 'function');
+ check_equals(typeof(recorder['x2']), 'number');
+ check_equals(typeof(recorder['x3']), 'object');
delete recorder;
}