MCPcopy Create free account
hub / github.com/Blizzard/s2client-api / TestEffectMovePatrol

Class TestEffectMovePatrol

tests/test_unit_command.cc:1119–1144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1117 //
1118
1119 class TestEffectMovePatrol : public TestUnitCommandTargetingPoint {
1120 public:
1121 TestEffectMovePatrol() {
1122 test_unit_type_ = UNIT_TYPEID::ZERG_HYDRALISK;
1123 test_ability_ = ABILITY_ID::PATROL;
1124 }
1125
1126 void SetTestTime() override {
1127 wait_game_loops_ = 200;
1128 }
1129
1130 void OnTestFinish() override {
1131 Unit test_unit;
1132 if (GetTestUnit(test_unit)) {
1133 Point2D patrol_target = test_unit.orders.front().target_pos;
1134 if ((patrol_target != target_point_) && (patrol_target != origin_pt_)) {
1135 ReportError("Unit no longer has target patrol point in orders.");
1136 }
1137 }
1138 else {
1139 ReportError("Could not find the test unit.");
1140 }
1141
1142 KillAllUnits();
1143 }
1144 };
1145
1146
1147 //

Callers 1

UnitCommandTestBotMethod · 0.85

Calls

no outgoing calls

Tested by 1

UnitCommandTestBotMethod · 0.68