/usr/src/rpm/BUILD/libirobot-create-0.1/tests/play-song-test.cc File Reference

#include "common.hh"

Include dependency graph for play-song-test.cc:


Functions

int run_test (iRobot::Create &robot, std::stringstream &)

Function Documentation

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 }


Generated on Thu Aug 28 14:38:08 2008 for iRobot Create library by  doxygen 1.5.4