| 1094 | } |
| 1095 | |
| 1096 | void OnTestFinish() override { |
| 1097 | Unit test_unit; |
| 1098 | if (GetTestUnit(test_unit)) { |
| 1099 | if (Point2D(test_unit.pos) != target_point_) { |
| 1100 | ReportError("Unit did not move to the target point."); |
| 1101 | } |
| 1102 | if (test_unit.facing < 3.09300422 || test_unit.facing > 3.19114877) { |
| 1103 | ReportError("Unit facing out of expected range after move."); |
| 1104 | } |
| 1105 | } |
| 1106 | else { |
| 1107 | ReportError("Could not find the test unit."); |
| 1108 | } |
| 1109 | |
| 1110 | KillAllUnits(); |
| 1111 | } |
| 1112 | }; |
| 1113 | |
| 1114 |