[Scummvm-cvs-logs] SF.net SVN: scummvm:[52134] scummvm/branches/gsoc2010-testbed/engines/ testbed

sud03r at users.sourceforge.net sud03r at users.sourceforge.net
Tue Aug 17 00:04:16 CEST 2010


Revision: 52134
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52134&view=rev
Author:   sud03r
Date:     2010-08-16 22:04:15 +0000 (Mon, 16 Aug 2010)

Log Message:
-----------
TESTBED: added a README file, some description fixes

Modified Paths:
--------------
    scummvm/branches/gsoc2010-testbed/engines/testbed/graphics.cpp

Added Paths:
-----------
    scummvm/branches/gsoc2010-testbed/engines/testbed/README

Added: scummvm/branches/gsoc2010-testbed/engines/testbed/README
===================================================================
--- scummvm/branches/gsoc2010-testbed/engines/testbed/README	                        (rev 0)
+++ scummvm/branches/gsoc2010-testbed/engines/testbed/README	2010-08-16 22:04:15 UTC (rev 52134)
@@ -0,0 +1,36 @@
+
+Testbed is a framework to test backend code.
+
+It implements a game-engine which invokes the backend code using the OSystem Interface, verifies
+the behavior by interacting with the user, and then produce results.
+
+Each distinct interface defined in the OSystem API is referred as a Subsystem, namely:
+* Graphics
+* Audio
+* Midi
+* FileSyatem
+* Savegames
+* Events
+* Timer/Mutexes
+
+There are testsuites for each one of these subsystems.
+
+
+Adding a New Test
+-----------------
+If you are willing to add a test relating to one of these subsystems say 'Foo', then :
+1). Modify the file 'foo.h' to include the declaration of your test-invoking function.
+2). Define that function in 'foo.cpp' (similar to other tests).
+3). Add the test to the subsystem testsuite by using addTest() method in the constructor.
+
+
+Adding a New Testsuite
+-----------------------
+If you are willing to add a new Testsuite, create a copy of template.h. call it as say 'your_suite.h'.
+Your Testsuite will be a subclass of Testsuite class deined in 'testsuite.h'.
+Now write test-invoking functions for every test you want to include.
+Add those tests to your_suite using the call to : 'addTest(name, InvokingFunction)'.
+
+Implement the required functions in 'your_test.cpp'
+Add that file to module.mk. Re-Compile and run.
+


Property changes on: scummvm/branches/gsoc2010-testbed/engines/testbed/README
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Modified: scummvm/branches/gsoc2010-testbed/engines/testbed/graphics.cpp
===================================================================
--- scummvm/branches/gsoc2010-testbed/engines/testbed/graphics.cpp	2010-08-16 21:18:38 UTC (rev 52133)
+++ scummvm/branches/gsoc2010-testbed/engines/testbed/graphics.cpp	2010-08-16 22:04:15 UTC (rev 52134)
@@ -601,7 +601,7 @@
 
 TestExitStatus GFXtests::mouseMovements() {
 	Testsuite::clearScreen();
-	// Make mouse visible
+	// Ensure that the cursor is visible
 	CursorMan.showMouse(true);
 
 	Common::String info = "Testing Automated Mouse movements.\n"
@@ -615,6 +615,8 @@
 
 	// Draw Rectangle
 	Graphics::Surface *screen = g_system->lockScreen();
+	// Ensure that 2 represents red in current palette
+	GFXTestSuite::setCustomColor(255, 0, 0);
 	screen->fillRect(Common::Rect::center(106, 106, 14, 14), 2);
 	g_system->unlockScreen();
 
@@ -736,6 +738,12 @@
 		"The expected cursor size is drawn as a rectangle.\n The cursor should approximately match that rectangle.\n"
 		"This may take time, You may skip the later scalers and just examine the first three i.e 1x, 2x and 3x";
 
+	bool isAspectRatioCorrected = g_system->getFeatureState(OSystem::kFeatureAspectRatioCorrection);
+
+	if (isAspectRatioCorrected) {
+		info += "\nDisabling Aspect ratio correction, for letting cusors match exactly, will be restored after this test.";
+	}
+	
 	if (Testsuite::handleInteractiveInput(info, "OK", "Skip", kOptionRight)) {
 		Testsuite::logPrintf("Info! Skipping test : Scaled Cursors\n");
 		return kTestSkipped;
@@ -746,7 +754,6 @@
 		maxLimit = 3;
 	}
 
-	bool isAspectRatioCorrected = g_system->getFeatureState(OSystem::kFeatureAspectRatioCorrection);
 
 	if (isAspectRatioCorrected) {	
 		g_system->beginGFXTransaction();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list