[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: |
Wed, 06 Feb 2008 11:27:33 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Benjamin Wolsey <bwy> 08/02/06 11:27:33
Modified files:
. : ChangeLog
testsuite/actionscript.all: String.as
Log message:
Test for chr and ord, especially with special chars.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5568&r2=1.5569
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/String.as?cvsroot=gnash&r1=1.37&r2=1.38
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5568
retrieving revision 1.5569
diff -u -b -r1.5568 -r1.5569
--- ChangeLog 6 Feb 2008 10:18:30 -0000 1.5568
+++ ChangeLog 6 Feb 2008 11:27:32 -0000 1.5569
@@ -1,3 +1,8 @@
+2008-02-06 Benjamin Wolsey <address@hidden>
+
+ * testsuite/actionscript.all/String.as: tests for chr() and
+ ord().
+
2008-02-06 Sandro Santilli <address@hidden>
* libbase/string_table.cpp (insert_group): only lowercase
Index: testsuite/actionscript.all/String.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/String.as,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- testsuite/actionscript.all/String.as 5 Feb 2008 15:58:48 -0000
1.37
+++ testsuite/actionscript.all/String.as 6 Feb 2008 11:27:33 -0000
1.38
@@ -16,7 +16,7 @@
// Original author: Mike Carlson - June 19th, 2006
-rcsid="$Id: String.as,v 1.37 2008/02/05 15:58:48 bwy Exp $";
+rcsid="$Id: String.as,v 1.38 2008/02/06 11:27:33 bwy Exp $";
#include "check.as"
@@ -281,10 +281,39 @@
var b = new String("1234");
check_equals ( b.substring(3, 6), "4");
+
+//-------------------------------------------
+// Chr and ord
+//-------------------------------------------
+
+check_equals (chr(0), "");
+check_equals (chr(65), "A");
+check_equals (ord("A"), 65);
+check_equals (ord(""), 0);
+
+// Chars greater than 128
+#if OUTPUT_VERSION > 5
+xcheck_equals (chr(246), "ö");
+xcheck_equals (chr(486), "Ǧ");
+trace ("Ǧ");
+trace(chr(486));
+xcheck_equals (chr(998), "Ϧ");
+xcheck_equals (ord("ö"), 246);
+xcheck_equals (ord("Ϧ"), 998);
+#else // version <= 5
+xcheck_equals (chr(486), "æ");
+xcheck_equals (chr(865), "a");
+xcheck_equals (ord("ö"), 195);
+xcheck_equals (ord("Ã"), 195);
+xcheck_equals (ord("ǵ"), 199);
+xcheck_equals (ord("Ϧ"), 207);
+#endif
+
#if OUTPUT_VERSION > 5
//-------------------------------------------
-// Check multi-byte chars with all functions
+// Check multi-byte chars with all string
+// functions
//-------------------------------------------
// These tests are only correct with SWF6 and above.
@@ -500,7 +529,7 @@
check_equals(r, "s:");
#if OUTPUT_VERSION < 6
- check_totals(175);
+ check_totals(185);
#else
- check_totals(209);
+ check_totals(218);
#endif