| 59 | |
| 60 | } |
| 61 | void RallyTest::update() |
| 62 | { |
| 63 | if (running == false) return; |
| 64 | if (fail) |
| 65 | { |
| 66 | running = false; |
| 67 | return; |
| 68 | } |
| 69 | int thisFrame = Broodwar->getFrameCount(); |
| 70 | BWAssert(thisFrame==nextFrame); |
| 71 | nextFrame++; |
| 72 | Broodwar->setScreenPosition(unit->getPosition() - Position(320,240)); |
| 73 | |
| 74 | if (thisFrame<startFrame+100) |
| 75 | { |
| 76 | FAILTEST(unit->getRallyUnit()==rallyUnit); |
| 77 | } |
| 78 | else if (thisFrame==startFrame+100) |
| 79 | { |
| 80 | FAILTEST(unit->getRallyUnit()==rallyUnit); |
| 81 | unit->setRallyPoint(rallyPosition); |
| 82 | FAILTEST(unit->getRallyPosition()==rallyPosition); |
| 83 | FAILTEST(unit->getRallyUnit()==NULL); |
| 84 | } |
| 85 | else if (thisFrame<startFrame+200) |
| 86 | { |
| 87 | FAILTEST(unit->getRallyPosition()==rallyPosition); |
| 88 | FAILTEST(unit->getRallyUnit()==NULL); |
| 89 | } |
| 90 | else |
| 91 | { |
| 92 | unit->setRallyPoint(unit); |
| 93 | running=false; |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | void RallyTest::stop() |
| 98 | { |
nothing calls this directly
no test coverage detected