gnash-commit
[Top][All Lists]
Advanced

[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: Fri, 22 Dec 2006 09:05:08 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/12/22 09:05:07

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: Makefile.am root_stop_test.c 
Added files:
        testsuite/misc-ming.all: root_stop_testrunner.cpp 

Log message:
        2006-12-22 Sandro Santilli <address@hidden>
        
                * testsuite/misc-ming.all/Makefile.am: enabled run of
                  root_stop_testrunner by 'make check'
        
        2006-12-22 Zou Lunkai <address@hidden>
        
                * testsuite/misc-ming.all/root_stop_test.c: updated
                  testcase.
                * testsuite/misc-ming.all/root_stop_testrunner.cpp:
                  test runner for root_stop_test.swf

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1993&r2=1.1994
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.43&r2=1.44
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/root_stop_test.c?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/root_stop_testrunner.cpp?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1993
retrieving revision 1.1994
diff -u -b -r1.1993 -r1.1994
--- ChangeLog   21 Dec 2006 23:07:33 -0000      1.1993
+++ ChangeLog   22 Dec 2006 09:05:07 -0000      1.1994
@@ -1,4 +1,16 @@
 
+2006-12-22 Sandro Santilli <address@hidden>
+
+       * testsuite/misc-ming.all/Makefile.am: enabled run of
+         root_stop_testrunner by 'make check'
+
+2006-12-22 Zou Lunkai <address@hidden>
+
+       * testsuite/misc-ming.all/root_stop_test.c: updated
+         testcase.
+       * testsuite/misc-ming.all/root_stop_testrunner.cpp:
+         test runner for root_stop_test.swf
+
 2006-12-21 Sandro Santilli <address@hidden>
 
        * testsuite/misc-ming.all/Makefile.am: added rules

Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- testsuite/misc-ming.all/Makefile.am 21 Dec 2006 23:07:34 -0000      1.43
+++ testsuite/misc-ming.all/Makefile.am 22 Dec 2006 09:05:07 -0000      1.44
@@ -62,6 +62,7 @@
        timeline_var_test \
        timeline_var_test-Runner \
        root_stop_test \
+       root_stop_testrunner \
        $(NULL)
 
 # TESTS = \
@@ -152,6 +153,17 @@
 root_stop_test.swf: root_stop_test
        ./root_stop_test $(top_srcdir)/testsuite/media
 
+root_stop_testrunner_SOURCES = \
+       root_stop_testrunner.cpp \
+       $(NULL)
+root_stop_testrunner_LDADD = \
+       $(top_builddir)/testsuite/libtestsuite.la \
+       $(NULL)
+root_stop_testrunner_DEPENDENCIES = \
+       $(top_builddir)/testsuite/libtestsuite.la \
+       root_stop_test.swf      \
+       $(NULL)
+
 spritehier.swf: spritehier
        ./spritehier
 
@@ -226,6 +238,7 @@
        ButtonEventsTest-Runner \
        VarAndCharClashTest-Runner \
        timeline_var_test-Runner \
+       root_stop_testrunner \
        $(NULL)
 
 

Index: testsuite/misc-ming.all/root_stop_test.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/root_stop_test.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/misc-ming.all/root_stop_test.c    21 Dec 2006 23:07:34 -0000      
1.1
+++ testsuite/misc-ming.all/root_stop_test.c    22 Dec 2006 09:05:07 -0000      
1.2
@@ -94,6 +94,7 @@
 
   //dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 
0, 800, 600);
   //SWFMovie_add(mo, (SWFBlock)dejagnuclip);
+       //SWFMovie_nextFrame(mo); 
 
        ac2 = action_in_sprite();
        sh2 = make_fill_square (300, 300, 60, 60, 255, 0, 0, 255, 0, 0);
@@ -106,12 +107,14 @@
                SWFMovieClip_nextFrame(mc);
        }
        
-
+       SWFDisplayItem it;
   ac1 =  action_in_root();
   SWFMovie_add(mo, (SWFBlock)ac1);
-       SWFMovie_add(mo, (SWFBlock)mc);  //add the movieClip to the _root
+       it = SWFMovie_add(mo, (SWFBlock)mc);  //add the movieClip to the _root
+       SWFDisplayItem_setName(it, "mc_in_root"); //name the movieclip
   SWFMovie_nextFrame(mo); 
 
+       
        sh1 = make_fill_square(270, 270, 120, 120, 255, 0, 0, 0, 0, 0);
        SWFMovie_add(mo, (SWFBlock)sh1); //add the black square to the _root's 
2nd frame
        SWFMovie_nextFrame(mo); 

Index: testsuite/misc-ming.all/root_stop_testrunner.cpp
===================================================================
RCS file: testsuite/misc-ming.all/root_stop_testrunner.cpp
diff -N testsuite/misc-ming.all/root_stop_testrunner.cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/root_stop_testrunner.cpp    22 Dec 2006 09:05:07 
-0000      1.1
@@ -0,0 +1,62 @@
+/* 
+ *   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 "root_stop_test.swf"
+
+#define HAVE_CONFIG_H  1
+
+#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 = INPUT_FILENAME;
+       MovieTester tester(filename);
+
+       sprite_instance* root = tester.getRootMovie();
+       assert(root);
+
+       check_equals(root->get_frame_count(), 2);
+       check_equals(root->get_current_frame(), 0);
+       const character* mc = tester.findDisplayItemByName(*root, "mc_in_root");
+       check(mc);
+       
+       check_equals(root->get_play_state(), sprite_instance::STOP);
+       tester.advance();
+       check_equals(root->get_play_state(), sprite_instance::PLAY);
+       tester.advance();
+       check_equals(root->get_play_state(), sprite_instance::STOP);
+       tester.advance();
+       check_equals(root->get_play_state(), sprite_instance::PLAY);
+       
+       return 0;
+}
+




reply via email to

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