[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Stri...
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Stri... |
Date: |
Sun, 16 Mar 2008 15:51:50 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Benjamin Wolsey <bwy> 08/03/16 15:51:49
Modified files:
. : ChangeLog
testsuite/actionscript.all: String.as
Log message:
* testsuite/actionscript.all/String.as: add test comparing
substring
and String.substr, showing that both are broken.
This was supposed to help me fix substring for non-ascii characters,
but it seems that String.substr needs some attention too...
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5939&r2=1.5940
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/String.as?cvsroot=gnash&r1=1.46&r2=1.47
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5939
retrieving revision 1.5940
diff -u -b -r1.5939 -r1.5940
--- ChangeLog 16 Mar 2008 14:22:49 -0000 1.5939
+++ ChangeLog 16 Mar 2008 15:51:49 -0000 1.5940
@@ -3,6 +3,8 @@
* gui/Player.{h,cpp}: handle an empty url, fix misc-ming.all failures.
Take std::string& instead of const char* - there seems to be no case
in which distinguishing between NULL and empty is useful.
+ * testsuite/actionscript.all/String.as: add test comparing substring
+ and String.substr, showing that both are broken.
2008-03-15 Dossy Shiobara <address@hidden>
Index: testsuite/actionscript.all/String.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/String.as,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- testsuite/actionscript.all/String.as 15 Mar 2008 16:56:31 -0000
1.46
+++ testsuite/actionscript.all/String.as 16 Mar 2008 15:51:49 -0000
1.47
@@ -17,7 +17,7 @@
// Original author: Mike Carlson - June 19th, 2006
-rcsid="$Id: String.as,v 1.46 2008/03/15 16:56:31 strk Exp $";
+rcsid="$Id: String.as,v 1.47 2008/03/16 15:51:49 bwy Exp $";
#include "check.as"
check_equals(typeof(String), 'function');
@@ -492,6 +492,38 @@
setvariable
};
check_equals( b, "f");
+
+teststr = "Heöllo";
+count = 0;
+
+for (i = -5; i < 10; i++)
+{
+ for (j = -5; j < 10; j++)
+ {
+ asm {
+ push "a"
+ push "teststr"
+ getvariable
+ push "i"
+ getvariable
+ push "j" // size is bigger then string length,
+ getvariable
+ // we expect the interpreter to adjust it
+ substring
+ setvariable
+ };
+
+ b = teststr.substr( i >= 1 ? i - 1 : 0, j >= 0 ? j: teststr.length());
+
+ // There are ... tests
+ if (a == b) count++;
+ else note(i + " : " + j + " -- " + a + ":" + b);
+ }
+}
+
+// For SWF5 this because of substr...
+xcheck_equals (count, 225);
+
#endif
//-----------------------------------------------------------
@@ -708,7 +740,7 @@
check_equals(r, "s:");
#if OUTPUT_VERSION < 6
- check_totals(201);
+ check_totals(202);
#else
- check_totals(231);
+ check_totals(232);
#endif