[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Stri...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Stri... |
Date: |
Wed, 28 Feb 2007 09:56:41 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/02/28 09:56:40
Modified files:
. : ChangeLog
testsuite/actionscript.all: String.as
Log message:
* testsuite/actionscript.all/String.as: add
test for read-only nature of 'length' property;
fix test for SWF5 target.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2491&r2=1.2492
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/String.as?cvsroot=gnash&r1=1.10&r2=1.11
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2491
retrieving revision 1.2492
diff -u -b -r1.2491 -r1.2492
--- ChangeLog 28 Feb 2007 09:46:48 -0000 1.2491
+++ ChangeLog 28 Feb 2007 09:56:40 -0000 1.2492
@@ -1,5 +1,11 @@
2007-02-28 Sandro Santilli <address@hidden>
+ * testsuite/actionscript.all/String.as: add
+ test for read-only nature of 'length' property;
+ fix test for SWF5 target.
+
+2007-02-28 Sandro Santilli <address@hidden>
+
* server/swf.h: add reference to ActionConstantPool
description
* server/parser/action_buffer.h (read_int16):
Index: testsuite/actionscript.all/String.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/String.as,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- testsuite/actionscript.all/String.as 2 Jan 2007 15:43:42 -0000
1.10
+++ testsuite/actionscript.all/String.as 28 Feb 2007 09:56:40 -0000
1.11
@@ -1,7 +1,7 @@
// Mike Carlson's test program for actionscript strings
// June 19th, 2006
-rcsid="$Id: String.as,v 1.10 2007/01/02 15:43:42 strk Exp $";
+rcsid="$Id: String.as,v 1.11 2007/02/28 09:56:40 strk Exp $";
#include "check.as"
@@ -25,12 +25,21 @@
check_equals ( a.split()[0], "wallawallawashinGTON" );
check_equals ( a.split().length, 1 );
check ( a.split() instanceof Array );
+#if OUTPUT_VERSION > 5
check_equals ( a.split("")[0], "w" );
check_equals ( a.split("")[19], "N" );
check_equals ( a.split("la")[0], "wal" );
check_equals ( a.split("la")[1], "wal" );
check_equals ( a.split("la")[2], "washinGTON" );
check_equals ( a.split("la").length, 3 );
+#else
+xcheck_equals ( a.split("")[0], "wallawallawashinGTON" );
+xcheck_equals ( a.split("")[19], undefined );
+xcheck_equals ( a.split("la")[0], "wallawallawashinGTON" );
+xcheck_equals ( a.split("la")[1], undefined );
+xcheck_equals ( a.split("la")[2], undefined );
+xcheck_equals ( a.split("la").length, 1 );
+#endif
// This is the correct usage pattern
@@ -106,7 +115,7 @@
var stringInstance = new String();
check (stringInstance.__proto__ != undefined);
check (stringInstance.__proto__ == String.prototype);
-check (String.prototype.constructor != undefined);
+check_equals (typeOf(String.prototype.constructor), 'function');
check (String.prototype.constructor == String);
check (stringInstance.__proto__.constructor == String);
@@ -129,3 +138,10 @@
check_equals (a_string.indexOf("hing"), -1 );
check_equals (a_string.indexOf("string"), 2 );
check_equals (a_string.charCodeAt(0), 97 );
+
+// Test String.length not being overridable
+a_string = "1234567890";
+check_equals(a_string.length, 10);
+a_string.length = 4;
+check_equals(a_string.length, 10);
+check_equals(a_string, "1234567890");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Stri...,
Sandro Santilli <=