void TestSuite::restartCurrTest() { auto scene = _testCallbacks[_currTestIndex](); auto testCase = getTestCase(scene); testCase->setTestSuite(this); testCase->setTestCaseName(_childTestNames[_currTestIndex]); Director::getInstance()->replaceScene(scene); }
void TestSuite::enterNextTest() { _currTestIndex = (_currTestIndex + 1) % _childTestNames.size(); auto scene = _testCallbacks[_currTestIndex](); auto testCase = getTestCase(scene); testCase->setTestSuite(this); testCase->setTestCaseName(_childTestNames[_currTestIndex]); Director::getInstance()->replaceScene(scene); }
void TestSuite::runThisTest() { if (!_childTestNames.empty()) { TestController::getInstance()->setCurrTestSuite(this); _currTestIndex = 0; auto scene = _testCallbacks[0](); auto testCase = getTestCase(scene); testCase->setTestSuite(this); testCase->setTestCaseName(_childTestNames[_currTestIndex]); Director::getInstance()->replaceScene(scene); } }
void TestSuite::enterPreviousTest() { if (_currTestIndex > 0) { _currTestIndex -= 1; } else { _currTestIndex = (int)_childTestNames.size() - 1; } auto scene = _testCallbacks[_currTestIndex](); auto testCase = getTestCase(scene); testCase->setTestSuite(this); testCase->setTestCaseName(_childTestNames[_currTestIndex]); Director::getInstance()->replaceScene(scene); }
void Test::testCaseNameNoChecks() { setTestCaseName("testCaseName<27>"); }
void Test::testCaseName() { setTestCaseName("testCaseName<15>"); CORRADE_VERIFY(true); }