removed empty lines and comments from test results

master
Marc Wäckerlin 9 years ago
parent 7dc2179629
commit 4d829961b1
  1. 15
      src/commands.hxx

@ -123,6 +123,9 @@ class Command: public QObject {
QString result() { QString result() {
return _result; return _result;
} }
virtual bool isTestcase() {
return true;
}
static void realMouseClick(QWebFrame* frame, QString selector) { static void realMouseClick(QWebFrame* frame, QString selector) {
QWebElement element(find(frame, selector)); QWebElement element(find(frame, selector));
if (element.isNull()) throw ElementNotFound(selector); if (element.isNull()) throw ElementNotFound(selector);
@ -251,6 +254,9 @@ class Empty: public Command {
bool execute(Script*, QWebFrame*) { bool execute(Script*, QWebFrame*) {
return true; return true;
} }
virtual bool isTestcase() {
return false;
}
}; };
class Comment: public Command { class Comment: public Command {
@ -281,6 +287,9 @@ class Comment: public Command {
this->log(false); this->log(false);
return true; return true;
} }
virtual bool isTestcase() {
return false;
}
private: private:
QString _comment; QString _comment;
}; };
@ -668,7 +677,8 @@ class Script: public QObject {
xmlattr(_cerr).toStdString()); xmlattr(_cerr).toStdString());
_cout.clear(); _cout.clear();
_cerr.clear(); _cerr.clear();
_testsuites->last()<<testcase; if ((*cmd)->isTestcase())
_testsuites->last()<<testcase;
} }
} catch (Exception& e) { } catch (Exception& e) {
_timer.stop(); _timer.stop();
@ -679,7 +689,8 @@ class Script: public QObject {
xmlattr(_cerr).toStdString()); xmlattr(_cerr).toStdString());
_cout.clear(); _cout.clear();
_cerr.clear(); _cerr.clear();
_testsuites->last()<<testcase; if ((*cmd)->isTestcase())
_testsuites->last()<<testcase;
removeSignals(frame); removeSignals(frame);
e.line((*cmd)->line()); e.line((*cmd)->line());
e.file((*cmd)->file()); e.file((*cmd)->file());

Loading…
Cancel
Save