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

33 lines
796 B
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>
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-29 17:35:36 +00:00
void internalLog(const QString &note, const QString &msg);
void consoleLog(const QString &msg);
void logSpecFilename(const QString &name);
2011-08-03 16:26:39 +00:00
std::ostream *outputIO;
QStack<QString> successes;
QStack<QString> failures;
bool showColors;
2011-08-29 17:35:36 +00:00
bool consoleLogUsed;
2011-08-23 23:49:47 +00:00
private:
2011-08-03 16:26:39 +00:00
void green();
void clear();
void red();
};
}
#endif