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

sud03r at users.sourceforge.net sud03r at users.sourceforge.net
Thu Jul 22 21:59:11 CEST 2010


Revision: 51160
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51160&view=rev
Author:   sud03r
Date:     2010-07-22 19:59:11 +0000 (Thu, 22 Jul 2010)

Log Message:
-----------
TESTBED: some changes in interaction messages, couple of fixes

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

Modified: scummvm/branches/gsoc2010-testbed/engines/testbed/config.cpp
===================================================================
--- scummvm/branches/gsoc2010-testbed/engines/testbed/config.cpp	2010-07-22 19:30:20 UTC (rev 51159)
+++ scummvm/branches/gsoc2010-testbed/engines/testbed/config.cpp	2010-07-22 19:59:11 UTC (rev 51160)
@@ -30,7 +30,7 @@
 TestbedOptionsDialog::TestbedOptionsDialog(Common::Array<Testsuite *> &tsList, TestbedConfigManager *tsConfMan) : GUI::Dialog("Browser") {
 	
 	new GUI::StaticTextWidget(this, "Browser.Headline", "Select Testsuites to Execute");
-	new GUI::StaticTextWidget(this, "Browser.Path", "Use Double click to select / deselect");
+	new GUI::StaticTextWidget(this, "Browser.Path", "Use Doubleclick to select/deselect");
 
 	// Construct a String Array
 	Common::Array<Testsuite *>::const_iterator iter;
@@ -56,7 +56,7 @@
 	_testListDisplay->setEditable(false);
 
 	_selectButton = new GUI::ButtonWidget(this, "Browser.Up", "Deselect All", kTestbedDeselectAll, 0);
-	new GUI::ButtonWidget(this, "Browser.Cancel", "Continue", GUI::kCloseCmd);
+	new GUI::ButtonWidget(this, "Browser.Cancel", "Run tests", GUI::kCloseCmd);
 	new GUI::ButtonWidget(this, "Browser.Choose", "Exit Testbed", kTestbedQuitCmd);
 }
 
@@ -75,7 +75,6 @@
 				ts->enable(true);
 				_testListDisplay->markAsSelected(_testListDisplay->getSelected());
 			}
-			ts->enable(!ts->isEnabled());
 		}
 		break;
 

Modified: scummvm/branches/gsoc2010-testbed/engines/testbed/graphics.cpp
===================================================================
--- scummvm/branches/gsoc2010-testbed/engines/testbed/graphics.cpp	2010-07-22 19:30:20 UTC (rev 51159)
+++ scummvm/branches/gsoc2010-testbed/engines/testbed/graphics.cpp	2010-07-22 19:59:11 UTC (rev 51160)
@@ -258,6 +258,12 @@
 		Common::String info = disableCursorPalette ? "Using Game Palette" : "Using cursor palette";
 		info += " to render the cursor, Click to finish";
 
+		Common::String gfxScalarMode(gfxModeName);
+
+		if (!gfxScalarMode.equals("")) {
+			info = "The cursor size (yellow) should match the red rectangle.";
+		}
+		
 		Testsuite::writeOnScreen(info, pt);
 
 		info = "GFX Mode";
@@ -268,7 +274,6 @@
 		info += "Cursor scale: ";
 		info += cScale;
 
-		Common::String gfxScalarMode(gfxModeName);
 		Common::Rect estimatedCursorRect;
 
 		if (!gfxScalarMode.equals("")) {
@@ -572,7 +577,7 @@
 		passed = false;
 	}
 
