1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#include "coverageobject.h"
#include <QDir>
#include <QMetaObject>
#include <QString>
#include <QTest>
void CoverageObject::init()
{
#ifdef __COVERAGESCANNER__
#endif
initTest();
}
void CoverageObject::cleanup()
{
cleanupTest();
#ifdef __COVERAGESCANNER__
QString test_name;
test_name += QString::fromLatin1(metaObject()->className());
test_name += QString::fromLatin1("/");
test_name += QString::fromLatin1(QTest::currentTestFunction());
if (QTest::currentDataTag()) {
test_name += QString::fromLatin1("/");
test_name += QString::fromLatin1(QTest::currentDataTag());
}
__coveragescanner_testname(test_name.toStdString().c_str());
if (QTest::currentTestFailed())
__coveragescanner_teststate("FAILED");
else
__coveragescanner_teststate("PASSED");
__coveragescanner_save();
__coveragescanner_testname("");
__coveragescanner_clear();
#endif
}
|