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

Class TestBuildForge

tests/test_unit_command.cc:268–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266 //
267
268 class TestBuildForge : public TestUnitCommandTargetingPoint {
269 public:
270 TestBuildForge() {
271 test_unit_type_ = UNIT_TYPEID::PROTOSS_PROBE;
272 test_ability_ = ABILITY_ID::BUILD_FORGE;
273 placing_structure_ = true;
274 }
275
276 void SetTestTime() override {
277 wait_game_loops_ = 150;
278 }
279
280 void AdditionalTestSetup() override {
281 target_point_ = GetPointOffsetX(origin_pt_);
282
283 agent_->Debug()->DebugCreateUnit(UNIT_TYPEID::PROTOSS_PYLON, origin_pt_, agent_->Observation()->GetPlayerID(), 1);
284 agent_->Debug()->SendDebug();
285 }
286
287 void OnTestFinish() override {
288 VerifyUnitExistsAndComplete(UNIT_TYPEID::PROTOSS_FORGE);
289 VerifyUnitIdleAfterOrder(test_unit_type_);
290 VerifyUnitIdleAfterOrder(UNIT_TYPEID::PROTOSS_FORGE);
291 KillAllUnits();
292 }
293 };
294
295
296 //

Callers 1

UnitCommandTestBotMethod · 0.85

Calls

no outgoing calls

Tested by 1

UnitCommandTestBotMethod · 0.68