#include "common.hh"

Functions | |
| int | run_test (iRobot::Create &robot, std::stringstream &) |
| int run_test | ( | iRobot::Create & | robot, | |
| std::stringstream & | ||||
| ) |
00022 { 00023 // Test Mode. 00024 CHECK_FAILURE 00025 (iRobot::CommandNotAvailable, 00026 robot.sendPlaySongCommand (iRobot::Create::SONG_MIN)); 00027 00028 // Switch to full mode and test a command. 00029 robot.sendFullCommand (); 00030 robot.sendPlaySongCommand (iRobot::Create::SONG_MIN); 00031 00032 // Switch to safe mode for the rest of the test. 00033 robot.sendSafeCommand (); 00034 00035 robot.sendPlaySongCommand (iRobot::Create::SONG_MIN); 00036 robot.sendPlaySongCommand (iRobot::Create::SONG_MAX); 00037 00038 CHECK_FAILURE 00039 (iRobot::InvalidArgument, 00040 robot.sendPlaySongCommand (iRobot::Create::SONG_MIN - 1)); 00041 00042 CHECK_FAILURE 00043 (iRobot::InvalidArgument, 00044 robot.sendPlaySongCommand (iRobot::Create::SONG_MAX + 1)); 00045 00046 return TEST_SUCCEED; 00047 }
1.5.4