diff --git a/Cargo.lock b/Cargo.lock index 1eb370735bf..06aebcc86bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -623,9 +623,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.20.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" dependencies = [ "bytemuck_derive", ] @@ -2884,9 +2884,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -3189,9 +3189,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] @@ -3208,9 +3208,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", @@ -3219,9 +3219,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.134" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" dependencies = [ "itoa", "memchr", @@ -3423,9 +3423,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.90" +version = "2.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "9c786062daee0d6db1132800e623df74274a0a87322d8e183338e01b3d98d058" dependencies = [ "proc-macro2", "quote", @@ -3543,18 +3543,18 @@ checksum = "a38c90d48152c236a3ab59271da4f4ae63d678c5d7ad6b7714d7cb9760be5e4b" [[package]] name = "thiserror" -version = "2.0.7" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93605438cbd668185516ab499d589afb7ee1859ea3d5fc8f6b0755e1c7443767" +checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.7" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d8749b4531af2117677a5fcd12b1348a3fe2b81e36e61ffeac5c4aa3273e36" +checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index eeb61606646..40b32578ec5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -64,8 +64,8 @@ pollster = "0.4.0" regex = "1.11.1" regress = { version = "0.10.1", features = ["utf16"] } rustc-hash = { version = "2.1.0", default-features = false } -serde_json = "1.0.133" -serde = "1.0.216" +serde_json = "1.0.134" +serde = "1.0.217" static_assertions = "1.1.0" textwrap = "0.16.0" thin-vec = "0.2.13" @@ -90,8 +90,8 @@ futures-util = "0.3.31" isahc = "1.7.2" rustyline = { version = "15.0.0", default-features = false } dhat = "0.3.3" -quote = "1.0.37" -syn = { version = "2.0.90", default-features = false } +quote = "1.0.38" +syn = { version = "2.0.93", default-features = false } proc-macro2 = "1.0" synstructure = "0.13" measureme = "12.0.0" @@ -101,12 +101,12 @@ rand = "0.8.5" num-integer = "0.1.46" ryu-js = "1.0.1" tap = "1.0.1" -thiserror = { version = "2.0.7", default-features = false } +thiserror = { version = "2.0.9", default-features = false } dashmap = "6.1.0" num_enum = "0.7.3" itertools = { version = "0.13.0", default-features = false } portable-atomic = "1.10.0" -bytemuck = { version = "1.19.0", default-features = false } +bytemuck = { version = "1.21.0", default-features = false } arrayvec = "0.7.6" intrusive-collections = "0.9.7" cfg-if = "1.0.0" diff --git a/test262_config.toml b/test262_config.toml index f3020ef1272..35c54989a2d 100644 --- a/test262_config.toml +++ b/test262_config.toml @@ -1,4 +1,4 @@ -commit = "dad2774b2eab2119cc8390ae65db4a5016de2dfe" +commit = "8296db887368bbffa3379f995a1e628ddbe8421f" [ignored] # Not implemented yet: @@ -35,6 +35,9 @@ features = [ # https://tc39.es/proposal-defer-import-eval "import-defer", + # https://github.com/tc39/proposal-iterator-sequencing + "iterator-sequencing", + # https://github.com/tc39/proposal-json-modules "json-modules", @@ -75,4 +78,4 @@ features = [ "caller", ] -tests = [] +tests = ["sm"] diff --git a/tests/tester/src/edition.rs b/tests/tester/src/edition.rs index 38ca0896665..9fd774c8bf0 100644 --- a/tests/tester/src/edition.rs +++ b/tests/tester/src/edition.rs @@ -45,6 +45,10 @@ static FEATURE_EDITION: phf::Map<&'static str, SpecEdition> = phf::phf_map! { // https://github.com/tc39/proposal-import-assertions/ "import-assertions" => SpecEdition::ESNext, + // Iterator sequencing + // https://github.com/tc39/proposal-iterator-sequencing + "iterator-sequencing" => SpecEdition::ESNext, + // JSON modules // https://github.com/tc39/proposal-json-modules "json-modules" => SpecEdition::ESNext, diff --git a/tests/tester/src/read.rs b/tests/tester/src/read.rs index 1fac7223c2d..bbd437d799c 100644 --- a/tests/tester/src/read.rs +++ b/tests/tester/src/read.rs @@ -1,6 +1,7 @@ //! Module to read the list of test suites from disk. use std::{ + collections::HashMap, ffi::OsStr, fs, path::{Path, PathBuf}, @@ -10,7 +11,7 @@ use color_eyre::{ eyre::{OptionExt, WrapErr}, Result, }; -use rustc_hash::FxHashMap; +use rustc_hash::{FxBuildHasher, FxHashMap}; use serde::Deserialize; use crate::{HarnessFile, Ignored}; @@ -92,33 +93,10 @@ pub(super) enum TestFlag { /// Reads the Test262 defined bindings. pub(super) fn read_harness(test262_path: &Path) -> Result { - fn read_harness_file(path: PathBuf) -> Result { - let content = fs::read_to_string(path.as_path()) - .wrap_err_with(|| format!("error reading the harness file `{}`", path.display()))?; - - Ok(HarnessFile { - content: content.into_boxed_str(), - path: path.into_boxed_path(), - }) - } - let mut includes = FxHashMap::default(); - - for entry in fs::read_dir(test262_path.join("harness")) - .wrap_err("error reading the harness directory")? - { - let entry = entry?; - let file_name = entry.file_name(); - let file_name = file_name.to_string_lossy(); + let mut includes: HashMap, HarnessFile, FxBuildHasher> = FxHashMap::default(); - if file_name == "assert.js" || file_name == "sta.js" || file_name == "doneprintHandle.js" { - continue; - } + read_harness_dir(&test262_path.join("harness"), &mut includes)?; - includes.insert( - file_name.into_owned().into_boxed_str(), - read_harness_file(entry.path())?, - ); - } let assert = read_harness_file(test262_path.join("harness/assert.js"))?; let sta = read_harness_file(test262_path.join("harness/sta.js"))?; let doneprint_handle = read_harness_file(test262_path.join("harness/doneprintHandle.js"))?; @@ -131,6 +109,40 @@ pub(super) fn read_harness(test262_path: &Path) -> Result { }) } +fn read_harness_dir( + directory_name: &Path, + includes: &mut HashMap, HarnessFile, FxBuildHasher>, +) -> Result<()> { + for entry in fs::read_dir(directory_name).wrap_err("error reading the harness directory")? { + let entry = entry?; + let file_name = entry.file_name(); + let file_name = file_name.to_string_lossy().into_owned(); + + if directory_name.join(file_name.clone()).is_dir() { + read_harness_dir(&directory_name.join(file_name), includes)?; + continue; + } + + if file_name == "assert.js" || file_name == "sta.js" || file_name == "doneprintHandle.js" { + continue; + } + + includes.insert(file_name.into_boxed_str(), read_harness_file(entry.path())?); + } + + Ok(()) +} + +fn read_harness_file(path: PathBuf) -> Result { + let content = fs::read_to_string(path.as_path()) + .wrap_err_with(|| format!("error reading the harness file `{}`", path.display()))?; + + Ok(HarnessFile { + content: content.into_boxed_str(), + path: path.into_boxed_path(), + }) +} + /// Reads a test suite in the given path. pub(super) fn read_suite( path: &Path,