[Top][All Lists]
[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, 18 May 2007 21:44:16 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/05/18 21:44:16
Modified files:
. : ChangeLog
testsuite/misc-ming.all: Makefile.am
Added files:
testsuite/misc-ming.all: loop_test3.c
Log message:
nother timeline control test failing in gnash
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3279&r2=1.3280
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.120&r2=1.121
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/loop_test3.c?cvsroot=gnash&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3279
retrieving revision 1.3280
diff -u -b -r1.3279 -r1.3280
--- ChangeLog 18 May 2007 19:39:20 -0000 1.3279
+++ ChangeLog 18 May 2007 21:44:15 -0000 1.3280
@@ -1,7 +1,7 @@
2007-05-18 Sandro Santilli <address@hidden>
- * testsuite/misc-ming.all/: Makefile.am, loop_test2.c:
- New Timeline control test. GNASH FAILS THIS ONE !!
+ * testsuite/misc-ming.all/: Makefile.am, loop_test2.c, loop_test3.c:
+ New Timeline control test. GNASH FAILS THESE ONES !!
2007-05-18 Sandro Santilli <address@hidden>
Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -b -r1.120 -r1.121
--- testsuite/misc-ming.all/Makefile.am 18 May 2007 17:27:23 -0000 1.120
+++ testsuite/misc-ming.all/Makefile.am 18 May 2007 21:44:16 -0000 1.121
@@ -74,6 +74,7 @@
root_stop_testrunner \
loop_test \
loop_test2 \
+ loop_test3 \
loop_test-Runner \
place_object_test \
move_object_test \
@@ -193,6 +194,7 @@
static_vs_dynamic2_testrunner \
getTimer_testrunner \
loop_test2runner \
+ loop_test3runner \
$(NULL)
if MAKESWF_SUPPORTS_PREBUILT_CLIPS
@@ -369,6 +371,20 @@
sh $< -f20 $(top_builddir) loop_test2.swf > $@
chmod 755 $@
+loop_test3_SOURCES = \
+ loop_test3.c \
+ ming_utils.h \
+ ming_utils.c \
+ $(NULL)
+loop_test3_LDADD = $(MING_LIBS)
+
+loop_test3.swf: loop_test3
+ ./loop_test3 $(top_srcdir)/testsuite/media
+
+loop_test3runner: $(srcdir)/../generic-testrunner.sh loop_test3.swf
+ sh $< -f20 $(top_builddir) loop_test3.swf > $@
+ chmod 755 $@
+
key_event_test_SOURCES = \
key_event_test.c \
ming_utils.h \
@@ -1421,6 +1437,7 @@
Video-EmbedSquareTestRunner \
NetStream-SquareTestRunner \
loop_test2runner \
+ loop_test3runner \
$(NULL)
if MAKESWF_SUPPORTS_PREBUILT_CLIPS
Index: testsuite/misc-ming.all/loop_test3.c
===================================================================
RCS file: testsuite/misc-ming.all/loop_test3.c
diff -N testsuite/misc-ming.all/loop_test3.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/loop_test3.c 18 May 2007 21:44:16 -0000
1.1
@@ -0,0 +1,171 @@
+/*
+ * 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
+ *
+ */
+
+/*
+ * Test "Jumping backward to the start of a character's lifetime after being
swapped to the depth of a subsequently placed character"
+ *
+ * Timeline:
+ *
+ * Frame | 1 | 2 | 3 | 4 |
+ * --------+---+---+---+---+
+ * Event | |P* |PM | J |
+ *
+ * P = place (by PlaceObject2)
+ * M = move to another depth (by swapDepth)
+ * J = jump
+ * * = jump target
+ *
+ * Description:
+ *
+ * frame2: a static characters is placed at depth 2 (-16381) [ a red square ]
+ * frame3: a static character is placed at depth 3 (-16380) [ a black square ]
+ * the two characters are depth-swapped
+ * frame4: jump to frame 2 and stop.
+ *
+ * Expected behaviour:
+ *
+ * A single instance of each characters is created.
+ * After loop-back only the character placed in frame 3 is still alive (the
black square),
+ * at depth -16381. The character placed in frame 2 has been destroyed !
+ *
+ * run as ./loop_test3
+ */
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 6
+#define OUTPUT_FILENAME "loop_test3.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);
+ 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);
+
+ SWFMovie_nextFrame(mo);
+
+ // Frame 3: Place black static movieClip2 character at depth 4 (-16380),
swap depths
+
+ sh2 = make_fill_square (330, 270, 120, 120, 0, 0, 0, 0, 0, 0);
+ mc2 = newSWFMovieClip();
+ SWFMovieClip_add(mc2, (SWFBlock)sh2);
+ SWFMovieClip_nextFrame(mc2);
+
+ it2 = SWFMovie_add(mo, (SWFBlock)mc2); //add movieClip2 to the _root
+ SWFDisplayItem_setDepth(it2, 4);
+ SWFDisplayItem_setName(it2, "movieClip2"); //name movieClip2
+ SWFDisplayItem_addAction(it2, newSWFAction(
+ "_root.note(this+' constructed');"
+ "_root.mc2Constructed++;"),
+ SWFACTION_CONSTRUCT);
+
+
+ SWFMovie_add(mo, (SWFBlock)newSWFAction(
+ "check_equals(movieClip1.getDepth(), -16381);"
+ "check_equals(movieClip2.getDepth(), -16380);"
+ "movieClip1.secretCode = 'mc1';"
+ "movieClip2.secretCode = 'mc2';"
+ "movieClip1.swapDepths(movieClip2);"
+ "check_equals(movieClip1.getDepth(), -16380);"
+ "check_equals(movieClip2.getDepth(), -16381);"
+ "check_equals(movieClip1.secretCode, 'mc1');"
+ "check_equals(movieClip2.secretCode, 'mc2');"
+ ));
+
+ SWFMovie_nextFrame(mo);
+
+ // Frame4: gotoAndStop(2), check..
+
+ SWFMovie_add(mo, (SWFBlock)newSWFAction(
+
+ "gotoAndStop(2);"
+
+ // Character placed in frame 3 at depth (-16380) was destroyed (placed
*after* target frame)
+ "xcheck_equals(typeof(movieClip1), 'undefined');"
+
+ // Depth of character at depth -16380 isn't restored (there's no
character at that depth)
+ // (gnash fails because create new instances instead)
+ "xcheck_equals(movieClip2.getDepth(), -16381);"
+
+ // movieClip2 is still the same instance
+ // (gnash fails because create new instance instead)
+ "xcheck_equals(movieClip2.secretCode, 'mc2');"
+
+ // Chars have been constructed only once
+ // (gnash fails because create new movieClip1 instance instead)
+ "xcheck_equals(mc1Constructed, 1);"
+ "check_equals(mc2Constructed, 1);"
+
+ "totals();"
+
+ ));
+ SWFMovie_nextFrame(mo);
+
+ //Output movie
+ puts("Saving " OUTPUT_FILENAME );
+ SWFMovie_save(mo, OUTPUT_FILENAME);
+
+ return 0;
+}
- Re: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., (continued)
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/14
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/14
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/16
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/18
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/18
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil...,
Sandro Santilli <=
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/21
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/23
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/23
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/23
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2007/05/24
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Zou Lunkai, 2007/05/29