[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ./ChangeLog testsuite/actionscript.all/ar...
From: |
strk |
Subject: |
[Gnash-commit] gnash ./ChangeLog testsuite/actionscript.all/ar... |
Date: |
Thu, 27 Apr 2006 09:37:00 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch:
Changes by: strk <address@hidden> 06/04/27 09:37:00
Modified files:
. : ChangeLog
testsuite/actionscript.all: array.as
Log message:
completed switch to check_equals() macro
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/ChangeLog.diff?tr1=1.242&tr2=1.243&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/testsuite/actionscript.all/array.as.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: gnash/ChangeLog
diff -u gnash/ChangeLog:1.242 gnash/ChangeLog:1.243
--- gnash/ChangeLog:1.242 Thu Apr 27 08:55:14 2006
+++ gnash/ChangeLog Thu Apr 27 09:37:00 2006
@@ -1,7 +1,8 @@
2006-04-27 Sandro Santilli <address@hidden>
* testsuite/actionscript.all/array.as: turned length()
- method calls to length data member accesses.
+ method calls to length data member accesses, completed
+ switch to check_equals() macro usage.
* server/: (Function.h, Function.cpp): added new constructor
taking exported interface as argument.
* server/: (System.cpp, System.h, Global.cpp): added System
Index: gnash/testsuite/actionscript.all/array.as
diff -u gnash/testsuite/actionscript.all/array.as:1.4
gnash/testsuite/actionscript.all/array.as:1.5
--- gnash/testsuite/actionscript.all/array.as:1.4 Thu Apr 27 07:27:25 2006
+++ gnash/testsuite/actionscript.all/array.as Thu Apr 27 09:37:00 2006
@@ -20,46 +20,46 @@
check_equals ( a.length, 3 );
check_equals ( a[2], 12 );
-check ( a.pop() == 12 );
-check ( a[2] == undefined );
-check ( a[1] == "asdf" );
+check_equals ( a.pop() , 12 );
+check_equals ( a[2] , undefined );
+check_equals ( a[1] , "asdf" );
a[1] = a[0];
-check ( a[1] == 551 );
+check_equals ( a[1] , 551 );
a[0] = 200;
-check ( a[0] == 200 );
-check ( a.tostring() == "200,551");
+check_equals ( a[0] , 200 );
+check_equals ( a.tostring() , "200,551");
a.push(7,8,9);
check_equals ( a.length, 5);
-check ( a[100] == undefined );
-check ( a[5] == undefined );
-check ( a[4] == 9 );
-check ( a.join() == "200,551,7,8,9" );
+check_equals ( a[100] , undefined );
+check_equals ( a[5] , undefined );
+check_equals ( a[4] , 9 );
+check_equals ( a.join() , "200,551,7,8,9" );
a.reverse();
-check ( a.join() == "9,8,7,551,200" );
-check ( a.join("test") == "9test8test7test551test200" );
+check_equals ( a.join() , "9,8,7,551,200" );
+check_equals ( a.join("test") , "9test8test7test551test200" );
// Test one of our sorting type members
-check ( Array.CASEINSENSITIVE == 1 );
-check ( Array.DESCENDING == 2 );
-check ( Array.UNIQUESORT == 4 );
-check ( Array.RETURNINDEXEDARRAY == 8 );
-check ( Array.NUMERIC == 16 );
+check_equals ( Array.CASEINSENSITIVE , 1 );
+check_equals ( Array.DESCENDING , 2 );
+check_equals ( Array.UNIQUESORT , 4 );
+check_equals ( Array.RETURNINDEXEDARRAY , 8 );
+check_equals ( Array.NUMERIC , 16 );
// Check sort functions
a.sort();
check_equals ( a.tostring(), "200,551,7,8,9" );
a.push(200,7,200,7,200,8,8,551,7,7);
a.sort( Array.NUMERIC );
-check ( a.tostring() == "7,7,7,7,7,8,8,8,9,200,200,200,200,551,551" );
+check_equals ( a.tostring() , "7,7,7,7,7,8,8,8,9,200,200,200,200,551,551" );
a.sort( Array.UNIQUESORT | Array.DESCENDING | Array.NUMERIC);
check_equals ( a.tostring() , "551,200,9,8,7" );
// Test multi-parameter constructor, and keep testing sort cases
var trysortarray = new Array("But", "alphabet", "Different", "capitalization");
trysortarray.sort( Array.CASEINSENSITIVE );
-check ( trysortarray.tostring() == "alphabet,But,capitalization,Different");
+check_equals ( trysortarray.tostring() ,
"alphabet,But,capitalization,Different");
trysortarray.sort();
-check ( trysortarray.tostring() == "But,Different,alphabet,capitalization" );
+check_equals ( trysortarray.tostring() ,
"But,Different,alphabet,capitalization" );
// TODO - test sort(Array.RETURNINDEXEDARRAY)
check ( b.pop() == 12 );
@@ -73,14 +73,14 @@
b.push(4,3);
b.pop();
b.shift();
-check ( b.tostring() == "2,4" );
+check_equals ( b.tostring() , "2,4" );
b.shift();
b.pop();
-check ( b.tostring() == "" );
+check_equals ( b.tostring() , "" );
// check reverse for empty case
b.reverse();
-check ( b.tostring() == "" );
+check_equals ( b.tostring() , "" );
// check concat, slice
var bclone = b.concat();
@@ -88,29 +88,32 @@
check_equals ( b.length, 0 );
var basic = b.concat(0,1,2);
var concatted = basic.concat(3,4,5,6);
-check ( concatted.join() == "0,1,2,3,4,5,6" );
-check ( concatted[4] == 4 );
-check ( basic.tostring() == "0,1,2" );
+check_equals ( concatted.join() , "0,1,2,3,4,5,6" );
+check_equals ( concatted[4] , 4 );
+check_equals ( basic.tostring() , "0,1,2" );
var portion = concatted.slice( 2,-2 );
-check ( portion.tostring() == "2,3,4" );
+check_equals ( portion.tostring() , "2,3,4" );
portion = portion.slice(1);
-check ( portion.tostring() == "3,4" );
+check_equals ( portion.tostring() , "3,4" );
portion = portion.slice(1, 2);
-check ( portion.tostring() == "4" );
+check_equals ( portion.tostring() , "4" );
check_equals ( portion.length, 1);
// Test single parameter constructor, and implicitly expanding array
var c = new Array(10);
check_equals ( typeof(c), "object" );
check_equals ( c.length, 10 );
-check ( c[5] == undefined );
+check_equals ( c[5] , undefined );
c[1000] = 283;
-check ( c[1000] == 283 );
-check ( c[1001] == undefined );
-check ( c[999] == undefined );
+check_equals ( c[1000] , 283 );
+check_equals ( c[1001] , undefined );
+check_equals ( c[999] , undefined );
check_equals ( c.length, 1001 );
// $Log: array.as,v $
+// Revision 1.5 2006/04/27 09:37:00 strk
+// completed switch to check_equals() macro
+//
// Revision 1.4 2006/04/27 07:27:25 strk
// * testsuite/actionscript.all/array.as: turned length()
// method calls to length data member accesses.