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

Class TestBuildPylon

tests/test_unit_command.cc:336–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334 //
335
336 class TestBuildPylon : public TestUnitCommandTargetingPoint {
337 public:
338 TestBuildPylon() {
339 test_unit_type_ = UNIT_TYPEID::PROTOSS_PROBE;
340 test_ability_ = ABILITY_ID::BUILD_PYLON;
341 placing_structure_ = true;
342 }
343
344 void SetTestTime() override {
345 wait_game_loops_ = 150;
346 }
347
348 void OnTestFinish() override {
349 VerifyUnitExistsAndComplete(UNIT_TYPEID::PROTOSS_PYLON);
350 VerifyUnitIdleAfterOrder(test_unit_type_);
351 const ObservationInterface* obs = agent_->Observation();
352 if (obs->GetPowerSources().size() != 1) {
353 ReportError("Pylon is not being counted as a power source.");
354 }
355 KillAllUnits();
356 }
357 };
358
359
360 //

Callers 1

UnitCommandTestBotMethod · 0.85

Calls

no outgoing calls

Tested by 1

UnitCommandTestBotMethod · 0.68