mirror of
https://github.com/tc39/test262.git
synced 2025-11-24 15:43:12 +01:00
parseTestRecord: add support for YAML frontmatter parseTestRecord: initial unit test for test record parser parseTestRecord: refactor for testing factor old parsing; add YAML parsing runner: support "includes" from YAML frontmatter support frontmatter "includes" in python runner use test.includes if present instead of scanning test code with regex harness: factor individual functions out into files tools: handle YAML errors tolerate missing keys in dictionary (flags, includes) report filename when empty frontmatter block new option --list-includes to test262.py harness: factor helper functions into separate files sth: remove extra close-paren (syntax error) test_common: TDD; failing parse of YAML common: use parseTestRecord (YAML-aware)
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;
|
|
}
|
|
|