Example #1
0
void TestSuite::restartCurrTest()
{
    auto scene = _testCallbacks[_currTestIndex]();
    auto testCase = getTestCase(scene);
    testCase->setTestSuite(this);
    testCase->setTestCaseName(_childTestNames[_currTestIndex]);

    Director::getInstance()->replaceScene(scene);
}
Example #2
0
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);
}
Example #3
0
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);
    }
}
Example #4
0
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);
}
Example #5
0
void Test::testCaseNameNoChecks() {
    setTestCaseName("testCaseName<27>");
}
Example #6
0
void Test::testCaseName() {
    setTestCaseName("testCaseName<15>");
    CORRADE_VERIFY(true);
}