This repository has been archived by the owner on Jun 16, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
halfway in the middle of the reporting change
- Loading branch information
Showing
13 changed files
with
409 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ moc_*.* | |
.DS_Store | ||
hydra-runner.log | ||
jhw-test | ||
.jhw-cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,54 @@ | ||
#include "ReportFileOutput.h" | ||
|
||
using namespace std; | ||
|
||
ReportFileOutput::ReportFileOutput() : QObject() { | ||
reset(); | ||
} | ||
|
||
void ReportFileOutput::reset() { | ||
buffer = new stringstream(); | ||
|
||
outputIO = buffer; | ||
} | ||
|
||
void ReportFileOutput::passed(const QString &specDetail) { | ||
*outputIO << "PASS||" << qPrintable(specDetail) << std::endl; | ||
successes.push(specDetail); | ||
} | ||
|
||
void ReportFileOutput::failed(const QString &specDetail) { | ||
*outputIO << "FAIL||" << qPrintable(specDetail) << std::endl; | ||
failures.push(specDetail); | ||
} | ||
|
||
void ReportFileOutput::errorLog(const QString &msg, int lineNumber, const QString &sourceID) { | ||
*outputIO << "ERROR||" << qPrintable(msg) << "||" << qPrintable(sourceID) << ":" << lineNumber << std::endl; | ||
} | ||
|
||
void ReportFileOutput::consoleLog(const QString &msg) { | ||
*outputIO << "CONSOLE||" << qPrintable(msg) << std::endl; | ||
} | ||
|
||
void ReportFileOutput::internalLog(const QString &, const QString &) {} | ||
void ReportFileOutput::logSpecFilename(const QString &) {} | ||
void ReportFileOutput::logSpecResult(const QString &) {} | ||
|
||
void ReportFileOutput::reportFailure(const QString &totalTests, const QString &failedTests, const QString &duration) { | ||
reportTotals(totalTests, failedTests, duration, false); | ||
} | ||
|
||
void ReportFileOutput::reportSuccess(const QString &totalTests, const QString &failedTests, const QString &duration) { | ||
reportTotals(totalTests, failedTests, duration, false); | ||
} | ||
|
||
void ReportFileOutput::reportSuccessWithJSErrors(const QString &totalTests, const QString &failedTests, const QString &duration) { | ||
reportTotals(totalTests, failedTests, duration, true); | ||
} | ||
|
||
void ReportFileOutput::reportTotals(const QString &totalTests, const QString &failedTests, const QString &duration, bool hasJavaScriptError) { | ||
*outputIO << "TOTAL||" << qPrintable(totalTests) << "||" << qPrintable(failedTests) << "||" << qPrintable(duration) << "||"; | ||
*outputIO << (hasJavaScriptError ? "T" : "F"); | ||
*outputIO << std::endl; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.