gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog configure.ac testsuite/Makefile... [relea


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog configure.ac testsuite/Makefile... [release_0_7_2]
Date: Thu, 02 Nov 2006 14:34:18 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Branch:         release_0_7_2
Changes by:     Sandro Santilli <strk>  06/11/02 14:34:18

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&only_with_tag=release_0_7_2&r1=1.1412.2.46&r2=1.1412.2.47
http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&only_with_tag=release_0_7_2&r1=1.186.2.8&r2=1.186.2.9
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/Makefile.am?cvsroot=gnash&only_with_tag=release_0_7_2&r1=1.19&r2=1.19.2.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/movies.all/Makefile.am?cvsroot=gnash&only_with_tag=release_0_7_2&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/movies.all/gravity_embedded-TestRunner.cpp?cvsroot=gnash&only_with_tag=release_0_7_2&rev=1.1.2.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1412.2.46
retrieving revision 1.1412.2.47
diff -u -b -r1.1412.2.46 -r1.1412.2.47
--- ChangeLog   2 Nov 2006 13:40:31 -0000       1.1412.2.46
+++ ChangeLog   2 Nov 2006 14:34:18 -0000       1.1412.2.47
@@ -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.186.2.8
retrieving revision 1.186.2.9
diff -u -b -r1.186.2.8 -r1.186.2.9
--- configure.ac        2 Nov 2006 00:09:57 -0000       1.186.2.8
+++ configure.ac        2 Nov 2006 14:34:18 -0000       1.186.2.9
@@ -15,7 +15,7 @@
 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 dnl  
 
-dnl $Id: configure.ac,v 1.186.2.8 2006/11/02 00:09:57 rsavoye Exp $
+dnl $Id: configure.ac,v 1.186.2.9 2006/11/02 14:34:18 strk Exp $
 
 AC_PREREQ(2.50)
 AC_INIT(gnash, 0.7.2)
@@ -729,6 +729,7 @@
 testsuite/actionscript.all/Makefile
 testsuite/samples/Makefile
 testsuite/misc-ming.all/Makefile
+testsuite/movies.all/Makefile
 testsuite/server/Makefile
 gui/Makefile
 plugin/Makefile

Index: testsuite/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/Makefile.am,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -u -b -r1.19 -r1.19.2.1
--- testsuite/Makefile.am       24 Oct 2006 13:19:36 -0000      1.19
+++ testsuite/Makefile.am       2 Nov 2006 14:34:18 -0000       1.19.2.1
@@ -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:34:18 -0000       1.1.2.1
@@ -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:34:18 -0000       1.1.2.1
@@ -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);
+
+
+}
+




reply via email to

[Prev in Thread] Current Thread [Next in Thread]