|
@@ -48,7 +48,7 @@ Equals.prototype.toString = function() {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
Equals.prototype.assert = function() {
|
|
Equals.prototype.assert = function() {
|
|
|
- return "is(" + this.e2.toString() + "," + this.e1.toString() + ");";
|
|
|
|
|
|
|
+ return statement("is(" + this.e2.toString() + "," + this.e1.toString() + ")");
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
Equals.prototype.verify = function() {
|
|
Equals.prototype.verify = function() {
|
|
@@ -60,7 +60,7 @@ NotEquals.prototype.toString = function() {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
NotEquals.prototype.assert = function() {
|
|
NotEquals.prototype.assert = function() {
|
|
|
- return "isnt(" + this.e2.toString() + "," + this.e1.toString() + ")";
|
|
|
|
|
|
|
+ return statement("isnt(" + this.e2.toString() + "," + this.e1.toString() + ")");
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
NotEquals.prototype.verify = function() {
|
|
NotEquals.prototype.verify = function() {
|
|
@@ -102,7 +102,7 @@ function assertTrue(expression) {
|
|
|
//if (r && r.length == 3) {
|
|
//if (r && r.length == 3) {
|
|
|
// return "ok(" + r[1] + ".should be_" + r[2];
|
|
// return "ok(" + r[1] + ".should be_" + r[2];
|
|
|
//} else {
|
|
//} else {
|
|
|
- return "ok(" + exp + ")";
|
|
|
|
|
|
|
+ return statement("ok(" + exp + ")");
|
|
|
//}
|
|
//}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -113,12 +113,12 @@ function assertFalse(expression) {
|
|
|
//if (r && r.length == 3) {
|
|
//if (r && r.length == 3) {
|
|
|
// return r[1] + ".should_not be_" + r[2];
|
|
// return r[1] + ".should_not be_" + r[2];
|
|
|
//} else {
|
|
//} else {
|
|
|
- return "ok(!" + exp + ")";
|
|
|
|
|
|
|
+ return statement("ok(!" + exp + ")");
|
|
|
//}
|
|
//}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function verify(statement) {
|
|
|
|
|
- return "verify { " + statement + " }";
|
|
|
|
|
|
|
+function verify(stmt) {
|
|
|
|
|
+ return stmt;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function verifyTrue(expression) {
|
|
function verifyTrue(expression) {
|
|
@@ -148,7 +148,7 @@ RegexpMatch.prototype.toString = function() {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
RegexpMatch.prototype.assert = function() {
|
|
RegexpMatch.prototype.assert = function() {
|
|
|
- return "like(qr" + this.patternAsRegEx() + "," + this.expression + ")";
|
|
|
|
|
|
|
+ return statement("like(qr" + this.patternAsRegEx() + "," + this.expression + ")");
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
RegexpMatch.prototype.verify = function() {
|
|
RegexpMatch.prototype.verify = function() {
|
|
@@ -164,7 +164,7 @@ RegexpNotMatch.prototype.toString = function() {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
RegexpNotMatch.prototype.assert = function() {
|
|
RegexpNotMatch.prototype.assert = function() {
|
|
|
- return "unlike(qr" + this.patternAsRegEx() + "," + this.expression + ")";
|
|
|
|
|
|
|
+ return statement("unlike(qr" + this.patternAsRegEx() + "," + this.expression + ")");
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
RegexpNotMatch.prototype.verify = function() {
|
|
RegexpNotMatch.prototype.verify = function() {
|