[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/MovieTester.cpp tests...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/MovieTester.cpp tests... |
Date: |
Thu, 27 Sep 2007 11:44:33 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/09/27 11:44:33
Modified files:
. : ChangeLog
testsuite : MovieTester.cpp MovieTester.h
testsuite/misc-ming.all: simple_loop_testrunner.cpp
Log message:
* testsuite/MovieTester.{cpp,h}: add restart() method.
* testsuite/misc-ming.all/simple_loop_testrunner.cpp: fix
expected
invalidated bounds: we expect it to be the WORLD range on
start
and restart. Test ::restart itself.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4441&r2=1.4442
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/MovieTester.cpp?cvsroot=gnash&r1=1.51&r2=1.52
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/MovieTester.h?cvsroot=gnash&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/simple_loop_testrunner.cpp?cvsroot=gnash&r1=1.9&r2=1.10
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4441
retrieving revision 1.4442
diff -u -b -r1.4441 -r1.4442
--- ChangeLog 27 Sep 2007 10:44:45 -0000 1.4441
+++ ChangeLog 27 Sep 2007 11:44:32 -0000 1.4442
@@ -1,5 +1,12 @@
2007-09-27 Sandro Santilli <address@hidden>
+ * testsuite/MovieTester.{cpp,h}: add restart() method.
+ * testsuite/misc-ming.all/simple_loop_testrunner.cpp: fix expected
+ invalidated bounds: we expect it to be the WORLD range on start
+ and restart. Test ::restart itself.
+
+2007-09-27 Sandro Santilli <address@hidden>
+
* server/movie_root.{cpp,h}: add the concept of an 'invalidated'
stage/movie_root. The Stage is only invalidated when the background
color changes, dunno if it should also be invalidated by changes
Index: testsuite/MovieTester.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/MovieTester.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- testsuite/MovieTester.cpp 12 Sep 2007 10:57:06 -0000 1.51
+++ testsuite/MovieTester.cpp 27 Sep 2007 11:44:33 -0000 1.52
@@ -492,4 +492,12 @@
gnash::set_sound_handler(_sound_handler.get());
}
+void
+MovieTester::restart()
+{
+ _movie_root->restart();
+ _movie = _movie_root->getLevel(0).get();
+ render();
+}
+
} // namespace gnash
Index: testsuite/MovieTester.h
===================================================================
RCS file: /sources/gnash/gnash/testsuite/MovieTester.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- testsuite/MovieTester.h 12 Sep 2007 09:21:03 -0000 1.30
+++ testsuite/MovieTester.h 27 Sep 2007 11:44:33 -0000 1.31
@@ -239,6 +239,14 @@
/// Return true if this build of gnash supports video
bool canTestVideo() const;
+ /// Restart the movie
+ //
+ /// NOTE: the movie returned by getRootMovie() will likely be
+ /// NOT the real root movie anymore, so call getRootMovie
+ /// again after this call.
+ ///
+ void restart();
+
private:
/// Initialize testing renderers
Index: testsuite/misc-ming.all/simple_loop_testrunner.cpp
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-ming.all/simple_loop_testrunner.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- testsuite/misc-ming.all/simple_loop_testrunner.cpp 1 Jul 2007 10:55:06
-0000 1.9
+++ testsuite/misc-ming.all/simple_loop_testrunner.cpp 27 Sep 2007 11:44:33
-0000 1.10
@@ -36,18 +36,29 @@
using namespace gnash;
using namespace std;
+void testAll(MovieTester& tester);
+
int
main(int /*argc*/, char** /*argv*/)
{
- typedef gnash::geometry::SnappingRanges2d<int> Ranges;
- typedef gnash::geometry::Range2d<int> Bounds;
-
string filename = string(TGTDIR) + string("/") + string(INPUT_FILENAME);
MovieTester tester(filename);
gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
dbglogfile.setVerbosity(1);
+ testAll(tester);
+ tester.restart();
+ testAll(tester);
+
+}
+
+
+void testAll(MovieTester& tester)
+{
+ typedef gnash::geometry::SnappingRanges2d<int> Ranges;
+ typedef gnash::geometry::Range2d<int> Bounds;
+
Ranges invalidated;
sprite_instance* root = tester.getRootMovie();
assert(root);
@@ -59,7 +70,9 @@
check_equals(root->get_current_frame(), 0);
check_equals(root->getDisplayList().size(), 0); // no chars
invalidated = tester.getInvalidatedRanges();
- check( invalidated.isNull() );
+ // I think it makes sense for the first frame to have world
+ // inv bounds.
+ check( invalidated.isWorld() );
tester.advance(); // FRAME 2/4
@@ -128,6 +141,4 @@
check( tester.findDisplayItemByDepth(*root,
4+character::staticDepthOffset) );
invalidated = tester.getInvalidatedRanges();
check( invalidated.contains(Bounds(120, 0, 180, 60)) );
-
}
-