jasmine-headless-webkit/ext/jasmine-webkit-specrunner/ConsoleOutput.h

39 lines
1.2 KiB
C
Raw Normal View History

2011-08-03 16:26:39 +00:00
#ifndef JHW_CONSOLE_OUTPUT
#define JHW_CONSOLE_OUTPUT
#include <QObject>
#include <iostream>
#include <QStack>
2011-08-30 19:59:09 +00:00
class ConsoleOutput : public QObject {
public:
ConsoleOutput();
2011-08-30 19:59:09 +00:00
void passed(const QString &specDetail);
void failed(const QString &specDetail);
void errorLog(const QString &msg, int lineNumber, const QString &sourceID);
void internalLog(const QString &note, const QString &msg);
void consoleLog(const QString &msg);
void logSpecFilename(const QString &name);
void logSpecResult(const QString &result);
2011-08-29 17:35:36 +00:00
2011-08-30 19:59:09 +00:00
void reportFailure(const QString &totalTests, const QString &failedTests, const QString &duration);
void reportSuccess(const QString &totalTests, const QString &failedTests, const QString &duration);
void reportSuccessWithJSErrors(const QString &totalTests, const QString &failedTests, const QString &duration);
std::ostream *outputIO;
QStack<QString> successes;
QStack<QString> failures;
bool showColors;
bool consoleLogUsed;
private:
void green();
void clear();
void red();
void yellow();
void formatTestResults(const QString &totalTests, const QString &failedTests, const QString &duration);
};
2011-08-03 16:26:39 +00:00
#endif