/usr/src/rpm/BUILD/libirobot-create-0.1/tests/baud-command-test.cc File Reference

#include "common.hh"

Include dependency graph for baud-command-test.cc:


Functions

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

Function Documentation

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

00022 {
00023   robot.sendBaudCommand (iRobot::Create::BAUD_300);
00024   robot.sendBaudCommand (iRobot::Create::BAUD_19200);
00025   robot.sendBaudCommand (iRobot::Create::BAUD_115200);
00026 
00027   try
00028     {
00029       // Send an invalid baud value.
00030       robot.sendBaudCommand (static_cast<iRobot::Create::Baud> (255));
00031     }
00032   catch (iRobot::InvalidArgument&)
00033     {
00034       return TEST_SUCCEED;
00035     }
00036   catch (...)
00037     {}
00038   return TEST_FAILED;
00039 }


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