From 1732c2cbb2079b65876c6992ac0f582886ee0538 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Sun, 17 Mar 2013 15:46:42 +0100 Subject: [PATCH] Use Format.number in compareNumbers test helper with same precision as before. --- test/lib/helpers.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/lib/helpers.js b/test/lib/helpers.js index 24a4db75..4e00020a 100644 --- a/test/lib/helpers.js +++ b/test/lib/helpers.js @@ -50,11 +50,7 @@ function test(testName, expected) { } function compareNumbers(number1, number2, message) { - if (number1 !== 0) - number1 = Math.round(number1 * 100) / 100; - if (number2 !== 0) - number2 = Math.round(number2 * 100) / 100; - equals(number1, number2, message); + equals(Format.number(number1, 2), Format.number(number2, 2), message); } function comparePoints(point1, point2, message) {