00001 #include <youbot_driver/testing/YouBotBaseTest.hpp> 00002 #include <youbot_driver/testing/YouBotBaseTestWithoutThread.hpp> 00003 #include <youbot_driver/testing/YouBotArmTestWithoutThread.hpp> 00004 #include <youbot_driver/testing/YouBotBaseKinematicsTest.hpp> 00005 #include <youbot_driver/testing/YouBotArmTest.hpp> 00006 #include <youbot_driver/testing/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 { 00021 std::cout 00022 << "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!" 00023 << std::endl; 00024 char input = 0; 00025 00026 while (input != 'y' && input != 'n') 00027 { 00028 std::cout << "Are all wheels off the ground? [n/y]" << std::endl; 00029 input = getchar(); 00030 if (input == 'n') 00031 { 00032 return 0; 00033 } 00034 } 00035 Logger::logginLevel = trace; 00036 00037 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest(); 00038 CppUnit::TextUi::TestRunner runner; 00039 runner.addTest(suite); 00040 runner.setOutputter(new CppUnit::CompilerOutputter(&runner.result(), std::cerr)); 00042 bool wasSucessful = runner.run(); 00043 00045 return wasSucessful ? 0 : 1; 00046 } 00047