-	if (!Testsuite::handleInteractiveInput("Did Cursor tests went as you were expecting?")) {
+	if (!Testsuite::handleInteractiveInput("Did test run as was described?")) {
 		passed = false;
 	}
 
@@ -593,16 +598,22 @@
 	CursorMan.showMouse(true);
 	
 	Common::String info = "Testing Automated Mouse movements.\n"
-						"You should expect cursor to automatically move from (0, 0) to (100, 100)";
+						"You should expect cursor hotspot(top-left corner) to automatically move from (0, 0) to (100, 100).\n"
+						"There we have a rectangle drawn, finally the rectangle should symmetrically contain the cursor.";
 
 	if (Testsuite::handleInteractiveInput(info, "OK", "Skip", kOptionRight)) {
 		Testsuite::logPrintf("Info! Skipping test : Mouse Movements");
 		return true;
 	}
 	
+	// Draw Rectangle
+	Graphics::Surface *screen = g_system->lockScreen();
+	screen->fillRect(Common::Rect::center(106, 106, 14, 14), 2);
+	g_system->unlockScreen();
+
 	// Testing Mouse Movements now!
-	Common::Point pt(0, 100);
-	Testsuite::writeOnScreen("Moving mouse automatically from (0, 0) to (100, 100)", pt);
+	Common::Point pt(0, 10);
+	Testsuite::writeOnScreen("Moving mouse hotspot automatically from (0, 0) to (100, 100)", pt);
 	g_system->warpMouse(0, 0);
 	g_system->updateScreen();
 	g_system->delayMillis(1000);
@@ -613,11 +624,11 @@
 		g_system->updateScreen();
 	}
 
-	Testsuite::clearScreen();
-	Testsuite::writeOnScreen("Mouse Moved to (100, 100)", pt);
-	g_system->delayMillis(1000);
+	Testsuite::writeOnScreen("Mouse hotspot Moved to (100, 100)", pt);
+	g_system->delayMillis(1500);
+	CursorMan.showMouse(false);
 
