From f6be0274df5c9dbdf6de262d310460e2d1d8b2e0 Mon Sep 17 00:00:00 2001 From: Neeraj Kumar Date: Tue, 20 Jul 2010 20:20:44 +0000 Subject: TESTBED: added preface to tests, can skip tests now. svn-id: r51073 --- engines/testbed/events.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'engines/testbed/events.cpp') diff --git a/engines/testbed/events.cpp b/engines/testbed/events.cpp index e0c44799ec..a7c0d534cf 100644 --- a/engines/testbed/events.cpp +++ b/engines/testbed/events.cpp @@ -101,6 +101,17 @@ char EventTests::keystrokeToChar() { } bool EventTests::mouseEvents() { + + Testsuite::clearScreen(); + Common::String info = "Testing Mouse events.\n " + "Any movement/click generated by L/R/M mouse buttons or the mouse wheel should be detected.\n" + "Press X to exit"; + + if (Testsuite::handleInteractiveInput(info, "OK", "Skip", kOptionRight)) { + Testsuite::logPrintf("Info! Skipping test : keyboard events"); + return true; + } + Common::EventManager *eventMan = g_system->getEventManager(); Common::Point pt(0, 100); @@ -191,6 +202,18 @@ bool EventTests::mouseEvents() { } bool EventTests::kbdEvents() { + + Testsuite::clearScreen(); + Common::String info = "Testing keyboard events.\n " + "Testbed should be able to figure out any alphanumeric keystrokes made by the user and display them back.\n" + "Press ESC key when done of the input."; + + if (Testsuite::handleInteractiveInput(info, "OK", "Skip", kOptionRight)) { + Testsuite::logPrintf("Info! Skipping test : keyboard events"); + return true; + } + + // Make user type some word and display the output on screen Common::String text = "You Entered : "; Common::Point pt(0, 100); @@ -217,6 +240,16 @@ bool EventTests::kbdEvents() { } bool EventTests::showMainMenu() { + + Testsuite::clearScreen(); + Common::String info = "Testing Main Menu events.\n " + "Main Menu event is normally trigerred by user pressing (Ctrl + f5).\n" + "Click 'resume' to continue testbed."; + + if (Testsuite::handleInteractiveInput(info, "OK", "Skip", kOptionRight)) { + Testsuite::logPrintf("Info! Skipping test : Main Menu"); + return true; + } Common::EventManager *eventMan = g_system->getEventManager(); Common::Event mainMenuEvent; mainMenuEvent.type = Common::EVENT_MAINMENU; -- cgit v1.2.3