new feature: if tatement for conditions in functions

This commit is contained in:
Marc Wäckerlin committed 2015-05-08 15:34:53 +00:00
1 parent bf6b4764db
commit ee1ebd8ca9
7 files changed
+189 -78

No files matched your search

+10 -3
View File
@@ -221,9 +221,9 @@ class ScriptExecutionFailed: public ScriptFailed {
class WrongNumberOfArguments: public TestFailed {
public:
WrongNumberOfArguments(QString name, QStringList vars, QStringList args):
TestFailed(QString("%1 has %2 arguments, but %3 were given")
.arg(name).arg(vars.size()).arg(args.size())) {
WrongNumberOfArguments(QStringList vars, QStringList args):
TestFailed(QString("function has %1 arguments, but %2 were given")
.arg(vars.size()).arg(args.size())) {
}
};
@@ -246,4 +246,11 @@ class FunctionNotFound: public TestFailed {
}
};
class VariableNotFound: public TestFailed {
public:
VariableNotFound(QString name):
TestFailed("variable not found: "+name) {
}
};
#endif