[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog configure.ac testsuite/Makefile...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog configure.ac testsuite/Makefile... |
Date: |
Thu, 02 Nov 2006 14:35:35 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/11/02 14:35:35
Modified files:
. : ChangeLog configure.ac
testsuite : Makefile.am
Added files:
testsuite/movies.all: Makefile.am
gravity_embedded-TestRunner.cpp
Log message:
* configure.ac, testsuite/Makefile.am,
testsuite/movies.all/Makefile.am,
testsuite/movies.all/gravity_embedded-TestRunner.cpp:
New automated testing for gravity_embedded.swf
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1479&r2=1.1480
http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.188&r2=1.189
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/Makefile.am?cvsroot=gnash&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/movies.all/Makefile.am?cvsroot=gnash&rev=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/movies.all/gravity_embedded-TestRunner.cpp?cvsroot=gnash&rev=1.2
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1479
retrieving revision 1.1480
diff -u -b -r1.1479 -r1.1480
--- ChangeLog 2 Nov 2006 14:01:44 -0000 1.1479
+++ ChangeLog 2 Nov 2006 14:35:35 -0000 1.1480
@@ -1,5 +1,12 @@
2006-11-02 Sandro Santilli <address@hidden>
+ * configure.ac, testsuite/Makefile.am,
+ testsuite/movies.all/Makefile.am,
+ testsuite/movies.all/gravity_embedded-TestRunner.cpp:
+ New automated testing for gravity_embedded.swf
+
+2006-11-02 Sandro Santilli <address@hidden>
+
* testsuite/MovieTester.cpp: properly set base_url to
allow movies being tested to load other movies.
Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -b -r1.188 -r1.189
--- configure.ac 30 Oct 2006 11:12:00 -0000 1.188
+++ configure.ac 2 Nov 2006 14:35:35 -0000 1.189
@@ -15,7 +15,7 @@
dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
dnl
-dnl $Id: configure.ac,v 1.188 2006/10/30 11:12:00 nihilus Exp $
+dnl $Id: configure.ac,v 1.189 2006/11/02 14:35:35 strk Exp $
AC_PREREQ(2.50)
AC_INIT(gnash, cvs)
@@ -716,6 +716,7 @@
testsuite/actionscript.all/Makefile
testsuite/samples/Makefile
testsuite/misc-ming.all/Makefile
+testsuite/movies.all/Makefile
testsuite/server/Makefile
plugin/Makefile
plugin/klash/Makefile
Index: testsuite/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/Makefile.am,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- testsuite/Makefile.am 24 Oct 2006 13:19:36 -0000 1.19
+++ testsuite/Makefile.am 2 Nov 2006 14:35:35 -0000 1.20
@@ -7,6 +7,7 @@
server \
samples \
misc-ming.all \
+ movies.all \
actionscript.all \
$(NULL)
Index: testsuite/movies.all/Makefile.am
===================================================================
RCS file: testsuite/movies.all/Makefile.am
diff -N testsuite/movies.all/Makefile.am
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/movies.all/Makefile.am 2 Nov 2006 14:35:35 -0000 1.2
@@ -0,0 +1,88 @@
+## Process this fill with automake to generate Makefile.in
+#
+# 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
+
+
+#
+
+AUTOMAKE_OPTIONS = dejagnu
+
+if ENABLE_MING
+
+CLEANFILES = \
+ gnash-dbg.log \
+ site.exp.bak \
+ testrun.sum \
+ testrun.log
+
+
+INCLUDES = -I.. \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/libbase \
+ -I$(top_srcdir)/server \
+ -I$(top_srcdir)/server/parser \
+ -I$(top_srcdir)/libgeometry \
+ -I$(top_srcdir)/testsuite \
+ $(MING_CFLAGS) \
+ $(NULL)
+
+
+check_PROGRAMS = \
+ gravity_embedded-TestRunner \
+ $(NULL)
+
+gravity_embedded_TestRunner_SOURCES = \
+ gravity_embedded-TestRunner.cpp \
+ $(NULL)
+gravity_embedded_TestRunner_LDADD = \
+ $(top_builddir)/testsuite/libtestsuite.la \
+ $(NULL)
+gravity_embedded_TestRunner_CXXFLAGS = \
+ -DSRCDIR='"$(srcdir)"' \
+ $(NULL)
+gravity_embedded_TestRunner_DEPENDENCIES = \
+ gravity-embedded.swf \
+ gravity.swf \
+ $(NULL)
+
+clean-local:
+
+EXTRA_DIST = gravity_embedded.swf gravity.swf
+
+TEST_DRIVERS = ../simple.exp
+TEST_CASES = \
+ gravity_embedded-TestRunner
+
+check-DEJAGNU: site-update $(check_PROGRAMS)
+ @runtest=$(RUNTEST); \
+ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+ $$runtest $(RUNTESTFLAGS) $(TEST_DRIVERS); \
+ else \
+ echo "WARNING: could not find \`runtest'" 1>&2; \
+ for i in "$(TEST_CASES)"; do \
+ $(SHELL) $$i; \
+ done; \
+ fi
+
+site-update: site.exp
+ @rm -fr site.exp.bak
+ @cp site.exp site.exp.bak
+ @sed -e '/testcases/d' site.exp.bak > site.exp
+ @echo "# This is a list of the pre-compiled testcases" >> site.exp
+ @echo "set testcases \"$(TEST_CASES)\"" >> site.exp
+endif
+
Index: testsuite/movies.all/gravity_embedded-TestRunner.cpp
===================================================================
RCS file: testsuite/movies.all/gravity_embedded-TestRunner.cpp
diff -N testsuite/movies.all/gravity_embedded-TestRunner.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/movies.all/gravity_embedded-TestRunner.cpp 2 Nov 2006
14:35:35 -0000 1.2
@@ -0,0 +1,146 @@
+/*
+ * 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 "gravity-embedded.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 <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();
+
+ dbglogfile.setVerbosity(1);
+
+ sprite_instance* root = tester.getRootMovie();
+ assert(root);
+
+ //const DisplayList& dl = root->getDisplayList();
+ //dl.dump(std::cout);
+
+ check_equals(root->get_frame_count(), 1);
+
+ // give loader time to load the actual gravity.swf movie ?
+ //sleep(1);
+
+ // used to get members
+ as_value tmp;
+
+ const character* loaded = tester.findDisplayItemByDepth(*root, 8);
+ check(loaded);
+ check_equals(loaded->get_parent(), root);
+
+ // we need a const_cast as get_member *might* eventually
+ // change the character (fetching _x shouldn't change it though)
+ check(const_cast<character*>(loaded)->get_member("_xscale", &tmp));
+ check_equals(tmp, as_value("50"));
+
+ check_equals(loaded->get_height(), 2056);
+ check_equals(loaded->get_width(), 2056);
+
+ const character* text = tester.findDisplayItemByDepth(*root, 7);
+ check(text);
+
+ check_equals(string(text->get_text_value()), "50");
+ check(!tester.isMouseOverMouseEntity());
+
+ // click some on the "smaller" button
+ tester.movePointerTo(474, 18);
+ check(tester.isMouseOverMouseEntity());
+ tester.pressMouseButton();
+ check_equals(string(text->get_text_value()), "50");
+ tester.depressMouseButton();
+ check_equals(string(text->get_text_value()), "48");
+ check(const_cast<character*>(loaded)->get_member("_xscale", &tmp));
+ check_equals(round(tmp.to_number()), 48);
+ check(const_cast<character*>(loaded)->get_member("_yscale", &tmp));
+ check_equals(round(tmp.to_number()), 48);
+ tester.pressMouseButton();
+ check_equals(string(text->get_text_value()), "48");
+ tester.depressMouseButton();
+ check_equals(string(text->get_text_value()), "46");
+ check(const_cast<character*>(loaded)->get_member("_xscale", &tmp));
+ check_equals(round(tmp.to_number()), 46);
+ check(const_cast<character*>(loaded)->get_member("_yscale", &tmp));
+ check_equals(round(tmp.to_number()), 46);
+ tester.pressMouseButton();
+ check_equals(string(text->get_text_value()), "46");
+ tester.depressMouseButton();
+ check_equals(string(text->get_text_value()), "44");
+ check(const_cast<character*>(loaded)->get_member("_xscale", &tmp));
+ check_equals(round(tmp.to_number()), 44);
+ check(const_cast<character*>(loaded)->get_member("_yscale", &tmp));
+ check_equals(round(tmp.to_number()), 44);
+
+ // click some on the "larger" button
+ tester.movePointerTo(580, 18);
+ check(tester.isMouseOverMouseEntity());
+ tester.pressMouseButton();
+ check_equals(string(text->get_text_value()), "44");
+ tester.depressMouseButton();
+ check_equals(string(text->get_text_value()), "46");
+ check(const_cast<character*>(loaded)->get_member("_xscale", &tmp));
+ check_equals(round(tmp.to_number()), 46);
+ check(const_cast<character*>(loaded)->get_member("_yscale", &tmp));
+ check_equals(round(tmp.to_number()), 46);
+ tester.pressMouseButton();
+ check_equals(string(text->get_text_value()), "46");
+ tester.depressMouseButton();
+ check_equals(string(text->get_text_value()), "48");
+ check(const_cast<character*>(loaded)->get_member("_xscale", &tmp));
+ check_equals(round(tmp.to_number()), 48);
+ check(const_cast<character*>(loaded)->get_member("_yscale", &tmp));
+ check_equals(round(tmp.to_number()), 48);
+ tester.pressMouseButton();
+ check_equals(string(text->get_text_value()), "48");
+ tester.depressMouseButton();
+ check_equals(string(text->get_text_value()), "50");
+ check(const_cast<character*>(loaded)->get_member("_xscale", &tmp));
+ check_equals(round(tmp.to_number()), 50);
+ check(const_cast<character*>(loaded)->get_member("_yscale", &tmp));
+ check_equals(round(tmp.to_number()), 50);
+ tester.pressMouseButton();
+ check_equals(string(text->get_text_value()), "50");
+ tester.depressMouseButton();
+ check_equals(string(text->get_text_value()), "52");
+ check(const_cast<character*>(loaded)->get_member("_xscale", &tmp));
+ check_equals(round(tmp.to_number()), 52);
+ check(const_cast<character*>(loaded)->get_member("_yscale", &tmp));
+ check_equals(round(tmp.to_number()), 52);
+
+
+}
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog configure.ac testsuite/Makefile...,
Sandro Santilli <=