00001 #include "YouBotBaseTest.hpp" 00002 #include "YouBotBaseTestWithoutThread.hpp" 00003 #include "YouBotArmTestWithoutThread.hpp" 00004 #include "YouBotBaseKinematicsTest.hpp" 00005 #include "YouBotArmTest.hpp" 00006 #include "YouBotGripperTest.hpp" 00007 #include <cppunit/CompilerOutputter.h> 00008 #include <cppunit/extensions/TestFactoryRegistry.h> 00009 #include <cppunit/ui/text/TestRunner.h> 00010 #include <cppunit/extensions/HelperMacros.h> 00011 00012 CPPUNIT_TEST_SUITE_REGISTRATION( YouBotBaseTestWithoutThread ); 00013 CPPUNIT_TEST_SUITE_REGISTRATION( YouBotBaseTest ); 00014 CPPUNIT_TEST_SUITE_REGISTRATION( YouBotBaseKinematicsTest ); 00015 CPPUNIT_TEST_SUITE_REGISTRATION( YouBotArmTestWithoutThread ); 00016 CPPUNIT_TEST_SUITE_REGISTRATION( YouBotArmTest ); 00017 CPPUNIT_TEST_SUITE_REGISTRATION( YouBotGripperTest ); 00018 00019 int main(int argc, char* argv[]) { 00020 std::cout << "Attention! All wheels of the youBot will move during the test. \nThe youBot should NOT stand on the ground and the wheels should be in the air! \nAlso the arm will move please be carefull!" << std::endl; 00021 char input = 0; 00022 00023 while (input != 'y' && input != 'n') { 00024 std::cout << "Are all wheels off the ground? [n/y]" << std::endl; 00025 input = getchar(); 00026 if (input == 'n') { 00027 return 0; 00028 } 00029 } 00030 Logger::logginLevel = trace; 00031 00032 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest(); 00033 CppUnit::TextUi::TestRunner runner; 00034 runner.addTest( suite ); 00035 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(), std::cerr ) ); 00036 /** let the test run */ 00037 bool wasSucessful = runner.run(); 00038 00039 /** check whether it was sucessfull or not */ 00040 return wasSucessful ? 0 : 1; 00041 } 00042 00043