"git@gitlab.doc.ic.ac.uk:pmaksimo/test262.git" did not exist on "72381359409f06933889943d94d6c8f6812def94"
Newer
Older
//-----------------------------------------------------------------------------
Rick Waldron
committed
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;
Rick Waldron
committed
}
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}]`);
}