mirror of https://github.com/tc39/test262.git
20 lines
408 B
JavaScript
20 lines
408 B
JavaScript
|
|
//-----------------------------------------------------------------------------
|
|
function compareArray(aExpected, aActual) {
|
|
if (aActual.length != aExpected.length) {
|
|
return false;
|
|
}
|
|
|
|
aExpected.sort();
|
|
aActual.sort();
|
|
|
|
var s;
|
|
for (var i = 0; i < aExpected.length; i++) {
|
|
if (aActual[i] !== aExpected[i]) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|