27 lines
529 B
C++
27 lines
529 B
C++
#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);
|
|
std::ostream *outputIO;
|
|
QStack<QString> successes;
|
|
QStack<QString> failures;
|
|
private:
|
|
bool showColors;
|
|
void green();
|
|
void clear();
|
|
void red();
|
|
};
|
|
}
|
|
|
|
#endif
|