summaryrefslogtreecommitdiff
path: root/harness
diff options
context:
space:
mode:
authorDaniel Ehrenberg <littledan@chromium.org>2017-04-26 14:05:31 +0200
committerLeo Balter <leonardo.balter@gmail.com>2017-04-27 19:33:41 -0400
commitabac4e0b19437000ebdad2fa51c890f8721334d1 (patch)
tree01a6122efd7ea5d8b339f98c606bb676d84758f8 /harness
parent6ee183a0578d45f4a4cf34bd4bd838e3fb918f95 (diff)
downloadqtdeclarative-testsuites-abac4e0b19437000ebdad2fa51c890f8721334d1.tar.gz
Fix up compareArray
Diffstat (limited to 'harness')
-rw-r--r--harness/compareArray.js14
1 files changed, 2 insertions, 12 deletions
diff --git a/harness/compareArray.js b/harness/compareArray.js
index 0e0654aeb..228a6aaae 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}`);
}