| 46 | Broodwar->printf("A %p has been destroyed",unit); |
| 47 | } |
| 48 | void TestModule::runTestCases() |
| 49 | { |
| 50 | if (currentTestCase==NULL && testCases.empty()==false && Broodwar->getFrameCount()>lastEndFrame+15) |
| 51 | { |
| 52 | currentTestCase = *testCases.begin(); |
| 53 | currentTestCase->start(); |
| 54 | } |
| 55 | if (currentTestCase!=NULL) |
| 56 | { |
| 57 | if (currentTestCase->isRunning()) |
| 58 | currentTestCase->update(); |
| 59 | else |
| 60 | { |
| 61 | currentTestCase->stop(); |
| 62 | delete currentTestCase; |
| 63 | currentTestCase = NULL; |
| 64 | testCases.erase(testCases.begin()); |
| 65 | lastEndFrame = Broodwar->getFrameCount(); |
| 66 | } |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | void TestModule::addTestCase(TestCase* testCase) |
| 71 | { |