//----------------------------------------------------------------------------- function compareArray(a, b) { if (b.length !== a.length) { return false; } for (var i = 0; i < a.length; i++) { if (b[i] !== a[i]) { return false; } } return true; } 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}]`); }