00001 #include "ippCommandTestCase.h"
00002
00003 #include "ippdme/Parser/ippCommandParser.h"
00004 #include "ippMemoryLeakDetector.h"
00005
00006 void recheck_with_parser(ippCommand& r,bool bParsingShouldFail = false)
00007 {
00008 ippCommandParser parser;
00009 std::string t = r.getCommandString();
00010 parser.setInput(t.c_str());
00011
00012 ippCommandPtr r_check= parser.parseCommand();
00013 if (bParsingShouldFail) {
00014 IPP_UTEST_ASSERT(!r_check);
00015 return ;
00016 }
00017 if (r_check) {
00018 std::string t_check = r_check->getCommandString();
00019 IPP_UTEST_ASSERT_EQUALS(t,t_check);
00020 } else {
00021
00022 IPP_UTEST_ASSERT_M(std::string(" failing parsing \n")+t ,r_check);
00023 std::cout << " failing parsing " << std::endl << t << std::endl;
00024 std::cout << parser.getErrorMessageString() <<std::endl;
00025 }
00026 }
00027
00028 #include "ippdme/Command/ippAlignPartCommand.h"
00029 void ippCommandTestCase::testAlignPartCommand()
00030 {
00031 {
00032 ippAlignPartCommand c(25,
00033 0,1,2,
00034 1,2,3,
00035 45
00036 );
00037 std::string t = c.getCommandString();
00038 IPP_UTEST_ASSERT_EQUALS(t,"00025 AlignPart(0., 1., 2., 1., 2., 3., 45.)\r\n");
00039 recheck_with_parser(c);
00040 }
00041 {
00042 ippAlignPartCommand c(25,
00043 0,1,2,
00044 1,2,3,
00045 0,1,2,
00046 1,2,3,
00047 45,60
00048 );
00049 std::string t = c.getCommandString();
00050 IPP_UTEST_ASSERT_EQUALS(t,"00025 AlignPart(0., 1., 2., 1., 2., 3., 0., 1., 2., 1., 2., 3., 45., 60.)\r\n");
00051 recheck_with_parser(c);
00052 }
00053
00054 }
00055 #include "ippdme/Command/ippAlignToolCommand.h"
00056 void ippCommandTestCase::testAlignToolCommand()
00057 {
00058 {
00059 ippAlignToolCommand c(25,
00060 0,1,2,
00061 45
00062 );
00063 std::string t = c.getCommandString();
00064 IPP_UTEST_ASSERT_EQUALS(t,"00025 AlignTool(0., 1., 2., 45.)\r\n");
00065 recheck_with_parser(c);
00066 }
00067 {
00068 ippAlignToolCommand c(25,
00069 0,1,2,
00070 1,2,3,
00071 45,70.
00072 );
00073 std::string t = c.getCommandString();
00074 IPP_UTEST_ASSERT_EQUALS(t,"00025 AlignTool(0., 1., 2., 1., 2., 3., 45., 70.)\r\n");
00075 recheck_with_parser(c);
00076 }
00077 }
00078
00079
00080 #include "ippdme/Command/ippCenterPartCommand.h"
00081 void ippCommandTestCase::testCenterPartCommand()
00082 {
00083 ippMemoryLeakDetector _leakDetector;
00084
00085 ippCenterPartCommand c(25,1.,2.,3.,4.);
00086 std::string t = c.getCommandString();
00087 IPP_UTEST_ASSERT_EQUALS(t,"00025 CenterPart(1., 2., 3., 4.)\r\n");
00088 recheck_with_parser(c);
00089
00090 }
00091 #include "ippdme/Command/ippChangeToolCommand.h"
00092 void ippCommandTestCase::testChangeToolCommand()
00093 {
00094 ippMemoryLeakDetector _leakDetector;
00095
00096 ippChangeToolCommand c(25,"MyTool");
00097 std::string t = c.getCommandString();
00098 std::string t_expected = "00025 ChangeTool(\"MyTool\")\r\n";
00099 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00100 recheck_with_parser(c);
00101 }
00102
00103 #include "ippdme/Command/ippEnumAllPropCommand.h"
00104 void ippCommandTestCase::testEnumAllPropCommand()
00105 {
00106 ippMemoryLeakDetector _leakDetector;
00107
00108 {
00109 ippEnumAllPropCommand c(25,ippProp(Tool));
00110 std::string t = c.getCommandString();
00111 IPP_UTEST_ASSERT_EQUALS(t,"00025 EnumAllProp(Tool())\r\n");
00112 recheck_with_parser(c);
00113 }
00114 {
00115 ippEnumAllPropCommand c(25,ippProp(Tool,GoToPar));
00116 std::string t = c.getCommandString();
00117 IPP_UTEST_ASSERT_EQUALS(t,"00025 EnumAllProp(Tool.GoToPar())\r\n");
00118 recheck_with_parser(c);
00119 }
00120 {
00121 ippEnumAllPropCommand c(25,ippProp(Tool,GoToPar,Speed));
00122 std::string t = c.getCommandString();
00123 IPP_UTEST_ASSERT_EQUALS(t,"00025 EnumAllProp(Tool.GoToPar.Speed())\r\n");
00124 recheck_with_parser(c);
00125 }
00126 {
00127 ippEnumAllPropCommand c(25,ippProp(Tool,GoToPar,Speed,Min));
00128 std::string t = c.getCommandString();
00129 IPP_UTEST_ASSERT_EQUALS(t,"00025 EnumAllProp(Tool.GoToPar.Speed.Min())\r\n");
00130 recheck_with_parser(c);
00131 }
00132 {
00133 ippEnumAllPropCommand c(25,ippProp(Part,Temperature));
00134 std::string t = c.getCommandString();
00135 IPP_UTEST_ASSERT_EQUALS(t,"00025 EnumAllProp(Part.Temperature())\r\n");
00136 recheck_with_parser(c);
00137 }
00138 {
00139 ippEnumAllPropCommand c(25,ippProp(Part));
00140 std::string t = c.getCommandString();
00141 IPP_UTEST_ASSERT_EQUALS(t,"00025 EnumAllProp(Part())\r\n");
00142 recheck_with_parser(c);
00143 }
00144 {
00145 ippEnumAllPropCommand c(25,ippProp(FoundTool));
00146 std::string t = c.getCommandString();
00147 IPP_UTEST_ASSERT_EQUALS(t,"00025 EnumAllProp(FoundTool())\r\n");
00148 recheck_with_parser(c);
00149 }
00150
00151 }
00152 #include "ippdme/Command/ippEnumPropCommand.h"
00153 void ippCommandTestCase::testEnumPropCommand()
00154 {
00155
00156 ippMemoryLeakDetector _leakDetector;
00157
00158 {
00159 ippEnumPropCommand c(25,ippProp(Tool));
00160 std::string t = c.getCommandString();
00161 IPP_UTEST_ASSERT_EQUALS(t,"00025 EnumProp(Tool())\r\n");
00162 recheck_with_parser(c);
00163 }
00164 {
00165 ippEnumPropCommand c(25,ippProp(Tool,GoToPar));
00166 std::string t = c.getCommandString();
00167 IPP_UTEST_ASSERT_EQUALS(t,"00025 EnumProp(Tool.GoToPar())\r\n");
00168 recheck_with_parser(c);
00169 }
00170 {
00171 ippEnumPropCommand c(25,ippProp(Tool,GoToPar,Speed));
00172 std::string t = c.getCommandString();
00173 IPP_UTEST_ASSERT_EQUALS(t,"00025 EnumProp(Tool.GoToPar.Speed())\r\n");
00174 recheck_with_parser(c);
00175 }
00176 {
00177 ippEnumPropCommand c(25,ippProp(Tool,GoToPar,Speed,Min));
00178 std::string t = c.getCommandString();
00179 IPP_UTEST_ASSERT_EQUALS(t,"00025 EnumProp(Tool.GoToPar.Speed.Min())\r\n");
00180 recheck_with_parser(c);
00181 }
00182 {
00183 ippEnumPropCommand c(25,ippProp(Part,Temperature));
00184 std::string t = c.getCommandString();
00185 IPP_UTEST_ASSERT_EQUALS(t,"00025 EnumProp(Part.Temperature())\r\n");
00186 recheck_with_parser(c);
00187 }
00188 {
00189 ippEnumPropCommand c(25,ippProp(Part));
00190 std::string t = c.getCommandString();
00191 IPP_UTEST_ASSERT_EQUALS(t,"00025 EnumProp(Part())\r\n");
00192 recheck_with_parser(c);
00193 }
00194 }
00195
00196 #include "ippdme/Command/ippFindToolCommand.h"
00197 void ippCommandTestCase::testFindToolCommand()
00198 {
00199 ippMemoryLeakDetector _leakDetector;
00200
00201 ippFindToolCommand c(25,"ThisTool");
00202 std::string t = c.getCommandString();
00203 std::string t_expected = "00025 FindTool(\"ThisTool\")\r\n";
00204 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00205 recheck_with_parser(c);
00206 }
00207
00208
00209 #include "ippdme/Command/ippGetChangeToolActionCommand.h"
00210 void ippCommandTestCase::testGetChangeToolActionCommand()
00211 {
00212 ippMemoryLeakDetector _leakDetector;
00213
00214 ippGetChangeToolActionCommand c(25,"ThisTool");
00215 std::string t = c.getCommandString();
00216 std::string t_expected = "00025 GetChangeToolAction(\"ThisTool\")\r\n";
00217 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00218 recheck_with_parser(c);
00219 }
00220
00221
00222 #include "ippdme/Command/ippGetCommand.h"
00223 void ippCommandTestCase::testGetCommand()
00224 {
00225 ippMemoryLeakDetector _leakDetector;
00226
00227 {
00228 ippGetCommand c(25,true,true,true,true,true,true,true);
00229 std::string t = c.getCommandString();
00230 std::string t_expected = "00025 Get(R(), X(), Y(), Z(), Tool.A(), Tool.B(), Tool.C())\r\n";
00231 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00232 recheck_with_parser(c);
00233 }
00234 {
00235 ippGetCommand c(25,true,false,false,true,false,true,true);
00236 std::string t = c.getCommandString();
00237 std::string t_expected = "00025 Get(R(), Z(), Tool.B(), Tool.C())\r\n";
00238 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00239 recheck_with_parser(c);
00240 }
00241
00242 }
00243
00244 #include "ippdme/Command/ippGetCsyTransformationCommand.h"
00245 void ippCommandTestCase::testGetCsyTransformationCommand()
00246 {
00247 ippMemoryLeakDetector _leakDetector;
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257 {
00258 ippGetCsyTransformationCommand c(25,MoveableMachineCsy);
00259 std::string t = c.getCommandString();
00260 std::string t_expected = "00025 GetCsyTransformation(MoveableMachineCsy)\r\n";
00261 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00262 recheck_with_parser(c);
00263 }
00264 {
00265 ippGetCsyTransformationCommand c(25,MultipleArmCsy);
00266 std::string t = c.getCommandString();
00267 std::string t_expected = "00025 GetCsyTransformation(MultipleArmCsy)\r\n";
00268 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00269 recheck_with_parser(c);
00270 }
00271 {
00272 ippGetCsyTransformationCommand c(25,PartCsy);
00273 std::string t = c.getCommandString();
00274 std::string t_expected = "00025 GetCsyTransformation(PartCsy)\r\n";
00275 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00276 recheck_with_parser(c);
00277 }
00278 {
00279 ippGetCsyTransformationCommand c(25,JogDisplayCsy);
00280 std::string t = c.getCommandString();
00281 std::string t_expected = "00025 GetCsyTransformation(JogDisplayCsy)\r\n";
00282 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00283 recheck_with_parser(c);
00284 }
00285 {
00286 ippGetCsyTransformationCommand c(25,JogMoveCsy);
00287 std::string t = c.getCommandString();
00288 std::string t_expected = "00025 GetCsyTransformation(JogMoveCsy)\r\n";
00289 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00290 recheck_with_parser(c);
00291 }
00292 {
00293 ippGetCsyTransformationCommand c(25,SensorCsy);
00294 std::string t = c.getCommandString();
00295 std::string t_expected = "00025 GetCsyTransformation(SensorCsy)\r\n";
00296 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00297 recheck_with_parser(c);
00298 }
00299
00300 }
00301
00302 #include "ippdme/Command/ippGetErrorInfoCommand.h"
00303 void ippCommandTestCase::testGetErrorInfoCommand()
00304 {
00305 ippMemoryLeakDetector _leakDetector;
00306
00307 ippGetErrorInfoCommand c(25,ArgumentOutOfRange);
00308 std::string t = c.getCommandString();
00309 recheck_with_parser(c);
00310
00311 }
00312 #include "ippdme/Command/ippGetPropCommand.h"
00313 void ippCommandTestCase::testGetPropCommand()
00314 {
00315 ippMemoryLeakDetector _leakDetector;
00316 {
00317 ippGetPropCommand c(10);
00318 c.addProp(ippProp(Tool,PtMeasPar,Approach));
00319 c.addProp(ippProp(Tool,PtMeasPar,Retract));
00320 c.addProp(ippProp(Tool,PtMeasPar,Search));
00321 std::string t = c.getCommandString();
00322 std::string t_expected = "00010 GetProp(Tool.PtMeasPar.Approach(), Tool.PtMeasPar.Retract(), Tool.PtMeasPar.Search())\r\n";
00323 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00324 recheck_with_parser(c);
00325 }
00326 {
00327 ippGetPropCommand c(25);
00328 c.addProp(ippProp(Tool,GoToPar,Accel,Actual));
00329 c.addProp(ippProp(Tool,Name));
00330 std::string t = c.getCommandString();
00331 std::string t_expected = "00025 GetProp(Tool.GoToPar.Accel.Act(), Tool.Name())\r\n";
00332 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00333 recheck_with_parser(c);
00334 }
00335 {
00336 ippGetPropCommand c(25);
00337 c.addProp(ippProp(Part,Temperature));
00338 std::string t = c.getCommandString();
00339 std::string t_expected = "00025 GetProp(Part.Temperature())\r\n";
00340 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00341 recheck_with_parser(c);
00342 }
00343 {
00344 ippGetPropCommand c(25);
00345 c.addProp(ippProp(Part,XPanCoefficient));
00346 std::string t = c.getCommandString();
00347 std::string t_expected = "00025 GetProp(Part.XPanCoefficient())\r\n";
00348 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00349 recheck_with_parser(c);
00350 }
00351
00352 {
00353 ippGetPropCommand c(25);
00354 c.addProp(ippProp(Part,Approach));
00355 std::string t = c.getCommandString();
00356 std::string t_expected = "00025 GetProp(Part.Approach())\r\n";
00357 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00358 recheck_with_parser(c);
00359 }
00360
00361 {
00362 ippGetPropCommand c(25);
00363 c.addProp(ippProp(Part,Search));
00364 std::string t = c.getCommandString();
00365 std::string t_expected = "00025 GetProp(Part.Search())\r\n";
00366 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00367 recheck_with_parser(c);
00368 }
00369 {
00370 ippGetPropCommand c(25);
00371 c.addProp(ippProp(Tool,ScanPar,Speed));
00372 std::string t = c.getCommandString();
00373 std::string t_expected = "00025 GetProp(Tool.ScanPar.Speed())\r\n";
00374 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00375 recheck_with_parser(c);
00376 }
00377 {
00378 ippGetPropCommand c(25);
00379 c.addProp(ippProp(Tool,ScanPar,Speed,Max));
00380 std::string t = c.getCommandString();
00381 std::string t_expected = "00025 GetProp(Tool.ScanPar.Speed.Max())\r\n";
00382 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00383 recheck_with_parser(c);
00384 }
00385
00386 }
00387 #include "ippdme/Command/ippGetPropECommand.h"
00388 void ippCommandTestCase::testGetPropECommand()
00389 {
00390 ippMemoryLeakDetector _leakDetector;
00391 ippGetPropECommand c(10);
00392 c.addProp(ippProp(Tool,PtMeasPar,Approach));
00393 c.addProp(ippProp(Tool,PtMeasPar,Retract));
00394 c.addProp(ippProp(Tool,PtMeasPar,Search));
00395 std::string t = c.getCommandString();
00396 std::string t_expected = "E0010 GetPropE(Tool.PtMeasPar.Approach(), Tool.PtMeasPar.Retract(), Tool.PtMeasPar.Search())\r\n";
00397 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00398 recheck_with_parser(c);
00399
00400 }
00401
00402 #include "ippdme/Command/ippGoToCommand.h"
00403 void ippCommandTestCase::testGoToCommand()
00404 {
00405 ippMemoryLeakDetector _leakDetector;
00406
00407
00408
00409
00410
00411
00412
00413 {
00414 ippGoToCommand c(25,
00415 true,true,true,
00416 0.5 , 10., 20.,
00417 true,true,true,
00418 7.5 , 15., -180.
00419 );
00420 std::string t = c.getCommandString();
00421 std::string t_expected = "00025 GoTo(X(0.5), Y(10.), Z(20.), Tool.A(7.5), Tool.B(15.), Tool.C(-180.))\r\n";
00422 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00423 recheck_with_parser(c);
00424 }
00425 {
00426 ippGoToCommand c(25,
00427 true,true,true,
00428 0.5 , 10., 20.,
00429 false,false,false,
00430 7.5 , 15., -180.
00431 );
00432 std::string t = c.getCommandString();
00433 std::string t_expected = "00025 GoTo(X(0.5), Y(10.), Z(20.))\r\n";
00434 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00435 recheck_with_parser(c);
00436 }
00437 {
00438 ippGoToCommand c(25,
00439 false,true,false,
00440 0.5 , 10., 20.,
00441 false,false,false,
00442 7.5 , 15., -180.
00443 );
00444 std::string t = c.getCommandString();
00445 std::string t_expected = "00025 GoTo(Y(10.))\r\n";
00446 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00447 recheck_with_parser(c);
00448 }
00449 }
00450
00451 #include "ippdme/Command/ippOnMoveReportECommand.h"
00452 void ippCommandTestCase::testOnMoveReportECommand()
00453 {
00454 ippMemoryLeakDetector _leakDetector;
00455
00456
00457
00458
00459
00460
00461
00462 {
00463 ippOnMoveReportECommand c(25,
00464 true,false,true,false,
00465 false,false,false,
00466 true,true,
00467 1.0 , 15.
00468 );
00469 std::string t = c.getCommandString();
00470 std::string t_expected = "E0025 OnMoveReportE(Dis(1.), Time(15.), R(), Y())\r\n";
00471 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00472 recheck_with_parser(c);
00473 }
00474 {
00475 ippOnMoveReportECommand c(25,
00476 true,true,true,true,
00477 true,true,true,
00478 true,true,
00479 1.0 , 15.
00480 );
00481 std::string t = c.getCommandString();
00482 std::string t_expected = "E0025 OnMoveReportE(Dis(1.), Time(15.), R(), X(), Y(), Z(), Tool.A(), Tool.B(), Tool.C())\r\n";
00483 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00484 recheck_with_parser(c);
00485 }
00486 }
00487
00488 #include "ippdme/Command/ippPtMeasCommand.h"
00489 void ippCommandTestCase::testPtMeasCommand()
00490 {
00491 ippMemoryLeakDetector _leakDetector;
00492
00493 ippPtMeasCommand c(20,
00494 true,true,true,true,
00495 1.0,2.0,3.0
00496 ,4.0,5.0,6.0);
00497 std::string t = c.getCommandString();
00498 std::string t_expected = "00020 PtMeas(X(1.), Y(2.), Z(3.), IJK(4., 5., 6.))\r\n";
00499 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00500 recheck_with_parser(c);
00501
00502
00503 }
00504
00505 #include "ippdme/Command/ippOnPtMeasReportCommand.h"
00506 void ippCommandTestCase::testOnPtMeasReportCommand()
00507 {
00508
00509
00510
00511
00512
00513 {
00514 ippOnPtMeasReportCommand c(25,
00515 true,true,false,
00516 true,true,true,
00517 true, true,true,true,false);
00518 std::string t = c.getCommandString();
00519 std::string t_expected = "00025 OnPtMeasReport(ER(), IJK(), R(), X(), Y(), Z(), Tool.A(), Tool.B(), Tool.C())\r\n";
00520 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00521 recheck_with_parser(c);
00522 }
00523 {
00524 ippOnPtMeasReportCommand c(25,
00525 false,false,false,false,
00526 false,true,false,
00527 false,false,false,false);
00528 std::string t = c.getCommandString();
00529 std::string t_expected = "00025 OnPtMeasReport(Y())\r\n";
00530 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00531 recheck_with_parser(c);
00532 }
00533 {
00534 ippOnPtMeasReportCommand c(25,
00535 true,true,true,false,
00536 false,false,false,
00537 false,false,false,true);
00538 std::string t = c.getCommandString();
00539 std::string t_expected = "00025 OnPtMeasReport(ER(), IJK(), IJKAct(), Q())\r\n";
00540 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00541 recheck_with_parser(c);
00542 }
00543 }
00544
00545
00546 #include "ippdme/Command/ippOnScanReportCommand.h"
00547 void ippCommandTestCase::testOnScanReportCommand()
00548 {
00549
00550 {
00551 ippMemoryLeakDetector _leakDetector;
00552
00553 ippOnScanReportCommand c(25);
00554 c.append(ippOnScanReportCommand::ER);
00555 c.append(ippOnScanReportCommand::IJK);
00556 c.append(ippOnScanReportCommand::Q);
00557 c.append(ippOnScanReportCommand::R);
00558 c.append(ippOnScanReportCommand::X);
00559 c.append(ippOnScanReportCommand::Y);
00560 c.append(ippOnScanReportCommand::Z);
00561 c.append(ippOnScanReportCommand::ToolA);
00562 c.append(ippOnScanReportCommand::ToolB);
00563 c.append(ippOnScanReportCommand::ToolC);
00564
00565 std::string t = c.getCommandString();
00566 std::string t_expected = "00025 OnScanReport(ER(), IJK(), Q(), R(), X(), Y(), Z(), Tool.A(), Tool.B(), Tool.C())\r\n";
00567 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00568 recheck_with_parser(c);
00569 }
00570 {
00571 ippMemoryLeakDetector _leakDetector;
00572
00573
00574 ippOnScanReportCommand c(25);
00575
00576 c.append(ippOnScanReportCommand::ER);
00577 c.append(ippOnScanReportCommand::IJK);
00578 c.append(ippOnScanReportCommand::IJKAct);
00579 c.append(ippOnScanReportCommand::Q);
00580 c.append(ippOnScanReportCommand::R);
00581 c.append(ippOnScanReportCommand::X);
00582 c.append(ippOnScanReportCommand::Y);
00583 c.append(ippOnScanReportCommand::Z);
00584 c.append(ippOnScanReportCommand::ToolA);
00585 c.append(ippOnScanReportCommand::ToolB);
00586 c.append(ippOnScanReportCommand::ToolC);
00587
00588
00589
00590 std::string t = c.getCommandString();
00591 std::string t_expected = "00025 OnScanReport(ER(), IJK(), IJKAct(), Q(), R(), X(), Y(), Z(), Tool.A(), Tool.B(), Tool.C())\r\n";
00592 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00593 recheck_with_parser(c);
00594 }
00595 }
00596
00597 #include "ippdme/Command/ippScanInCylEndIsPlaneCommand.h"
00598 void ippCommandTestCase::testScanInCylEndIsPlaneCommand()
00599 {
00600 ippMemoryLeakDetector _leakDetector;
00601 ippScanInCylEndIsPlaneCommand c(25,1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.,12.,13.,14.,15,16,17,18,19,20,21.,22,23,24,25,26);
00602 std::string t = c.getCommandString();
00603 std::string t_expected = "00025 ScanInCylEndIsPlane(1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23, 24., 25., 26.)\r\n";
00604 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00605 recheck_with_parser(c);
00606
00607 }
00608
00609 #include "ippdme/Command/ippScanInCylEndIsSphereCommand.h"
00610 void ippCommandTestCase::testScanInCylEndIsSphereCommand()
00611 {
00612 ippMemoryLeakDetector _leakDetector;
00613 ippScanInCylEndIsSphereCommand c(25,
00614 1.,2.,3.,
00615 4.,5.,6.,
00616 7.,8.,9.,
00617 10.,11.,12.,
00618 13.,14.,15,
00619 16,
00620 17,18,19,20,
00621 888,
00622 22,23,24);
00623 std::string t = c.getCommandString();
00624 std::string t_expected = "00025 ScanInCylEndIsSphere(1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 888, 22., 23., 24.)\r\n";
00625 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00626 recheck_with_parser(c);
00627
00628 }
00629
00630 #include "ippdme/Command/ippScanInPlaneEndIsCylCommand.h"
00631 void ippCommandTestCase::testScanInPlaneEndIsCylCommand()
00632 {
00633 ippMemoryLeakDetector _leakDetector;
00634 ippScanInPlaneEndIsCylCommand c(25,1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.,12.,13.,14.,15,16,17,18,19,20,8888,22,23,24);
00635 std::string t = c.getCommandString();
00636 std::string t_expected = "00025 ScanInPlaneEndIsCyl(1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 8888, 22., 23., 24.)\r\n";
00637 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00638 recheck_with_parser(c);
00639
00640
00641 }
00642
00643 #include "ippdme/Command/ippScanInPlaneEndIsPlaneCommand.h"
00644 void ippCommandTestCase::testScanInPlaneEndIsPlaneCommand()
00645 {
00646 ippMemoryLeakDetector _leakDetector;
00647 ippScanInPlaneEndIsPlaneCommand c(25,1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.,12.,13.,14.,15,16,17,18,19,9999,21,22,23);
00648 std::string t = c.getCommandString();
00649 std::string t_expected = "00025 ScanInPlaneEndIsPlane(1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 9999, 21., 22., 23.)\r\n";
00650 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00651 recheck_with_parser(c);
00652
00653 }
00654
00655 #include "ippdme/Command/ippScanInPlaneEndIsSphereCommand.h"
00656 void ippCommandTestCase::testScanInPlaneEndIsSphereCommand()
00657 {
00658 ippMemoryLeakDetector _leakDetector;
00659 ippScanInPlaneEndIsSphereCommand c(25,1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.,12.,13.,14.,15,16,17,9999,19,20,21);
00660 std::string t = c.getCommandString();
00661 std::string t_expected = "00025 ScanInPlaneEndIsSphere(1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 9999, 19., 20., 21.)\r\n";
00662 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00663 recheck_with_parser(c);
00664
00665 }
00666
00667 #include "ippdme/Command/ippScanOnCircleCommand.h"
00668 void ippCommandTestCase::testScanOnCircleCommand()
00669 {
00670 ippMemoryLeakDetector _leakDetector;
00671 ippScanOnCircleCommand c(25,1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.,12.);
00672 std::string t = c.getCommandString();
00673 std::string t_expected = "00025 ScanOnCircle(1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12.)\r\n";
00674 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00675 recheck_with_parser(c);
00676
00677 }
00678
00679 #include "ippdme/Command/ippScanOnCircleHintCommand.h"
00680 void ippCommandTestCase::testScanOnCircleHintCommand()
00681 {
00682 ippMemoryLeakDetector _leakDetector;
00683 ippScanOnCircleHintCommand c(25,1.1,2.2);
00684 std::string t = c.getCommandString();
00685 std::string t_expected = "00025 ScanOnCircleHint(1.1, 2.2)\r\n";
00686 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00687 recheck_with_parser(c);
00688 }
00689
00690 #include "ippdme/Command/ippScanOnLineCommand.h"
00691 void ippCommandTestCase::testScanOnLineCommand()
00692 {
00693 ippMemoryLeakDetector _leakDetector;
00694 ippScanOnLineCommand c(25,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.);
00695 std::string t = c.getCommandString();
00696 std::string t_expected = "00025 ScanOnLine(1., 2., 3., 4., 5., 6., 7., 8., 9., 10.)\r\n";
00697 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00698 recheck_with_parser(c);
00699
00700 }
00701
00702 #include "ippdme/Command/ippScanOnLineHintCommand.h"
00703 void ippCommandTestCase::testScanOnLineHintCommand()
00704 {
00705 ippMemoryLeakDetector _leakDetector;
00706 ippScanOnLineHintCommand c(25,1.1,2.2);
00707 std::string t = c.getCommandString();
00708 std::string t_expected = "00025 ScanOnLineHint(1.1, 2.2)\r\n";
00709 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00710 recheck_with_parser(c);
00711 }
00712
00713 #include "ippdme/Command/ippScanUnknownHintCommand.h"
00714 void ippCommandTestCase::testScanUnknownHintCommand()
00715 {
00716 ippMemoryLeakDetector _leakDetector;
00717 ippScanUnknownHintCommand c(25,1.1);
00718 std::string t = c.getCommandString();
00719 std::string t_expected = "00025 ScanUnknownHint(1.1)\r\n";
00720 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00721 recheck_with_parser(c);
00722
00723 }
00724
00725 #include "ippdme/Command/ippSetCoordSystemCommand.h"
00726 void ippCommandTestCase::testSetCoordSystemCommand()
00727 {
00728 ippMemoryLeakDetector _leakDetector;
00729
00730 {
00731 ippSetCoordSystemCommand c(25,MachineCsy);
00732 std::string t = c.getCommandString();
00733 std::string t_expected = "00025 SetCoordSystem(MachineCsy)\r\n";
00734 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00735 recheck_with_parser(c);
00736 }
00737 {
00738 ippSetCoordSystemCommand c(25,MoveableMachineCsy);
00739 std::string t = c.getCommandString();
00740 std::string t_expected = "00025 SetCoordSystem(MoveableMachineCsy)\r\n";
00741 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00742 recheck_with_parser(c);
00743 }
00744 {
00745 ippSetCoordSystemCommand c(25,MultipleArmCsy);
00746 std::string t = c.getCommandString();
00747 std::string t_expected = "00025 SetCoordSystem(MultipleArmCsy)\r\n";
00748 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00749 recheck_with_parser(c);
00750 }
00751 {
00752 ippSetCoordSystemCommand c(25,PartCsy);
00753 std::string t = c.getCommandString();
00754 std::string t_expected = "00025 SetCoordSystem(PartCsy)\r\n";
00755 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00756 recheck_with_parser(c);
00757 }
00758
00759 {
00760 ippSetCoordSystemCommand c(25,JogDisplayCsy);
00761 std::string t = c.getCommandString();
00762 std::string t_expected = "00025 SetCoordSystem(JogDisplayCsy)\r\n";
00763 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00764 recheck_with_parser(c,true);
00765 }
00766 {
00767 ippSetCoordSystemCommand c(25,JogMoveCsy);
00768 std::string t = c.getCommandString();
00769 std::string t_expected = "00025 SetCoordSystem(JogMoveCsy)\r\n";
00770 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00771 recheck_with_parser(c,true);
00772 }
00773 {
00774 ippSetCoordSystemCommand c(25,SensorCsy);
00775 std::string t = c.getCommandString();
00776 std::string t_expected = "00025 SetCoordSystem(SensorCsy)\r\n";
00777 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00778 recheck_with_parser(c,true);
00779 }
00780
00781 }
00782
00783 #include "ippdme/Command/ippSetCsyTransformationCommand.h"
00784 void ippCommandTestCase::testSetCsyTransformationCommand()
00785 {
00786 ippMemoryLeakDetector _leakDetector;
00787
00788
00789 {
00790
00791
00792 ippSetCsyTransformationCommand c(24,MachineCsy,
00793 1.,2.,4.0, 10.,15.,30);
00794 std::string t = c.getCommandString();
00795 std::string t_expected = "00024 SetCsyTransformation(MachineCsy, 1., 2., 4., 10., 15., 30.)\r\n";
00796 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00797 recheck_with_parser(c,true);
00798 }
00799
00800 {
00801 ippSetCsyTransformationCommand c(24,MoveableMachineCsy,
00802 1.,2.,4.0, 10.,15.,30);
00803 std::string t = c.getCommandString();
00804 std::string t_expected = "00024 SetCsyTransformation(MoveableMachineCsy, 1., 2., 4., 10., 15., 30.)\r\n";
00805 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00806 recheck_with_parser(c);
00807 }
00808 {
00809 ippSetCsyTransformationCommand c(24,MultipleArmCsy,
00810 1.,2.,4.0, 10.,15.,30);
00811 std::string t = c.getCommandString();
00812 std::string t_expected = "00024 SetCsyTransformation(MultipleArmCsy, 1., 2., 4., 10., 15., 30.)\r\n";
00813 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00814 recheck_with_parser(c);
00815 }
00816 {
00817 ippSetCsyTransformationCommand c(24,PartCsy,
00818 1.,2.,4.0, 10.,15.,30);
00819 std::string t = c.getCommandString();
00820 std::string t_expected = "00024 SetCsyTransformation(PartCsy, 1., 2., 4., 10., 15., 30.)\r\n";
00821 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00822 recheck_with_parser(c);
00823 }
00824 {
00825 ippSetCsyTransformationCommand c(24,JogDisplayCsy,
00826 1.,2.,4.0, 10.,15.,30);
00827 std::string t = c.getCommandString();
00828 std::string t_expected = "00024 SetCsyTransformation(JogDisplayCsy, 1., 2., 4., 10., 15., 30.)\r\n";
00829 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00830 recheck_with_parser(c);
00831 }
00832 {
00833 ippSetCsyTransformationCommand c(24,JogMoveCsy,
00834 1.,2.,4.0, 10.,15.,30);
00835 std::string t = c.getCommandString();
00836 std::string t_expected = "00024 SetCsyTransformation(JogMoveCsy, 1., 2., 4., 10., 15., 30.)\r\n";
00837 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00838 recheck_with_parser(c);
00839 }
00840 {
00841 ippSetCsyTransformationCommand c(24,SensorCsy,
00842 1.,2.,4.0, 10.,15.,30);
00843 std::string t = c.getCommandString();
00844 std::string t_expected = "00024 SetCsyTransformation(SensorCsy, 1., 2., 4., 10., 15., 30.)\r\n";
00845 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00846 recheck_with_parser(c);
00847 }
00848 }
00849
00850 #include "ippdme/Command/ippSetPropCommand.h"
00851 void ippCommandTestCase::testSetPropCommand()
00852 {
00853 ippMemoryLeakDetector _leakDetector;
00854
00855 ippSetPropCommand c(10);
00856 c.addPropValue(ippProp(Tool,PtMeasPar,Approach),10);
00857 c.addPropValue(ippProp(Tool,PtMeasPar,Retract),20);
00858 c.addPropValue(ippProp(Tool,PtMeasPar,Search),30);
00859 std::string t = c.getCommandString();
00860 std::string t_expected = "00010 SetProp(Tool.PtMeasPar.Approach(10.), Tool.PtMeasPar.Retract(20.), Tool.PtMeasPar.Search(30.))\r\n";
00861 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00862 recheck_with_parser(c);
00863
00864 }
00865
00866 #include "ippdme/Command/ippSetToolCommand.h"
00867 void ippCommandTestCase::testSetToolCommand()
00868 {
00869 ippMemoryLeakDetector _leakDetector;
00870 ippSetToolCommand c(25,"SomeTool");
00871 std::string t = c.getCommandString();
00872 std::string t_expected = "00025 SetTool(\"SomeTool\")\r\n";
00873 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00874 recheck_with_parser(c);
00875 }
00876
00877 #include "ippdme/Command/ippStopDaemonCommand.h"
00878 void ippCommandTestCase::testStopDaemonCommand()
00879 {
00880 ippMemoryLeakDetector _leakDetector;
00881
00882 ippStopDaemonCommand c(25,23);
00883 std::string t = c.getCommandString();
00884 std::string t_expected = "00025 StopDaemon(E0023)\r\n";
00885 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00886 recheck_with_parser(c);
00887 }
00888
00889 #include "ippdme/Command/ippTiltCenterPartCommand.h"
00890 void ippCommandTestCase::testTiltCenterPartCommand()
00891 {
00892 ippMemoryLeakDetector _leakDetector;
00893
00894 ippTiltCenterPartCommand c(25,
00895 1.,2.,3,
00896 10.,11,12,
00897 13.);
00898 std::string t = c.getCommandString();
00899 std::string t_expected = "00025 TiltCenterPart(1., 2., 3., 10., 11., 12., 13.)\r\n";
00900 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00901
00902 recheck_with_parser(c);
00903 }
00904
00905 #include "ippdme/Command/ippTiltPartCommand.h"
00906 void ippCommandTestCase::testTiltPartCommand()
00907 {
00908 ippMemoryLeakDetector _leakDetector;
00909
00910 ippTiltPartCommand c(25,
00911 1.,2.,3,
00912 13.);
00913 std::string t = c.getCommandString();
00914 std::string t_expected = "00025 TiltPart(1., 2., 3., 13.)\r\n";
00915 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00916 recheck_with_parser(c);
00917 }
00918
00919 #include "ippdme/Command/ippLockAxisCommand.h"
00920 void ippCommandTestCase::testLockAxisCommand()
00921 {
00922 ippMemoryLeakDetector _leakDetector;
00923
00924 {
00925 ippLockAxisCommand c(25,true,true,true,true,true,true);
00926 std::string t = c.getCommandString();
00927 std::string t_expected = "00025 LockAxis(C(), Phi(), R(), X(), Y(), Z())\r\n";
00928 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00929 recheck_with_parser(c);
00930 }
00931 {
00932 ippLockAxisCommand c(25,false,true,true,true,true,true);
00933 std::string t = c.getCommandString();
00934 std::string t_expected = "00025 LockAxis(Phi(), R(), X(), Y(), Z())\r\n";
00935 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00936 recheck_with_parser(c);
00937 }
00938 {
00939 ippLockAxisCommand c(25,false,false,true,true,true,true);
00940 std::string t = c.getCommandString();
00941 std::string t_expected = "00025 LockAxis(R(), X(), Y(), Z())\r\n";
00942 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00943 recheck_with_parser(c);
00944 }
00945 {
00946 ippLockAxisCommand c(25,false,false,false,true,true,true);
00947 std::string t = c.getCommandString();
00948 std::string t_expected = "00025 LockAxis(X(), Y(), Z())\r\n";
00949 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00950 recheck_with_parser(c);
00951 }
00952 {
00953 ippLockAxisCommand c(25,false,false,false,true,false,true);
00954 std::string t = c.getCommandString();
00955 std::string t_expected = "00025 LockAxis(X(), Z())\r\n";
00956 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00957 recheck_with_parser(c);
00958 }
00959 }
00960
00961
00962 void ippCommandTestCase::testReQualifyCommand()
00963 {
00964 ippCommand c(25,ReQualify);
00965 std::string t = c.getCommandString();
00966 std::string t_expected = "00025 ReQualify()\r\n";
00967 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00968 recheck_with_parser(c);
00969
00970 }
00971
00972 #include "ippdme/Command/ippEnumToolsCommand.h"
00973 void ippCommandTestCase::testEnumToolsCommand()
00974 {
00975 ippEnumToolsCommand c(25);
00976 std::string t = c.getCommandString();
00977 std::string t_expected = "00025 EnumTools()\r\n";
00978 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00979 recheck_with_parser(c);
00980 }
00981
00982
00983 #include "ippdme/Command/ippEnumToolCollectionCommand.h"
00984 void ippCommandTestCase::testEnumToolCollectionCommand()
00985 {
00986 ippEnumToolCollectionCommand c(25,"SomeCollection");
00987 std::string t = c.getCommandString();
00988 std::string t_expected = "00025 EnumToolCollection(\"SomeCollection\")\r\n";
00989 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
00990 recheck_with_parser(c);
00991 }
00992
00993 #include "ippdme/Command/ippEnumAllToolCollectionsCommand.h"
00994 void ippCommandTestCase::testEnumAllToolCollectionsCommand()
00995 {
00996 ippEnumAllToolCollectionsCommand c(25,"Stuff");
00997 std::string t = c.getCommandString();
00998 std::string t_expected = "00025 EnumAllToolCollections(\"Stuff\")\r\n";
00999 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01000 recheck_with_parser(c);
01001 }
01002
01003 #include "ippdme/Command/ippOpenToolCollectionCommand.h"
01004 void ippCommandTestCase::testOpenToolCollectionCommand()
01005 {
01006 ippOpenToolCollectionCommand c(25,"Stuff");
01007 std::string t = c.getCommandString();
01008 std::string t_expected = "00025 OpenToolCollection(\"Stuff\")\r\n";
01009 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01010 recheck_with_parser(c);
01011 }
01012
01013 #include "ippdme/Command/ippPtMeasSelfCenterCommand.h"
01014 void ippCommandTestCase::testPtMeasSelfCenterCommand()
01015 {
01016 ippPtMeasSelfCenterCommand c(25,1,2,3,ippTargetVector(4,5,6));
01017 std::string t = c.getCommandString();
01018 std::string t_expected = "00025 PtMeasSelfCenter(X(1.), Y(2.), Z(3.), IJK(4., 5., 6.))\r\n";
01019 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01020 recheck_with_parser(c);
01021 }
01022
01023 #include "ippdme/Command/ippPtMeasSelfCenterLockedCommand.h"
01024 void ippCommandTestCase::testPtMeasSelfCenterLockedCommand()
01025 {
01026 {
01027 ippPtMeasSelfCenterLockedCommand c(25,1,2,3,ippTargetVector(4,5,6),ippTargetVector(7,8,9));
01028 std::string t = c.getCommandString();
01029 std::string t_expected = "00025 PtMeasSelfCenterLocked(X(1.), Y(2.), Z(3.), IJK(4., 5., 6.), LMN(7., 8., 9.))\r\n";
01030 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01031 recheck_with_parser(c);
01032 }
01033 }
01034
01035 #include "ippdme/Command/ippGetNamedCsyTransformationCommand.h"
01036 void ippCommandTestCase::testGetNamedCsyTransformationCommand()
01037 {
01038 ippGetNamedCsyTransformationCommand c(25,"Stuff");
01039 std::string t = c.getCommandString();
01040 std::string t_expected = "00025 GetNamedCsyTransformation(\"Stuff\")\r\n";
01041 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01042 recheck_with_parser(c);
01043 }
01044
01045 #include "ippdme/Command/ippSaveNamedCsyTransformationCommand.h"
01046 void ippCommandTestCase::testSaveNamedCsyTransformationCommand()
01047 {
01048 ippSaveNamedCsyTransformationCommand c(25,"Stuff",1,2,3,4,5,6);
01049 std::string t = c.getCommandString();
01050 std::string t_expected = "00025 SaveNamedCsyTransformation(\"Stuff\", 1., 2., 3., 4., 5., 6.)\r\n";
01051 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01052 recheck_with_parser(c);
01053 }
01054
01055
01056 #include "ippdme/Command/ippSaveActiveCoordSystemCommand.h"
01057 void ippCommandTestCase::testSaveActiveCoordSystemCommand()
01058 {
01059 ippSaveActiveCoordSystemCommand c(25,"Stuff");
01060 std::string t = c.getCommandString();
01061 std::string t_expected = "00025 SaveActiveCoordSystem(\"Stuff\")\r\n";
01062 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01063 recheck_with_parser(c);
01064 }
01065 #include "ippdme/Command/ippLoadCoordSystemCommand.h"
01066 void ippCommandTestCase::testLoadCoordSystemCommand()
01067 {
01068 ippLoadCoordSystemCommand c(25,"Stuff");
01069 std::string t = c.getCommandString();
01070 std::string t_expected = "00025 LoadCoordSystem(\"Stuff\")\r\n";
01071 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01072 recheck_with_parser(c);
01073 }
01074 #include "ippdme/Command/ippDeleteCoordSystemCommand.h"
01075 void ippCommandTestCase::testDeleteCoordSystemCommand()
01076 {
01077 ippDeleteCoordSystemCommand c(25,"Stuff");
01078 std::string t = c.getCommandString();
01079 std::string t_expected = "00025 DeleteCoordSystem(\"Stuff\")\r\n";
01080 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01081 recheck_with_parser(c);
01082 }
01083 #include "ippdme/Command/ippEnumCoordSystemsCommand.h"
01084 void ippCommandTestCase::testEnumCoordSystemsCommand()
01085 {
01086 ippEnumCoordSystemsCommand c(25);
01087 std::string t = c.getCommandString();
01088 std::string t_expected = "00025 EnumCoordSystems()\r\n";
01089 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01090 recheck_with_parser(c);
01091 }
01092
01093 #include "ippdme/Command/ippScanUnknownDensityCommand.h"
01094 void ippCommandTestCase::testScanUnknownDensityCommand()
01095 {
01096 {
01097 ippScanUnknownDensityCommand c(25,1.,true,10.);
01098 std::string t = c.getCommandString();
01099 std::string t_expected = "00025 ScanUnknownDensity(Dis(1.), Angle(10.))\r\n";
01100 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01101 recheck_with_parser(c);
01102 }
01103 {
01104 ippScanUnknownDensityCommand c(25,2.,false,10.);
01105 std::string t = c.getCommandString();
01106
01107 std::string t_expected = "00025 ScanUnknownDensity(Dis(2.))\r\n";
01108 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01109 recheck_with_parser(c);
01110 }
01111
01112
01113
01114 }
01115 #include "ippdme/Command/ippScanOnCurveDensityCommand.h"
01116 void ippCommandTestCase::testScanOnCurveDensityCommand()
01117 {
01118 {
01119 ippScanOnCurveDensityCommand c(25,1.,true,10.,true);
01120 std::string t = c.getCommandString();
01121 std::string t_expected = "00025 ScanOnCurveDensity(Dis(1.), Angle(10.), AtNominals(1))\r\n";
01122 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01123 recheck_with_parser(c);
01124 }
01125
01126
01127
01128 {
01129 ippScanOnCurveDensityCommand c(25,2.,false,10.,true);
01130 std::string t = c.getCommandString();
01131 std::string t_expected = "00025 ScanOnCurveDensity(Dis(2.), AtNominals(1))\r\n";
01132 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01133 recheck_with_parser(c);
01134 }
01135 {
01136
01137 ippScanOnCurveDensityCommand c(25,3.,false,10.,false);
01138 std::string t = c.getCommandString();
01139 std::string t_expected = "00025 ScanOnCurveDensity(Dis(3.), AtNominals(0))\r\n";
01140 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01141 recheck_with_parser(c);
01142 }
01143 }
01144
01145
01146 #include "ippdme/Command/ippScanOnCurveHintCommand.h"
01147 void ippCommandTestCase::testScanOnCurveHintCommand()
01148 {
01149
01150 ippScanOnCurveHintCommand c(25,0.1,0.2);
01151 std::string t = c.getCommandString();
01152 std::string t_expected = "00025 ScanOnCurveHint(0.1, 0.2)\r\n";
01153 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01154 recheck_with_parser(c);
01155 }
01156
01157 #include "ippdme/Command/ippScanOnCurveCommand.h"
01158 void ippCommandTestCase::testScanOnCurveCommand_Type1()
01159 {
01160
01161 ippScanOnCurveCommand c(25,true,ippScanOnCurveCommand::Type1);
01162 c.addPoint(1.,2.,3.,4.,5.,6.,1000);
01163 c.addPoint(11.,12.,13.,14.,15.,16.,1001);
01164 std::string t = c.getCommandString();
01165 std::string t_expected = "00025 ScanOnCurve(Closed(1), "
01166 "Format(X(),Y(),Z(),IJK(),tag), "
01167 "Data(1., 2., 3., 4., 5., 6., 1000, 11., 12., 13., 14., 15., 16., 1001))\r\n";
01168 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01169 recheck_with_parser(c);
01170 }
01171 void ippCommandTestCase::testScanOnCurveCommand_Type2()
01172 {
01173
01174 ippScanOnCurveCommand c(25,true,ippScanOnCurveCommand::Type2);
01175 c.addPoint(1.,2.,3.,4.,5.,6.,1000,1.,2.,3.);
01176 c.addPoint(11.,12.,13.,14.,15.,16.,1001,1.,2.,3.);
01177 std::string t = c.getCommandString();
01178 std::string t_expected = "00025 ScanOnCurve(Closed(1), "
01179 "Format(X(),Y(),Z(),IJK(),tag,pi,pj,pk),"
01180 " Data(1., 2., 3., 4., 5., 6., 1000, 1., 2., 3.,"
01181 " 11., 12., 13., 14., 15., 16., 1001, 1., 2., 3.))\r\n";
01182 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01183 recheck_with_parser(c);
01184 }
01185 void ippCommandTestCase::testScanOnCurveCommand_Type3()
01186 {
01187
01188 ippScanOnCurveCommand c(25,true,ippScanOnCurveCommand::Type3);
01189 c.addPoint(1.,2.,3.,4.,5.,6.,1000, 1., 2., 3., 4., 5., 6.);
01190 c.addPoint(11.,12.,13.,14.,15.,16.,1001, 1., 2., 3., 4., 5., 6.);
01191 std::string t = c.getCommandString();
01192 std::string t_expected = "00025 ScanOnCurve(Closed(1), "
01193 "Format(X(),Y(),Z(),IJK(),tag,pi,pj,pk,si,sj,sk), "
01194 "Data(1., 2., 3., 4., 5., 6., 1000,"
01195 " 1., 2., 3., 4., 5., 6.,"
01196 " 11., 12., 13., 14., 15., 16., 1001,"
01197 " 1., 2., 3., 4., 5., 6.))\r\n";
01198 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01199 recheck_with_parser(c);
01200 }
01201 #include "ippdme/Command/ippScanOnHelixCommand.h"
01202 void ippCommandTestCase::testScanOnHelixCommand()
01203 {
01204 ippScanOnHelixCommand c(25,
01205 1.,2.,3.,
01206 4.,5.,6.,
01207 7.,8.,9.,
01208 10.,11.,12.,13.
01209 );
01210 std::string t = c.getCommandString();
01211 std::string t_expected = "00025 ScanOnHelix(1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13.)\r\n";
01212 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01213 recheck_with_parser(c);
01214 }
01215
01216 #include "ippdme/Command/ippGetPropCommand.h"
01217 void ippCommandTestCase::testFoundToolProperties()
01218 {
01219
01220
01221
01222 {
01223 ippGetPropCommand c(25);
01224 c.addProp(ippProp(FoundTool,CollisionVolume));
01225 std::string t = c.getCommandString();
01226 std::string t_expected = "00025 GetProp(FoundTool.CollisionVolume())\r\n";
01227 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01228 recheck_with_parser(c);
01229 }
01230 {
01231 ippGetPropCommand c(25);
01232 c.addProp(ippProp(FoundTool,Alignment));
01233 std::string t = c.getCommandString();
01234 std::string t_expected = "00025 GetProp(FoundTool.Alignment())\r\n";
01235 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01236 recheck_with_parser(c);
01237 }
01238 {
01239 ippGetPropCommand c(25);
01240 c.addProp(ippProp(FoundTool,AvrRadius));
01241 std::string t = c.getCommandString();
01242 std::string t_expected = "00025 GetProp(FoundTool.AvrRadius())\r\n";
01243 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01244 recheck_with_parser(c);
01245 }
01246 {
01247 ippGetPropCommand c(25);
01248 c.addProp(ippProp(FoundTool,AlignmentVolume));
01249 std::string t = c.getCommandString();
01250 std::string t_expected = "00025 GetProp(FoundTool.AlignmentVolume())\r\n";
01251 IPP_UTEST_ASSERT_EQUALS(t,t_expected);
01252 recheck_with_parser(c);
01253 }
01254 }
01255