Skip to content

Commit

Permalink
Make the assertNear test helper method a bit friendlier to debug.
Browse files Browse the repository at this point in the history
  • Loading branch information
savetheclocktower committed Oct 17, 2010
1 parent 46d273e commit 27e6845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/unit/layout_test.js
Expand Up @@ -123,7 +123,7 @@ new Test.Unit.Runner({

function assertNear(v1, v2, message) {
var abs = Math.abs(v1 - v2);
this.assert(abs <= 1, message);
this.assert(abs <= 1, message + ' (actual: ' + v1 + ', ' + v2 + ')');
}

// With percentage widths, we'll occasionally run into rounding
Expand Down

0 comments on commit 27e6845

Please sign in to comment.