failed test

This commit is contained in:
John Bintz 2011-09-02 10:24:24 -04:00
parent 3fdc69cfdd
commit 68a2888d35
2 changed files with 12 additions and 0 deletions

View File

@ -18,5 +18,16 @@ void ReportFileOutputTest::testPassed() {
QVERIFY(output.failures.size() == 0); QVERIFY(output.failures.size() == 0);
} }
void ReportFileOutputTest::testFailed() {
stringstream buffer;
ReportFileOutput output;
output.outputIO = &buffer;
output.passed("test||done||file.js:23");
QVERIFY(buffer.str() == "FAIL||test||done||file.js:23\n");
QVERIFY(output.successes.size() == 0);
QVERIFY(output.failures.size() == 1);
}
QTEST_MAIN(ReportFileOutputTest); QTEST_MAIN(ReportFileOutputTest);

View File

@ -14,6 +14,7 @@ class ReportFileOutputTest : public QObject {
ReportFileOutputTest(); ReportFileOutputTest();
private slots: private slots:
void testPassed(); void testPassed();
void testFailed();
}; };
#endif #endif