Correct number matching in equals_

This commit is contained in:
ragaskar
2010-03-18 20:32:40 -07:00
parent c85079e9d0
commit bf938ffc50
4 changed files with 60 additions and 5 deletions

View File

@@ -213,6 +213,10 @@ jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {
return (a == b);
}
if (jasmine.isNumber_(a) && jasmine.isNumber_(b)) {
return (a == b);
}
if (typeof a === "object" && typeof b === "object") {
return this.compareObjects_(a, b, mismatchKeys, mismatchValues);
}