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: Mon, 22 Jan 2007 12:23:47 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/01/22 12:23:47

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

Log message:
                * testsuite/misc-ming.all/: Makefile.am, goto_frame_test.c:
                  Failing test for gotoFrame action.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2143&r2=1.2144
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.52&r2=1.53
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/goto_frame_test.c?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2143
retrieving revision 1.2144
diff -u -b -r1.2143 -r1.2144
--- ChangeLog   22 Jan 2007 07:12:53 -0000      1.2143
+++ ChangeLog   22 Jan 2007 12:23:47 -0000      1.2144
@@ -1,3 +1,8 @@
+2007-01-22 Zou Lunkai <address@hidden>
+
+       * testsuite/misc-ming.all/: Makefile.am, goto_frame_test.c:
+         Failing test for gotoFrame action.
+
 2007-01-22 Ann Barcomb <address@hidden>
 
        * Partially merged branch 'testing-documentation-refactor' for

Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- testsuite/misc-ming.all/Makefile.am 19 Jan 2007 14:22:56 -0000      1.52
+++ testsuite/misc-ming.all/Makefile.am 22 Jan 2007 12:23:47 -0000      1.53
@@ -68,6 +68,7 @@
        place_and_remove_object_insane_test \
        attachMovieTest \
        attachMovieTestRunner \
+       goto_frame_test \
        $(NULL)
 
 check_SCRIPTS = \
@@ -76,6 +77,7 @@
        place_object_testrunner \
        place_and_remove_object_testrunner \
        place_and_remove_object_insane_testrunner \
+       goto_frame_testrunner \
        $(NULL)
 
 # TESTS = \
@@ -267,6 +269,20 @@
        $(top_builddir)/testsuite/libtestsuite.la \
        $(NULL)
 
+goto_frame_test_SOURCES =      \
+       goto_frame_test.c       \
+       ming_utils.h            \
+       ming_utils.c            \
+       $(NULL)
+goto_frame_test_LDADD = $(MING_LIBS)
+
+goto_frame_test.swf: goto_frame_test
+       ./goto_frame_test $(top_srcdir)/testsuite/media
+
+goto_frame_testrunner: $(srcdir)/../generic-testrunner.sh goto_frame_test.swf
+       sh $< $(top_builddir) goto_frame_test.swf > $@
+       chmod 755 $@
+
 spritehier.swf: spritehier
        ./spritehier
 
@@ -347,6 +363,7 @@
        place_and_remove_object_testrunner \
        place_and_remove_object_insane_testrunner \
        attachMovieTestRunner \
+       goto_frame_testrunner \
        $(NULL)
 
 

Index: testsuite/misc-ming.all/goto_frame_test.c
===================================================================
RCS file: testsuite/misc-ming.all/goto_frame_test.c
diff -N testsuite/misc-ming.all/goto_frame_test.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/goto_frame_test.c   22 Jan 2007 12:23:47 -0000      
1.1
@@ -0,0 +1,92 @@
+/*
+ *   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 ActionGotoFrame 
+ *
+ * the root movie has 3 frames which contains another 2-framed movieClip named 
mc_red.
+ * At _root's 1st frame, tell mc_red to goto frame2 and stop.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 6
+#define OUTPUT_FILENAME "goto_frame_test.swf"
+
+
+int
+main(int argc, char** argv)
+{
+  SWFMovie mo;
+  SWFMovieClip  mc_red, dejagnuclip;
+  SWFShape  sh_red;
+
+  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);
+
+  
+  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);  
+  add_clip_actions(mc_red, "var flag = \"action_executed\"; ");
+  SWFMovieClip_nextFrame(mc_red);//1st frame
+  SWFMovieClip_nextFrame(mc_red);//2nd frame
+  
+  SWFDisplayItem it_red;
+  it_red = SWFMovie_add(mo, (SWFBlock)mc_red);  
+  SWFDisplayItem_setDepth(it_red, 3); 
+  SWFDisplayItem_setName(it_red, "mc_red");
+  add_actions(mo, " mc_red.gotoAndStop(2); ");
+  SWFMovie_nextFrame(mo); //1st frame
+
+  SWFMovie_nextFrame(mo); //2nd frame
+
+  //checks
+  xcheck_equals(mo, "_root.mc_red.flag", "'action_executed'");
+  add_actions(mo, " _root.totals(); stop(); ");
+  SWFMovie_nextFrame(mo); //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]