[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: |
Tue, 26 Dec 2006 14:30:04 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/12/26 14:30:04
Modified files:
. : ChangeLog
testsuite/misc-ming.all: Makefile.am
testsuite/samples: Makefile.am
Added files:
testsuite/misc-ming.all: loop_test-Runner.cpp loop_test.c
Removed files:
testsuite/samples: loop_test-Runner.cpp loop_test.swf
Log message:
* testsuite/misc-ming.all/: Makefile.am, loop_test-Runner.cpp,
loop_test.c: added source of loop_test testcase, updated
tester.
* testsuite/samples/: Makefile.am, loop_test-Runner.cpp,
loop_test.swf: removed code moved to misc-ming.all.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2002&r2=1.2003
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.44&r2=1.45
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/loop_test-Runner.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/loop_test.c?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/samples/Makefile.am?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/samples/loop_test-Runner.cpp?cvsroot=gnash&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/samples/loop_test.swf?cvsroot=gnash&r1=1.1&r2=0
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2002
retrieving revision 1.2003
diff -u -b -r1.2002 -r1.2003
--- ChangeLog 25 Dec 2006 12:29:07 -0000 1.2002
+++ ChangeLog 26 Dec 2006 14:30:03 -0000 1.2003
@@ -1,3 +1,11 @@
+2006-12-26 Sandro Santilli <address@hidden>
+
+ * testsuite/misc-ming.all/: Makefile.am, loop_test-Runner.cpp,
+ loop_test.c: added source of loop_test testcase, updated
+ tester.
+ * testsuite/samples/: Makefile.am, loop_test-Runner.cpp,
+ loop_test.swf: removed code moved to misc-ming.all.
+
2006-12-25 Tomas Groth Christensen <address@hidden>
* backend/render_handler_ogl.cpp: Made the OpenGl backend
Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- testsuite/misc-ming.all/Makefile.am 22 Dec 2006 09:05:07 -0000 1.44
+++ testsuite/misc-ming.all/Makefile.am 26 Dec 2006 14:30:03 -0000 1.45
@@ -63,6 +63,8 @@
timeline_var_test-Runner \
root_stop_test \
root_stop_testrunner \
+ loop_test \
+ loop_test-Runner \
$(NULL)
# TESTS = \
@@ -164,6 +166,30 @@
root_stop_test.swf \
$(NULL)
+loop_test_SOURCES = \
+ loop_test.c \
+ ming_utils.h \
+ ming_utils.c \
+ $(NULL)
+loop_test_LDADD = $(MING_LIBS)
+
+loop_test.swf: loop_test
+ ./loop_test $(top_srcdir)/testsuite/media
+
+loop_test_Runner_SOURCES = \
+ loop_test-Runner.cpp \
+ $(NULL)
+loop_test_Runner_LDADD = \
+ $(top_builddir)/testsuite/libtestsuite.la \
+ $(NULL)
+loop_test_Runner_CXXFLAGS = \
+ -DSRCDIR='"$(srcdir)"' \
+ $(NULL)
+loop_test_Runner_DEPENDENCIES = \
+ loop_test.swf \
+ $(top_builddir)/testsuite/libtestsuite.la \
+ $(NULL)
+
spritehier.swf: spritehier
./spritehier
@@ -239,6 +265,7 @@
VarAndCharClashTest-Runner \
timeline_var_test-Runner \
root_stop_testrunner \
+ loop_test-Runner \
$(NULL)
Index: testsuite/samples/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/samples/Makefile.am,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- testsuite/samples/Makefile.am 13 Dec 2006 14:19:44 -0000 1.9
+++ testsuite/samples/Makefile.am 26 Dec 2006 14:30:03 -0000 1.10
@@ -37,7 +37,6 @@
check_PROGRAMS = \
clip_as_button2-TestRunner \
- loop_test-Runner \
$(NULL)
clip_as_button2_TestRunner_SOURCES = \
@@ -54,20 +53,6 @@
$(top_builddir)/testsuite/libtestsuite.la \
$(NULL)
-loop_test_Runner_SOURCES = \
- loop_test-Runner.cpp \
- $(NULL)
-loop_test_Runner_LDADD = \
- $(top_builddir)/testsuite/libtestsuite.la \
- $(NULL)
-loop_test_Runner_CXXFLAGS = \
- -DSRCDIR='"$(srcdir)"' \
- $(NULL)
-loop_test_Runner_DEPENDENCIES = \
- loop_test.swf \
- $(top_builddir)/testsuite/libtestsuite.la \
- $(NULL)
-
clean-local:
EXTRA_DIST = \
Index: testsuite/misc-ming.all/loop_test-Runner.cpp
===================================================================
RCS file: testsuite/misc-ming.all/loop_test-Runner.cpp
diff -N testsuite/misc-ming.all/loop_test-Runner.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/loop_test-Runner.cpp 26 Dec 2006 14:30:03
-0000 1.1
@@ -0,0 +1,131 @@
+/*
+ * 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
+ *
+ *
+ */
+
+#define INPUT_FILENAME "loop_test.swf"
+
+#include "MovieTester.h"
+#include "sprite_instance.h"
+#include "character.h"
+#include "dlist.h"
+#include "container.h"
+#include "log.h"
+#include "GnashException.h"
+
+#include "check.h"
+
+#include <string>
+#include <iostream>
+#include <cassert>
+#include <memory>
+
+using namespace gnash;
+using namespace std;
+
+int
+main(int /*argc*/, char** /*argv*/)
+{
+ string filename = INPUT_FILENAME;
+ auto_ptr<MovieTester> t;
+
+ try
+ {
+ t.reset(new MovieTester(filename));
+ }
+ catch (const GnashException& e)
+ {
+ std::cerr << "Error initializing MovieTester: " << e.what() <<
std::endl;
+ exit(EXIT_FAILURE);
+ }
+
+ MovieTester& tester = *t;
+
+ // TODO: check why we need this !!
+ // I wouldn't want the first advance to be needed
+ tester.advance();
+
+ gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
+ dbglogfile.setVerbosity(1);
+ dbglogfile.setActionDump(1);
+
+ sprite_instance* root = tester.getRootMovie();
+ assert(root);
+
+ check_equals(root->get_frame_count(), 30);
+
+ const character* movieClip1 = tester.findDisplayItemByName(*root,
"movieClip1");
+ check(movieClip1);
+ check_equals(movieClip1->get_depth(), 1);
+
+ const character* movieClip2 = tester.findDisplayItemByName(*root,
"movieClip2");
+ check(movieClip2);
+ check_equals(movieClip2->get_depth(), 2);
+
+ // Advance to frame 27
+ for (int i=root->get_current_frame(); i<28; ++i) {
+ tester.advance();
+ }
+
+ // In frame 29, a swapDepth() action will
+ // change the characters depth
+ tester.advance();
+ check_equals(root->get_current_frame(), 29);
+ check_equals(movieClip1->get_depth(), 2);
+ check_equals(movieClip2->get_depth(), 1);
+
+ // Now keep advancing until last frame is reached
+ // (29, as framecount is 0-based)
+ for (int i=root->get_current_frame(); i<29; ++i) {
+ tester.advance();
+ }
+
+ check_equals(root->get_current_frame(), 29);
+ check_equals(movieClip1->get_depth(), 2);
+ check_equals(movieClip2->get_depth(), 1);
+
+
+ // Next advance will make the movie restart
+ tester.advance();
+ check_equals(root->get_current_frame(), 0);
+
+ // We expect the depth to be kept on restart
+ check_equals(movieClip1->get_depth(), 2);
+ check_equals(movieClip2->get_depth(), 1);
+
+ // ... until next SwapDepth ...
+
+ for (int i=root->get_current_frame(); i<28; ++i) {
+ tester.advance();
+ }
+
+ check_equals(movieClip1->get_depth(), 2);
+ check_equals(movieClip2->get_depth(), 1);
+
+ // we expect depths to be swapped again
+ tester.advance();
+ check_equals(root->get_current_frame(), 29);
+ xcheck_equals(movieClip1->get_depth(), 1);
+ xcheck_equals(movieClip2->get_depth(), 2);
+
+ // .. and the new deptsh to be kept at restart
+ tester.advance();
+ check_equals(root->get_current_frame(), 0);
+ xcheck_equals(movieClip1->get_depth(), 1);
+ xcheck_equals(movieClip2->get_depth(), 2);
+}
+
Index: testsuite/misc-ming.all/loop_test.c
===================================================================
RCS file: testsuite/misc-ming.all/loop_test.c
diff -N testsuite/misc-ming.all/loop_test.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/loop_test.c 26 Dec 2006 14:30:03 -0000 1.1
@@ -0,0 +1,118 @@
+/*
+ * 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 movie loop.
+ *
+ * The _root movie has 30 frames.
+ *
+ * Normally, you can see both the red and black squares overlap each
+ * other with equal time.
+ *
+ * run as ./loop_test
+ */
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 6
+#define OUTPUT_FILENAME "loop_test.swf"
+
+//actions in _root movie, the last frame
+SWFAction action_in_root(void);
+SWFAction action_in_root()
+{
+ SWFAction ac;
+ ac = compileSWFActionCode(" \
+ var mc1_depth = movieClip1.getDepth(); \
+ var mc2_depth = movieClip2.getDepth(); \
+ movieClip1.swapDepths(movieClip2); \
+ ");
+ // we're not loading dejagnu clip !
+ //_root.check_equals(movieClip1.getDepth(), mc2_depth);
+ //_root.check_equals(movieClip2.getDepth(), mc1_depth);
+ return ac;
+}
+
+
+int
+main(int argc, char** argv)
+{
+ SWFMovie mo;
+ SWFMovieClip mc1, mc2, dejagnuclip;
+ 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);
+
+ //dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0,
0, 800, 600);
+ //SWFMovie_add(mo, (SWFBlock)dejagnuclip);
+ //SWFMovie_nextFrame(mo);
+
+
+ sh1 = make_fill_square (300, 300, 60, 60, 255, 0, 0, 255, 0, 0);
+ mc1 = newSWFMovieClip();
+ SWFMovieClip_add(mc1, (SWFBlock)sh1);
+ SWFMovieClip_nextFrame(mc1);
+
+ sh2 = make_fill_square (330, 270, 120, 120, 0, 0, 0, 0, 0, 0);
+ mc2 = newSWFMovieClip();
+ SWFMovieClip_add(mc2, (SWFBlock)sh2);
+ SWFMovieClip_nextFrame(mc2);
+
+ SWFDisplayItem it1, it2;
+ it1 = SWFMovie_add(mo, (SWFBlock)mc1); //add movieClip1 to the _root
+ it2 = SWFMovie_add(mo, (SWFBlock)mc2); //add movieClip2 to the _root
+ SWFDisplayItem_setName(it1, "movieClip1"); //name movieClip1
+ SWFDisplayItem_setName(it2, "movieClip2"); //name movieClip2
+
+ for(i=0; i<29; i++)
+ {
+ SWFMovie_nextFrame(mo);
+ }
+
+ ac = action_in_root();
+ SWFMovie_add(mo, (SWFBlock)ac);
+ SWFMovie_nextFrame(mo);
+
+ //Output movie
+ puts("Saving " OUTPUT_FILENAME );
+ SWFMovie_save(mo, OUTPUT_FILENAME);
+
+ return 0;
+}
Index: testsuite/samples/loop_test-Runner.cpp
===================================================================
RCS file: testsuite/samples/loop_test-Runner.cpp
diff -N testsuite/samples/loop_test-Runner.cpp
--- testsuite/samples/loop_test-Runner.cpp 24 Dec 2006 20:07:23 -0000
1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,114 +0,0 @@
-/*
- * 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
- *
- *
- */
-
-#define INPUT_FILENAME "loop_test.swf"
-
-#include "MovieTester.h"
-#include "sprite_instance.h"
-#include "character.h"
-#include "dlist.h"
-#include "container.h"
-#include "log.h"
-
-#include "check.h"
-#include <string>
-#include <iostream>
-#include <cassert>
-
-using namespace gnash;
-using namespace std;
-
-int
-main(int /*argc*/, char** /*argv*/)
-{
- string filename = string(SRCDIR) + string("/") + string(INPUT_FILENAME);
- MovieTester tester(filename);
-
- // TODO: check why we need this !!
- // I wouldn't want the first advance to be needed
- tester.advance();
-
- gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
- dbglogfile.setVerbosity(1);
-
- sprite_instance* root = tester.getRootMovie();
- assert(root);
-
- check_equals(root->get_frame_count(), 30);
-
- const character* rectangle = tester.findDisplayItemByDepth(*root, 1);
- check(rectangle);
- check_equals(rectangle->get_name(), "sprite2");
- check_equals(rectangle->get_width(), 126*20);
-
- const character* circle = tester.findDisplayItemByDepth(*root, 4);
- check(circle);
- check_equals(circle->get_name(), "sprite1");
- check_equals(circle->get_width(), 111*20);
-
- // Advance to frame 27
- for (int i=root->get_current_frame(); i<27; ++i) {
- tester.advance();
- }
-
- check_equals(root->get_current_frame(), 27);
- check_equals(rectangle->get_depth(), 1);
- check_equals(circle->get_depth(), 4);
-
- // In frame 28, a swapDepth() action will
- // change the characters depth
- tester.advance();
- check_equals(root->get_current_frame(), 28);
- check_equals(rectangle->get_depth(), 4);
- check_equals(circle->get_depth(), 1);
-
- // Now keep advancing until last frame is reached
- // (29, as framecount is 0-based)
- for (int i=root->get_current_frame(); i<29; ++i) {
- tester.advance();
- }
-
- check_equals(root->get_current_frame(), 29);
- check_equals(rectangle->get_depth(), 4);
- check_equals(circle->get_depth(), 1);
-
-
- // Next advance will make the movie restart
- tester.advance();
- check_equals(root->get_current_frame(), 0);
-
- // We expect the depth to be kept on restart
- check_equals(rectangle->get_depth(), 4);
- check_equals(circle->get_depth(), 1);
-
- // ... until next SwapDepth ...
-
- for (int i=root->get_current_frame(); i<27; ++i) {
- tester.advance();
- }
-
- check_equals(rectangle->get_depth(), 4);
- check_equals(circle->get_depth(), 1);
- // depths swapped again
- tester.advance();
- check_equals(root->get_current_frame(), 28);
- xcheck_equals(rectangle->get_depth(), 1);
- xcheck_equals(circle->get_depth(), 4);
-}
-
Index: testsuite/samples/loop_test.swf
===================================================================
RCS file: testsuite/samples/loop_test.swf
diff -N testsuite/samples/loop_test.swf
Binary files /tmp/cvsjmluyq and /dev/null differ
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2006/12/12
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2006/12/15
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2006/12/18
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2006/12/18
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2006/12/21
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2006/12/22
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil...,
Sandro Santilli <=
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2006/12/27
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2006/12/30
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2006/12/30
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil..., Sandro Santilli, 2006/12/31