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/Make...


From: Zou Lunkai
Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Make...
Date: Fri, 09 May 2008 09:21:55 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Zou Lunkai <zoulunkai>  08/05/09 09:21:55

Modified files:
        .              : ChangeLog 
        testsuite/actionscript.all: Makefile.am 
Added files:
        testsuite/actionscript.all: setProperty.as 

Log message:
        * testsuite/actionscript.all/setProperty.as, Makefile.am: 
          new tests for set/getProperty. Fixing this will fix some swf5 files.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6564&r2=1.6565
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Makefile.am?cvsroot=gnash&r1=1.91&r2=1.92
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/setProperty.as?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6564
retrieving revision 1.6565
diff -u -b -r1.6564 -r1.6565
--- ChangeLog   9 May 2008 07:27:12 -0000       1.6564
+++ ChangeLog   9 May 2008 09:21:51 -0000       1.6565
@@ -1,3 +1,8 @@
+2008-05-09 Zou Lunkai <address@hidden>
+       
+       * testsuite/actionscript.all/setProperty.as, Makefile.am: 
+         new tests for set/getProperty. Fixing this will fix some swf5 files.
+         
 2008-05-09 Sandro Santilli <address@hidden>
 
        * libmedia/Makefile.am: remove other references to libltdl.

Index: testsuite/actionscript.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Makefile.am,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -b -r1.91 -r1.92
--- testsuite/actionscript.all/Makefile.am      7 May 2008 08:03:40 -0000       
1.91
+++ testsuite/actionscript.all/Makefile.am      9 May 2008 09:21:53 -0000       
1.92
@@ -78,6 +78,7 @@
        delete.as               \
        getvariable.as          \
        swap.as                 \
+       setProperty.as \
        targetPath.as           \
        Boolean.as              \
        Camera.as               \

Index: testsuite/actionscript.all/setProperty.as
===================================================================
RCS file: testsuite/actionscript.all/setProperty.as
diff -N testsuite/actionscript.all/setProperty.as
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/actionscript.all/setProperty.as   9 May 2008 09:21:54 -0000       
1.1
@@ -0,0 +1,78 @@
+// 
+//   Copyright (C) 2008 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+// Test case for setProperty/getProperty action opcodes.
+// compile this test case with Ming makeswf, and then
+// execute it like this gnash -1 -r 0 -v out.swf
+
+#include "check.as"
+
+#ifdef MING_SUPPORTS_ASM
+
+//
+// Test getProperty and setProperty
+//
+createSprite = ASnative(901, 0); // MovieClip.prototype.createEmptyMovieClip 
+createSprite("mc1", 10);
+mc1.func = function () {
+    check_equals(this, _root.mc1);
+    check_equals(_root.mc1._xscale, 100);
+    check_equals(_root._xscale, 100);
+    
+    // setProperty("", _xscale, 10);
+    // for SWF6 and above, it's _root._xscale = 10.
+    // for SWF5, it's mc1._xscale = 10;
+    asm{
+        push "", 2, 30
+        setproperty
+    };  
+#if OUTPUT_VERSION == 5
+    // failed by looking into the wrong context.
+    xcheck_equals(_root.mc1._xscale, 30);
+    xcheck_equals(_root._xscale, 100);
+#else
+    // Gnash might be failed due to accuracy problem.
+    // should we be more tolerant here?
+    check_equals(_root.mc1._xscale, 100);
+    check_equals(_root._xscale, 30); 
+#endif
+    _root._xscale = 60;
+    var testvar = 0;
+    // testvar = getProperty("", _xscale);
+    // for SWF6 and above, it's testvar = _root._xscale;
+    // for SWF5, it's testvar = mc1._xscale;
+    asm{
+        push "testvar"
+        push "", 2
+        getproperty
+        setvariable
+    };
+#if OUTPUT_VERSION == 5
+    xcheck_equals(testvar, 30);
+#else
+    // Gnash might be failed due to accuracy problem.
+    // should we be more tolerant here?
+    check_equals(testvar, 60);
+#endif
+};
+mc1.func();
+
+check_totals(7); 
+stop();
+
+#endif //MING_SUPPORTS_ASM
+




reply via email to

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