gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog testsuite/misc-mtasc.all/functi...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-mtasc.all/functi...
Date: Tue, 06 Mar 2007 15:29:44 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/03/06 15:29:44

Modified files:
        .              : ChangeLog 
        testsuite/misc-mtasc.all: function.as 

Log message:
                * testsuite/misc-mtasc.all/function.as:
                  Add a (succeeding) test for 'this' pointer being correctly set
                  on ActionCallMethod with *defined* name.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2554&r2=1.2555
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/function.as?cvsroot=gnash&r1=1.5&r2=1.6

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2554
retrieving revision 1.2555
diff -u -b -r1.2554 -r1.2555
--- ChangeLog   6 Mar 2007 15:23:38 -0000       1.2554
+++ ChangeLog   6 Mar 2007 15:29:44 -0000       1.2555
@@ -1,3 +1,9 @@
+2007-03-06 Sandro Santilli <address@hidden>
+
+        * testsuite/misc-mtasc.all/function.as:
+          Add a (succeeding) test for 'this' pointer being correctly set
+         on ActionCallMethod with *defined* name.
+
 2007-03-06 Udo Giacomozzi <address@hidden>
 
        * libgeometry/snappingrange2d.h: do not call combine_ranges() too 

Index: testsuite/misc-mtasc.all/function.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/function.as,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- testsuite/misc-mtasc.all/function.as        6 Mar 2007 15:14:52 -0000       
1.5
+++ testsuite/misc-mtasc.all/function.as        6 Mar 2007 15:29:44 -0000       
1.6
@@ -2,6 +2,13 @@
 
 class Test extends TestClass
 {
+       var x;
+
+       function setX(nx)
+       {
+               this.x = nx;
+       }
+
        function Test()
        {
                _root.check_equals(typeof(super), 'object');
@@ -9,7 +16,12 @@
                // This seems to trigger an ActionCallMethod(undefined, super).
                // It is expected that the VM fetches super.constructor and 
calls
                // that instead.
+               // The *this* pointer should be set by the VM as the current one
+               // at time of ActionCallMethod.
                super();
+
+               // This seems to trigger an ActionCallMethod(myTest, setX).
+               setX(2);
        }
 
        static function main(mc)
@@ -22,5 +34,10 @@
                // This checks that the 'this' pointer is properly set
                // (and shows it's NOT properly set with Gnash)
                
_root.xcheck_equals(typeof(myTest.__proto__.TestClassCtorCalled), 'undefined');
+
+               // This checks that the 'this' pointer is properly set for 
"normal"
+               // ActionCallMethod (see setX(2) in Test ctor)  
+               _root.check_equals(myTest.x, 2);
+               _root.check_equals(typeof(myTest.__proto__.x), 'undefined');
        }
 }




reply via email to

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