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: Wed, 23 May 2007 18:59:44 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/05/23 18:59:44

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

Log message:
                * testsuite/misc-ming.all/: Makefile.am, loop_test6.c:
                  New test for "Jumping backward after a character's lifetime".
                  Reveals a conceptual bug in last step of all redesign attempts
                  for displaylist reconstruction (execute *all* frame tags
                  from start to target frame).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3322&r2=1.3323
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.127&r2=1.128
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/loop_test6.c?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3322
retrieving revision 1.3323
diff -u -b -r1.3322 -r1.3323
--- ChangeLog   23 May 2007 18:00:52 -0000      1.3322
+++ ChangeLog   23 May 2007 18:59:43 -0000      1.3323
@@ -1,5 +1,13 @@
 2007-05-23 Sandro Santilli <address@hidden>
 
+       * testsuite/misc-ming.all/: Makefile.am, loop_test6.c:
+         New test for "Jumping backward after a character's lifetime".
+         Reveals a conceptual bug in last step of all redesign attempts
+         for displaylist reconstruction (execute *all* frame tags
+         from start to target frame).
+
+2007-05-23 Sandro Santilli <address@hidden>
+
        * testsuite/misc-ming.all/: Makefile.am, replace_shapes1test.c,
          replace_sprites1test.c, replace_shapes1test_runner.cpp,
          replace_sprites1test_runner.cpp: Modified coordinates and size

Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -b -r1.127 -r1.128
--- testsuite/misc-ming.all/Makefile.am 23 May 2007 18:00:52 -0000      1.127
+++ testsuite/misc-ming.all/Makefile.am 23 May 2007 18:59:44 -0000      1.128
@@ -80,6 +80,7 @@
        loop_test3 \
        loop_test4 \
        loop_test5 \
+       loop_test6 \
        loop_test-Runner \
        place_object_test \
        move_object_test \
@@ -212,6 +213,7 @@
        loop_test3runner \
        loop_test4runner \
        loop_test5runner \
+       loop_test6runner \
        shape_testrunner \
        $(NULL)
 
@@ -413,6 +415,16 @@
        sh $< -f20 $(top_builddir) loop_test5.swf > $@
        chmod 755 $@
 
+loop_test6_SOURCES = loop_test6.c
+loop_test6_LDADD = libgnashmingutils.la
+
+loop_test6.swf: loop_test6
+       ./loop_test6 $(top_srcdir)/testsuite/media
+
+loop_test6runner: $(srcdir)/../generic-testrunner.sh loop_test6.swf
+       sh $< -f20 $(top_builddir) loop_test6.swf > $@
+       chmod 755 $@
+
 shape_test_SOURCES = shape_test.c
 shape_test_LDADD = libgnashmingutils.la
 
@@ -1417,6 +1429,7 @@
        loop_test3runner \
        loop_test4runner \
        loop_test5runner \
+       loop_test6runner \
        shape_testrunner \
        $(NULL)
 

Index: testsuite/misc-ming.all/loop_test6.c
===================================================================
RCS file: testsuite/misc-ming.all/loop_test6.c
diff -N testsuite/misc-ming.all/loop_test6.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/loop_test6.c        23 May 2007 18:59:44 -0000      
1.1
@@ -0,0 +1,139 @@
+/* 
+ *   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 "Jumping backward to the end of a character's lifetime"
+ *
+ * Timeline:
+ * 
+ *   Frame  | 1 | 2 | 3 | 4 | 5 | 6 |
+ *  --------+---+---+---+---+---+---+
+ *   Event  |   | P | R | * | J |   |
+ * 
+ *  P = place (by PlaceObject2)
+ *  R = remove (by RemoveObject* tag)
+ *  J = jump
+ *  * = jump target
+ *
+ * Description:
+ *
+ *  frame2: a static characters is placed at depth 3 (-16381) [ a red square ]
+ *  frame3: character at depth 3 (-16381) removed
+ *  frame5: jump back to frame 4 and stop
+ *
+ * Expected behaviour:
+ *
+ *   After jump back, a single instance have been created.
+ *   It's onConstruct event handler has been invoked once.
+ *
+ * run as ./loop_test6
+ */
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 7
+#define OUTPUT_FILENAME "loop_test6.swf"
+
+
+int
+main(int argc, char** argv)
+{
+  SWFMovie mo;
+  SWFMovieClip mc1, mc2, dejagnuclip;
+  SWFDisplayItem it1, it2;
+  SWFShape  sh1,sh2;
+  SWFAction ac;
+  int i;
+
+  const char *srcdir=".";
+  if ( argc>1 ) 
+    srcdir=argv[1];
+  else
+  {
+      //fprintf(stderr, "Usage: %s <mediadir>\n", argv[0]);
+      //return 1;
+  }
+
+  Ming_init();
+  Ming_useSWFVersion (OUTPUT_VERSION);
+  
+  mo = newSWFMovie();
+  SWFMovie_setDimension(mo, 800, 600);
+  SWFMovie_setRate(mo, 6);
+
+  // Frame 1: Place dejagnu clip
+
+  dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 0, 
800, 600);
+  SWFMovie_add(mo, (SWFBlock)dejagnuclip);
+  add_actions(mo, "mc1Constructed=0; mc2Constructed=0; mc3Constructed=0; 
mc4Constructed=0;");
+  SWFMovie_nextFrame(mo); 
+  
+  //
+  // Frame 2: 
+  //   Place red static movieClip1 character at depth 3 (-16381)
+  //
+  sh1 = make_fill_square (300, 300, 60, 60, 255, 0, 0, 255, 0, 0);
+  mc1 = newSWFMovieClip();
+  SWFMovieClip_add(mc1, (SWFBlock)sh1); 
+  SWFMovieClip_nextFrame(mc1);
+  
+  it1 = SWFMovie_add(mo, (SWFBlock)mc1);  //add movieClip1 to the _root
+  SWFDisplayItem_setDepth(it1, 3);
+  SWFDisplayItem_setName(it1, "movieClip1"); //name movieClip1
+  SWFDisplayItem_addAction(it1, newSWFAction(
+    "_root.note(this+' constructed');"
+    "_root.mc1Constructed++;"
+    ), SWFACTION_CONSTRUCT);
+
+  check_equals(mo, "typeof(movieClip1)", "'movieclip'");
+  check_equals(mo, "_root.mc1Constructed", "1");
+
+  SWFMovie_nextFrame(mo);  
+
+  // Frame3: Remove red square
+  SWFDisplayItem_remove(it1);
+  check_equals(mo, "typeof(movieClip1)", "'undefined'");
+  check_equals(mo, "_root.mc1Constructed", "1");
+  SWFMovie_nextFrame(mo);  
+  
+  // Frame4: nothing new
+  SWFMovie_nextFrame(mo); 
+  
+  // Frame5: check, gotoAndStop(4), check..
+
+  SWFMovie_add(mo, (SWFBlock)newSWFAction( "gotoAndStop(4);"));
+  check_equals(mo, "typeof(movieClip1)", "'undefined'");
+
+  // Gnash calls onConstruct again !!
+  xcheck_equals(mo, "_root.mc1Constructed", "1");
+
+  SWFMovie_add(mo, (SWFBlock)newSWFAction( "totals(); stop();" ));
+  SWFMovie_nextFrame(mo);
+
+  //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]