-	if (Testsuite::handleInteractiveInput("Were you able to see an automated mouse movement?", "Yes", "No", kOptionRight)) {
+	if (Testsuite::handleInteractiveInput("Was the cursor symmetrically contained in the rectangle at (100, 100)?", "Yes", "No", kOptionRight)) {
 		return false;
 	}
 
@@ -652,7 +663,7 @@
 	g_system->updateScreen();
 	g_system->delayMillis(1000);
 
-	if (Testsuite::handleInteractiveInput("Did the test worked as you were expecting?", "Yes", "No", kOptionRight)) {
+	if (Testsuite::handleInteractiveInput("Did you see yellow rectangle?", "Yes", "No", kOptionRight)) {
 		return false;
 	}
 
@@ -666,7 +677,7 @@
 bool GFXtests::iconifyWindow() {
 	
 	Testsuite::clearScreen();
-	Common::String info = "Testing Iconify Window mode.\n If the feature is supported by the backend,"
+	Common::String info = "Testing Iconify Window mode.\n If the feature is supported by the backend, "
 		"you should expect the window to be minimized.\n However you would manually need to de-iconify.";
 
 	if (Testsuite::handleInteractiveInput(info, "OK", "Skip", kOptionRight)) {
@@ -700,7 +711,7 @@
 		Testsuite::displayMessage("feature not supported");
 	}
 
-	if (Testsuite::handleInteractiveInput("Did the test worked as you were expecting?", "Yes", "No", kOptionRight)) {
+	if (Testsuite::handleInteractiveInput("Did you see window minimized?", "Yes", "No", kOptionRight)) {
 		return false;
 	}
 
@@ -714,9 +725,9 @@
 
 	Testsuite::clearScreen();
 	Common::String info = "Testing : Scaled cursors\n"
-		"Here every graphics mode is tried with a cursorTargetScale of 1,2 and 3.\n"
+		"Here every graphics mode is tried with a cursorTargetScale of 1, 2 and 3.\n"
 		"The expected cursor size is drawn as a rectangle, the cursor should entirely cover 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";
+		"This may take time, You may skip the later scalers and just examine the first three i.e 1x, 2x and 3x";
 
 	if (Testsuite::handleInteractiveInput(info, "OK", "Skip", kOptionRight)) {
 		Testsuite::logPrintf("Info! Skipping test : Scaled Cursors");
@@ -724,7 +735,7 @@
 	}
 
 	int maxLimit = 1000;
-	if (!Testsuite::handleInteractiveInput("Do you want to restrict scalers to 1x, 2x and 3x only?", "Yes", "No", kOptionRight)) {
+	if (!Testsuite::handleInteractiveInput("Do You want to restrict scalers to 1x, 2x and 3x only?", "Yes", "No", kOptionRight)) {
 		maxLimit = 3;
 	}
 
@@ -786,7 +797,7 @@
 	}
 
 	Common::Point pt(0, 100);
-	Testsuite::writeOnScreen("If Shaking effect works,this should shake!", pt);
+	Testsuite::writeOnScreen("If Shaking Effect works, this should shake!", pt);
 	int times = 35;
 	while (times--) {
 		g_system->setShakePos(10);
@@ -796,7 +807,7 @@
 	}
 	g_system->delayMillis(1500);
 
-	if (Testsuite::handleInteractiveInput("Did the shaking test worked as you were expecting?", "Yes", "No", kOptionRight)) {
+	if (Testsuite::handleInteractiveInput("Did the Shaking test worked as you were expecting?", "Yes", "No", kOptionRight)) {
 		Testsuite::logDetailedPrintf("Shaking Effect didn't worked");
 		return false;
 	}

Modified: scummvm/branches/gsoc2010-testbed/engines/testbed/misc.cpp
===================================================================
--- scummvm/branches/gsoc2010-testbed/engines/testbed/misc.cpp	2010-07-22 19:30:20 UTC (rev 51159)
+++ scummvm/branches/gsoc2010-testbed/engines/testbed/misc.cpp	2010-07-22 19:59:11 UTC (rev 51160)
@@ -67,6 +67,16 @@
 }
 
 bool MiscTests::testDateTime() {
+	
+	if (Testsuite::isSessionInteractive) {
+		if (Testsuite::handleInteractiveInput("Testing the date time API implementation", "Continue", "Skip", kOptionRight)) {
+			Testsuite::logPrintf("Info! Date time tests skipped by the user.\n");
+			return true;
+		}
+		
+		Testsuite::writeOnScreen("Verifying Date-Time...", Common::Point(0, 100));
+	}
+	
 	TimeDate t1, t2;
 	g_system->getTimeAndDate(t1);
 	Testsuite::logDetailedPrintf("Current Time and Date: ");
@@ -76,7 +86,6 @@
 	if (Testsuite::isSessionInteractive) {
 		// Directly verify date
 		dateTimeNow = "We expect the current date time to be " + dateTimeNow;
-		Testsuite::clearScreen();
 		if (Testsuite::handleInteractiveInput(dateTimeNow, "Correct!", "Wrong", kOptionRight)) {
 			return false;
 		}
@@ -117,6 +126,15 @@
 }
 
 bool MiscTests::testMutexes() {
+	
+	if (Testsuite::isSessionInteractive) {
+		if (Testsuite::handleInteractiveInput("Testing the Mutual Exclusion API implementation", "Continue", "Skip", kOptionRight)) {
+			Testsuite::logPrintf("Info! Mutex tests skipped by the user.\n");
+			return true;
+		}
+		Testsuite::writeOnScreen("Installing mutex", Common::Point(0, 100));
+	}
+
 	static SharedVars sv = {1, 1, true, g_system->createMutex()};
 
 	if (g_system->getTimerManager()->installTimerProc(criticalSection, 100000, &sv)) {
@@ -130,6 +148,9 @@
 	g_system->unlockMutex(sv.mutex);
 
 	// wait till timed process exits
+	if (Testsuite::isSessionInteractive) {
+		Testsuite::writeOnScreen("Waiting for 3s so that timed processes finish", Common::Point(0, 100));
+	}
 	g_system->delayMillis(3000);
 
 	Testsuite::logDetailedPrintf("Final Value: %d %d\n", sv.first, sv.second);


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