removed empty lines and comments from test results

master
Marc Wäckerlin 9 years ago
parent 7dc2179629
commit 4d829961b1
  1. 11
      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,6 +677,7 @@ class Script: public QObject {
xmlattr(_cerr).toStdString()); xmlattr(_cerr).toStdString());
_cout.clear(); _cout.clear();
_cerr.clear(); _cerr.clear();
if ((*cmd)->isTestcase())
_testsuites->last()<<testcase; _testsuites->last()<<testcase;
} }
} catch (Exception& e) { } catch (Exception& e) {
@ -679,6 +689,7 @@ class Script: public QObject {
xmlattr(_cerr).toStdString()); xmlattr(_cerr).toStdString());
_cout.clear(); _cout.clear();
_cerr.clear(); _cerr.clear();
if ((*cmd)->isTestcase())
_testsuites->last()<<testcase; _testsuites->last()<<testcase;
removeSignals(frame); removeSignals(frame);
e.line((*cmd)->line()); e.line((*cmd)->line());

Loading…
Cancel
Save