From abac4e0b19437000ebdad2fa51c890f8721334d1 Mon Sep 17 00:00:00 2001 From: Daniel Ehrenberg Date: Wed, 26 Apr 2017 14:05:31 +0200 Subject: [PATCH] Fix up compareArray --- harness/compareArray.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/harness/compareArray.js b/harness/compareArray.js index 0e0654aeb4..228a6aaaec 100644 --- a/harness/compareArray.js +++ b/harness/compareArray.js @@ -14,16 +14,6 @@ function compareArray(a, b) { } assert.compareArray = function(actual, expected, message) { - if (compareArray(actual, expected)) return; - - - if (message === undefined) { - message = ''; - } else { - message += ' '; - } - - message += 'Expected SameValue(«' + String(actual) + '», «' + String(expected) + '») to be true'; - - $ERROR(`${message}${message === undefined ? '' : ' '}Expected the arrays [${actual}] to have the same contents as [${expected}]`); + assert(compareArray(actual, expected), + `Expected [${actual.join(", ")}] and [${expected.join(", ")}] to have the same contents. ${message}`); }