gnash-commit
[Top][All Lists]
Advanced

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

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


From: Zou Lunkai
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/action_...
Date: Thu, 05 Apr 2007 07:03:43 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Zou Lunkai <zoulunkai>  07/04/05 07:03:43

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: action_execution_order_test6.c 
Added files:
        testsuite/misc-ming.all: reverse_execute_PlaceObject2_test2.c 

Log message:
        a new testcase

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2783&r2=1.2784
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/action_execution_order_test6.c?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/reverse_execute_PlaceObject2_test2.c?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2783
retrieving revision 1.2784
diff -u -b -r1.2783 -r1.2784
--- ChangeLog   5 Apr 2007 01:28:39 -0000       1.2783
+++ ChangeLog   5 Apr 2007 07:03:43 -0000       1.2784
@@ -1,3 +1,12 @@
+2007-04-05 Zou Lunkai <address@hidden>
+
+       * testsuite/misc-ming.all: reverse_execute_PlaceObject2_test2.c
+       another testcase for reverse execution of frame tags. 
+       * testsuite/misc-ming.all/reverse_execute_PlaceObject2_test1.c
+       add notes that reverse execution is likely to be deprecated.
+       * testsuite/misc-ming.all/action_execution_order_test6.c
+       do checks and stop movie at the last frame.
+       
 2007-04-04 Markus Gothe <address@hidden>
 
        * server/asobj/TextFormat.{cpp,h} - Added stub for class TextFormat.

Index: testsuite/misc-ming.all/action_execution_order_test6.c
===================================================================
RCS file: 
/sources/gnash/gnash/testsuite/misc-ming.all/action_execution_order_test6.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- testsuite/misc-ming.all/action_execution_order_test6.c      22 Mar 2007 
08:26:10 -0000      1.2
+++ testsuite/misc-ming.all/action_execution_order_test6.c      5 Apr 2007 
07:03:43 -0000       1.3
@@ -29,7 +29,7 @@
  * 3rd frm of _root:
  *    place mc1 and  mc2;
  * 4th frm of _root:
- *    stop and do checks
+ *    record the order of all triggered events and goto the 10th frame
  * 5th frm of _root
  *    gotoAndPlay(4);
  *    remove mc1 and mc2; 
@@ -41,6 +41,8 @@
  *    remove mc3;
  * 9th frm of _root
  *    gotoAndPlay(5);
+ * 10th frm of _root
+ *    stop and check
  *  
  * expected actions order:
  * At frame2 go forward to frame9:
@@ -184,8 +186,7 @@
     
   SWFMovie_nextFrame(mo); /* 3rd frame */
   
-  xcheck_equals(mo, "_root.x1", "'1+2+3+4+5+6+7+8+9+1+2+4+x+5+xx+'");
-  add_actions(mo, " _root.totals(); stop(); ");
+  add_actions(mo, " if(flag == 1) { _root.check_result = _root.x1; 
gotoAndStop(10); } ");
   SWFMovie_nextFrame(mo); /* 4th frame */
   
   add_actions(mo, " gotoAndPlay(4); ");
@@ -223,9 +224,12 @@
   SWFDisplayItem_remove(it3); 
   SWFMovie_nextFrame(mo); /* 8th frame */
   
-  add_actions(mo, " gotoAndPlay(5); ");
+  add_actions(mo, " gotoAndPlay(5); flag = 1;");
   SWFMovie_nextFrame(mo); /* 9th frame */
   
+  xcheck_equals(mo, "_root.check_result", "'1+2+3+4+5+6+7+8+9+1+2+4+x+5+xx+'");
+  add_actions(mo, " _root.totals(); stop(); ");
+  SWFMovie_nextFrame(mo); /* 10th frame */
   
   //Output movie
   puts("Saving " OUTPUT_FILENAME );

Index: testsuite/misc-ming.all/reverse_execute_PlaceObject2_test2.c
===================================================================
RCS file: testsuite/misc-ming.all/reverse_execute_PlaceObject2_test2.c
diff -N testsuite/misc-ming.all/reverse_execute_PlaceObject2_test2.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/reverse_execute_PlaceObject2_test2.c        5 Apr 
2007 07:03:43 -0000       1.1
@@ -0,0 +1,109 @@
+/*
+ *   Copyright (C) 2005, 2006, 2007 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 2 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
+ *
+ */ 
+
+/*
+ * Zou Lunkai, address@hidden
+ *
+ * This file was intended to test reverse execution of frame tags. 
+ * However, the concept of reverse execution may be deprecated someday.
+ *
+ * frame2: place mc
+ * frame3: move mc
+ * frame4: move mc
+ * frame5: do nothing
+ * frame6: remove mc and goto frame5
+ *
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 6
+#define OUTPUT_FILENAME "reverse_execute_PlaceObject2_test2.swf"
+
+
+int
+main(int argc, char** argv)
+{
+  SWFMovie mo;
+  SWFMovieClip  mc, dejagnuclip;
+  SWFShape  sh;
+
+  const char *srcdir=".";
+  if ( argc>1 ) 
+    srcdir=argv[1];
+  else
+  {
+      fprintf(stderr, "Usage: %s <mediadir>\n", argv[0]);
+      return 1;
+  }
+
+  Ming_init();
+  mo = newSWFMovieWithVersion(OUTPUT_VERSION);
+  SWFMovie_setDimension(mo, 800, 600);
+  SWFMovie_setRate (mo, 12.0);
+
+  dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 0, 
800, 600);
+  SWFMovie_add(mo, (SWFBlock)dejagnuclip);
+  SWFMovie_nextFrame(mo); /* 1st frame */
+
+  
+  mc = newSWFMovieClip();
+  sh = make_fill_square (0, 0, 60, 60, 255, 0, 0, 255, 0, 0);
+  SWFMovieClip_add(mc, (SWFBlock)sh);  
+  SWFMovieClip_nextFrame(mc);//1st frame
+ 
+  /* add mc to _root and name it as "mc" */
+  SWFDisplayItem it;
+  it = SWFMovie_add(mo, (SWFBlock)mc);  
+  SWFDisplayItem_setDepth(it, 10); 
+  SWFDisplayItem_setName(it, "mc"); 
+  check_equals(mo, "_root.mc._x", "0");
+  SWFMovie_nextFrame(mo); /* 2nd frame */
+
+  check_equals(mo, "_root.mc._x", "300");
+  SWFDisplayItem_move(it, 300.0, 300.0);
+  SWFMovie_nextFrame(mo); /* 3rd frame */ 
+
+  check_equals(mo, "_root.mc._x", "900");
+  SWFDisplayItem_move(it, 600.0, 600.0);
+  SWFMovie_nextFrame(mo); /* 4th frame */
+  
+  check_equals(mo, "_root.mc._x", "900");
+  SWFMovie_nextFrame(mo); /* 5th frame */
+  
+  SWFDisplayItem_remove(it);
+  add_actions(mo, " if(stopflag != 1)  gotoAndPlay(5);  stopflag = 1; ");
+  SWFMovie_nextFrame(mo); /* 6th frame */
+
+  //checks 
+  add_actions(mo, " _root.totals(); stop(); ");
+  SWFMovie_nextFrame(mo); /* 7th frame */
+  
+  //Output movie
+  puts("Saving " OUTPUT_FILENAME );
+  SWFMovie_save(mo, OUTPUT_FILENAME);
+
+  return 0;
+}
+
+
+




reply via email to

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