CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/10/05 22:27:57
Modified files: . : ChangeLog testsuite/actionscript.all: String.as Log message: * testsuite/actionscript.all/String.as: couple more tests for String.indexOf (lots more needed!). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4547&r2=1.4548 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/String.as?cvsroot=gnash&r1=1.23&r2=1.24 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4547 retrieving revision 1.4548 diff -u -b -r1.4547 -r1.4548 --- ChangeLog 5 Oct 2007 22:17:53 -0000 1.4547 +++ ChangeLog 5 Oct 2007 22:27:57 -0000 1.4548 @@ -1,5 +1,7 @@ 2007-10-05 Sandro Santilli <[EMAIL PROTECTED]> + * testsuite/actionscript.all/String.as: couple more tests for + String.indexOf (lots more needed!). * server/asobj/AsBroadcaster.{cpp,h} (initialize): query addListener and removeListener methods from the global AsBroadcaster, using any overridden member (shown Index: testsuite/actionscript.all/String.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/String.as,v retrieving revision 1.23 retrieving revision 1.24 diff -u -b -r1.23 -r1.24 --- testsuite/actionscript.all/String.as 29 Sep 2007 16:22:58 -0000 1.23 +++ testsuite/actionscript.all/String.as 5 Oct 2007 22:27:57 -0000 1.24 @@ -16,7 +16,7 @@ // Original author: Mike Carlson - June 19th, 2006 -rcsid="$Id: String.as,v 1.23 2007/09/29 16:22:58 strk Exp $"; +rcsid="$Id: String.as,v 1.24 2007/10/05 22:27:57 strk Exp $"; #include "check.as" @@ -36,9 +36,17 @@ isNaN (a.charAt(21) ); check_equals ( a.indexOf("lawa"), 3 ); check_equals ( a.lastIndexOf("lawa"), 8); + +//---------------------------------------- +// Check String.indexOf +//----------------------------------------- + check_equals ( a.indexOf("lawas"), 8 ); check_equals ( a.indexOf("hinG"), 13 ); check_equals ( a.indexOf("hing"), -1 ); +check_equals ( a.indexOf("lawas", -1), 8 ); +check_equals ( a.indexOf("a", 2), 4 ); +//TODO: add many more tests with a second argument to indexOf ! //---------------------------------------- // Check String.split _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit