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, 16 Feb 2007 15:33:03 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/02/16 15:33:03

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

Log message:
                * testsuite/misc-ming.all/: Makefile.am, move_object_test.c:
                  Test unnamed instances handling on restart, and also test
                  for syntetized instance names.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2380&r2=1.2381
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.67&r2=1.68
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/move_object_test.c?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2380
retrieving revision 1.2381
diff -u -b -r1.2380 -r1.2381
--- ChangeLog   16 Feb 2007 13:48:12 -0000      1.2380
+++ ChangeLog   16 Feb 2007 15:33:03 -0000      1.2381
@@ -1,3 +1,9 @@
+2007-02-16 Sandro Santilli <address@hidden>
+
+       * testsuite/misc-ming.all/: Makefile.am, move_object_test.c:
+         Test unnamed instances handling on restart, and also test
+         for syntetized instance names.
+
 2007-02-16 Udo Giacomozzi <address@hidden>
 
   * server/sprite_instance.cpp: Removed name check to get sprites

Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- testsuite/misc-ming.all/Makefile.am 14 Feb 2007 09:39:08 -0000      1.67
+++ testsuite/misc-ming.all/Makefile.am 16 Feb 2007 15:33:03 -0000      1.68
@@ -67,6 +67,7 @@
        loop_test \
        loop_test-Runner \
        place_object_test \
+       move_object_test \
        place_and_remove_object_test \
        place_and_remove_object_insane_test \
        attachMovieTest \
@@ -91,6 +92,7 @@
        VarAndCharClashTest-Runner \
        timeline_var_test-Runner \
        place_object_testrunner \
+       move_object_testrunner \
        place_and_remove_object_testrunner \
        place_and_remove_object_insane_testrunner \
        goto_frame_testrunner \
@@ -237,6 +239,20 @@
        sh $< -r5 $(top_builddir) place_object_test.swf > $@
        chmod 755 $@
 
+move_object_test_SOURCES =     \
+       move_object_test.c      \
+       ming_utils.h            \
+       ming_utils.c            \
+       $(NULL)
+move_object_test_LDADD = $(MING_LIBS)
+
+move_object_test.swf: move_object_test
+       ./move_object_test $(top_srcdir)/testsuite/media
+
+move_object_testrunner: $(srcdir)/../generic-testrunner.sh move_object_test.swf
+       sh $< -r5 $(top_builddir) move_object_test.swf > $@
+       chmod 755 $@
+
 place_and_remove_object_test_SOURCES = \
        place_and_remove_object_test.c  \
        ming_utils.h            \
@@ -571,6 +587,7 @@
        root_stop_testrunner \
        loop_test-Runner \
        place_object_testrunner \
+       move_object_testrunner \
        place_and_remove_object_testrunner \
        place_and_remove_object_insane_testrunner \
        attachMovieTestRunner \

Index: testsuite/misc-ming.all/move_object_test.c
===================================================================
RCS file: testsuite/misc-ming.all/move_object_test.c
diff -N testsuite/misc-ming.all/move_object_test.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/move_object_test.c  16 Feb 2007 15:33:03 -0000      
1.1
@@ -0,0 +1,102 @@
+/* 
+ *   Copyright (C) 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
+ *
+ */ 
+
+/*
+ * Test for tag PlaceObject2 used to move chars
+ * 
+ * Moves an "unnamed" movieclip square.
+ * Expect the clip to get back to its original position
+ * on loop-back.
+ *
+ * It is important for the clip to be unnamed, as 
+ * we're testing for a bug not occurring if a name
+ * is specified in PLACEOBJECT2 tag.
+ * Luckly, this won't prevent us from referencing it,
+ * as the player is expected to assign syntetized
+ * instance names to unnamed objects.
+ *
+ * run as ./move_object_test
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 6
+#define OUTPUT_FILENAME "move_object_test.swf"
+
+
+
+
+int
+main(int argc, char** argv)
+{
+       SWFMovie mo;
+       SWFMovieClip mc1, dejagnuclip;
+       SWFDisplayItem it1;
+       SWFShape  sh1;
+
+       const char *srcdir=".";
+       if ( argc>1 ) 
+               srcdir=argv[1];
+       else
+       {
+               //fprintf(stderr, "Usage: %s <mediadir>\n", argv[0]);
+               //return 1;
+       }
+
+       Ming_init();
+       mo = newSWFMovie();
+       SWFMovie_setDimension(mo, 800, 600);
+       SWFMovie_setRate (mo, 1.0);
+
+       sh1 = make_fill_square (0, 0, 60, 60, 255, 0, 0, 255, 0, 0);
+       mc1 = newSWFMovieClip();
+       SWFMovieClip_add(mc1, (SWFBlock)sh1);
+       add_clip_actions(mc1, "onRollOver = function() {};");
+       SWFMovieClip_nextFrame(mc1);
+
+       dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 
0, 70, 800, 500);
+       SWFMovie_add(mo, (SWFBlock)dejagnuclip);
+       it1 = SWFMovie_add(mo, (SWFBlock)mc1);  
+       check_equals(mo, "typeof(instance2)", "'movieclip'");
+       check_equals(mo, "instance2._x", "0");
+
+       SWFMovie_nextFrame(mo);  // frame 1
+
+       SWFDisplayItem_moveTo(it1, 700, 1);
+
+       // instance1 is automatically assigned to the dejagnu clip
+       check_equals(mo, "typeof(instance1)", "'movieclip'");
+
+       // instance2 is automatically assigned to the square clip
+       check_equals(mo, "typeof(instance2)", "'movieclip'");
+       check_equals(mo, "instance2._x", "700");
+
+       add_actions(mo, "if ( ++counter > 1 ) { totals(); stop(); }");
+       SWFMovie_nextFrame(mo);  // frame 2
+
+
+       //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]