gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash testsuite/actionscript.all/array.as Chang...


From: Sandro Santilli
Subject: [Gnash-commit] gnash testsuite/actionscript.all/array.as Chang...
Date: Wed, 19 Mar 2008 09:23:44 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  08/03/19 09:23:44

Modified files:
        testsuite/actionscript.all: array.as 
        .              : ChangeLog 

Log message:
        Test splice on sparse array

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/array.as?cvsroot=gnash&r1=1.54&r2=1.55
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5972&r2=1.5973

Patches:
Index: testsuite/actionscript.all/array.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/array.as,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- testsuite/actionscript.all/array.as 19 Mar 2008 09:04:36 -0000      1.54
+++ testsuite/actionscript.all/array.as 19 Mar 2008 09:23:43 -0000      1.55
@@ -19,7 +19,7 @@
 // Initial test written by Mike Carlson
 
 
-rcsid="$Id: array.as,v 1.54 2008/03/19 09:04:36 strk Exp $";
+rcsid="$Id: array.as,v 1.55 2008/03/19 09:23:43 strk Exp $";
 #include "check.as"
 
 check_equals(typeof(Array), 'function');
@@ -640,12 +640,25 @@
 check_equals ( ary.length, 4 ); // don't be fooled by toString output !
 check_equals ( spliced.toString(), '2,a,b,10,11,12,8' );
 
-// Finally, ensure the simplest usage cases are correct!
+// Ensure the simplest usage cases are correct!
 spliced = ary.splice(1);
 check_equals ( spliced.toString(), "3,4,5,6");
 spliced = ary.splice(0);
 check_equals ( spliced.toString(), "1,2");
 
+// Splice a sparse array
+ary = new Array(); ary[2] = 1; ary[7] = 7;
+
+check_equals(ary.length, 8);
+count=0; for (var i in ary) count++;
+check_equals(count, 2);
+
+spliced = ary.splice(3, 0); // no op ?
+check_equals(ary.length, 8); // no change in length
+count=0; for (var i in ary) count++;
+xcheck_equals(count, 8); // but fills the gaps !
+
+
 //-------------------------------
 // Test single parameter constructor, and implicitly expanding array
 //-------------------------------
@@ -1282,11 +1295,11 @@
 
 
 #if OUTPUT_VERSION < 6
- check_totals(447);
+ check_totals(451);
 #else
 # if OUTPUT_VERSION < 7
-  check_totals(487);
+  check_totals(491);
 # else
-  check_totals(497);
+  check_totals(501);
 # endif
 #endif

Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5972
retrieving revision 1.5973
diff -u -b -r1.5972 -r1.5973
--- ChangeLog   19 Mar 2008 09:05:55 -0000      1.5972
+++ ChangeLog   19 Mar 2008 09:23:44 -0000      1.5973
@@ -1,3 +1,8 @@
+2008-03-18 Sandro Santilli <address@hidden>
+
+       * testsuite/actionscript.all/array.as:
+         test splice() on a sparse array.
+
 2008-03-19 Benjamin Wolsey <address@hidden>
 
        * gui/gnash.cpp: remove duplicated --verbose in usage, add --version.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]