diff --git a/boa_tester/src/read.rs b/boa_tester/src/read.rs index 6c66333b057..a2f0e8ffcdc 100644 --- a/boa_tester/src/read.rs +++ b/boa_tester/src/read.rs @@ -128,7 +128,7 @@ pub(super) fn read_suite(path: &Path) -> io::Result { if entry.file_type()?.is_dir() { suites.push(read_suite(entry.path().as_path())?); - } else if entry.file_name().to_string_lossy().ends_with("_FIXTURE.js") { + } else if entry.file_name().to_string_lossy().contains("_FIXTURE") { continue; } else if IGNORED.contains_file(&entry.file_name().to_string_lossy()) { let mut test = Test::default(); @@ -165,13 +165,13 @@ pub(super) fn read_test(path: &Path) -> io::Result { })?; let content = fs::read_to_string(path)?; - let metadata = read_metadata(&content)?; + let metadata = read_metadata(&content, path)?; Ok(Test::new(name, content, metadata)) } /// Reads the metadata from the input test code. -fn read_metadata(code: &str) -> io::Result { +fn read_metadata(code: &str, test: &Path) -> io::Result { use once_cell::sync::Lazy; use regex::Regex; @@ -183,9 +183,19 @@ fn read_metadata(code: &str) -> io::Result { let yaml = META_REGEX .captures(code) - .ok_or_else(|| io::Error::new(io::ErrorKind::InvalidData, "no metadata found"))? + .ok_or_else(|| { + io::Error::new( + io::ErrorKind::InvalidData, + format!("no metadata found for test {}", test.display()), + ) + })? .get(1) - .ok_or_else(|| io::Error::new(io::ErrorKind::InvalidData, "no metadata found"))? + .ok_or_else(|| { + io::Error::new( + io::ErrorKind::InvalidData, + format!("no metadata found for test {}", test.display()), + ) + })? .as_str() .replace('\r', "\n"); diff --git a/boa_tester/src/results.rs b/boa_tester/src/results.rs index 25054611540..7aa65f7dc5f 100644 --- a/boa_tester/src/results.rs +++ b/boa_tester/src/results.rs @@ -428,15 +428,13 @@ fn compute_result_diff( .into_boxed_str(); match (base_test.result, new_test.result) { - (TestOutcomeResult::Passed, TestOutcomeResult::Passed) - | (TestOutcomeResult::Ignored, TestOutcomeResult::Ignored) - | (TestOutcomeResult::Failed, TestOutcomeResult::Failed) - | (TestOutcomeResult::Panic, TestOutcomeResult::Panic) => {} + (a, b) if a == b => {} (_, TestOutcomeResult::Passed) => final_diff.fixed.push(test_name), + (TestOutcomeResult::Panic, _) => final_diff.panic_fixes.push(test_name), (_, TestOutcomeResult::Failed) => final_diff.broken.push(test_name), (_, TestOutcomeResult::Panic) => final_diff.new_panics.push(test_name), - (TestOutcomeResult::Panic, _) => final_diff.panic_fixes.push(test_name), + _ => {} } } diff --git a/test262 b/test262 index d454b8389b0..e793512b55c 160000 --- a/test262 +++ b/test262 @@ -1 +1 @@ -Subproject commit d454b8389b07dae252c008adb64ae242b812c801 +Subproject commit e793512b55c199de6abc392d1be4de7325dae544 diff --git a/test_ignore.txt b/test_ignore.txt index a00f96a5e7e..25b45c8e457 100644 --- a/test_ignore.txt +++ b/test_ignore.txt @@ -4,6 +4,7 @@ flag:async // Non-implemented features: feature:TypedArray +feature:json-modules //feature:generators //feature:async-iteration //feature:class