gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash/testsuite misc-ming.all/registerClassTest...


From: Zou Lunkai
Subject: [Gnash-commit] gnash/testsuite misc-ming.all/registerClassTest...
Date: Fri, 16 Nov 2007 08:56:18 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Zou Lunkai <zoulunkai>  07/11/16 08:56:18

Modified files:
        testsuite/misc-ming.all: registerClassTest2.c 
        testsuite/misc-swfc.all: movieclip_destruction_test1.sc 
                                 opcode_guard_test2.sc 

Log message:
        * testsuite/misc-ming.all/registerClassTest2.c: adjust the source order 
to match the final tags order, avoid confusion, no logic changes.
        * testsuite/misc-swfc.all/movieclip_destruction_test1.sc: cleanups, 
indent, no logic changes.
        * testsuite/misc-swfc.all/opcode_guard_test2.sc: add a few tests about 
setTarget('/'), passed.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/registerClassTest2.c?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-swfc.all/movieclip_destruction_test1.sc?cvsroot=gnash&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-swfc.all/opcode_guard_test2.sc?cvsroot=gnash&r1=1.11&r2=1.12

Patches:
Index: misc-ming.all/registerClassTest2.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/registerClassTest2.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- misc-ming.all/registerClassTest2.c  9 Nov 2007 10:34:22 -0000       1.9
+++ misc-ming.all/registerClassTest2.c  16 Nov 2007 08:56:17 -0000      1.10
@@ -154,6 +154,17 @@
   // Export mc3
   addExport(mo, mc3, "libItem3");  
   
+  add_actions(mo, "totals(21); stop();");
+   
+  // add init actions for mc3
+  add_clip_init_actions(mc3, " _root.note('mc3.initactions'); "
+                             " theClass3 = function () {}; "
+                             " theClass3.prototype = new MovieClip(); "
+                             " Object.registerClass('libItem3', theClass3); "
+                             " _root.attachMovie('libItem3', 'clip3', 30); "
+                             // clip3.__proto__ is initialized before 
executing onClipConstruct
+                             "_root.check_equals(clip3.__proto__, 
_root.theClass3.prototype); ");
+                             
   it3 = SWFMovie_add(mo, mc3);
   SWFDisplayItem_addAction(it3,
     newSWFAction(" _root.note('mc3.onClipInitialize'); " 
@@ -170,18 +181,7 @@
                 ),
     SWFACTION_CONSTRUCT);
 
-  // add init actions for mc3
-  add_clip_init_actions(mc3, " _root.note('mc3.initactions'); "
-                             " theClass3 = function () {}; "
-                             " theClass3.prototype = new MovieClip(); "
-                             " Object.registerClass('libItem3', theClass3); "
-                             " _root.attachMovie('libItem3', 'clip3', 30); "
-                             // clip3.__proto__ is initialized before 
executing onClipConstruct
-                             "_root.check_equals(clip3.__proto__, 
_root.theClass3.prototype); ");
- 
-  
-  add_actions(mo, "totals(21); stop();");
-  SWFMovie_nextFrame(mo); /* end of frame4 */
+  SWFMovie_nextFrame(mo); /* end of frame3 */
      
  /*****************************************************
   *

Index: misc-swfc.all/movieclip_destruction_test1.sc
===================================================================
RCS file: 
/sources/gnash/gnash/testsuite/misc-swfc.all/movieclip_destruction_test1.sc,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- misc-swfc.all/movieclip_destruction_test1.sc        15 Nov 2007 16:57:24 
-0000      1.29
+++ misc-swfc.all/movieclip_destruction_test1.sc        16 Nov 2007 08:56:17 
-0000      1.30
@@ -91,14 +91,6 @@
     check_equals(mc1.getDepth(), -16383);
   .end
 
-// No matter onUnload defined or not, the above actions still got skipped.
-//#define DEFINE_ONUNLOAD
-#ifdef DEFINE_ONUNLOAD
-  .action:
-    // Define onUnload(for deduction)
-     mc1.onUnload = function () {};
-  .end
-#endif
 
 .frame 3 
        .action: note("root.frame3 (before definesprite)");

Index: misc-swfc.all/opcode_guard_test2.sc
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-swfc.all/opcode_guard_test2.sc,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- misc-swfc.all/opcode_guard_test2.sc 25 Oct 2007 09:14:08 -0000      1.11
+++ misc-swfc.all/opcode_guard_test2.sc 16 Nov 2007 08:56:18 -0000      1.12
@@ -19,7 +19,7 @@
 /*
  *  Zou Lunkai, address@hidden
  * 
- *  test setTarget.
+ *  test opcode guard and setTarget
  */
 
 
@@ -61,7 +61,7 @@
     _root.check_equals(typeof(_root.dup1), 'movieclip');
     _root.check_equals(typeof(_root.dup2), 'movieclip');
     
-    dup1.testVar = 'dup1_var'; // <<-----------------------------
+    dup1.testVar = 'dup1_var'; // 
     setTarget('dup1');
       removeMovieClip(_root.dup1);
       // seems Gnash discarded the following 2 tests, caused by opcode guard 
with
@@ -78,7 +78,7 @@
       _root.check_equals(testVar, undefined);
     }
 
-    dup3.testVar = 'dup3_var'; // <<-----------------------------
+    dup3.testVar = 'dup3_var'; // 
     setTarget('dup3');
       removeMovieClip(_root.dup3);
       // dup3 is unloaded but not destroyed
@@ -179,12 +179,31 @@
   .end
   
   
+//
+// separate tests for setTarget('/')
+//
+.frame 13
+    .sprite mc6
+        .action:
+            setTarget('/');
+                _root.check_equals(_target, "/");
+                gotoAndPlay(15);
+            setTarget('');
+        .end
+    .end
+       .put mc6
+       
+.frame 14
+    .action:
+        _root.check(false); // shoudn't executed!
+    .end
+    
 .frame 15
  
   .action:
     stop();
     // Gnash failed on totals() by discarding some checks.
-    xtotals(19);
+    xtotals(20);
   .end
   
 .end  // file end




reply via email to

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