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


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil...
Date: Fri, 12 Jan 2007 11:34:33 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/01/12 11:34:33

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: Makefile.am 
Added files:
        testsuite/misc-ming.all: place_and_remove_object_insane_test.c 

Log message:
                * testsuite/misc-ming.all/Makefile.am: enable run of
                  the insane testcase.
        
        By Zou Lunkai <address@hidden>:
        
                * testsuite/misc-ming.all/place_and_remove_object_insane_test.c:
                  new insane testcase (surprisingly works though).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2099&r2=1.2100
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.50&r2=1.51
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/place_and_remove_object_insane_test.c?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2099
retrieving revision 1.2100
diff -u -b -r1.2099 -r1.2100
--- ChangeLog   12 Jan 2007 11:20:15 -0000      1.2099
+++ ChangeLog   12 Jan 2007 11:34:33 -0000      1.2100
@@ -1,4 +1,14 @@
-2006-01-12 Bastiaan Jacques <address@hidden>
+2007-01-12 Sandro Santilli <address@hidden>
+
+       * testsuite/misc-ming.all/Makefile.am: enable run of
+         the insane testcase.
+
+2007-01-12 Zou Lunkai <address@hidden>
+
+       * testsuite/misc-ming.all/place_and_remove_object_insane_test.c:
+         new insane testcase (surprisingly works though).
+
+2007-01-12 Bastiaan Jacques <address@hidden>
 
        * server/asobj/NetStreamFfmpeg.cpp: Don't delete the RGB video data
        buffer until we've actually finished using it. Doh!

Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- testsuite/misc-ming.all/Makefile.am 31 Dec 2006 11:26:18 -0000      1.50
+++ testsuite/misc-ming.all/Makefile.am 12 Jan 2007 11:34:33 -0000      1.51
@@ -65,6 +65,7 @@
        loop_test-Runner \
        place_object_test \
        place_and_remove_object_test \
+       place_and_remove_object_insane_test \
        $(NULL)
 
 check_SCRIPTS = \
@@ -72,6 +73,7 @@
        timeline_var_test-Runner \
        place_object_testrunner \
        place_and_remove_object_testrunner \
+       place_and_remove_object_insane_testrunner \
        $(NULL)
 
 # TESTS = \
@@ -225,6 +227,20 @@
        sh $< -r5 $(top_builddir) place_and_remove_object_test.swf > $@
        chmod 755 $@
 
+place_and_remove_object_insane_test_SOURCES =  \
+       place_and_remove_object_insane_test.c   \
+       ming_utils.h            \
+       ming_utils.c            \
+       $(NULL)
+place_and_remove_object_insane_test_LDADD = $(MING_LIBS)
+
+place_and_remove_object_insane_test.swf: place_and_remove_object_insane_test
+       ./place_and_remove_object_insane_test $(top_srcdir)/testsuite/media
+
+place_and_remove_object_insane_testrunner: $(srcdir)/../generic-testrunner.sh 
place_and_remove_object_insane_test.swf
+       sh $< -r5 $(top_builddir) place_and_remove_object_insane_test.swf > $@
+       chmod 755 $@
+
 spritehier.swf: spritehier
        ./spritehier
 
@@ -303,6 +319,7 @@
        loop_test-Runner \
        place_object_testrunner \
        place_and_remove_object_testrunner \
+       place_and_remove_object_insane_testrunner \
        $(NULL)
 
 

