00022 {
00023 using namespace iRobot;
00024
00025 Create::opcodes_t script;
00026
00027
00028 script.push_back (Create::OPCODE_START);
00029 script.push_back (Create::OPCODE_WAIT_EVENT);
00030 robot.sendScriptCommand (script);
00031
00032
00033 while (script.size () <= Create::SCRIPT_MAX_SIZE)
00034 script.push_back (Create::OPCODE_START);
00035 CHECK_FAILURE
00036 (InvalidArgument,
00037 robot.sendScriptCommand (script));
00038 script.clear ();
00039
00040
00041 Create::Opcode min = static_cast<Create::Opcode> (Create::OPCODE_START - 1);
00042 script.push_back (min);
00043 CHECK_FAILURE
00044 (InvalidArgument,
00045 robot.sendScriptCommand (script));
00046 script.clear ();
00047
00048
00049 Create::Opcode max = static_cast<Create::Opcode>
00050 (Create::OPCODE_WAIT_EVENT + 1);
00051 script.push_back (max);
00052 CHECK_FAILURE
00053 (InvalidArgument,
00054 robot.sendScriptCommand (script));
00055
00056 return TEST_SUCCEED;
00057 }