| 12 | running = false; |
| 13 | } |
| 14 | void LiftTest::start() |
| 15 | { |
| 16 | if (fail) return; |
| 17 | running = true; |
| 18 | |
| 19 | int userCount = Broodwar->self()->completedUnitCount(unitType); |
| 20 | BWAssertF(userCount>=1,{fail=true;return;}); |
| 21 | for (Unit u : Broodwar->self()->getUnits()) |
| 22 | if (u->getType()==unitType) |
| 23 | unit = u; |
| 24 | |
| 25 | BWAssertF(unit!=NULL,{fail=true;return;}); |
| 26 | BWAssertF(unit->exists(),{fail=true;return;}); |
| 27 | BWAssertF(unit->isLifted()==false,{fail=true;return;}); |
| 28 | BWAssertF(unit->isIdle()==true,{fail=true;return;}); |
| 29 | BWAssertF(unit->isTraining()==false,{fail=true;return;}); |
| 30 | BWAssertF(unit->isResearching()==false,{fail=true;return;}); |
| 31 | BWAssertF(unit->isUpgrading()==false,{fail=true;return;}); |
| 32 | BWAssertF(unit->isConstructing()==false,{fail=true;return;}); |
| 33 | originalTilePosition = unit->getTilePosition(); |
| 34 | unit->lift(); |
| 35 | BWAssertF(unit->getOrder()==Orders::BuildingLiftOff,{fail=true;return;}); |
| 36 | startFrame = Broodwar->getFrameCount(); |
| 37 | nextFrame = Broodwar->getFrameCount(); |
| 38 | |
| 39 | } |
| 40 | void LiftTest::update() |
| 41 | { |
| 42 | if (running == false) return; |
nothing calls this directly
no test coverage detected