Permalink
Browse files

Issue 4924: Online test results of FBTest should include expected and…

  • Loading branch information...
1 parent e62e065 commit 4fb7766285d59084afd4e79ce06064ebefe29136 @simonlindholm committed Dec 21, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 tests/FBTest/content/FBTestFirebug.js
@@ -73,8 +73,16 @@ this.compare = function(expected, actual, msg, shouldNotMatch)
FBTest.sysout("compare "+(result?"passes":"**** FAILS ****")+" "+msg,
{expected: expected, actual: actual});
+ var shownMsg = msg;
+ if (!result)
+ {
+ shownMsg += " (was: " + actual + ", expected" +
+ (shouldNotMatch ? " otherwise" : ": " + expected) +
+ (typeof actual === typeof expected ? ")" : " - different types)");
+ }
+
FBTestApp.TestRunner.appendResult(new FBTestApp.TestResult(window,
- result, msg, expected, actual));
+ result, shownMsg, expected, actual));
if (result)
FBTest.resetTimeout();

0 comments on commit 4fb7766

Please sign in to comment.