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

Method VerifyUnitDoesNotExist

tests/test_unit_command_common.cc:132–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130 }
131
132 void TestUnitCommand::VerifyUnitDoesNotExist(UNIT_TYPEID unit_type) {
133 const ObservationInterface* obs = agent_->Observation();
134 const Units& units = obs->GetUnits(Unit::Alliance::Self);
135 for (const Unit& unit : units) {
136 if (unit.unit_type == unit_type) {
137 ReportError("Unexpected unit exists when it should not.");
138 }
139 }
140 }
141
142 void TestUnitCommand::VerifyUnitIdleAfterOrder(UNIT_TYPEID unit_type) {
143 bool unit_idled = false;

Callers

nothing calls this directly

Calls 2

ObservationMethod · 0.80
GetUnitsMethod · 0.80

Tested by

no test coverage detected