From 43258712c6b58580597581160c259ca807623557 Mon Sep 17 00:00:00 2001 From: Doehyun Baek Date: Mon, 12 Dec 2022 16:09:07 +0900 Subject: [PATCH 1/7] More generous parsing of test262 metadata. Now parsing logic of metadata of test262 test can also handle features separated just with comma. --- src/main/scala/esmeta/test262/Test.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/esmeta/test262/Test.scala b/src/main/scala/esmeta/test262/Test.scala index 97326fc85d..2af871708a 100644 --- a/src/main/scala/esmeta/test262/Test.scala +++ b/src/main/scala/esmeta/test262/Test.scala @@ -117,7 +117,7 @@ object Test { val featuresn = if (line contains "features:") line.dropWhile(_ != '[') match { case "" => List() - case s => s.tail.takeWhile(_ != ']').split(", ").toList + case s => s.tail.takeWhile(_ != ']').split(",").map(_.trim).toList } else features ( From 552da0c2a66fdceac9400f9422c4d500c65e83a9 Mon Sep 17 00:00:00 2001 From: Doehyun Baek Date: Mon, 12 Dec 2022 16:52:36 +0900 Subject: [PATCH 2/7] Iterate filtered.json to initialize TestFilter. --- .../manuals/default/test262/filtered.json | 12 +- .../esmeta/test262/util/TestFilter.scala | 110 +++++++----------- 2 files changed, 48 insertions(+), 74 deletions(-) diff --git a/src/main/resources/manuals/default/test262/filtered.json b/src/main/resources/manuals/default/test262/filtered.json index 2c95faa3d9..466dc86e01 100644 --- a/src/main/resources/manuals/default/test262/filtered.json +++ b/src/main/resources/manuals/default/test262/filtered.json @@ -1,5 +1,5 @@ { - "early errors": [ + "negative-errors": [ "built-ins/AsyncGeneratorFunction/instance-await-expr-in-param", "built-ins/AsyncGeneratorFunction/instance-yield-expr-in-param", "built-ins/Function/StrictFunction_reservedwords_with", @@ -181,7 +181,7 @@ "language/statements/with/12.10.1-16-s", "language/statements/with/12.10.1-7-s" ], - "long tests": [ + "long-tests": [ "built-ins/Array/length/S15.4.5.2_A3_T4", "built-ins/Array/prototype/Symbol.unscopables/value", "built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-sparse-object", @@ -235,12 +235,12 @@ "language/statements/while/tco-body", "language/types/number/8.5.1" ], - "non tests": [ + "non-tests": [ "built-ins/ShadowRealm/prototype/importValue/import-value_FIXTURE", "built-ins/ShadowRealm/prototype/importValue/import-value_syntax_error_FIXTURE", "built-ins/ShadowRealm/prototype/importValue/import-value_throws_FIXTURE" ], - "non-strict tests": [ + "non-strict": [ "built-ins/Function/S15.3.2.1_A3_T8", "built-ins/Function/S15.3.5_A2_T1", "built-ins/Function/S15.3.5_A2_T2", @@ -300,11 +300,11 @@ "language/statements/variable/12.2.1-17-s", "language/statements/variable/12.2.1-21-s" ], - "wrong tests": [ + "wrong-tests": [ "built-ins/AsyncGeneratorPrototype/return/return-state-completed-broken-promise", "built-ins/AsyncGeneratorPrototype/return/return-suspendedStart-broken-promise" ], - "not yet categorized tests": [ + "not-yet-categorized-tests": [ "built-ins/Array/prototype/sort/stability-2048-elements", "built-ins/AsyncFromSyncIteratorPrototype/next/iterator-result-rejected", "built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result", diff --git a/src/main/scala/esmeta/test262/util/TestFilter.scala b/src/main/scala/esmeta/test262/util/TestFilter.scala index 3c3e03a88a..62f2fd7e24 100644 --- a/src/main/scala/esmeta/test262/util/TestFilter.scala +++ b/src/main/scala/esmeta/test262/util/TestFilter.scala @@ -34,56 +34,53 @@ case class TestFilter(spec: Spec) { private def getFilters( withYet: Boolean, features: Set[String], - ): List[(String, Test => Option[ReasonPath])] = List( - lift("harness" -> (_.relName.startsWith("harness"))), - lift("internationalisation" -> (_.relName.startsWith("intl"))), - lift( - "annex" -> (test => - test.relName.startsWith("annex") || - test.relName.contains("__proto__"), + ): List[(String, Test => Option[ReasonPath])] = + manualConfig.filtered.toList.map { (desc, tests) => + lift( + desc -> (test => + if (desc == "yet") + !withYet && tests.contains(removedExt(test.relName)) + else tests.contains(removedExt(test.relName)), + ), + ) + } ++ List( + lift("harness" -> (_.relName.startsWith("harness"))), + lift("internationalisation" -> (_.relName.startsWith("intl"))), + lift( + "annex" -> (test => + test.relName.startsWith("annex") || + test.relName.contains("__proto__"), + ), ), - ), - liftReason( - "not-supported-features" -> (_.features.find(!features.contains(_))), - ), - lift( - "non-strict" -> (test => - test.flags.contains("noStrict") || - test.flags.contains("raw") || - manualNonstrict.contains(removedExt(test.relName)), + liftReason( + "not-supported-features" -> (_.features.find(!features.contains(_))), ), - ), - lift( - "module" -> (test => - test.flags.contains("module") || - test.relName.startsWith("language/module-code/") || - test.relName.startsWith("language/import/") || - test.relName.startsWith("language/expressions/dynamic-import/") || - test.relName.startsWith("language/expressions/import.meta/"), + lift( + "non-strict" -> (test => + test.flags.contains("noStrict") || + test.flags.contains("raw"), + ), ), - ), - lift( - "negative-errors" -> (test => - test.negative.isDefined || - manualEarlyError.contains(removedExt(test.relName)), + lift( + "module" -> (test => + test.flags.contains("module") || + test.relName.startsWith("language/module-code/") || + test.relName.startsWith("language/import/") || + test.relName.startsWith("language/expressions/dynamic-import/") || + test.relName.startsWith("language/expressions/import.meta/"), + ), ), - ), - lift( - "inessential-builtin-objects" -> (test => - test.flags.contains("CanBlockIsFalse") || - test.flags.contains("CanBlockIsTrue") || - !test.locales.isEmpty, + lift( + "negative-errors" -> (test => test.negative.isDefined), ), - ), - lift( - "non-tests" -> (test => manualNonTest.contains(removedExt(test.relName))), - ), - lift( - "wrong-tests" -> (test => wrongTest.contains(removedExt(test.relName))), - ), - lift("longTest" -> (test => longTest.contains(removedExt(test.relName)))), - lift("yet" -> (test => !withYet && yets.contains(removedExt(test.relName)))), - ) + lift( + "inessential-builtin-objects" -> (test => + test.flags.contains("CanBlockIsFalse") || + test.flags.contains("CanBlockIsTrue") || + !test.locales.isEmpty, + ), + ), + ) private def lift( pair: (String, Test => Boolean), @@ -106,27 +103,4 @@ case class TestFilter(spec: Spec) { */ lazy val languageFeatures = manualConfig.supportedFeatures - /** manually filtered out non-strict mode tests */ - lazy val manualNonstrict = - manualConfig.filtered.getOrElse("non-strict tests", Nil).toSet - - /** manually filtered out tests for EarlyErorr */ - lazy val manualEarlyError = - manualConfig.filtered.getOrElse("early errors", Nil).toSet - - /** manually filtered out non test files */ - lazy val manualNonTest = - manualConfig.filtered.getOrElse("non tests", Nil).toSet - - /** manually filtered out long tests */ - lazy val longTest = - manualConfig.filtered.getOrElse("long tests", Nil).toSet - - /** manually filtered out wrong test262 tests */ - lazy val wrongTest = - manualConfig.filtered.getOrElse("wrong tests", Nil).toSet - - /** manually filtered out not yet supported tests */ - lazy val yets = - manualConfig.filtered.getOrElse("not yet categorized tests", Nil).toSet } From b0cb59e8bf288bc80429030804c96297bdd829da Mon Sep 17 00:00:00 2001 From: jhnaldo Date: Mon, 12 Dec 2022 17:32:04 +0900 Subject: [PATCH 3/7] Refactored TestFilter --- .../manuals/default/test262/filtered.json | 401 ------------------ .../default/test262/yet-categorized.json | 401 ++++++++++++++++++ .../esmeta/test262/util/ManualConfig.scala | 6 +- .../esmeta/test262/util/TestFilter.scala | 109 +++-- 4 files changed, 458 insertions(+), 459 deletions(-) create mode 100644 src/main/resources/manuals/default/test262/yet-categorized.json diff --git a/src/main/resources/manuals/default/test262/filtered.json b/src/main/resources/manuals/default/test262/filtered.json index 466dc86e01..f8abf11f5a 100644 --- a/src/main/resources/manuals/default/test262/filtered.json +++ b/src/main/resources/manuals/default/test262/filtered.json @@ -303,406 +303,5 @@ "wrong-tests": [ "built-ins/AsyncGeneratorPrototype/return/return-state-completed-broken-promise", "built-ins/AsyncGeneratorPrototype/return/return-suspendedStart-broken-promise" - ], - "not-yet-categorized-tests": [ - "built-ins/Array/prototype/sort/stability-2048-elements", - "built-ins/AsyncFromSyncIteratorPrototype/next/iterator-result-rejected", - "built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result", - "built-ins/Atomics/wait/good-views", - "built-ins/BigInt/asIntN/arithmetic", - "built-ins/BigInt/asUintN/arithmetic", - "built-ins/BigInt/wrapper-object-ordinary-toprimitive", - "built-ins/Boolean/prototype/S15.6.3.1_A1", - "built-ins/Function/private-identifiers-not-empty", - "built-ins/Function/prototype/bind/15.3.4.5-2-6", - "built-ins/Function/prototype/bind/15.3.4.5-3-1", - "built-ins/GeneratorPrototype/next/from-state-executing", - "built-ins/GeneratorPrototype/return/from-state-executing", - "built-ins/GeneratorPrototype/throw/from-state-executing", - "built-ins/GeneratorPrototype/throw/try-catch-before-try", - "built-ins/GeneratorPrototype/throw/try-catch-following-catch", - "built-ins/GeneratorPrototype/throw/try-catch-within-catch", - "built-ins/GeneratorPrototype/throw/try-finally-before-try", - "built-ins/GeneratorPrototype/throw/try-finally-following-finally", - "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-catch", - "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-finally", - "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-outer-try-after-nested", - "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-outer-try-before-nested", - "built-ins/GeneratorPrototype/throw/try-finally-within-finally", - "built-ins/GeneratorPrototype/throw/try-finally-within-try", - "built-ins/Map/prototype/clear/map-data-list-is-preserved", - "built-ins/Map/prototype/delete/does-not-break-iterators", - "built-ins/Map/prototype/entries/returns-iterator", - "built-ins/Map/prototype/entries/returns-iterator-empty", - "built-ins/Map/prototype/keys/returns-iterator", - "built-ins/Map/prototype/keys/returns-iterator-empty", - "built-ins/Map/prototype/values/returns-iterator", - "built-ins/Map/prototype/values/returns-iterator-empty", - "built-ins/MapIteratorPrototype/next/iteration", - "built-ins/MapIteratorPrototype/next/iteration-mutable", - "built-ins/Number/prototype/S15.7.3.1_A3", - "built-ins/Number/prototype/S15.7.4_A1", - "built-ins/Number/prototype/toFixed/exactness", - "built-ins/Object/S15.2.1.1_A2_T12", - "built-ins/Object/S15.2.1.1_A2_T14", - "built-ins/Object/S15.2.1.1_A2_T2", - "built-ins/Object/S15.2.1.1_A2_T3", - "built-ins/Object/S15.2.1.1_A2_T6", - "built-ins/Object/S15.2.1.1_A2_T7", - "built-ins/Object/S15.2.1.1_A3_T1", - "built-ins/Object/S15.2.1.1_A3_T3", - "built-ins/Object/S15.2.2.1_A3_T1", - "built-ins/Object/S15.2.2.1_A3_T2", - "built-ins/Object/S15.2.2.1_A3_T3", - "built-ins/Object/S15.2.2.1_A4_T1", - "built-ins/Object/S15.2.2.1_A4_T2", - "built-ins/Object/S15.2.2.1_A4_T3", - "built-ins/Object/S15.2.2.1_A5_T1", - "built-ins/Object/S15.2.2.1_A5_T3", - "built-ins/Object/S15.2.2.1_A5_T4", - "built-ins/Object/S15.2.2.1_A6_T1", - "built-ins/Object/S15.2.2.1_A6_T3", - "built-ins/Promise/all/iter-arg-is-string-resolve", - "built-ins/Promise/allSettled/iter-arg-is-string-resolve", - "built-ins/Promise/any/iter-arg-is-empty-string-reject", - "built-ins/RegExp/lookBehind/sliced-strings", - "built-ins/Set/prototype/entries/returns-iterator", - "built-ins/Set/prototype/entries/returns-iterator-empty", - "built-ins/Set/prototype/values/returns-iterator", - "built-ins/Set/prototype/values/returns-iterator-empty", - "built-ins/Set/prototype/values/values-iteration-mutable", - "built-ins/SetIteratorPrototype/next/iteration", - "built-ins/SetIteratorPrototype/next/iteration-mutable", - "built-ins/String/S15.5.2.1_A1_T1", - "built-ins/String/S15.5.2.1_A1_T10", - "built-ins/String/S15.5.2.1_A1_T11", - "built-ins/String/S15.5.2.1_A1_T16", - "built-ins/String/S15.5.2.1_A1_T17", - "built-ins/String/S15.5.2.1_A1_T18", - "built-ins/String/S15.5.2.1_A1_T19", - "built-ins/String/S15.5.2.1_A1_T2", - "built-ins/String/S15.5.2.1_A1_T3", - "built-ins/String/S15.5.2.1_A1_T4", - "built-ins/String/S15.5.2.1_A1_T5", - "built-ins/String/S15.5.2.1_A1_T6", - "built-ins/String/S15.5.2.1_A1_T7", - "built-ins/String/S15.5.2.1_A1_T8", - "built-ins/String/S15.5.2.1_A1_T9", - "built-ins/String/S15.5.5.1_A5", - "built-ins/String/prototype/S15.5.4_A2", - "built-ins/String/prototype/concat/S15.5.4.6_A3", - "built-ins/String/prototype/constructor/S15.5.4.1_A1_T2", - "built-ins/String/prototype/matchAll/length", - "built-ins/String/prototype/matchAll/name", - "built-ins/String/prototype/matchAll/prop-desc", - "built-ins/String/prototype/matchAll/regexp-is-null", - "built-ins/String/prototype/matchAll/regexp-is-undefined", - "built-ins/String/prototype/matchAll/regexp-matchAll-invocation", - "built-ins/String/prototype/matchAll/regexp-matchAll-not-callable", - "built-ins/String/prototype/matchAll/regexp-prototype-has-no-matchAll", - "built-ins/String/prototype/matchAll/this-val-non-obj-coercible", - "built-ins/Symbol/prototype/Symbol.toPrimitive/redefined-symbol-wrapper-ordinary-toprimitive", - "built-ins/Symbol/prototype/Symbol.toPrimitive/removed-symbol-wrapper-ordinary-toprimitive", - "language/computed-property-names/class/static/generator-prototype", - "language/computed-property-names/class/static/method-prototype", - "language/expressions/array/spread-err-mult-err-expr-throws", - "language/expressions/array/spread-err-sngl-err-expr-throws", - "language/expressions/arrow-function/dstr/ary-ptrn-elision-step-err", - "language/expressions/arrow-function/dstr/ary-ptrn-rest-id-elision-next-err", - "language/expressions/arrow-function/dstr/ary-ptrn-rest-id-iter-step-err", - "language/expressions/arrow-function/dstr/dflt-ary-ptrn-elision-step-err", - "language/expressions/arrow-function/dstr/dflt-ary-ptrn-rest-id-elision-next-err", - "language/expressions/arrow-function/dstr/dflt-ary-ptrn-rest-id-iter-step-err", - "language/expressions/assignment/dstr/array-elem-iter-rtrn-close-err", - "language/expressions/assignment/dstr/array-elem-iter-rtrn-close-null", - "language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-err", - "language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-null", - "language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-err", - "language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-null", - "language/expressions/assignment/dstr/array-rest-iter-rtrn-close-err", - "language/expressions/assignment/dstr/array-rest-iter-rtrn-close-null", - "language/expressions/assignment/target-member-computed-reference-null", - "language/expressions/assignment/target-member-computed-reference-undefined", - "language/expressions/async-generator/dstr/ary-ptrn-elision-step-err", - "language/expressions/async-generator/dstr/ary-ptrn-rest-id-elision-next-err", - "language/expressions/async-generator/dstr/ary-ptrn-rest-id-iter-step-err", - "language/expressions/async-generator/dstr/dflt-ary-ptrn-elision-step-err", - "language/expressions/async-generator/dstr/dflt-ary-ptrn-rest-id-elision-next-err", - "language/expressions/async-generator/dstr/dflt-ary-ptrn-rest-id-iter-step-err", - "language/expressions/async-generator/dstr/named-ary-ptrn-elision-step-err", - "language/expressions/async-generator/dstr/named-ary-ptrn-rest-id-elision-next-err", - "language/expressions/async-generator/dstr/named-ary-ptrn-rest-id-iter-step-err", - "language/expressions/async-generator/dstr/named-dflt-ary-ptrn-elision-step-err", - "language/expressions/async-generator/dstr/named-dflt-ary-ptrn-rest-id-elision-next-err", - "language/expressions/async-generator/dstr/named-dflt-ary-ptrn-rest-id-iter-step-err", - "language/expressions/call/spread-err-mult-err-expr-throws", - "language/expressions/call/spread-err-sngl-err-expr-throws", - "language/expressions/class/dstr/async-gen-meth-ary-ptrn-elision-step-err", - "language/expressions/class/dstr/async-gen-meth-ary-ptrn-rest-id-elision-next-err", - "language/expressions/class/dstr/async-gen-meth-ary-ptrn-rest-id-iter-step-err", - "language/expressions/class/dstr/async-gen-meth-dflt-ary-ptrn-elision-step-err", - "language/expressions/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-id-elision-next-err", - "language/expressions/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-id-iter-step-err", - "language/expressions/class/dstr/async-gen-meth-static-ary-ptrn-elision-step-err", - "language/expressions/class/dstr/async-gen-meth-static-ary-ptrn-rest-id-elision-next-err", - "language/expressions/class/dstr/async-gen-meth-static-ary-ptrn-rest-id-iter-step-err", - "language/expressions/class/dstr/async-gen-meth-static-dflt-ary-ptrn-elision-step-err", - "language/expressions/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-id-elision-next-err", - "language/expressions/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-id-iter-step-err", - "language/expressions/class/dstr/gen-meth-ary-ptrn-elision-step-err", - "language/expressions/class/dstr/gen-meth-ary-ptrn-rest-id-elision-next-err", - "language/expressions/class/dstr/gen-meth-ary-ptrn-rest-id-iter-step-err", - "language/expressions/class/dstr/gen-meth-dflt-ary-ptrn-elision-step-err", - "language/expressions/class/dstr/gen-meth-dflt-ary-ptrn-rest-id-elision-next-err", - "language/expressions/class/dstr/gen-meth-dflt-ary-ptrn-rest-id-iter-step-err", - "language/expressions/class/dstr/gen-meth-static-ary-ptrn-elision-step-err", - "language/expressions/class/dstr/gen-meth-static-ary-ptrn-rest-id-elision-next-err", - "language/expressions/class/dstr/gen-meth-static-ary-ptrn-rest-id-iter-step-err", - "language/expressions/class/dstr/gen-meth-static-dflt-ary-ptrn-elision-step-err", - "language/expressions/class/dstr/gen-meth-static-dflt-ary-ptrn-rest-id-elision-next-err", - "language/expressions/class/dstr/gen-meth-static-dflt-ary-ptrn-rest-id-iter-step-err", - "language/expressions/class/dstr/meth-ary-ptrn-elision-step-err", - "language/expressions/class/dstr/meth-ary-ptrn-rest-id-elision-next-err", - "language/expressions/class/dstr/meth-ary-ptrn-rest-id-iter-step-err", - "language/expressions/class/dstr/meth-dflt-ary-ptrn-elision-step-err", - "language/expressions/class/dstr/meth-dflt-ary-ptrn-rest-id-elision-next-err", - "language/expressions/class/dstr/meth-dflt-ary-ptrn-rest-id-iter-step-err", - "language/expressions/class/dstr/meth-static-ary-ptrn-elision-step-err", - "language/expressions/class/dstr/meth-static-ary-ptrn-rest-id-elision-next-err", - "language/expressions/class/dstr/meth-static-ary-ptrn-rest-id-iter-step-err", - "language/expressions/class/dstr/meth-static-dflt-ary-ptrn-elision-step-err", - "language/expressions/class/dstr/meth-static-dflt-ary-ptrn-rest-id-elision-next-err", - "language/expressions/class/dstr/meth-static-dflt-ary-ptrn-rest-id-iter-step-err", - "language/expressions/compound-assignment/S11.13.2_A7.10_T1", - "language/expressions/compound-assignment/S11.13.2_A7.10_T2", - "language/expressions/compound-assignment/S11.13.2_A7.11_T1", - "language/expressions/compound-assignment/S11.13.2_A7.11_T2", - "language/expressions/compound-assignment/S11.13.2_A7.1_T1", - "language/expressions/compound-assignment/S11.13.2_A7.1_T2", - "language/expressions/compound-assignment/S11.13.2_A7.2_T1", - "language/expressions/compound-assignment/S11.13.2_A7.2_T2", - "language/expressions/compound-assignment/S11.13.2_A7.3_T1", - "language/expressions/compound-assignment/S11.13.2_A7.3_T2", - "language/expressions/compound-assignment/S11.13.2_A7.4_T1", - "language/expressions/compound-assignment/S11.13.2_A7.4_T2", - "language/expressions/compound-assignment/S11.13.2_A7.5_T1", - "language/expressions/compound-assignment/S11.13.2_A7.5_T2", - "language/expressions/compound-assignment/S11.13.2_A7.6_T1", - "language/expressions/compound-assignment/S11.13.2_A7.6_T2", - "language/expressions/compound-assignment/S11.13.2_A7.7_T1", - "language/expressions/compound-assignment/S11.13.2_A7.7_T2", - "language/expressions/compound-assignment/S11.13.2_A7.8_T1", - "language/expressions/compound-assignment/S11.13.2_A7.8_T2", - "language/expressions/compound-assignment/S11.13.2_A7.9_T1", - "language/expressions/compound-assignment/S11.13.2_A7.9_T2", - "language/expressions/does-not-equals/S11.9.2_A3.2", - "language/expressions/does-not-equals/S11.9.2_A3.3", - "language/expressions/does-not-equals/S11.9.2_A7.2", - "language/expressions/does-not-equals/S11.9.2_A7.3", - "language/expressions/does-not-equals/S11.9.2_A7.4", - "language/expressions/does-not-equals/S11.9.2_A7.5", - "language/expressions/does-not-equals/S11.9.2_A7.6", - "language/expressions/does-not-equals/S11.9.2_A7.7", - "language/expressions/does-not-equals/S11.9.2_A7.8", - "language/expressions/does-not-equals/S11.9.2_A7.9", - "language/expressions/does-not-equals/bigint-and-object", - "language/expressions/equals/S11.9.1_A7.2", - "language/expressions/equals/S11.9.1_A7.3", - "language/expressions/equals/S11.9.1_A7.4", - "language/expressions/equals/S11.9.1_A7.5", - "language/expressions/equals/S11.9.1_A7.6", - "language/expressions/equals/S11.9.1_A7.7", - "language/expressions/equals/S11.9.1_A7.8", - "language/expressions/equals/S11.9.1_A7.9", - "language/expressions/equals/bigint-and-object", - "language/expressions/equals/coerce-symbol-to-prim-err", - "language/expressions/equals/coerce-symbol-to-prim-invocation", - "language/expressions/equals/coerce-symbol-to-prim-return-obj", - "language/expressions/equals/coerce-symbol-to-prim-return-prim", - "language/expressions/equals/get-symbol-to-prim-err", - "language/expressions/equals/to-prim-hint", - "language/expressions/function/dstr/ary-ptrn-elision-step-err", - "language/expressions/function/dstr/ary-ptrn-rest-id-elision-next-err", - "language/expressions/function/dstr/ary-ptrn-rest-id-iter-step-err", - "language/expressions/function/dstr/dflt-ary-ptrn-elision-step-err", - "language/expressions/function/dstr/dflt-ary-ptrn-rest-id-elision-next-err", - "language/expressions/function/dstr/dflt-ary-ptrn-rest-id-iter-step-err", - "language/expressions/generators/dstr/ary-ptrn-elision-step-err", - "language/expressions/generators/dstr/ary-ptrn-rest-id-elision-next-err", - "language/expressions/generators/dstr/ary-ptrn-rest-id-iter-step-err", - "language/expressions/generators/dstr/dflt-ary-ptrn-elision-step-err", - "language/expressions/generators/dstr/dflt-ary-ptrn-rest-id-elision-next-err", - "language/expressions/generators/dstr/dflt-ary-ptrn-rest-id-iter-step-err", - "language/expressions/generators/named-strict-error-reassign-fn-name-in-body", - "language/expressions/generators/named-strict-error-reassign-fn-name-in-body-in-arrow", - "language/expressions/generators/named-strict-error-reassign-fn-name-in-body-in-eval", - "language/expressions/greater-than-or-equal/bigint-and-number-extremes", - "language/expressions/greater-than/bigint-and-number-extremes", - "language/expressions/less-than-or-equal/bigint-and-number-extremes", - "language/expressions/less-than/bigint-and-number-extremes", - "language/expressions/logical-assignment/lgcl-and-assignment-operator-lhs-before-rhs", - "language/expressions/logical-assignment/lgcl-nullish-assignment-operator-lhs-before-rhs", - "language/expressions/logical-assignment/lgcl-or-assignment-operator-lhs-before-rhs", - "language/expressions/multiplication/S11.5.1_A4_T7", - "language/expressions/new/S11.2.2_A1.1", - "language/expressions/new/S11.2.2_A1.2", - "language/expressions/new/spread-err-mult-err-expr-throws", - "language/expressions/new/spread-err-sngl-err-expr-throws", - "language/expressions/object/dstr/async-gen-meth-ary-ptrn-elision-step-err", - "language/expressions/object/dstr/async-gen-meth-ary-ptrn-rest-id-elision-next-err", - "language/expressions/object/dstr/async-gen-meth-ary-ptrn-rest-id-iter-step-err", - "language/expressions/object/dstr/async-gen-meth-dflt-ary-ptrn-elision-step-err", - "language/expressions/object/dstr/async-gen-meth-dflt-ary-ptrn-rest-id-elision-next-err", - "language/expressions/object/dstr/async-gen-meth-dflt-ary-ptrn-rest-id-iter-step-err", - "language/expressions/object/dstr/gen-meth-ary-ptrn-elision-step-err", - "language/expressions/object/dstr/gen-meth-ary-ptrn-rest-id-elision-next-err", - "language/expressions/object/dstr/gen-meth-ary-ptrn-rest-id-iter-step-err", - "language/expressions/object/dstr/gen-meth-dflt-ary-ptrn-elision-step-err", - "language/expressions/object/dstr/gen-meth-dflt-ary-ptrn-rest-id-elision-next-err", - "language/expressions/object/dstr/gen-meth-dflt-ary-ptrn-rest-id-iter-step-err", - "language/expressions/object/dstr/meth-ary-ptrn-elision-step-err", - "language/expressions/object/dstr/meth-ary-ptrn-rest-id-elision-next-err", - "language/expressions/object/dstr/meth-ary-ptrn-rest-id-iter-step-err", - "language/expressions/object/dstr/meth-dflt-ary-ptrn-elision-step-err", - "language/expressions/object/dstr/meth-dflt-ary-ptrn-rest-id-elision-next-err", - "language/expressions/object/dstr/meth-dflt-ary-ptrn-rest-id-iter-step-err", - "language/expressions/postfix-decrement/S11.3.2_A6_T1", - "language/expressions/postfix-decrement/S11.3.2_A6_T2", - "language/expressions/postfix-increment/S11.3.1_A6_T1", - "language/expressions/postfix-increment/S11.3.1_A6_T2", - "language/expressions/prefix-decrement/S11.4.5_A6_T1", - "language/expressions/prefix-decrement/S11.4.5_A6_T2", - "language/expressions/prefix-increment/S11.4.4_A6_T1", - "language/expressions/prefix-increment/S11.4.4_A6_T2", - "language/expressions/super/call-spread-err-mult-err-expr-throws", - "language/expressions/super/call-spread-err-sngl-err-expr-throws", - "language/expressions/yield/star-throw-is-null", - "language/statements/async-generator/dstr/ary-ptrn-elision-step-err", - "language/statements/async-generator/dstr/ary-ptrn-rest-id-elision-next-err", - "language/statements/async-generator/dstr/ary-ptrn-rest-id-iter-step-err", - "language/statements/async-generator/dstr/dflt-ary-ptrn-elision-step-err", - "language/statements/async-generator/dstr/dflt-ary-ptrn-rest-id-elision-next-err", - "language/statements/async-generator/dstr/dflt-ary-ptrn-rest-id-iter-step-err", - "language/statements/class/dstr/async-gen-meth-ary-ptrn-elision-step-err", - "language/statements/class/dstr/async-gen-meth-ary-ptrn-rest-id-elision-next-err", - "language/statements/class/dstr/async-gen-meth-ary-ptrn-rest-id-iter-step-err", - "language/statements/class/dstr/async-gen-meth-dflt-ary-ptrn-elision-step-err", - "language/statements/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-id-elision-next-err", - "language/statements/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-id-iter-step-err", - "language/statements/class/dstr/async-gen-meth-static-ary-ptrn-elision-step-err", - "language/statements/class/dstr/async-gen-meth-static-ary-ptrn-rest-id-elision-next-err", - "language/statements/class/dstr/async-gen-meth-static-ary-ptrn-rest-id-iter-step-err", - "language/statements/class/dstr/async-gen-meth-static-dflt-ary-ptrn-elision-step-err", - "language/statements/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-id-elision-next-err", - "language/statements/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-id-iter-step-err", - "language/statements/class/dstr/gen-meth-ary-ptrn-elision-step-err", - "language/statements/class/dstr/gen-meth-ary-ptrn-rest-id-elision-next-err", - "language/statements/class/dstr/gen-meth-ary-ptrn-rest-id-iter-step-err", - "language/statements/class/dstr/gen-meth-dflt-ary-ptrn-elision-step-err", - "language/statements/class/dstr/gen-meth-dflt-ary-ptrn-rest-id-elision-next-err", - "language/statements/class/dstr/gen-meth-dflt-ary-ptrn-rest-id-iter-step-err", - "language/statements/class/dstr/gen-meth-static-ary-ptrn-elision-step-err", - "language/statements/class/dstr/gen-meth-static-ary-ptrn-rest-id-elision-next-err", - "language/statements/class/dstr/gen-meth-static-ary-ptrn-rest-id-iter-step-err", - "language/statements/class/dstr/gen-meth-static-dflt-ary-ptrn-elision-step-err", - "language/statements/class/dstr/gen-meth-static-dflt-ary-ptrn-rest-id-elision-next-err", - "language/statements/class/dstr/gen-meth-static-dflt-ary-ptrn-rest-id-iter-step-err", - "language/statements/class/dstr/meth-ary-ptrn-elision-step-err", - "language/statements/class/dstr/meth-ary-ptrn-rest-id-elision-next-err", - "language/statements/class/dstr/meth-ary-ptrn-rest-id-iter-step-err", - "language/statements/class/dstr/meth-dflt-ary-ptrn-elision-step-err", - "language/statements/class/dstr/meth-dflt-ary-ptrn-rest-id-elision-next-err", - "language/statements/class/dstr/meth-dflt-ary-ptrn-rest-id-iter-step-err", - "language/statements/class/dstr/meth-static-ary-ptrn-elision-step-err", - "language/statements/class/dstr/meth-static-ary-ptrn-rest-id-elision-next-err", - "language/statements/class/dstr/meth-static-ary-ptrn-rest-id-iter-step-err", - "language/statements/class/dstr/meth-static-dflt-ary-ptrn-elision-step-err", - "language/statements/class/dstr/meth-static-dflt-ary-ptrn-rest-id-elision-next-err", - "language/statements/class/dstr/meth-static-dflt-ary-ptrn-rest-id-iter-step-err", - "language/statements/class/static-method-gen-non-configurable-err", - "language/statements/class/static-method-non-configurable-err", - "language/statements/const/dstr/ary-ptrn-elision-step-err", - "language/statements/const/dstr/ary-ptrn-rest-id-elision-next-err", - "language/statements/const/dstr/ary-ptrn-rest-id-iter-step-err", - "language/statements/for-await-of/async-func-dstr-const-ary-ptrn-elision-step-err", - "language/statements/for-await-of/async-func-dstr-const-ary-ptrn-rest-id-elision-next-err", - "language/statements/for-await-of/async-func-dstr-const-ary-ptrn-rest-id-iter-step-err", - "language/statements/for-await-of/async-func-dstr-let-ary-ptrn-elision-step-err", - "language/statements/for-await-of/async-func-dstr-let-ary-ptrn-rest-id-elision-next-err", - "language/statements/for-await-of/async-func-dstr-let-ary-ptrn-rest-id-iter-step-err", - "language/statements/for-await-of/async-func-dstr-var-ary-ptrn-elision-step-err", - "language/statements/for-await-of/async-func-dstr-var-ary-ptrn-rest-id-elision-next-err", - "language/statements/for-await-of/async-func-dstr-var-ary-ptrn-rest-id-iter-step-err", - "language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-elision-step-err", - "language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-rest-id-elision-next-err", - "language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-rest-id-iter-step-err", - "language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-elision-step-err", - "language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-rest-id-elision-next-err", - "language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-rest-id-iter-step-err", - "language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-elision-step-err", - "language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-rest-id-elision-next-err", - "language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-rest-id-iter-step-err", - "language/statements/for-in/scope-body-var-none", - "language/statements/for-of/array-key-get-error", - "language/statements/for-of/dstr/array-elem-iter-rtrn-close-err", - "language/statements/for-of/dstr/array-elem-iter-rtrn-close-null", - "language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-err", - "language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-null", - "language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-err", - "language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-null", - "language/statements/for-of/dstr/array-rest-iter-rtrn-close-err", - "language/statements/for-of/dstr/array-rest-iter-rtrn-close-null", - "language/statements/for-of/dstr/const-ary-ptrn-elision-step-err", - "language/statements/for-of/dstr/const-ary-ptrn-rest-id-elision-next-err", - "language/statements/for-of/dstr/const-ary-ptrn-rest-id-iter-step-err", - "language/statements/for-of/dstr/let-ary-ptrn-elision-step-err", - "language/statements/for-of/dstr/let-ary-ptrn-rest-id-elision-next-err", - "language/statements/for-of/dstr/let-ary-ptrn-rest-id-iter-step-err", - "language/statements/for-of/dstr/var-ary-ptrn-elision-step-err", - "language/statements/for-of/dstr/var-ary-ptrn-rest-id-elision-next-err", - "language/statements/for-of/dstr/var-ary-ptrn-rest-id-iter-step-err", - "language/statements/for-of/generator-next-error", - "language/statements/for-of/map", - "language/statements/for-of/map-contract", - "language/statements/for-of/map-contract-expand", - "language/statements/for-of/map-expand", - "language/statements/for-of/map-expand-contract", - "language/statements/for-of/set", - "language/statements/for-of/set-expand", - "language/statements/for/dstr/const-ary-ptrn-elision-step-err", - "language/statements/for/dstr/const-ary-ptrn-rest-id-elision-next-err", - "language/statements/for/dstr/const-ary-ptrn-rest-id-iter-step-err", - "language/statements/for/dstr/let-ary-ptrn-elision-step-err", - "language/statements/for/dstr/let-ary-ptrn-rest-id-elision-next-err", - "language/statements/for/dstr/let-ary-ptrn-rest-id-iter-step-err", - "language/statements/for/dstr/var-ary-ptrn-elision-step-err", - "language/statements/for/dstr/var-ary-ptrn-rest-id-elision-next-err", - "language/statements/for/dstr/var-ary-ptrn-rest-id-iter-step-err", - "language/statements/function/dstr/ary-ptrn-elision-step-err", - "language/statements/function/dstr/ary-ptrn-rest-id-elision-next-err", - "language/statements/function/dstr/ary-ptrn-rest-id-iter-step-err", - "language/statements/function/dstr/dflt-ary-ptrn-elision-step-err", - "language/statements/function/dstr/dflt-ary-ptrn-rest-id-elision-next-err", - "language/statements/function/dstr/dflt-ary-ptrn-rest-id-iter-step-err", - "language/statements/generators/dstr/ary-ptrn-elision-step-err", - "language/statements/generators/dstr/ary-ptrn-rest-id-elision-next-err", - "language/statements/generators/dstr/ary-ptrn-rest-id-iter-step-err", - "language/statements/generators/dstr/dflt-ary-ptrn-elision-step-err", - "language/statements/generators/dstr/dflt-ary-ptrn-rest-id-elision-next-err", - "language/statements/generators/dstr/dflt-ary-ptrn-rest-id-iter-step-err", - "language/statements/let/dstr/ary-ptrn-elision-step-err", - "language/statements/let/dstr/ary-ptrn-rest-id-elision-next-err", - "language/statements/let/dstr/ary-ptrn-rest-id-iter-step-err", - "language/statements/try/dstr/ary-ptrn-elision-step-err", - "language/statements/try/dstr/ary-ptrn-rest-id-elision-next-err", - "language/statements/try/dstr/ary-ptrn-rest-id-iter-step-err", - "language/statements/variable/dstr/ary-ptrn-elision-step-err", - "language/statements/variable/dstr/ary-ptrn-rest-id-elision-next-err", - "language/statements/variable/dstr/ary-ptrn-rest-id-iter-step-err", - "language/types/string/S8.4_A6.1", - "language/types/string/S8.4_A6.2", - "language/types/string/S8.4_A9_T1", - "language/types/string/S8.4_A9_T2", - "language/types/string/S8.4_A9_T3" ] } diff --git a/src/main/resources/manuals/default/test262/yet-categorized.json b/src/main/resources/manuals/default/test262/yet-categorized.json new file mode 100644 index 0000000000..e2551dae43 --- /dev/null +++ b/src/main/resources/manuals/default/test262/yet-categorized.json @@ -0,0 +1,401 @@ +[ + "built-ins/Array/prototype/sort/stability-2048-elements", + "built-ins/AsyncFromSyncIteratorPrototype/next/iterator-result-rejected", + "built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result", + "built-ins/Atomics/wait/good-views", + "built-ins/BigInt/asIntN/arithmetic", + "built-ins/BigInt/asUintN/arithmetic", + "built-ins/BigInt/wrapper-object-ordinary-toprimitive", + "built-ins/Boolean/prototype/S15.6.3.1_A1", + "built-ins/Function/private-identifiers-not-empty", + "built-ins/Function/prototype/bind/15.3.4.5-2-6", + "built-ins/Function/prototype/bind/15.3.4.5-3-1", + "built-ins/GeneratorPrototype/next/from-state-executing", + "built-ins/GeneratorPrototype/return/from-state-executing", + "built-ins/GeneratorPrototype/throw/from-state-executing", + "built-ins/GeneratorPrototype/throw/try-catch-before-try", + "built-ins/GeneratorPrototype/throw/try-catch-following-catch", + "built-ins/GeneratorPrototype/throw/try-catch-within-catch", + "built-ins/GeneratorPrototype/throw/try-finally-before-try", + "built-ins/GeneratorPrototype/throw/try-finally-following-finally", + "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-catch", + "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-finally", + "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-outer-try-after-nested", + "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-outer-try-before-nested", + "built-ins/GeneratorPrototype/throw/try-finally-within-finally", + "built-ins/GeneratorPrototype/throw/try-finally-within-try", + "built-ins/Map/prototype/clear/map-data-list-is-preserved", + "built-ins/Map/prototype/delete/does-not-break-iterators", + "built-ins/Map/prototype/entries/returns-iterator", + "built-ins/Map/prototype/entries/returns-iterator-empty", + "built-ins/Map/prototype/keys/returns-iterator", + "built-ins/Map/prototype/keys/returns-iterator-empty", + "built-ins/Map/prototype/values/returns-iterator", + "built-ins/Map/prototype/values/returns-iterator-empty", + "built-ins/MapIteratorPrototype/next/iteration", + "built-ins/MapIteratorPrototype/next/iteration-mutable", + "built-ins/Number/prototype/S15.7.3.1_A3", + "built-ins/Number/prototype/S15.7.4_A1", + "built-ins/Number/prototype/toFixed/exactness", + "built-ins/Object/S15.2.1.1_A2_T12", + "built-ins/Object/S15.2.1.1_A2_T14", + "built-ins/Object/S15.2.1.1_A2_T2", + "built-ins/Object/S15.2.1.1_A2_T3", + "built-ins/Object/S15.2.1.1_A2_T6", + "built-ins/Object/S15.2.1.1_A2_T7", + "built-ins/Object/S15.2.1.1_A3_T1", + "built-ins/Object/S15.2.1.1_A3_T3", + "built-ins/Object/S15.2.2.1_A3_T1", + "built-ins/Object/S15.2.2.1_A3_T2", + "built-ins/Object/S15.2.2.1_A3_T3", + "built-ins/Object/S15.2.2.1_A4_T1", + "built-ins/Object/S15.2.2.1_A4_T2", + "built-ins/Object/S15.2.2.1_A4_T3", + "built-ins/Object/S15.2.2.1_A5_T1", + "built-ins/Object/S15.2.2.1_A5_T3", + "built-ins/Object/S15.2.2.1_A5_T4", + "built-ins/Object/S15.2.2.1_A6_T1", + "built-ins/Object/S15.2.2.1_A6_T3", + "built-ins/Promise/all/iter-arg-is-string-resolve", + "built-ins/Promise/allSettled/iter-arg-is-string-resolve", + "built-ins/Promise/any/iter-arg-is-empty-string-reject", + "built-ins/RegExp/lookBehind/sliced-strings", + "built-ins/Set/prototype/entries/returns-iterator", + "built-ins/Set/prototype/entries/returns-iterator-empty", + "built-ins/Set/prototype/values/returns-iterator", + "built-ins/Set/prototype/values/returns-iterator-empty", + "built-ins/Set/prototype/values/values-iteration-mutable", + "built-ins/SetIteratorPrototype/next/iteration", + "built-ins/SetIteratorPrototype/next/iteration-mutable", + "built-ins/String/S15.5.2.1_A1_T1", + "built-ins/String/S15.5.2.1_A1_T10", + "built-ins/String/S15.5.2.1_A1_T11", + "built-ins/String/S15.5.2.1_A1_T16", + "built-ins/String/S15.5.2.1_A1_T17", + "built-ins/String/S15.5.2.1_A1_T18", + "built-ins/String/S15.5.2.1_A1_T19", + "built-ins/String/S15.5.2.1_A1_T2", + "built-ins/String/S15.5.2.1_A1_T3", + "built-ins/String/S15.5.2.1_A1_T4", + "built-ins/String/S15.5.2.1_A1_T5", + "built-ins/String/S15.5.2.1_A1_T6", + "built-ins/String/S15.5.2.1_A1_T7", + "built-ins/String/S15.5.2.1_A1_T8", + "built-ins/String/S15.5.2.1_A1_T9", + "built-ins/String/S15.5.5.1_A5", + "built-ins/String/prototype/S15.5.4_A2", + "built-ins/String/prototype/concat/S15.5.4.6_A3", + "built-ins/String/prototype/constructor/S15.5.4.1_A1_T2", + "built-ins/String/prototype/matchAll/length", + "built-ins/String/prototype/matchAll/name", + "built-ins/String/prototype/matchAll/prop-desc", + "built-ins/String/prototype/matchAll/regexp-is-null", + "built-ins/String/prototype/matchAll/regexp-is-undefined", + "built-ins/String/prototype/matchAll/regexp-matchAll-invocation", + "built-ins/String/prototype/matchAll/regexp-matchAll-not-callable", + "built-ins/String/prototype/matchAll/regexp-prototype-has-no-matchAll", + "built-ins/String/prototype/matchAll/this-val-non-obj-coercible", + "built-ins/Symbol/prototype/Symbol.toPrimitive/redefined-symbol-wrapper-ordinary-toprimitive", + "built-ins/Symbol/prototype/Symbol.toPrimitive/removed-symbol-wrapper-ordinary-toprimitive", + "language/computed-property-names/class/static/generator-prototype", + "language/computed-property-names/class/static/method-prototype", + "language/expressions/array/spread-err-mult-err-expr-throws", + "language/expressions/array/spread-err-sngl-err-expr-throws", + "language/expressions/arrow-function/dstr/ary-ptrn-elision-step-err", + "language/expressions/arrow-function/dstr/ary-ptrn-rest-id-elision-next-err", + "language/expressions/arrow-function/dstr/ary-ptrn-rest-id-iter-step-err", + "language/expressions/arrow-function/dstr/dflt-ary-ptrn-elision-step-err", + "language/expressions/arrow-function/dstr/dflt-ary-ptrn-rest-id-elision-next-err", + "language/expressions/arrow-function/dstr/dflt-ary-ptrn-rest-id-iter-step-err", + "language/expressions/assignment/dstr/array-elem-iter-rtrn-close-err", + "language/expressions/assignment/dstr/array-elem-iter-rtrn-close-null", + "language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-err", + "language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-null", + "language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-err", + "language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-null", + "language/expressions/assignment/dstr/array-rest-iter-rtrn-close-err", + "language/expressions/assignment/dstr/array-rest-iter-rtrn-close-null", + "language/expressions/assignment/target-member-computed-reference-null", + "language/expressions/assignment/target-member-computed-reference-undefined", + "language/expressions/async-generator/dstr/ary-ptrn-elision-step-err", + "language/expressions/async-generator/dstr/ary-ptrn-rest-id-elision-next-err", + "language/expressions/async-generator/dstr/ary-ptrn-rest-id-iter-step-err", + "language/expressions/async-generator/dstr/dflt-ary-ptrn-elision-step-err", + "language/expressions/async-generator/dstr/dflt-ary-ptrn-rest-id-elision-next-err", + "language/expressions/async-generator/dstr/dflt-ary-ptrn-rest-id-iter-step-err", + "language/expressions/async-generator/dstr/named-ary-ptrn-elision-step-err", + "language/expressions/async-generator/dstr/named-ary-ptrn-rest-id-elision-next-err", + "language/expressions/async-generator/dstr/named-ary-ptrn-rest-id-iter-step-err", + "language/expressions/async-generator/dstr/named-dflt-ary-ptrn-elision-step-err", + "language/expressions/async-generator/dstr/named-dflt-ary-ptrn-rest-id-elision-next-err", + "language/expressions/async-generator/dstr/named-dflt-ary-ptrn-rest-id-iter-step-err", + "language/expressions/call/spread-err-mult-err-expr-throws", + "language/expressions/call/spread-err-sngl-err-expr-throws", + "language/expressions/class/dstr/async-gen-meth-ary-ptrn-elision-step-err", + "language/expressions/class/dstr/async-gen-meth-ary-ptrn-rest-id-elision-next-err", + "language/expressions/class/dstr/async-gen-meth-ary-ptrn-rest-id-iter-step-err", + "language/expressions/class/dstr/async-gen-meth-dflt-ary-ptrn-elision-step-err", + "language/expressions/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-id-elision-next-err", + "language/expressions/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-id-iter-step-err", + "language/expressions/class/dstr/async-gen-meth-static-ary-ptrn-elision-step-err", + "language/expressions/class/dstr/async-gen-meth-static-ary-ptrn-rest-id-elision-next-err", + "language/expressions/class/dstr/async-gen-meth-static-ary-ptrn-rest-id-iter-step-err", + "language/expressions/class/dstr/async-gen-meth-static-dflt-ary-ptrn-elision-step-err", + "language/expressions/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-id-elision-next-err", + "language/expressions/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-id-iter-step-err", + "language/expressions/class/dstr/gen-meth-ary-ptrn-elision-step-err", + "language/expressions/class/dstr/gen-meth-ary-ptrn-rest-id-elision-next-err", + "language/expressions/class/dstr/gen-meth-ary-ptrn-rest-id-iter-step-err", + "language/expressions/class/dstr/gen-meth-dflt-ary-ptrn-elision-step-err", + "language/expressions/class/dstr/gen-meth-dflt-ary-ptrn-rest-id-elision-next-err", + "language/expressions/class/dstr/gen-meth-dflt-ary-ptrn-rest-id-iter-step-err", + "language/expressions/class/dstr/gen-meth-static-ary-ptrn-elision-step-err", + "language/expressions/class/dstr/gen-meth-static-ary-ptrn-rest-id-elision-next-err", + "language/expressions/class/dstr/gen-meth-static-ary-ptrn-rest-id-iter-step-err", + "language/expressions/class/dstr/gen-meth-static-dflt-ary-ptrn-elision-step-err", + "language/expressions/class/dstr/gen-meth-static-dflt-ary-ptrn-rest-id-elision-next-err", + "language/expressions/class/dstr/gen-meth-static-dflt-ary-ptrn-rest-id-iter-step-err", + "language/expressions/class/dstr/meth-ary-ptrn-elision-step-err", + "language/expressions/class/dstr/meth-ary-ptrn-rest-id-elision-next-err", + "language/expressions/class/dstr/meth-ary-ptrn-rest-id-iter-step-err", + "language/expressions/class/dstr/meth-dflt-ary-ptrn-elision-step-err", + "language/expressions/class/dstr/meth-dflt-ary-ptrn-rest-id-elision-next-err", + "language/expressions/class/dstr/meth-dflt-ary-ptrn-rest-id-iter-step-err", + "language/expressions/class/dstr/meth-static-ary-ptrn-elision-step-err", + "language/expressions/class/dstr/meth-static-ary-ptrn-rest-id-elision-next-err", + "language/expressions/class/dstr/meth-static-ary-ptrn-rest-id-iter-step-err", + "language/expressions/class/dstr/meth-static-dflt-ary-ptrn-elision-step-err", + "language/expressions/class/dstr/meth-static-dflt-ary-ptrn-rest-id-elision-next-err", + "language/expressions/class/dstr/meth-static-dflt-ary-ptrn-rest-id-iter-step-err", + "language/expressions/compound-assignment/S11.13.2_A7.10_T1", + "language/expressions/compound-assignment/S11.13.2_A7.10_T2", + "language/expressions/compound-assignment/S11.13.2_A7.11_T1", + "language/expressions/compound-assignment/S11.13.2_A7.11_T2", + "language/expressions/compound-assignment/S11.13.2_A7.1_T1", + "language/expressions/compound-assignment/S11.13.2_A7.1_T2", + "language/expressions/compound-assignment/S11.13.2_A7.2_T1", + "language/expressions/compound-assignment/S11.13.2_A7.2_T2", + "language/expressions/compound-assignment/S11.13.2_A7.3_T1", + "language/expressions/compound-assignment/S11.13.2_A7.3_T2", + "language/expressions/compound-assignment/S11.13.2_A7.4_T1", + "language/expressions/compound-assignment/S11.13.2_A7.4_T2", + "language/expressions/compound-assignment/S11.13.2_A7.5_T1", + "language/expressions/compound-assignment/S11.13.2_A7.5_T2", + "language/expressions/compound-assignment/S11.13.2_A7.6_T1", + "language/expressions/compound-assignment/S11.13.2_A7.6_T2", + "language/expressions/compound-assignment/S11.13.2_A7.7_T1", + "language/expressions/compound-assignment/S11.13.2_A7.7_T2", + "language/expressions/compound-assignment/S11.13.2_A7.8_T1", + "language/expressions/compound-assignment/S11.13.2_A7.8_T2", + "language/expressions/compound-assignment/S11.13.2_A7.9_T1", + "language/expressions/compound-assignment/S11.13.2_A7.9_T2", + "language/expressions/does-not-equals/S11.9.2_A3.2", + "language/expressions/does-not-equals/S11.9.2_A3.3", + "language/expressions/does-not-equals/S11.9.2_A7.2", + "language/expressions/does-not-equals/S11.9.2_A7.3", + "language/expressions/does-not-equals/S11.9.2_A7.4", + "language/expressions/does-not-equals/S11.9.2_A7.5", + "language/expressions/does-not-equals/S11.9.2_A7.6", + "language/expressions/does-not-equals/S11.9.2_A7.7", + "language/expressions/does-not-equals/S11.9.2_A7.8", + "language/expressions/does-not-equals/S11.9.2_A7.9", + "language/expressions/does-not-equals/bigint-and-object", + "language/expressions/equals/S11.9.1_A7.2", + "language/expressions/equals/S11.9.1_A7.3", + "language/expressions/equals/S11.9.1_A7.4", + "language/expressions/equals/S11.9.1_A7.5", + "language/expressions/equals/S11.9.1_A7.6", + "language/expressions/equals/S11.9.1_A7.7", + "language/expressions/equals/S11.9.1_A7.8", + "language/expressions/equals/S11.9.1_A7.9", + "language/expressions/equals/bigint-and-object", + "language/expressions/equals/coerce-symbol-to-prim-err", + "language/expressions/equals/coerce-symbol-to-prim-invocation", + "language/expressions/equals/coerce-symbol-to-prim-return-obj", + "language/expressions/equals/coerce-symbol-to-prim-return-prim", + "language/expressions/equals/get-symbol-to-prim-err", + "language/expressions/equals/to-prim-hint", + "language/expressions/function/dstr/ary-ptrn-elision-step-err", + "language/expressions/function/dstr/ary-ptrn-rest-id-elision-next-err", + "language/expressions/function/dstr/ary-ptrn-rest-id-iter-step-err", + "language/expressions/function/dstr/dflt-ary-ptrn-elision-step-err", + "language/expressions/function/dstr/dflt-ary-ptrn-rest-id-elision-next-err", + "language/expressions/function/dstr/dflt-ary-ptrn-rest-id-iter-step-err", + "language/expressions/generators/dstr/ary-ptrn-elision-step-err", + "language/expressions/generators/dstr/ary-ptrn-rest-id-elision-next-err", + "language/expressions/generators/dstr/ary-ptrn-rest-id-iter-step-err", + "language/expressions/generators/dstr/dflt-ary-ptrn-elision-step-err", + "language/expressions/generators/dstr/dflt-ary-ptrn-rest-id-elision-next-err", + "language/expressions/generators/dstr/dflt-ary-ptrn-rest-id-iter-step-err", + "language/expressions/generators/named-strict-error-reassign-fn-name-in-body", + "language/expressions/generators/named-strict-error-reassign-fn-name-in-body-in-arrow", + "language/expressions/generators/named-strict-error-reassign-fn-name-in-body-in-eval", + "language/expressions/greater-than-or-equal/bigint-and-number-extremes", + "language/expressions/greater-than/bigint-and-number-extremes", + "language/expressions/less-than-or-equal/bigint-and-number-extremes", + "language/expressions/less-than/bigint-and-number-extremes", + "language/expressions/logical-assignment/lgcl-and-assignment-operator-lhs-before-rhs", + "language/expressions/logical-assignment/lgcl-nullish-assignment-operator-lhs-before-rhs", + "language/expressions/logical-assignment/lgcl-or-assignment-operator-lhs-before-rhs", + "language/expressions/multiplication/S11.5.1_A4_T7", + "language/expressions/new/S11.2.2_A1.1", + "language/expressions/new/S11.2.2_A1.2", + "language/expressions/new/spread-err-mult-err-expr-throws", + "language/expressions/new/spread-err-sngl-err-expr-throws", + "language/expressions/object/dstr/async-gen-meth-ary-ptrn-elision-step-err", + "language/expressions/object/dstr/async-gen-meth-ary-ptrn-rest-id-elision-next-err", + "language/expressions/object/dstr/async-gen-meth-ary-ptrn-rest-id-iter-step-err", + "language/expressions/object/dstr/async-gen-meth-dflt-ary-ptrn-elision-step-err", + "language/expressions/object/dstr/async-gen-meth-dflt-ary-ptrn-rest-id-elision-next-err", + "language/expressions/object/dstr/async-gen-meth-dflt-ary-ptrn-rest-id-iter-step-err", + "language/expressions/object/dstr/gen-meth-ary-ptrn-elision-step-err", + "language/expressions/object/dstr/gen-meth-ary-ptrn-rest-id-elision-next-err", + "language/expressions/object/dstr/gen-meth-ary-ptrn-rest-id-iter-step-err", + "language/expressions/object/dstr/gen-meth-dflt-ary-ptrn-elision-step-err", + "language/expressions/object/dstr/gen-meth-dflt-ary-ptrn-rest-id-elision-next-err", + "language/expressions/object/dstr/gen-meth-dflt-ary-ptrn-rest-id-iter-step-err", + "language/expressions/object/dstr/meth-ary-ptrn-elision-step-err", + "language/expressions/object/dstr/meth-ary-ptrn-rest-id-elision-next-err", + "language/expressions/object/dstr/meth-ary-ptrn-rest-id-iter-step-err", + "language/expressions/object/dstr/meth-dflt-ary-ptrn-elision-step-err", + "language/expressions/object/dstr/meth-dflt-ary-ptrn-rest-id-elision-next-err", + "language/expressions/object/dstr/meth-dflt-ary-ptrn-rest-id-iter-step-err", + "language/expressions/postfix-decrement/S11.3.2_A6_T1", + "language/expressions/postfix-decrement/S11.3.2_A6_T2", + "language/expressions/postfix-increment/S11.3.1_A6_T1", + "language/expressions/postfix-increment/S11.3.1_A6_T2", + "language/expressions/prefix-decrement/S11.4.5_A6_T1", + "language/expressions/prefix-decrement/S11.4.5_A6_T2", + "language/expressions/prefix-increment/S11.4.4_A6_T1", + "language/expressions/prefix-increment/S11.4.4_A6_T2", + "language/expressions/super/call-spread-err-mult-err-expr-throws", + "language/expressions/super/call-spread-err-sngl-err-expr-throws", + "language/expressions/yield/star-throw-is-null", + "language/statements/async-generator/dstr/ary-ptrn-elision-step-err", + "language/statements/async-generator/dstr/ary-ptrn-rest-id-elision-next-err", + "language/statements/async-generator/dstr/ary-ptrn-rest-id-iter-step-err", + "language/statements/async-generator/dstr/dflt-ary-ptrn-elision-step-err", + "language/statements/async-generator/dstr/dflt-ary-ptrn-rest-id-elision-next-err", + "language/statements/async-generator/dstr/dflt-ary-ptrn-rest-id-iter-step-err", + "language/statements/class/dstr/async-gen-meth-ary-ptrn-elision-step-err", + "language/statements/class/dstr/async-gen-meth-ary-ptrn-rest-id-elision-next-err", + "language/statements/class/dstr/async-gen-meth-ary-ptrn-rest-id-iter-step-err", + "language/statements/class/dstr/async-gen-meth-dflt-ary-ptrn-elision-step-err", + "language/statements/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-id-elision-next-err", + "language/statements/class/dstr/async-gen-meth-dflt-ary-ptrn-rest-id-iter-step-err", + "language/statements/class/dstr/async-gen-meth-static-ary-ptrn-elision-step-err", + "language/statements/class/dstr/async-gen-meth-static-ary-ptrn-rest-id-elision-next-err", + "language/statements/class/dstr/async-gen-meth-static-ary-ptrn-rest-id-iter-step-err", + "language/statements/class/dstr/async-gen-meth-static-dflt-ary-ptrn-elision-step-err", + "language/statements/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-id-elision-next-err", + "language/statements/class/dstr/async-gen-meth-static-dflt-ary-ptrn-rest-id-iter-step-err", + "language/statements/class/dstr/gen-meth-ary-ptrn-elision-step-err", + "language/statements/class/dstr/gen-meth-ary-ptrn-rest-id-elision-next-err", + "language/statements/class/dstr/gen-meth-ary-ptrn-rest-id-iter-step-err", + "language/statements/class/dstr/gen-meth-dflt-ary-ptrn-elision-step-err", + "language/statements/class/dstr/gen-meth-dflt-ary-ptrn-rest-id-elision-next-err", + "language/statements/class/dstr/gen-meth-dflt-ary-ptrn-rest-id-iter-step-err", + "language/statements/class/dstr/gen-meth-static-ary-ptrn-elision-step-err", + "language/statements/class/dstr/gen-meth-static-ary-ptrn-rest-id-elision-next-err", + "language/statements/class/dstr/gen-meth-static-ary-ptrn-rest-id-iter-step-err", + "language/statements/class/dstr/gen-meth-static-dflt-ary-ptrn-elision-step-err", + "language/statements/class/dstr/gen-meth-static-dflt-ary-ptrn-rest-id-elision-next-err", + "language/statements/class/dstr/gen-meth-static-dflt-ary-ptrn-rest-id-iter-step-err", + "language/statements/class/dstr/meth-ary-ptrn-elision-step-err", + "language/statements/class/dstr/meth-ary-ptrn-rest-id-elision-next-err", + "language/statements/class/dstr/meth-ary-ptrn-rest-id-iter-step-err", + "language/statements/class/dstr/meth-dflt-ary-ptrn-elision-step-err", + "language/statements/class/dstr/meth-dflt-ary-ptrn-rest-id-elision-next-err", + "language/statements/class/dstr/meth-dflt-ary-ptrn-rest-id-iter-step-err", + "language/statements/class/dstr/meth-static-ary-ptrn-elision-step-err", + "language/statements/class/dstr/meth-static-ary-ptrn-rest-id-elision-next-err", + "language/statements/class/dstr/meth-static-ary-ptrn-rest-id-iter-step-err", + "language/statements/class/dstr/meth-static-dflt-ary-ptrn-elision-step-err", + "language/statements/class/dstr/meth-static-dflt-ary-ptrn-rest-id-elision-next-err", + "language/statements/class/dstr/meth-static-dflt-ary-ptrn-rest-id-iter-step-err", + "language/statements/class/static-method-gen-non-configurable-err", + "language/statements/class/static-method-non-configurable-err", + "language/statements/const/dstr/ary-ptrn-elision-step-err", + "language/statements/const/dstr/ary-ptrn-rest-id-elision-next-err", + "language/statements/const/dstr/ary-ptrn-rest-id-iter-step-err", + "language/statements/for-await-of/async-func-dstr-const-ary-ptrn-elision-step-err", + "language/statements/for-await-of/async-func-dstr-const-ary-ptrn-rest-id-elision-next-err", + "language/statements/for-await-of/async-func-dstr-const-ary-ptrn-rest-id-iter-step-err", + "language/statements/for-await-of/async-func-dstr-let-ary-ptrn-elision-step-err", + "language/statements/for-await-of/async-func-dstr-let-ary-ptrn-rest-id-elision-next-err", + "language/statements/for-await-of/async-func-dstr-let-ary-ptrn-rest-id-iter-step-err", + "language/statements/for-await-of/async-func-dstr-var-ary-ptrn-elision-step-err", + "language/statements/for-await-of/async-func-dstr-var-ary-ptrn-rest-id-elision-next-err", + "language/statements/for-await-of/async-func-dstr-var-ary-ptrn-rest-id-iter-step-err", + "language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-elision-step-err", + "language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-rest-id-elision-next-err", + "language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-rest-id-iter-step-err", + "language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-elision-step-err", + "language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-rest-id-elision-next-err", + "language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-rest-id-iter-step-err", + "language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-elision-step-err", + "language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-rest-id-elision-next-err", + "language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-rest-id-iter-step-err", + "language/statements/for-in/scope-body-var-none", + "language/statements/for-of/array-key-get-error", + "language/statements/for-of/dstr/array-elem-iter-rtrn-close-err", + "language/statements/for-of/dstr/array-elem-iter-rtrn-close-null", + "language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-err", + "language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-null", + "language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-err", + "language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-null", + "language/statements/for-of/dstr/array-rest-iter-rtrn-close-err", + "language/statements/for-of/dstr/array-rest-iter-rtrn-close-null", + "language/statements/for-of/dstr/const-ary-ptrn-elision-step-err", + "language/statements/for-of/dstr/const-ary-ptrn-rest-id-elision-next-err", + "language/statements/for-of/dstr/const-ary-ptrn-rest-id-iter-step-err", + "language/statements/for-of/dstr/let-ary-ptrn-elision-step-err", + "language/statements/for-of/dstr/let-ary-ptrn-rest-id-elision-next-err", + "language/statements/for-of/dstr/let-ary-ptrn-rest-id-iter-step-err", + "language/statements/for-of/dstr/var-ary-ptrn-elision-step-err", + "language/statements/for-of/dstr/var-ary-ptrn-rest-id-elision-next-err", + "language/statements/for-of/dstr/var-ary-ptrn-rest-id-iter-step-err", + "language/statements/for-of/generator-next-error", + "language/statements/for-of/map", + "language/statements/for-of/map-contract", + "language/statements/for-of/map-contract-expand", + "language/statements/for-of/map-expand", + "language/statements/for-of/map-expand-contract", + "language/statements/for-of/set", + "language/statements/for-of/set-expand", + "language/statements/for/dstr/const-ary-ptrn-elision-step-err", + "language/statements/for/dstr/const-ary-ptrn-rest-id-elision-next-err", + "language/statements/for/dstr/const-ary-ptrn-rest-id-iter-step-err", + "language/statements/for/dstr/let-ary-ptrn-elision-step-err", + "language/statements/for/dstr/let-ary-ptrn-rest-id-elision-next-err", + "language/statements/for/dstr/let-ary-ptrn-rest-id-iter-step-err", + "language/statements/for/dstr/var-ary-ptrn-elision-step-err", + "language/statements/for/dstr/var-ary-ptrn-rest-id-elision-next-err", + "language/statements/for/dstr/var-ary-ptrn-rest-id-iter-step-err", + "language/statements/function/dstr/ary-ptrn-elision-step-err", + "language/statements/function/dstr/ary-ptrn-rest-id-elision-next-err", + "language/statements/function/dstr/ary-ptrn-rest-id-iter-step-err", + "language/statements/function/dstr/dflt-ary-ptrn-elision-step-err", + "language/statements/function/dstr/dflt-ary-ptrn-rest-id-elision-next-err", + "language/statements/function/dstr/dflt-ary-ptrn-rest-id-iter-step-err", + "language/statements/generators/dstr/ary-ptrn-elision-step-err", + "language/statements/generators/dstr/ary-ptrn-rest-id-elision-next-err", + "language/statements/generators/dstr/ary-ptrn-rest-id-iter-step-err", + "language/statements/generators/dstr/dflt-ary-ptrn-elision-step-err", + "language/statements/generators/dstr/dflt-ary-ptrn-rest-id-elision-next-err", + "language/statements/generators/dstr/dflt-ary-ptrn-rest-id-iter-step-err", + "language/statements/let/dstr/ary-ptrn-elision-step-err", + "language/statements/let/dstr/ary-ptrn-rest-id-elision-next-err", + "language/statements/let/dstr/ary-ptrn-rest-id-iter-step-err", + "language/statements/try/dstr/ary-ptrn-elision-step-err", + "language/statements/try/dstr/ary-ptrn-rest-id-elision-next-err", + "language/statements/try/dstr/ary-ptrn-rest-id-iter-step-err", + "language/statements/variable/dstr/ary-ptrn-elision-step-err", + "language/statements/variable/dstr/ary-ptrn-rest-id-elision-next-err", + "language/statements/variable/dstr/ary-ptrn-rest-id-iter-step-err", + "language/types/string/S8.4_A6.1", + "language/types/string/S8.4_A6.2", + "language/types/string/S8.4_A9_T1", + "language/types/string/S8.4_A9_T2", + "language/types/string/S8.4_A9_T3" +] diff --git a/src/main/scala/esmeta/test262/util/ManualConfig.scala b/src/main/scala/esmeta/test262/util/ManualConfig.scala index ecf31bc7ae..3af5a2b129 100644 --- a/src/main/scala/esmeta/test262/util/ManualConfig.scala +++ b/src/main/scala/esmeta/test262/util/ManualConfig.scala @@ -7,6 +7,7 @@ import java.io.File case class ManualConfig( filtered: Map[String, List[String]], + yetCategorized: List[String], supportedFeatures: List[String], ) object ManualConfig { @@ -19,8 +20,11 @@ object ManualConfig { val filtered = fileMap .get("filtered.json") .fold(Map())(readJson[Map[String, List[String]]]) + val yetCategorized = fileMap + .get("yet-categorized.json") + .fold(Nil)(readJson[List[String]]) val supportedFeatures = fileMap .get("supported-features.json") .fold(Nil)(readJson[List[String]]) - ManualConfig(filtered, supportedFeatures) + ManualConfig(filtered, yetCategorized, supportedFeatures) } diff --git a/src/main/scala/esmeta/test262/util/TestFilter.scala b/src/main/scala/esmeta/test262/util/TestFilter.scala index 62f2fd7e24..61da24c93a 100644 --- a/src/main/scala/esmeta/test262/util/TestFilter.scala +++ b/src/main/scala/esmeta/test262/util/TestFilter.scala @@ -21,7 +21,7 @@ case class TestFilter(spec: Spec) { ): (List[Test], Iterable[(Test, ReasonPath)]) = var removedMap: Vector[(Test, ReasonPath)] = Vector() val targetTests = getFilters(withYet, features.toSet).foldLeft(tests) { - case (tests, (desc, filter)) => + case (tests, filter) => for { test <- tests if filter(test) match @@ -34,73 +34,68 @@ case class TestFilter(spec: Spec) { private def getFilters( withYet: Boolean, features: Set[String], - ): List[(String, Test => Option[ReasonPath])] = - manualConfig.filtered.toList.map { (desc, tests) => - lift( - desc -> (test => - if (desc == "yet") - !withYet && tests.contains(removedExt(test.relName)) - else tests.contains(removedExt(test.relName)), - ), - ) - } ++ List( - lift("harness" -> (_.relName.startsWith("harness"))), - lift("internationalisation" -> (_.relName.startsWith("intl"))), - lift( - "annex" -> (test => - test.relName.startsWith("annex") || - test.relName.contains("__proto__"), - ), - ), - liftReason( - "not-supported-features" -> (_.features.find(!features.contains(_))), - ), - lift( - "non-strict" -> (test => - test.flags.contains("noStrict") || - test.flags.contains("raw"), - ), - ), - lift( - "module" -> (test => - test.flags.contains("module") || - test.relName.startsWith("language/module-code/") || - test.relName.startsWith("language/import/") || - test.relName.startsWith("language/expressions/dynamic-import/") || - test.relName.startsWith("language/expressions/import.meta/"), - ), - ), - lift( - "negative-errors" -> (test => test.negative.isDefined), - ), - lift( - "inessential-builtin-objects" -> (test => - test.flags.contains("CanBlockIsFalse") || - test.flags.contains("CanBlockIsTrue") || - !test.locales.isEmpty, - ), - ), - ) + ): List[Test => Option[ReasonPath]] = List( + "harness" -> ((test: Test) => test.relName.startsWith("harness")), + "internationalisation" -> ((test: Test) => test.relName.startsWith("intl")), + "annex" -> ((test: Test) => + test.relName.startsWith("annex") || + test.relName.contains("__proto__"), + ), + "not-supported-features" -> ((test: Test) => + test.features.find(!features.contains(_)), + ), + "non-strict" -> ((test: Test) => + test.flags.contains("noStrict") || + test.flags.contains("raw"), + ), + "module" -> ((test: Test) => + test.flags.contains("module") || + test.relName.startsWith("language/module-code/") || + test.relName.startsWith("language/import/") || + test.relName.startsWith("language/expressions/dynamic-import/") || + test.relName.startsWith("language/expressions/import.meta/"), + ), + "negative-errors" -> ((test: Test) => test.negative.isDefined), + "inessential-builtin-objects" -> ((test: Test) => + test.flags.contains("CanBlockIsFalse") || + test.flags.contains("CanBlockIsTrue") || + !test.locales.isEmpty, + ), + // manually filter tests + test => manualFilterMap.get(removedExt(test.relName)), + // manually filter not yet categorized tests + "not-yet-categorized" -> ((test: Test) => + !withYet && manualYetCategorized.contains(removedExt(test.relName)), + ), + ) - private def lift( - pair: (String, Test => Boolean), - ): (String, Test => Option[ReasonPath]) = + given liftBool: Conversion[ + (String, Test => Boolean), + Test => Option[ReasonPath], + ] = pair => val (name, filter) = pair val lifted = (x: Test) => if (filter(x)) Some(List(name)) else None - name -> lifted + lifted - private def liftReason( - pair: (String, Test => Option[Reason]), - ): (String, Test => Option[ReasonPath]) = + given liftReason: Conversion[ + (String, Test => Option[Reason]), + Test => Option[ReasonPath], + ] = pair => val (name, filter) = pair - name -> (test => filter(test).map(List(name, _))) + test => filter(test).map(List(name, _)) lazy val manualConfig = spec.manualInfo.test262 + lazy val manualFilterMap = (for { + (reason, tests) <- manualConfig.filtered + test <- tests + } yield test -> List(reason)).toMap + + lazy val manualYetCategorized = manualConfig.yetCategorized.toSet + /** language features in Test262 * @url * https://github.com/tc39/test262/blob/main/features.txt */ lazy val languageFeatures = manualConfig.supportedFeatures - } From eede016695a92e8099a454a33c066dfb7504ae43 Mon Sep 17 00:00:00 2001 From: Doehyun Baek Date: Tue, 13 Dec 2022 14:18:19 +0900 Subject: [PATCH 4/7] Classify YetObj with NOT_SUPPORTED_FEATURES --- src/main/scala/esmeta/interpreter/Interpreter.scala | 4 ++-- src/main/scala/esmeta/package.scala | 3 +++ src/main/scala/esmeta/state/Heap.scala | 8 +++++--- src/main/scala/esmeta/test262/util/TestFilter.scala | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/main/scala/esmeta/interpreter/Interpreter.scala b/src/main/scala/esmeta/interpreter/Interpreter.scala index 28260322fc..43d1500e42 100644 --- a/src/main/scala/esmeta/interpreter/Interpreter.scala +++ b/src/main/scala/esmeta/interpreter/Interpreter.scala @@ -1,6 +1,6 @@ package esmeta.interpreter -import esmeta.{EVAL_LOG_DIR, LINE_SEP} +import esmeta.{EVAL_LOG_DIR, LINE_SEP, NOT_SUPPORTED_FEATURES} import esmeta.analyzer.* import esmeta.cfg.* import esmeta.error.* @@ -666,7 +666,7 @@ object Interpreter { Str(ESValueParser.parseTRVTemplateTail(str)) case (_, "Contains") => Bool(false) case ("RegularExpressionLiteral", name) => - throw NotSupported(List("RegExp", sdoName)) + throw NotSupported(List(NOT_SUPPORTED_FEATURES, "RegExp", sdoName)) case _ => throw InvalidAstProp(lex, Str(sdoName)) } diff --git a/src/main/scala/esmeta/package.scala b/src/main/scala/esmeta/package.scala index 05884f23c8..b5e5519b6c 100644 --- a/src/main/scala/esmeta/package.scala +++ b/src/main/scala/esmeta/package.scala @@ -59,6 +59,9 @@ var STATUS_MODE = false var TEST262_DIR = s"$TEST_DIR/test262" def TEST262_TEST_DIR = s"$TEST262_DIR/test" +/** constant string for not supported features */ +val NOT_SUPPORTED_FEATURES = "not-supported-features" + // ----------------------------------------------------------------------------- // Mutable Global Options // ----------------------------------------------------------------------------- diff --git a/src/main/scala/esmeta/state/Heap.scala b/src/main/scala/esmeta/state/Heap.scala index 18f7056711..23cd7dcaed 100644 --- a/src/main/scala/esmeta/state/Heap.scala +++ b/src/main/scala/esmeta/state/Heap.scala @@ -1,5 +1,6 @@ package esmeta.state +import esmeta.{NOT_SUPPORTED_FEATURES} import esmeta.cfg.* import esmeta.error.* import esmeta.ir.{Func => IRFunc, *} @@ -16,14 +17,15 @@ case class Heap( /** getters */ def apply(addr: Addr): Obj = map.getOrElse(addr, throw UnknownAddr(addr)) match - case YetObj(_, msg) => throw NotSupported(msg) - case obj => obj + case YetObj(_, msg) => + throw NotSupported(List(NOT_SUPPORTED_FEATURES, msg)) + case obj => obj def apply(addr: Addr, key: PureValue): Value = apply(addr) match case _ if addr == NamedAddr(INTRINSICS) => Heap.getIntrinsics(key) case (s: SymbolObj) => s(key) case (m: MapObj) => m(key) case (l: ListObj) => l(key) - case YetObj(_, msg) => throw NotSupported(msg) + case YetObj(_, msg) => throw NotSupported(List(NOT_SUPPORTED_FEATURES, msg)) /** setters */ def update(addr: Addr, prop: PureValue, value: Value): this.type = diff --git a/src/main/scala/esmeta/test262/util/TestFilter.scala b/src/main/scala/esmeta/test262/util/TestFilter.scala index 61da24c93a..7c27f39f1f 100644 --- a/src/main/scala/esmeta/test262/util/TestFilter.scala +++ b/src/main/scala/esmeta/test262/util/TestFilter.scala @@ -41,7 +41,7 @@ case class TestFilter(spec: Spec) { test.relName.startsWith("annex") || test.relName.contains("__proto__"), ), - "not-supported-features" -> ((test: Test) => + NOT_SUPPORTED_FEATURES -> ((test: Test) => test.features.find(!features.contains(_)), ), "non-strict" -> ((test: Test) => From f0d4ce6d24b2d050119edc07fb073f4f3cebeeaa Mon Sep 17 00:00:00 2001 From: Doehyun Baek Date: Tue, 13 Dec 2022 14:22:04 +0900 Subject: [PATCH 5/7] Update supported-features.json They were not supported but included in supported-features.json. --- .../default/test262/supported-features.json | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/src/main/resources/manuals/default/test262/supported-features.json b/src/main/resources/manuals/default/test262/supported-features.json index 90b816c10a..c78f19d93b 100644 --- a/src/main/resources/manuals/default/test262/supported-features.json +++ b/src/main/resources/manuals/default/test262/supported-features.json @@ -4,23 +4,7 @@ "Array.prototype.flat", "Array.prototype.flatMap", "Array.prototype.values", - "ArrayBuffer", - "Atomics", "BigInt", - "DataView", - "DataView.prototype.getFloat32", - "DataView.prototype.getFloat64", - "DataView.prototype.getInt16", - "DataView.prototype.getInt32", - "DataView.prototype.getInt8", - "DataView.prototype.getUint16", - "DataView.prototype.getUint32", - "DataView.prototype.setUint8", - "Float32Array", - "Float64Array", - "Int16Array", - "Int32Array", - "Int8Array", "Map", "Object.fromEntries", "Object.hasOwn", @@ -29,13 +13,7 @@ "Promise.allSettled", "Promise.any", "Promise.prototype.finally", - "Proxy", - "Reflect", - "Reflect.construct", - "Reflect.set", - "Reflect.setPrototypeOf", "Set", - "SharedArrayBuffer", "String.fromCodePoint", "String.prototype.at", "String.prototype.endsWith", @@ -59,12 +37,6 @@ "Symbol.toPrimitive", "Symbol.toStringTag", "Symbol.unscopables", - "TypedArray", - "TypedArray.prototype.at", - "Uint16Array", - "Uint32Array", - "Uint8Array", - "Uint8ClampedArray", "WeakMap", "WeakSet", "align-detached-buffer-semantics-with-web-reality", @@ -106,10 +78,6 @@ "optional-catch-binding", "optional-chaining", "proxy-missing-checks", - "regexp-dotall", - "regexp-lookbehind", - "regexp-named-groups", - "regexp-unicode-property-escapes", "rest-parameters", "string-trimming", "super", From 1d467c1c12d90bd18c7dd2fd4a2024122fba9a1d Mon Sep 17 00:00:00 2001 From: jhnaldo Date: Tue, 13 Dec 2022 16:40:31 +0900 Subject: [PATCH 6/7] Intro enum for categories of not supported reasons --- .../{filtered.json => categorized.json} | 117 +++++++++--------- src/main/scala/esmeta/analyzer/package.scala | 1 + .../scala/esmeta/error/NotSupported.scala | 23 +++- .../esmeta/interpreter/Interpreter.scala | 19 +-- src/main/scala/esmeta/package.scala | 3 - src/main/scala/esmeta/state/Heap.scala | 10 +- .../esmeta/test262/util/ManualConfig.scala | 2 +- .../esmeta/test262/util/TestFilter.scala | 52 ++++---- 8 files changed, 124 insertions(+), 103 deletions(-) rename src/main/resources/manuals/default/test262/{filtered.json => categorized.json} (98%) diff --git a/src/main/resources/manuals/default/test262/filtered.json b/src/main/resources/manuals/default/test262/categorized.json similarity index 98% rename from src/main/resources/manuals/default/test262/filtered.json rename to src/main/resources/manuals/default/test262/categorized.json index f8abf11f5a..6d8b29f17c 100644 --- a/src/main/resources/manuals/default/test262/filtered.json +++ b/src/main/resources/manuals/default/test262/categorized.json @@ -1,5 +1,5 @@ { - "negative-errors": [ + "negative": [ "built-ins/AsyncGeneratorFunction/instance-await-expr-in-param", "built-ins/AsyncGeneratorFunction/instance-yield-expr-in-param", "built-ins/Function/StrictFunction_reservedwords_with", @@ -181,65 +181,6 @@ "language/statements/with/12.10.1-16-s", "language/statements/with/12.10.1-7-s" ], - "long-tests": [ - "built-ins/Array/length/S15.4.5.2_A3_T4", - "built-ins/Array/prototype/Symbol.unscopables/value", - "built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-sparse-object", - "built-ins/Array/prototype/every/15.4.4.16-7-c-ii-2", - "built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-1", - "built-ins/Array/prototype/flatMap/array-like-objects", - "built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-1", - "built-ins/Array/prototype/indexOf/15.4.4.14-10-1", - "built-ins/Array/prototype/lastIndexOf/15.4.4.15-9-1", - "built-ins/Array/prototype/map/15.4.4.19-8-c-ii-1", - "built-ins/Array/prototype/some/15.4.4.17-7-c-ii-2", - "built-ins/RegExp/S15.10.2.8_A3_T15", - "built-ins/RegExp/S15.10.2.8_A3_T16", - "built-ins/RegExp/property-escapes/generated/Changes_When_NFKC_Casefolded", - "built-ins/RegExp/property-escapes/generated/General_Category_-_Letter", - "built-ins/RegExp/property-escapes/generated/General_Category_-_Other", - "built-ins/RegExp/property-escapes/generated/General_Category_-_Unassigned", - "built-ins/RegExp/property-escapes/generated/ID_Continue", - "built-ins/RegExp/property-escapes/generated/ID_Start", - "language/expressions/call/tco-call-args", - "language/expressions/call/tco-member-args", - "language/expressions/class/async-gen-method-static/yield-star-async-throw", - "language/expressions/coalesce/tco-pos-null", - "language/expressions/coalesce/tco-pos-undefined", - "language/expressions/comma/tco-final", - "language/expressions/conditional/tco-cond", - "language/expressions/conditional/tco-pos", - "language/expressions/logical-and/tco-right", - "language/expressions/logical-or/tco-right", - "language/expressions/tco-pos", - "language/reserved-words/ident-name-keyword-accessor", - "language/reserved-words/ident-name-keyword-prop-name", - "language/statements/block/tco-stmt", - "language/statements/block/tco-stmt-list", - "language/statements/do-while/tco-body", - "language/statements/for/tco-const-body", - "language/statements/for/tco-let-body", - "language/statements/for/tco-lhs-body", - "language/statements/for/tco-var-body", - "language/statements/function/S13.2.1_A1_T1", - "language/statements/if/tco-else-body", - "language/statements/if/tco-if-body", - "language/statements/labeled/tco", - "language/statements/return/tco", - "language/statements/switch/tco-case-body", - "language/statements/switch/tco-case-body-dflt", - "language/statements/switch/tco-dftl-body", - "language/statements/try/tco-catch", - "language/statements/try/tco-catch-finally", - "language/statements/try/tco-finally", - "language/statements/while/tco-body", - "language/types/number/8.5.1" - ], - "non-tests": [ - "built-ins/ShadowRealm/prototype/importValue/import-value_FIXTURE", - "built-ins/ShadowRealm/prototype/importValue/import-value_syntax_error_FIXTURE", - "built-ins/ShadowRealm/prototype/importValue/import-value_throws_FIXTURE" - ], "non-strict": [ "built-ins/Function/S15.3.2.1_A3_T8", "built-ins/Function/S15.3.5_A2_T1", @@ -300,7 +241,61 @@ "language/statements/variable/12.2.1-17-s", "language/statements/variable/12.2.1-21-s" ], - "wrong-tests": [ + "long": [ + "built-ins/Array/length/S15.4.5.2_A3_T4", + "built-ins/Array/prototype/Symbol.unscopables/value", + "built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-sparse-object", + "built-ins/Array/prototype/every/15.4.4.16-7-c-ii-2", + "built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-1", + "built-ins/Array/prototype/flatMap/array-like-objects", + "built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-1", + "built-ins/Array/prototype/indexOf/15.4.4.14-10-1", + "built-ins/Array/prototype/lastIndexOf/15.4.4.15-9-1", + "built-ins/Array/prototype/map/15.4.4.19-8-c-ii-1", + "built-ins/Array/prototype/some/15.4.4.17-7-c-ii-2", + "built-ins/RegExp/S15.10.2.8_A3_T15", + "built-ins/RegExp/S15.10.2.8_A3_T16", + "built-ins/RegExp/property-escapes/generated/Changes_When_NFKC_Casefolded", + "built-ins/RegExp/property-escapes/generated/General_Category_-_Letter", + "built-ins/RegExp/property-escapes/generated/General_Category_-_Other", + "built-ins/RegExp/property-escapes/generated/General_Category_-_Unassigned", + "built-ins/RegExp/property-escapes/generated/ID_Continue", + "built-ins/RegExp/property-escapes/generated/ID_Start", + "language/expressions/call/tco-call-args", + "language/expressions/call/tco-member-args", + "language/expressions/class/async-gen-method-static/yield-star-async-throw", + "language/expressions/coalesce/tco-pos-null", + "language/expressions/coalesce/tco-pos-undefined", + "language/expressions/comma/tco-final", + "language/expressions/conditional/tco-cond", + "language/expressions/conditional/tco-pos", + "language/expressions/logical-and/tco-right", + "language/expressions/logical-or/tco-right", + "language/expressions/tco-pos", + "language/reserved-words/ident-name-keyword-accessor", + "language/reserved-words/ident-name-keyword-prop-name", + "language/statements/block/tco-stmt", + "language/statements/block/tco-stmt-list", + "language/statements/do-while/tco-body", + "language/statements/for/tco-const-body", + "language/statements/for/tco-let-body", + "language/statements/for/tco-lhs-body", + "language/statements/for/tco-var-body", + "language/statements/function/S13.2.1_A1_T1", + "language/statements/if/tco-else-body", + "language/statements/if/tco-if-body", + "language/statements/labeled/tco", + "language/statements/return/tco", + "language/statements/switch/tco-case-body", + "language/statements/switch/tco-case-body-dflt", + "language/statements/switch/tco-dftl-body", + "language/statements/try/tco-catch", + "language/statements/try/tco-catch-finally", + "language/statements/try/tco-finally", + "language/statements/while/tco-body", + "language/types/number/8.5.1" + ], + "wrong": [ "built-ins/AsyncGeneratorPrototype/return/return-state-completed-broken-promise", "built-ins/AsyncGeneratorPrototype/return/return-suspendedStart-broken-promise" ] diff --git a/src/main/scala/esmeta/analyzer/package.scala b/src/main/scala/esmeta/analyzer/package.scala index 9a1e4f1910..22c6b4c39a 100644 --- a/src/main/scala/esmeta/analyzer/package.scala +++ b/src/main/scala/esmeta/analyzer/package.scala @@ -4,6 +4,7 @@ import esmeta.analyzer.domain.* import esmeta.analyzer.util.* import esmeta.cfg.{CFG, Node} import esmeta.error.* +import esmeta.error.NotSupported.given import esmeta.es.Initialize import esmeta.ir.* import esmeta.state.* diff --git a/src/main/scala/esmeta/error/NotSupported.scala b/src/main/scala/esmeta/error/NotSupported.scala index bc12223de2..e4a9e04858 100644 --- a/src/main/scala/esmeta/error/NotSupported.scala +++ b/src/main/scala/esmeta/error/NotSupported.scala @@ -6,4 +6,25 @@ case class NotSupported(reasonPath: NotSupported.ReasonPath) object NotSupported: type Reason = String type ReasonPath = List[Reason] - def apply(reason: Reason): NotSupported = NotSupported(List(reason)) + def unapply(ns: NotSupported): Option[ReasonPath] = Some(ns.reasonPath) + def apply(category: Category)(reasonPath: ReasonPath): NotSupported = + NotSupported(category.name :: reasonPath) + + /** implicit conversion from reasons to reason paths */ + given Conversion[Reason, ReasonPath] = List(_) + + /** constants for categories of not supported features */ + enum Category(val name: String) { + case Harness extends Category("harness") + case Internationalisation extends Category("internationalisation") + case Annex extends Category("annex") + case Negative extends Category("negative") + case NonStrict extends Category("non-strict") + case Module extends Category("module") + case Fixture extends Category("fixture") + case Feature extends Category("feature") + case Metalanguage extends Category("metalanguage") + case Long extends Category("long") + case Wrong extends Category("wrong") + case YetCategorized extends Category("yet-categorized") + } diff --git a/src/main/scala/esmeta/interpreter/Interpreter.scala b/src/main/scala/esmeta/interpreter/Interpreter.scala index 43d1500e42..db50548f2e 100644 --- a/src/main/scala/esmeta/interpreter/Interpreter.scala +++ b/src/main/scala/esmeta/interpreter/Interpreter.scala @@ -1,9 +1,11 @@ package esmeta.interpreter -import esmeta.{EVAL_LOG_DIR, LINE_SEP, NOT_SUPPORTED_FEATURES} +import esmeta.{EVAL_LOG_DIR, LINE_SEP} import esmeta.analyzer.* import esmeta.cfg.* import esmeta.error.* +import esmeta.error.NotSupported.{*, given} +import esmeta.error.NotSupported.Category.* import esmeta.ir.{Func => IRFunc, *} import esmeta.es.* import esmeta.parser.{ESParser, ESValueParser} @@ -245,7 +247,7 @@ class Interpreter( case v => throw NoNt(nt, v) st.allocList(eval(ast).asAst.getItems(name).map(AstValue(_))) case EYet(msg) => - throw NotSupported(List("metalanguage", msg)) + throw NotSupported(Metalanguage)(List(msg)) case EContains(list, elem, field) => val l = eval(list).getList(list, st) val e = eval(elem) @@ -666,7 +668,7 @@ object Interpreter { Str(ESValueParser.parseTRVTemplateTail(str)) case (_, "Contains") => Bool(false) case ("RegularExpressionLiteral", name) => - throw NotSupported(List(NOT_SUPPORTED_FEATURES, "RegExp", sdoName)) + throw NotSupported(Feature)(List("RegExp")) case _ => throw InvalidAstProp(lex, Str(sdoName)) } @@ -810,10 +812,13 @@ object Interpreter { case (MOp.Sinh, List(Math(x))) => Math(sinh(x.toDouble)) case (MOp.Tanh, List(Math(x))) => Math(tanh(x.toDouble)) case (MOp.Acos, List(Math(x))) => Math(acos(x.toDouble)) - case (MOp.Acosh, List(Math(x))) => throw NotSupported("acosh") - case (MOp.Asinh, List(Math(x))) => throw NotSupported("asinh") - case (MOp.Atanh, List(Math(x))) => throw NotSupported("atanh") - case (MOp.Asin, List(Math(x))) => Math(asin(x.toDouble)) + case (MOp.Acosh, List(Math(x))) => + throw NotSupported(Metalanguage)("acosh") + case (MOp.Asinh, List(Math(x))) => + throw NotSupported(Metalanguage)("asinh") + case (MOp.Atanh, List(Math(x))) => + throw NotSupported(Metalanguage)("atanh") + case (MOp.Asin, List(Math(x))) => Math(asin(x.toDouble)) case (MOp.Atan2, List(Math(x), Math(y))) => Math(atan2(x.toDouble, y.toDouble)) case (MOp.Atan, List(Math(x))) => Math(atan(x.toDouble)) diff --git a/src/main/scala/esmeta/package.scala b/src/main/scala/esmeta/package.scala index b5e5519b6c..05884f23c8 100644 --- a/src/main/scala/esmeta/package.scala +++ b/src/main/scala/esmeta/package.scala @@ -59,9 +59,6 @@ var STATUS_MODE = false var TEST262_DIR = s"$TEST_DIR/test262" def TEST262_TEST_DIR = s"$TEST262_DIR/test" -/** constant string for not supported features */ -val NOT_SUPPORTED_FEATURES = "not-supported-features" - // ----------------------------------------------------------------------------- // Mutable Global Options // ----------------------------------------------------------------------------- diff --git a/src/main/scala/esmeta/state/Heap.scala b/src/main/scala/esmeta/state/Heap.scala index 23cd7dcaed..f8eeaa8771 100644 --- a/src/main/scala/esmeta/state/Heap.scala +++ b/src/main/scala/esmeta/state/Heap.scala @@ -1,8 +1,9 @@ package esmeta.state -import esmeta.{NOT_SUPPORTED_FEATURES} import esmeta.cfg.* import esmeta.error.* +import esmeta.error.NotSupported.{*, given} +import esmeta.error.NotSupported.Category.* import esmeta.ir.{Func => IRFunc, *} import esmeta.es.builtin.* import esmeta.util.BaseUtils.* @@ -17,15 +18,14 @@ case class Heap( /** getters */ def apply(addr: Addr): Obj = map.getOrElse(addr, throw UnknownAddr(addr)) match - case YetObj(_, msg) => - throw NotSupported(List(NOT_SUPPORTED_FEATURES, msg)) - case obj => obj + case YetObj(_, msg) => throw NotSupported(Feature)(msg) + case obj => obj def apply(addr: Addr, key: PureValue): Value = apply(addr) match case _ if addr == NamedAddr(INTRINSICS) => Heap.getIntrinsics(key) case (s: SymbolObj) => s(key) case (m: MapObj) => m(key) case (l: ListObj) => l(key) - case YetObj(_, msg) => throw NotSupported(List(NOT_SUPPORTED_FEATURES, msg)) + case YetObj(_, msg) => throw NotSupported(Feature)(msg) /** setters */ def update(addr: Addr, prop: PureValue, value: Value): this.type = diff --git a/src/main/scala/esmeta/test262/util/ManualConfig.scala b/src/main/scala/esmeta/test262/util/ManualConfig.scala index 3af5a2b129..697e3d2a29 100644 --- a/src/main/scala/esmeta/test262/util/ManualConfig.scala +++ b/src/main/scala/esmeta/test262/util/ManualConfig.scala @@ -18,7 +18,7 @@ object ManualConfig { if jsonFilter(file.getName) } yield file.getName -> file.toString).toMap val filtered = fileMap - .get("filtered.json") + .get("categorized.json") .fold(Map())(readJson[Map[String, List[String]]]) val yetCategorized = fileMap .get("yet-categorized.json") diff --git a/src/main/scala/esmeta/test262/util/TestFilter.scala b/src/main/scala/esmeta/test262/util/TestFilter.scala index 7c27f39f1f..8346e97d3b 100644 --- a/src/main/scala/esmeta/test262/util/TestFilter.scala +++ b/src/main/scala/esmeta/test262/util/TestFilter.scala @@ -1,11 +1,11 @@ package esmeta.test262.util -import esmeta.* import esmeta.spec.Spec import esmeta.util.* import esmeta.util.BaseUtils.* import esmeta.util.SystemUtils.* import esmeta.error.NotSupported.* +import esmeta.error.NotSupported.Category.* import esmeta.test262.{*, given} import io.circe.*, io.circe.syntax.* import java.io.* @@ -35,54 +35,56 @@ case class TestFilter(spec: Spec) { withYet: Boolean, features: Set[String], ): List[Test => Option[ReasonPath]] = List( - "harness" -> ((test: Test) => test.relName.startsWith("harness")), - "internationalisation" -> ((test: Test) => test.relName.startsWith("intl")), - "annex" -> ((test: Test) => + // harness files + Harness -> ((test: Test) => test.relName.startsWith("harness")), + // tests for internationalisation + Internationalisation -> ((test: Test) => test.relName.startsWith("intl")), + // tests for appendices, including web browsers + Annex -> ((test: Test) => test.relName.startsWith("annex") || test.relName.contains("__proto__"), ), - NOT_SUPPORTED_FEATURES -> ((test: Test) => - test.features.find(!features.contains(_)), - ), - "non-strict" -> ((test: Test) => + // tests for negative result, including parsing errors + Negative -> ((test: Test) => test.negative.isDefined), + // tests for non-strict mode + NonStrict -> ((test: Test) => test.flags.contains("noStrict") || test.flags.contains("raw"), ), - "module" -> ((test: Test) => + // tests for modules + Module -> ((test: Test) => test.flags.contains("module") || test.relName.startsWith("language/module-code/") || test.relName.startsWith("language/import/") || test.relName.startsWith("language/expressions/dynamic-import/") || test.relName.startsWith("language/expressions/import.meta/"), ), - "negative-errors" -> ((test: Test) => test.negative.isDefined), - "inessential-builtin-objects" -> ((test: Test) => - test.flags.contains("CanBlockIsFalse") || - test.flags.contains("CanBlockIsTrue") || - !test.locales.isEmpty, - ), - // manually filter tests - test => manualFilterMap.get(removedExt(test.relName)), - // manually filter not yet categorized tests - "not-yet-categorized" -> ((test: Test) => + // fixtures + Fixture -> ((test: Test) => removedExt(test.relName).endsWith("_FIXTURE")), + // tests for language features not supported in ESMeta + Feature -> ((test: Test) => test.features.find(!features.contains(_))), + // manually filtered tests not yet categorized based on failure reasons + YetCategorized -> ((test: Test) => !withYet && manualYetCategorized.contains(removedExt(test.relName)), ), + // manually filtered tests categorized based on failure reasons + test => manualFilterMap.get(removedExt(test.relName)), ) given liftBool: Conversion[ - (String, Test => Boolean), + (Category, Test => Boolean), Test => Option[ReasonPath], ] = pair => - val (name, filter) = pair - val lifted = (x: Test) => if (filter(x)) Some(List(name)) else None + val (category, filter) = pair + val lifted = (x: Test) => if (filter(x)) Some(List(category.name)) else None lifted given liftReason: Conversion[ - (String, Test => Option[Reason]), + (Category, Test => Option[Reason]), Test => Option[ReasonPath], ] = pair => - val (name, filter) = pair - test => filter(test).map(List(name, _)) + val (category, filter) = pair + test => filter(test).map(List(category.name, _)) lazy val manualConfig = spec.manualInfo.test262 From 87f4342c20fb99b463b71a84353f95913b0a49f4 Mon Sep 17 00:00:00 2001 From: Doehyun Baek Date: Tue, 13 Dec 2022 22:04:50 +0900 Subject: [PATCH 7/7] Delte unnecessary unapply --- src/main/scala/esmeta/error/NotSupported.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/scala/esmeta/error/NotSupported.scala b/src/main/scala/esmeta/error/NotSupported.scala index e4a9e04858..61db1cee60 100644 --- a/src/main/scala/esmeta/error/NotSupported.scala +++ b/src/main/scala/esmeta/error/NotSupported.scala @@ -6,7 +6,6 @@ case class NotSupported(reasonPath: NotSupported.ReasonPath) object NotSupported: type Reason = String type ReasonPath = List[Reason] - def unapply(ns: NotSupported): Option[ReasonPath] = Some(ns.reasonPath) def apply(category: Category)(reasonPath: ReasonPath): NotSupported = NotSupported(category.name :: reasonPath)