[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: |
Thu, 28 Dec 2006 00:39:59 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/12/28 00:39:59
Modified files:
. : ChangeLog
testsuite/misc-ming.all: Makefile.am
Added files:
testsuite/misc-ming.all: place_object_test.c
place_object_testrunner.cpp
Log message:
* testsuite/misc-ming.all/: Makefile.am, place_object_test.c,
place_object_testrunner.cpp: new test by Zou Lunkai for
depth replacement and automatic runner for it (by myself).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2005&r2=1.2006
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.45&r2=1.46
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/place_object_test.c?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/place_object_testrunner.cpp?cvsroot=gnash&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2005
retrieving revision 1.2006
diff -u -b -r1.2005 -r1.2006
--- ChangeLog 28 Dec 2006 00:20:25 -0000 1.2005
+++ ChangeLog 28 Dec 2006 00:39:59 -0000 1.2006
@@ -1,5 +1,11 @@
2006-12-28 Sandro Santilli <address@hidden>
+ * testsuite/misc-ming.all/: Makefile.am, place_object_test.c,
+ place_object_testrunner.cpp: new test by Zou Lunkai for
+ depth replacement and automatic runner for it (by myself).
+
+2006-12-28 Sandro Santilli <address@hidden>
+
* testsuite/misc-ming.all/root_stop_testrunner.cpp:
carriage returns removed; fixed wrong assumption,
added more tests (no more expected failures).
Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- testsuite/misc-ming.all/Makefile.am 26 Dec 2006 14:30:03 -0000 1.45
+++ testsuite/misc-ming.all/Makefile.am 28 Dec 2006 00:39:59 -0000 1.46
@@ -65,6 +65,8 @@
root_stop_testrunner \
loop_test \
loop_test-Runner \
+ place_object_test \
+ place_object_testrunner \
$(NULL)
# TESTS = \
@@ -190,6 +192,27 @@
$(top_builddir)/testsuite/libtestsuite.la \
$(NULL)
+place_object_test_SOURCES = \
+ place_object_test.c \
+ ming_utils.h \
+ ming_utils.c \
+ $(NULL)
+place_object_test_LDADD = $(MING_LIBS)
+
+place_object_test.swf: place_object_test
+ ./place_object_test $(top_srcdir)/testsuite/media
+
+place_object_testrunner_SOURCES = \
+ place_object_testrunner.cpp \
+ $(NULL)
+place_object_testrunner_LDADD = \
+ $(top_builddir)/testsuite/libtestsuite.la \
+ $(NULL)
+place_object_testrunner_DEPENDENCIES = \
+ $(top_builddir)/testsuite/libtestsuite.la \
+ place_object_test.swf \
+ $(NULL)
+
spritehier.swf: spritehier
./spritehier
@@ -266,6 +289,7 @@
timeline_var_test-Runner \
root_stop_testrunner \
loop_test-Runner \
+ place_object_testrunner \
$(NULL)
Index: testsuite/misc-ming.all/place_object_test.c
===================================================================
RCS file: testsuite/misc-ming.all/place_object_test.c
diff -N testsuite/misc-ming.all/place_object_test.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/place_object_test.c 28 Dec 2006 00:39:59 -0000
1.1
@@ -0,0 +1,89 @@
+/*
+ * 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 tag PlaceObject2
+ *
+ * To see what happen if places a character at the same depth twice.
+ *
+ * Normally, you will see the red square.
+ *
+ * run as ./place_object_test
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 6
+#define OUTPUT_FILENAME "place_object_test.swf"
+
+
+
+
+int
+main(int argc, char** argv)
+{
+ SWFMovie mo;
+ SWFMovieClip mc1, mc2, dejagnuclip;
+ SWFDisplayItem it;
+ SWFShape sh1,sh2;
+ SWFAction ac1, ac2;
+ int i;
+
+ 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);
+
+ //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);
+ sh2 = make_fill_square (300, 300, 60, 60, 255, 0, 0, 0, 0, 0);
+
+ it = SWFMovie_add(mo, (SWFBlock)sh1);
+ SWFDisplayItem_setName(it, "sh1");
+ SWFDisplayItem_setDepth(it, 3); //place the sh1 character at depth 3
+
+ it = SWFMovie_add(mo, (SWFBlock)sh2);
+ SWFDisplayItem_setName(it, "sh2");
+ SWFDisplayItem_setDepth(it, 3); //place the sh2 character at depth 3
again!
+
+ SWFMovie_nextFrame(mo);
+
+
+ //Output movie
+ puts("Saving " OUTPUT_FILENAME );
+ SWFMovie_save(mo, OUTPUT_FILENAME);
+
+ return 0;
+}
Index: testsuite/misc-ming.all/place_object_testrunner.cpp
===================================================================
RCS file: testsuite/misc-ming.all/place_object_testrunner.cpp
diff -N testsuite/misc-ming.all/place_object_testrunner.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/place_object_testrunner.cpp 28 Dec 2006 00:39:59
-0000 1.1
@@ -0,0 +1,76 @@
+/*
+ * 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 "place_object_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(), 1);
+
+ const character* ch = tester.findDisplayItemByDepth(*root, 3);
+ check(ch);
+ xcheck_equals(ch->get_name(), "sh1"); // gnash fails here in that it
lets 'sh2'
+ // replace existing char at depth
3
+}
+
- [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, 2006/12/26
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil...,
Sandro Santilli <=
- [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