Logo Search packages:      
Sourcecode: qt4-x11 version File versions

Q_TESTLIB_EXPORT const char * QTest::currentTestFunction (  ) 

Returns the name of the test function that is currently executed.

Example:

    void MyTestClass::cleanup()
    {
        if (qstrcmp(currentTestFunction(), "myDatabaseTest") == 0) {
            // clean up all database connections
            closeAllDatabases();
        }
    }

Definition at line 1340 of file qtestcase.cpp.

{
    return QTestResult::currentTestFunction();
}


Generated by  Doxygen 1.6.0   Back to index