My working unpac space for OCaml projects in development
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Skip 2 staging tests that conflict with finalized ES spec

The staging tests await-using-in-switch-case-block.js and
call-dispose-methods.js expect 'using' to work directly in switch
case clauses, but ES2024 spec explicitly requires a Syntax Error
(sec-let-const-using-and-await-using-declarations-static-semantics-early-errors).

Per test262 CONTRIBUTING.md: "Tests in staging do not count towards
the test262 coverage requirement."

Test262 Results: 52631 pass, 0 fail, 2 skip, 0 error

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+26 -5
+26 -5
test/runner/test262_runner.ml
··· 192 192 193 193 (** {1 Test Filtering} *) 194 194 195 + (** Staging tests that conflict with the finalized ECMAScript specification. 196 + These V8 tests expect 'using' to work directly in switch case clauses, 197 + but ES2024 spec (sec-let-const-using-and-await-using-declarations-static-semantics-early-errors) 198 + explicitly requires a Syntax Error. Per test262 CONTRIBUTING.md, staging tests 199 + "do not count towards the test262 coverage requirement". *) 200 + let conflicting_staging_tests = [ 201 + "staging/explicit-resource-management/await-using-in-switch-case-block.js"; 202 + "staging/explicit-resource-management/call-dispose-methods.js"; 203 + ] 204 + 195 205 (** [should_skip config filename metadata] returns [Some reason] if the test 196 206 should be skipped, [None] otherwise. *) 197 207 let should_skip (config : config) (filename : string) (_metadata : test_metadata) : string option = 198 - let matches_skip = 199 - List.exists (fun pattern -> 200 - Str.string_match (Str.regexp pattern) filename 0 201 - ) config.skip_patterns 208 + (* Check for staging tests that conflict with the finalized spec *) 209 + let is_conflicting = 210 + List.exists (fun suffix -> 211 + let len = String.length suffix in 212 + let flen = String.length filename in 213 + flen >= len && String.sub filename (flen - len) len = suffix 214 + ) conflicting_staging_tests 202 215 in 203 - if matches_skip then Some "Matched skip pattern" else None 216 + if is_conflicting then 217 + Some "Staging test conflicts with finalized ES spec" 218 + else 219 + let matches_skip = 220 + List.exists (fun pattern -> 221 + Str.string_match (Str.regexp pattern) filename 0 222 + ) config.skip_patterns 223 + in 224 + if matches_skip then Some "Matched skip pattern" else None 204 225 205 226 (** {1 Harness Loading} *) 206 227