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

Class TestEffectMoveMove

tests/test_unit_command.cc:1081–1112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1079 //
1080
1081 class TestEffectMoveMove : public TestUnitCommandTargetingPoint {
1082 public:
1083 TestEffectMoveMove() {
1084 test_unit_type_ = UNIT_TYPEID::ZERG_HYDRALISK;
1085 test_ability_ = ABILITY_ID::MOVE;
1086 }
1087
1088 void SetTestTime() override {
1089 wait_game_loops_ = 100;
1090 }
1091
1092 void AdditionalTestSetup() override {
1093 target_point_ = GetPointOffsetX(origin_pt_, -5);
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
1115 //

Callers 1

UnitCommandTestBotMethod · 0.85

Calls

no outgoing calls

Tested by 1

UnitCommandTestBotMethod · 0.68