gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r9961: Add simple MovieTester-based


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r9961: Add simple MovieTester-based runner for EmbeddedSound, enable automatic
Date: Wed, 08 Oct 2008 12:47:01 +0200
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9961
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Wed 2008-10-08 12:47:01 +0200
message:
  Add simple MovieTester-based runner for EmbeddedSound, enable automatic
  run of test.
added:
  testsuite/misc-ming.all/EmbeddedSoundTest-Runner.cpp
modified:
  testsuite/misc-ming.all/Makefile.am
=== added file 'testsuite/misc-ming.all/EmbeddedSoundTest-Runner.cpp'
--- a/testsuite/misc-ming.all/EmbeddedSoundTest-Runner.cpp      1970-01-01 
00:00:00 +0000
+++ b/testsuite/misc-ming.all/EmbeddedSoundTest-Runner.cpp      2008-10-08 
10:47:01 +0000
@@ -0,0 +1,58 @@
+/* 
+ *   Copyright (C) 2007, 2008 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 3 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 "EmbeddedSoundTest.swf"
+
+#include "MovieTester.h"
+#include "sprite_instance.h"
+#include "character.h"
+#include "DisplayList.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(TGTDIR) + string("/") + string(INPUT_FILENAME);
+       MovieTester tester(filename);
+
+       gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
+       dbglogfile.setVerbosity(1);
+
+       sprite_instance* root = tester.getRootMovie();
+       assert(root);
+
+    const size_t framecount = root->get_frame_count();
+
+       while (true)
+       {
+        if (root->get_current_frame() + 1 == framecount) break;
+
+               tester.advance();
+       }
+
+}
+

=== modified file 'testsuite/misc-ming.all/Makefile.am'
--- a/testsuite/misc-ming.all/Makefile.am       2008-09-15 11:31:55 +0000
+++ b/testsuite/misc-ming.all/Makefile.am       2008-10-08 10:47:01 +0000
@@ -179,6 +179,12 @@
        instanceNameTest \
        $(NULL)
 
+if MING_VERSION_0_4_3
+check_PROGRAMS += \
+       EmbeddedSoundTest \
+       $(NULL)
+endif
+
 if MING_VERSION_0_4
 check_PROGRAMS += \
        opcode_guard_test \
@@ -220,6 +226,10 @@
        ButtonEventsTest-Runner 
 endif
 
+if MING_VERSION_0_4_3
+check_PROGRAMS += EmbeddedSoundTest-Runner
+endif
+
 check_SCRIPTS = \
        timeline_var_test-Runner \
        place_object_testrunner \
@@ -1417,6 +1427,37 @@
 XMLSocketTest.swf: XMLSocketTest
        ./XMLSocketTest $(top_srcdir)/testsuite/media
 
+EmbeddedSoundTest_SOURCES = \
+       EmbeddedSoundTest.c
+       $(NULL)
+
+EmbeddedSoundTest_CFLAGS = \
+       -DMEDIADIR='"$(abs_mediadir)"' \
+       $(NULL)
+
+EmbeddedSoundTest_LDADD = libgnashmingutils.la
+
+EmbeddedSoundTest.swf: EmbeddedSoundTest
+       ./EmbeddedSoundTest $(top_srcdir)/testsuite/media
+
+EmbeddedSoundTest_Runner_SOURCES = \
+       EmbeddedSoundTest-Runner.cpp \
+       $(NULL)
+
+EmbeddedSoundTest_Runner_CXXFLAGS = \
+       -DSRCDIR='"$(srcdir)"' \
+       -DTGTDIR='"$(abs_builddir)"' \
+       $(NULL)
+
+EmbeddedSoundTest_Runner_LDADD = \
+       $(top_builddir)/testsuite/libtestsuite.la \
+       $(NULL)
+
+EmbeddedSoundTest_Runner_DEPENDENCIES = \
+       $(top_builddir)/testsuite/libtestsuite.la \
+       EmbeddedSoundTest.swf   \
+       $(NULL)
+
 registerClassTest_SOURCES =    \
        registerClassTest.c     \
        $(NULL)
@@ -1881,6 +1922,10 @@
        instanceNameTestRunner \
        $(NULL)
 
+if MING_VERSION_0_4_3
+TEST_CASES += EmbeddedSoundTest-Runner
+endif
+
 if MING_VERSION_0_4
 TEST_CASES += \
        opcode_guard_testrunner \


reply via email to

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