Exemple #1
0
void UnitTest::beginTestCase (String const& name)
{
    finishCase ();

    String s;
    s << getTestName () << " : " << name;
    logMessage (s);

    m_case = new Case (name, m_className);
}
/*!
 * @brief Returns the index of the test with the specified name.
 *
 * @param[in] name - name of the desired test
 * @return - returns the index of the test if found, -1 otherwise
 *
 * @author J. Peterson
 * @date 06/22/2014
*/
int CTestScript::findTestByName(QString &name)
{
    int testCount = getTestCount();
    for (int i=0; i<testCount; i++)
    {
        QString *pStr = getTestName(i);
        if (name == *pStr)
            return(i);
    }
    return(-1);
}