| 28 | running = false; |
| 29 | } |
| 30 | void RallyTest::start() |
| 31 | { |
| 32 | if (fail) return; |
| 33 | running = true; |
| 34 | |
| 35 | int userCount = Broodwar->self()->completedUnitCount(unitType); |
| 36 | FAILTEST(userCount>=1); |
| 37 | for (Unit u : Broodwar->self()->getUnits()) |
| 38 | { |
| 39 | if (u->getType()==unitType) |
| 40 | { |
| 41 | unit = u; |
| 42 | } |
| 43 | if (u->getType().isWorker()) |
| 44 | { |
| 45 | rallyUnit = u; |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | FAILTEST(rallyUnit!=NULL); |
| 50 | rallyPosition=rallyUnit->getPosition(); |
| 51 | |
| 52 | FAILTEST(unit!=NULL); |
| 53 | FAILTEST(unit->exists()); |
| 54 | FAILTEST(unit->getType().isBuilding()); |
| 55 | unit->setRallyPoint(rallyUnit); |
| 56 | FAILTEST(unit->getRallyUnit()==rallyUnit); |
| 57 | startFrame = Broodwar->getFrameCount(); |
| 58 | nextFrame = Broodwar->getFrameCount(); |
| 59 | |
| 60 | } |
| 61 | void RallyTest::update() |
| 62 | { |
| 63 | if (running == false) return; |
nothing calls this directly
no test coverage detected