diff --git a/ext/jasmine-webkit-specrunner/ReportFileOutput_test.cpp b/ext/jasmine-webkit-specrunner/ReportFileOutput_test.cpp index b25931e..5f3fa3d 100644 --- a/ext/jasmine-webkit-specrunner/ReportFileOutput_test.cpp +++ b/ext/jasmine-webkit-specrunner/ReportFileOutput_test.cpp @@ -18,5 +18,16 @@ void ReportFileOutputTest::testPassed() { 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); diff --git a/ext/jasmine-webkit-specrunner/ReportFileOutput_test.h b/ext/jasmine-webkit-specrunner/ReportFileOutput_test.h index 7fe1516..25dee7d 100644 --- a/ext/jasmine-webkit-specrunner/ReportFileOutput_test.h +++ b/ext/jasmine-webkit-specrunner/ReportFileOutput_test.h @@ -14,6 +14,7 @@ class ReportFileOutputTest : public QObject { ReportFileOutputTest(); private slots: void testPassed(); + void testFailed(); }; #endif