Index: testsuite/misc-ming.all/place_and_remove_object_insane_test.c
===================================================================
RCS file: testsuite/misc-ming.all/place_and_remove_object_insane_test.c
diff -N testsuite/misc-ming.all/place_and_remove_object_insane_test.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/place_and_remove_object_insane_test.c       12 Jan 
2007 11:34:33 -0000      1.1
@@ -0,0 +1,173 @@
+/* 
+ *   Copyright (C) 2005, 2006 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
+ *
+ * Test for tag PlaceObject2 and also sprite_instance::advance_sprite(float 
delta_time)
+ *
+ * Normally, you will see the both the red square and black square
+ *  again and again while looping back
+ *
+ * run as ./place_and_remove_object_test
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 6
+#define OUTPUT_FILENAME "place_and_remove_object_insane_test.swf"
+
+
+
+
+int
+main(int argc, char** argv)
+{
+       SWFMovie mo;
+       SWFMovieClip  mc_red, mc_green, mc_blue, mc_black, dejagnuclip;
+       SWFShape  sh_red, sh_green, sh_blue, sh_black;
+
+       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, 1.0);
+
+       dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 
0, 0, 800, 600);
+       SWFMovie_add(mo, (SWFBlock)dejagnuclip);
+
+       mc_red = newSWFMovieClip();
+       sh_red = make_fill_square (0, 300, 60, 60, 255, 0, 0, 255, 0, 0);
+       SWFMovieClip_add(mc_red, (SWFBlock)sh_red);  
+       SWFMovieClip_nextFrame(mc_red);
+       
+       mc_green = newSWFMovieClip();
+       sh_green = make_fill_square (200, 300, 60, 60, 255, 0, 0, 0, 255, 0);
+       SWFMovieClip_add(mc_green, (SWFBlock)sh_green);  
+       SWFMovieClip_nextFrame(mc_green);
+       
+       mc_blue = newSWFMovieClip();
+       sh_blue = make_fill_square (400, 300, 60, 60, 255, 0, 0, 0, 0, 255);
+       SWFMovieClip_add(mc_blue, (SWFBlock)sh_blue);  
+       SWFMovieClip_nextFrame(mc_blue);
+       
+       mc_black = newSWFMovieClip();
+       sh_black = make_fill_square (600, 300, 60, 60, 255, 0, 0, 0, 0, 0);
+       SWFMovieClip_add(mc_black, (SWFBlock)sh_black);  
+       SWFMovieClip_nextFrame(mc_black);
+       
+       SWFDisplayItem it_red;
+       SWFDisplayItem it_blue;
+       SWFDisplayItem it_green;
+       SWFDisplayItem it_black;
+       
+       it_red = SWFMovie_add(mo, (SWFBlock)mc_red);  //add mc_red to the 1st 
frame at depth 3
+       SWFDisplayItem_setDepth(it_red, 3); 
+       SWFDisplayItem_setName(it_red, "mc_red");
+       
+       it_blue = SWFMovie_add(mo, (SWFBlock)mc_blue); //add mc_blue to the 1st 
frame at depth 30
+       SWFDisplayItem_setDepth(it_blue, 30); 
+       SWFDisplayItem_setName(it_blue, "mc_blue");
+       
+       it_black = SWFMovie_add(mo, (SWFBlock)mc_black); //add mc_black to the 
1st frame at depth 40
+       SWFDisplayItem_setDepth(it_black, 40); 
+       SWFDisplayItem_setName(it_black, "mc_black");
+       
+       check(mo, "_root.mc_red != undefined");
+       check(mo, "_root.mc_blue != undefined");
+
+       check_equals(mo, "_root.mc_green",  "undefined");
+       add_actions(mo, " trace(\"hello\");  trace(counter); 
trace(_root.mc_blue._x);  \
+                         if(counter == undefined) \
+                         { \
+                            flag = 1;  \
+                            _root.mc_blue._x += 60; \
+                         }else \
+                         {  \
+                            if((counter == 1)  \
+                                && (_root.mc_blue._x == 60)  \ 
+                                && (_root.mc_black == undefined) \
+                                && (_root.mc_black_name_changed != undefined)) 
\
+                                flag  = 1; \
+                            else \
+                                flag = 0;  \
+                         } ");
+                            
+       check_equals(mo, " _root.mc_red._x",  "0"); 
+       check_equals(mo, " _root.mc_blue._x", "60"); 
+       xcheck_equals(mo, "flag", "1"); 
+       SWFMovie_nextFrame(mo);        
+       //------------end of 1st frame---------------------------------
+       
+       
+       SWFMovie_remove(mo, it_red);    //remove mc_red at the 2nd frame
+       SWFMovie_remove(mo, it_blue);   //remove mc_blue at the 2nd frame
+       SWFMovie_remove(mo, it_black);  //remove it_black at the 2nd frame
+       check_equals(mo, "_root.mc_red",  "undefined");
+       check_equals(mo, "_root.mc_green",  "undefined");
+       check_equals(mo, "_root.mc_black",  "undefined");
+       SWFMovie_nextFrame(mo);       
+       //------------end of 2nd frame---------------------------------
+       
+       
+       it_red = SWFMovie_add(mo, (SWFBlock)mc_red);  //add mc_red to the 3rd 
frame at depth 3 again
+       SWFDisplayItem_setDepth(it_red, 3); 
+       SWFDisplayItem_setName(it_red, "mc_red");
+       SWFDisplayItem_setRatio(it_red, 2.0); 
+       
+       it_blue = SWFMovie_add(mo, (SWFBlock)mc_blue);  //add mc_red to the 3rd 
frame at depth 30 again
+       SWFDisplayItem_setDepth(it_blue, 30); 
+       SWFDisplayItem_setName(it_blue, "mc_blue");
+       //SWFDisplayItem_setRatio(it, 2.0);  //Don't set ratio this time!
+
+       it_black = SWFMovie_add(mo, (SWFBlock)mc_black);  //add mc_red to the 
3rd frame at depth 40 again
+       SWFDisplayItem_setDepth(it_black, 40); 
+       SWFDisplayItem_setName(it_black, "mc_black_name_changed");
+       //SWFDisplayItem_setRatio(it_black, 2.0);  //Don't set ratio this time!
+               
+       it_green = SWFMovie_add(mo, (SWFBlock)mc_green);  //add mc_green to the 
3rd frame at depth 4
+       SWFDisplayItem_setDepth(it_green, 4); 
+       SWFDisplayItem_setName(it_green, "mc_green");
+               
+       check(mo, "_root.mc_red != undefined");
+       check(mo, "_root.mc_green != undefined");
+       
+       add_actions(mo, " _root.mc_red._x += 60; _root.mc_blue._x += 60;");
+       add_actions(mo, "if ( ++counter > 1 ) { _root.totals(); stop(); }");
+
+       SWFMovie_nextFrame(mo);        
+       //------------end of 3rd 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]