MCPcopy Create free account
hub / github.com/bwapi/bwapi / runTestCases

Method runTestCases

bwapi/TestAIModule/Source/TestModule.cpp:48–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 Broodwar->printf("A %p has been destroyed",unit);
47}
48void 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
70void TestModule::addTestCase(TestCase* testCase)
71{

Callers

nothing calls this directly

Calls 6

beginMethod · 0.80
isRunningMethod · 0.80
getFrameCountMethod · 0.45
startMethod · 0.45
updateMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected