2011-08-03 16:26:39 +00:00
|
|
|
#ifndef JHW_CONSOLE_OUTPUT
|
|
|
|
#define JHW_CONSOLE_OUTPUT
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <iostream>
|
|
|
|
#include <QStack>
|
|
|
|
|
|
|
|
namespace HeadlessSpecRunner {
|
|
|
|
class ConsoleOutput : public QObject {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
ConsoleOutput();
|
|
|
|
void passed(const QString &specDetail);
|
|
|
|
void failed(const QString &specDetail);
|
2011-08-26 15:18:04 +00:00
|
|
|
void errorLog(const QString &msg, int lineNumber, const QString &sourceID);
|
2011-08-03 16:26:39 +00:00
|
|
|
std::ostream *outputIO;
|
|
|
|
QStack<QString> successes;
|
|
|
|
QStack<QString> failures;
|
|
|
|
bool showColors;
|
2011-08-23 23:49:47 +00:00
|
|
|
private:
|
2011-08-03 16:26:39 +00:00
|
|
|
void green();
|
|
|
|
void clear();
|
|
|
|
void red();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|