[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Movi...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Movi... |
Date: |
Fri, 24 Aug 2007 15:05:23 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/08/24 15:05:23
Modified files:
. : ChangeLog
testsuite/actionscript.all: MovieClip.as
Log message:
* testsuite/actionscript.all/MovieClip.as: more test for
soft references.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4096&r2=1.4097
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/MovieClip.as?cvsroot=gnash&r1=1.82&r2=1.83
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4096
retrieving revision 1.4097
diff -u -b -r1.4096 -r1.4097
--- ChangeLog 24 Aug 2007 13:55:07 -0000 1.4096
+++ ChangeLog 24 Aug 2007 15:05:22 -0000 1.4097
@@ -1,5 +1,7 @@
2007-08-24 Sandro Santilli <address@hidden>
+ * testsuite/actionscript.all/MovieClip.as: more test for
+ soft references.
* server/as_value.cpp: fix build when MOVIECLIP_AS_SOFTREF is
undefined.
* server/swf/PlaceObject2Tag.cpp (loader): remove unused variable.
Index: testsuite/actionscript.all/MovieClip.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/MovieClip.as,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -b -r1.82 -r1.83
--- testsuite/actionscript.all/MovieClip.as 24 Aug 2007 13:52:24 -0000
1.82
+++ testsuite/actionscript.all/MovieClip.as 24 Aug 2007 15:05:23 -0000
1.83
@@ -20,7 +20,7 @@
// compile this test case with Ming makeswf, and then
// execute it like this gnash -1 -r 0 -v out.swf
-rcsid="$Id: MovieClip.as,v 1.82 2007/08/24 13:52:24 strk Exp $";
+rcsid="$Id: MovieClip.as,v 1.83 2007/08/24 15:05:23 strk Exp $";
#include "check.as"
@@ -437,11 +437,32 @@
check_equals(typeof(softref), 'movieclip');
check_equals(typeof(softref.member), 'undefined');
check_equals(typeof(softref._target), 'undefined');
-_root.createEmptyMovieClip("hardref", 61);
+hardref = 4;
+check_equals(typeof(softref), 'movieclip'); // hardref doesn't hide this
+// Delete is needed, or further inspection functions will hit the variable
before the character
+delete hardref;
+sr61 = _root.createEmptyMovieClip("hardref", 61);
hardref.member = 2;
check_equals(typeof(softref.member), 'number');
check_equals(softref.member, 2);
+// Two movieclips can have the same name
+sr62 = _root.createEmptyMovieClip("hardref", 62);
+// Still, soft references correctly point each to
+// it's distinct clip !
+sr61.member = 6;
+check_equals(sr61.member, 6);
+xcheck_equals(typeof(sr62.member), 'undefined');
+check_equals(sr61._name, "hardref");
+check_equals(sr62._name, "hardref");
+
+// When getting a member by name, the one with lowest
+// depth comes up first
+check_equals(hardref.member, 6); // depth 61 < 62
+sr60 = _root.createEmptyMovieClip("hardref", 60);
+sr60.member = 60;
+check_equals(hardref.member, 60); // depth 60 < 61 < 62
+
#endif // OUTPUT_VERSION >= 6
//----------------------------------------------