| 11 | running = false; |
| 12 | } |
| 13 | void SiegeTest::start() |
| 14 | { |
| 15 | if (fail) return; |
| 16 | running = true; |
| 17 | |
| 18 | int userCount = Broodwar->self()->completedUnitCount(UnitTypes::Terran_Siege_Tank_Tank_Mode); |
| 19 | BWAssertF(userCount>=1,{fail=true;return;}); |
| 20 | for (Unit u : Broodwar->self()->getUnits()) |
| 21 | if (u->getType()==UnitTypes::Terran_Siege_Tank_Tank_Mode) |
| 22 | unit = u; |
| 23 | |
| 24 | BWAssertF(unit!=NULL,{fail=true;return;}); |
| 25 | BWAssertF(unit->exists(),{fail=true;return;}); |
| 26 | BWAssertF(unit->isSieged()==false,{fail=true;return;}); |
| 27 | unit->siege(); |
| 28 | BWAssertF(unit->getOrder()==Orders::Sieging,{fail=true;return;}); |
| 29 | startFrame = Broodwar->getFrameCount(); |
| 30 | nextFrame = Broodwar->getFrameCount(); |
| 31 | |
| 32 | } |
| 33 | void SiegeTest::update() |
| 34 | { |
| 35 | if (running == false) return; |
nothing calls this directly
no test coverage detected