[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/testsuite/actionscript.all with.as
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash/testsuite/actionscript.all with.as |
Date: |
Thu, 11 Oct 2007 23:00:27 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/10/11 23:00:27
Modified files:
testsuite/actionscript.all: with.as
Log message:
Another test for path resolution in with context
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/with.as?cvsroot=gnash&r1=1.24&r2=1.25
Patches:
Index: with.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/with.as,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- with.as 11 Oct 2007 22:47:45 -0000 1.24
+++ with.as 11 Oct 2007 23:00:27 -0000 1.25
@@ -21,7 +21,7 @@
// compile this test case with Ming makeswf, and then
// execute it like this gnash -1 -r 0 -v out.swf
-rcsid="$Id: with.as,v 1.24 2007/10/11 22:47:45 strk Exp $";
+rcsid="$Id: with.as,v 1.25 2007/10/11 23:00:27 strk Exp $";
#include "check.as"
@@ -344,6 +344,24 @@
// (o.b does not exist)
check_equals(b, 6);
+ // Members named 'x.y' won't be seeked for in with stack
elements
+ asm {
+ push 'checkpoint'
+ push 'g.h'
+ getvariable
+ setvariable
+ };
+ check_equals(typeof(checkpoint), "undefined");
+
+ // Path like 'x.y' will be looked for in with stack elements
+ asm {
+ push 'checkpoint'
+ push 'i.j'
+ getvariable
+ setvariable
+ };
+ check_equals(checkpoint, "o.i.j");
+
//// SETTING VARIABLES
// with stack takes precedence over locals:
@@ -383,6 +401,9 @@
o.a = 4;
o.e = "o.e";
o.f = "o.f";
+o['g.h'] = "o.g.h";
+o.i = new Object;
+o.i.j = "o.i.j";
a = 120;
b = 5;
testWith();
@@ -390,6 +411,14 @@
check_equals(typeof(o.d), 'undefined');
check_equals(o.e, 'with o');
xcheck_equals(o.f, 'with o'); // gnash fails by giving precedence to locals
when setting the variable in 'with' context
+asm {
+ push 'checkpoint'
+ push 'o.g.h'
+ getvariable
+ setvariable
+};
+check_equals(typeof(checkpoint), "undefined");
+
newFunc();
//---------------------------------------------------------
@@ -397,7 +426,7 @@
//---------------------------------------------------------
#if OUTPUT_VERSION < 6
- check_totals(38);
+ check_totals(41);
#else
- check_totals(67);
+ check_totals(70);
#endif
- [Gnash-commit] gnash/testsuite/actionscript.all with.as, Sandro Santilli, 2007/10/11
- [Gnash-commit] gnash/testsuite/actionscript.all with.as, Sandro Santilli, 2007/10/11
- [Gnash-commit] gnash/testsuite/actionscript.all with.as,
Sandro Santilli <=
- [Gnash-commit] gnash/testsuite/actionscript.all with.as, Sandro Santilli, 2007/10/11
- [Gnash-commit] gnash/testsuite/actionscript.all with.as, Sandro Santilli, 2007/10/23
- [Gnash-commit] gnash/testsuite/actionscript.all with.as, Sandro Santilli, 2007/10/23
- [Gnash-commit] gnash/testsuite/actionscript.all with.as, Sandro Santilli, 2007/10/26