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


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/timelin...
Date: Mon, 18 Dec 2006 09:36:59 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/12/18 09:36:58

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: timeline_var_test.c 

Log message:
                * testsuite/misc-ming.all/timeline_var_test.c: turn into
                  a self-contained test (still not Dejagnu.swf based).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1957&r2=1.1958
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/timeline_var_test.c?cvsroot=gnash&r1=1.1&r2=1.2

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1957
retrieving revision 1.1958
diff -u -b -r1.1957 -r1.1958
--- ChangeLog   18 Dec 2006 09:31:25 -0000      1.1957
+++ ChangeLog   18 Dec 2006 09:36:58 -0000      1.1958
@@ -1,5 +1,7 @@
 2006-12-18 Sandro Santilli <address@hidden>
 
+       * testsuite/misc-ming.all/timeline_var_test.c: turn into
+         a self-contained test (still not Dejagnu.swf based).
        * utilities/processor.cpp: allow 10 loop backs before
          kicking to one-after latest frame processed.
        * utilities/Makefile.am, testsuite/server/Makefile.am:

Index: testsuite/misc-ming.all/timeline_var_test.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/timeline_var_test.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/misc-ming.all/timeline_var_test.c 15 Dec 2006 16:48:57 -0000      
1.1
+++ testsuite/misc-ming.all/timeline_var_test.c 18 Dec 2006 09:36:58 -0000      
1.2
@@ -20,60 +20,92 @@
  *
  ***********************************************************************
  * zoulunkai,  address@hidden
- * Test case for variable defined in main timeline:
+ * Test case for variable defined in main timeline;
+ *
+ * Movie has 4 frames defined as FRAME_COUNT;
  ***********************************************************************/
 
 
 #include <stdio.h>
 #include <ming.h>
 
-#define OUTPUT_FILENAME "timeline_var_test.swf"
 
+#define OUTPUT_FILENAME "timeline_var_test.swf"
+const int  FRAME_COUNT  = 4;
 
 SWFAction  action_in_frame1()
 {
        SWFAction ac;
-       ac = compileSWFActionCode( "trace(var_at_frame2);" );
+  ac = compileSWFActionCode(" \
+      loop_back = 0; \
+  ");
        return ac;
 }
 
+
 SWFAction  action_in_frame2()
 {
        SWFAction ac;
-       ac = compileSWFActionCode( "var var_at_frame2 = 
\"var_defined_at_frame2\";" );
+  ac = compileSWFActionCode(" \
+     if(loop_back == 0) \
+     { \
+        if ( var_at_frame3 == undefined ) \
+            trace(\"PASSED: var_at_frame3 == undefined \" ); \
+        else \
+            trace(\"FAILED: var_at_frame3 == undefined \" ); \
+     } \
+     else \
+     { \
+         if ( var_at_frame3 == \"var_defined_at_frame3\" ) \
+             trace(\"XPASSED: var_at_frame3 == var_defined_at_frame3\" ); \
+         else \
+             trace(\"XFAILED: var_at_frame3 == var_defined_at_frame3\" ); \
+     } \
+  ");
        return ac;
 }
 
 SWFAction  action_in_frame3()
 {
        SWFAction ac;
-       ac = compileSWFActionCode( "gotoAndStop(1);" );
+  ac = compileSWFActionCode(" \
+      var var_at_frame3 = \"var_defined_at_frame3\"; \
+  ");
        return ac;
 }
 
-int main()
+SWFAction  action_in_frame4()
 {
-       SWFMovie  movie;
        SWFAction ac;
+  ac = compileSWFActionCode(" \
+    if ( ++loop_back < 2 ) gotoAndPlay(2); \
+  " );
+  return ac;
+}
 
 
+int main()
+{
+  SWFMovie  movie;
+  SWFAction ac[FRAME_COUNT];
+  int i;
+
        Ming_init();
        movie = newSWFMovie();
 
        // Add frame ActionScipts to frames
-       ac = action_in_frame1();
-       SWFMovie_add(movie, (SWFBlock)ac);
-       SWFMovie_nextFrame(movie); 
-       
-       ac = action_in_frame2();
-       SWFMovie_add(movie, (SWFBlock)ac);
-       SWFMovie_nextFrame(movie); 
-       
-       ac = action_in_frame3();
-       SWFMovie_add(movie, (SWFBlock)ac);
+  ac[0] = action_in_frame1();
+  ac[1] = action_in_frame2();
+  ac[2] = action_in_frame3();
+  ac[3] = action_in_frame4();
+  
+  for(i=0; i<FRAME_COUNT; i++)
+  {
+    SWFMovie_add(movie, (SWFBlock)ac[i]);
        SWFMovie_nextFrame(movie); 
+  }
        
-       //save files
+  // save files
        puts("Saving " OUTPUT_FILENAME );
        SWFMovie_save(movie, OUTPUT_FILENAME);
 




reply via email to

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