gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/case.as


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/case.as
Date: Wed, 06 Feb 2008 10:15:07 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  08/02/06 10:15:07

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

Log message:
        add tests showing that the current case-insensitive string_table 
comparison
        is conceptually bogus (and probably the whole global string_table is).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5566&r2=1.5567
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/case.as?cvsroot=gnash&r1=1.16&r2=1.17

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5566
retrieving revision 1.5567
diff -u -b -r1.5566 -r1.5567
--- ChangeLog   6 Feb 2008 10:04:55 -0000       1.5566
+++ ChangeLog   6 Feb 2008 10:15:06 -0000       1.5567
@@ -1,5 +1,12 @@
 2008-02-06 Sandro Santilli <address@hidden>
 
+       * testsuite/actionscript.all/case.as: add tests showing that
+         the current case-insensitive string_table comparison is
+         conceptually bogus (and probably the whole global string_table
+         is).
+
+2008-02-06 Sandro Santilli <address@hidden>
+
        * testsuite/actionscript.all/case.as: use case-sensitive sorting
          for predictable results (case-insensitive depends on unspecified
          order of properties).

Index: testsuite/actionscript.all/case.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/case.as,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- testsuite/actionscript.all/case.as  6 Feb 2008 10:04:55 -0000       1.16
+++ testsuite/actionscript.all/case.as  6 Feb 2008 10:15:07 -0000       1.17
@@ -22,7 +22,7 @@
  *  Test case sensitivity 
  */
 
-rcsid="$Id: case.as,v 1.16 2008/02/06 10:04:55 strk Exp $";
+rcsid="$Id: case.as,v 1.17 2008/02/06 10:15:07 strk Exp $";
 
 #include "check.as"
 
@@ -265,4 +265,44 @@
     check_equals(propRecorder[2], 'b')
 #endif 
 
-totals();
+// Now create a new object, with lowercase A and uppercase B
+// Gnash will fail as long as it uses a single string_table
+// for the whole objects set
+obj = { a: 1, B: 2 };
+#if OUTPUT_VERSION > 5
+ check(obj.hasOwnProperty('a'));
+ #if OUTPUT_VERSION == 6
+  check(obj.hasOwnProperty('A')); 
+ #else
+  check(!obj.hasOwnProperty('A')); 
+ #endif
+#endif
+propRecorder = new Array();
+for(var prop in obj)
+{
+   propRecorder.push(prop);
+}
+propRecorder.sort();
+check_equals(propRecorder.length, 2);
+#if OUTPUT_VERSION < 7
+ // gnash fails here because 'B' will point to a previously used 'b'
+ // and 'a' will point to a previously used 'A'
+ // in the global string_table
+ xcheck_equals(propRecorder[0], 'B');
+ xcheck_equals(propRecorder[1], 'a');
+#else
+ // The problem above is a non-issue in SWF7 or higher, as 'b' and
+ // 'B' will be separate entries in the string_table
+ check_equals(propRecorder[0], 'B');
+ check_equals(propRecorder[1], 'a');
+#endif
+
+#if OUTPUT_VERSION <= 5
+ check_totals(23);
+#endif
+#if OUTPUT_VERSION == 6
+ check_totals(48);
+#endif
+#if OUTPUT_VERSION >= 7
+ check_totals(44);
+#endif




reply via email to

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