From 76c61245a178008d35e09314540e3b13f59e6f1d Mon Sep 17 00:00:00 2001 From: Ronald Brill Date: Tue, 30 May 2023 16:41:50 +0200 Subject: [PATCH] remove default parameter from compareArray.js --- .../javascript/tests/Test262SuiteTest.java | 13 ++- testsrc/test262.properties | 80 ++----------------- 2 files changed, 19 insertions(+), 74 deletions(-) diff --git a/testsrc/org/mozilla/javascript/tests/Test262SuiteTest.java b/testsrc/org/mozilla/javascript/tests/Test262SuiteTest.java index 73bac4bc8c..f333f86195 100644 --- a/testsrc/org/mozilla/javascript/tests/Test262SuiteTest.java +++ b/testsrc/org/mozilla/javascript/tests/Test262SuiteTest.java @@ -41,6 +41,7 @@ import org.junit.runners.Parameterized.Parameters; import org.mozilla.javascript.Context; import org.mozilla.javascript.EvaluatorException; +import org.mozilla.javascript.Kit; import org.mozilla.javascript.RhinoException; import org.mozilla.javascript.Script; import org.mozilla.javascript.Scriptable; @@ -517,9 +518,19 @@ private Scriptable buildScope(Context cx) throws IOException { if (!HARNESS_SCRIPT_CACHE.get(optLevel).containsKey(harnessFile)) { String harnessPath = testHarnessDir + harnessFile; try (Reader reader = new FileReader(harnessPath)) { + String script = Kit.readReader(reader); + + // fix for missing features in Rhino + if ("compareArray.js".equalsIgnoreCase(harnessFile)) { + script = + script.replace( + "assert.compareArray = function(actual, expected, message = '')", + "assert.compareArray = function(actual, expected, message)"); + } + HARNESS_SCRIPT_CACHE .get(optLevel) - .put(harnessFile, cx.compileReader(reader, harnessPath, 1, null)); + .put(harnessFile, cx.compileString(script, harnessPath, 1, null)); } } HARNESS_SCRIPT_CACHE.get(optLevel).get(harnessFile).exec(cx, scope); diff --git a/testsrc/test262.properties b/testsrc/test262.properties index 6aefded231..bd416dff50 100644 --- a/testsrc/test262.properties +++ b/testsrc/test262.properties @@ -1,6 +1,6 @@ # This is a configuration file for Test262SuiteTest.java. See ./README.md for more info about this file -built-ins/Array 238/2670 (8.91%) +built-ins/Array 200/2670 (7.49%) from/calling-from-valid-1-noStrict.js non-strict Spec pretty clearly says this should be undefined from/elements-deleted-after.js Checking to see if length changed, but spec says it should not from/iter-map-fn-this-non-strict.js non-strict Error propagation needs work in general @@ -23,23 +23,9 @@ built-ins/Array 238/2670 (8.91%) of/return-abrupt-from-data-property.js Object.preventExtensions doesn't seem to throw of/return-abrupt-from-data-property-using-proxy.js {unsupported: [Proxy]} prototype/concat/arg-length-exceeding-integer-limit.js {unsupported: [Proxy]} - prototype/concat/Array.prototype.concat_array-like.js - prototype/concat/Array.prototype.concat_array-like-negative-length.js - prototype/concat/Array.prototype.concat_array-like-primitive-non-number-length.js - prototype/concat/Array.prototype.concat_array-like-string-length.js - prototype/concat/Array.prototype.concat_holey-sloppy-arguments.js prototype/concat/Array.prototype.concat_large-typed-array.js new prototype/concat/Array.prototype.concat_non-array.js - prototype/concat/Array.prototype.concat_sloppy-arguments.js - prototype/concat/Array.prototype.concat_sloppy-arguments-with-dupes.js non-strict prototype/concat/Array.prototype.concat_small-typed-array.js - prototype/concat/Array.prototype.concat_spreadable-boolean-wrapper.js - prototype/concat/Array.prototype.concat_spreadable-function.js - prototype/concat/Array.prototype.concat_spreadable-number-wrapper.js - prototype/concat/Array.prototype.concat_spreadable-reg-exp.js - prototype/concat/Array.prototype.concat_spreadable-sparse-object.js - prototype/concat/Array.prototype.concat_spreadable-string-wrapper.js - prototype/concat/Array.prototype.concat_strict-arguments.js prototype/concat/create-ctor-non-object.js prototype/concat/create-ctor-poisoned.js prototype/concat/create-proto-from-ctor-realm-array.js {unsupported: [Symbol.species]} @@ -62,31 +48,12 @@ built-ins/Array 238/2670 (8.91%) prototype/concat/is-concat-spreadable-is-array-proxy-revoked.js {unsupported: [Proxy]} prototype/concat/is-concat-spreadable-proxy.js {unsupported: [Proxy]} prototype/concat/is-concat-spreadable-proxy-revoked.js {unsupported: [Proxy]} - prototype/copyWithin/coerced-values-end.js - prototype/copyWithin/coerced-values-start.js prototype/copyWithin/coerced-values-start-change-start.js prototype/copyWithin/coerced-values-start-change-target.js - prototype/copyWithin/coerced-values-target.js - prototype/copyWithin/negative-end.js - prototype/copyWithin/negative-out-of-bounds-end.js - prototype/copyWithin/negative-out-of-bounds-start.js - prototype/copyWithin/negative-out-of-bounds-target.js - prototype/copyWithin/negative-start.js - prototype/copyWithin/negative-target.js - prototype/copyWithin/non-negative-out-of-bounds-end.js - prototype/copyWithin/non-negative-out-of-bounds-target-and-start.js - prototype/copyWithin/non-negative-target-and-start.js - prototype/copyWithin/non-negative-target-start-and-end.js prototype/copyWithin/return-abrupt-from-delete-proxy-target.js {unsupported: [Proxy]} prototype/copyWithin/return-abrupt-from-delete-target.js non-strict Not throwing properly on unwritable prototype/copyWithin/return-abrupt-from-has-start.js {unsupported: [Proxy]} - prototype/copyWithin/undefined-end.js prototype/every/15.4.4.16-5-1-s.js non-strict - prototype/fill/coerced-indexes.js - prototype/fill/fill-values.js - prototype/fill/fill-values-custom-start-and-end.js - prototype/fill/fill-values-relative-end.js - prototype/fill/fill-values-relative-start.js prototype/filter/15.4.4.20-5-1-s.js non-strict prototype/filter/create-ctor-non-object.js prototype/filter/create-ctor-poisoned.js @@ -136,7 +103,6 @@ built-ins/Array 238/2670 (8.91%) prototype/push/throws-if-integer-limit-exceeded.js incorrect length handling prototype/push/throws-with-string-receiver.js prototype/reduceRight/15.4.4.22-9-c-ii-4-s.js non-strict - prototype/reduceRight/length-near-integer-limit.js prototype/reduce/15.4.4.21-9-c-ii-4-s.js non-strict prototype/reverse/length-exceeding-integer-limit-with-proxy.js prototype/shift/throws-when-this-value-length-is-writable-false.js @@ -154,7 +120,6 @@ built-ins/Array 238/2670 (8.91%) prototype/slice/create-species-null.js {unsupported: [Symbol.species]} prototype/slice/create-species-poisoned.js {unsupported: [Symbol.species]} prototype/slice/create-species-undef.js {unsupported: [Symbol.species]} - prototype/slice/length-exceeding-integer-limit.js prototype/slice/length-exceeding-integer-limit-proxied-array.js prototype/slice/target-array-non-extensible.js {unsupported: [Symbol.species]} prototype/slice/target-array-with-non-configurable-property.js {unsupported: [Symbol.species]} @@ -179,9 +144,6 @@ built-ins/Array 238/2670 (8.91%) prototype/splice/create-species-poisoned.js {unsupported: [Symbol.species]} prototype/splice/create-species-undef.js {unsupported: [Symbol.species]} prototype/splice/create-species-undef-invalid-len.js {unsupported: [Proxy]} - prototype/splice/length-and-deleteCount-exceeding-integer-limit.js - prototype/splice/length-exceeding-integer-limit-shrink-array.js - prototype/splice/length-near-integer-limit-grow-array.js prototype/splice/property-traps-order-with-species.js {unsupported: [Proxy, Symbol.species]} prototype/splice/S15.4.4.12_A6.1_T2.js incorrect length handling prototype/splice/S15.4.4.12_A6.1_T3.js non-strict @@ -759,9 +721,8 @@ built-ins/JSON 36/140 (25.71%) stringify/value-string-escape-unicode.js Symbol.toStringTag.js -built-ins/Map 7/145 (4.83%) +built-ins/Map 6/145 (4.14%) Symbol.species 4/4 (100.0%) - iterable-calls-set.js iterator-is-undefined-throws.js proto-from-ctor-realm.js {unsupported: [Reflect]} @@ -800,7 +761,7 @@ built-ins/Number 9/283 (3.18%) S9.3.1_A3_T1_U180E.js {unsupported: [u180e]} S9.3.1_A3_T2_U180E.js {unsupported: [u180e]} -built-ins/Object 140/3150 (4.44%) +built-ins/Object 132/3150 (4.19%) assign/source-own-prop-desc-missing.js {unsupported: [Proxy]} assign/source-own-prop-error.js {unsupported: [Proxy]} assign/source-own-prop-keys-error.js {unsupported: [Proxy]} @@ -847,7 +808,6 @@ built-ins/Object 140/3150 (4.44%) defineProperty/15.2.3.6-4-336.js entries/observable-operations.js {unsupported: [Proxy]} entries/order-after-define-property.js - entries/return-order.js freeze/abrupt-completion.js {unsupported: [Proxy]} freeze/proxy-no-ownkeys-returned-keys-order.js {unsupported: [Proxy, Reflect]} freeze/throws-when-false.js @@ -861,7 +821,6 @@ built-ins/Object 140/3150 (4.44%) fromEntries/iterator-not-closed-for-throwing-done-accessor.js fromEntries/iterator-not-closed-for-throwing-next.js fromEntries/iterator-not-closed-for-uncallable-next.js - fromEntries/key-order.js fromEntries/to-property-key.js fromEntries/uses-keys-not-iterator.js getOwnPropertyDescriptors/observable-operations.js {unsupported: [Proxy]} @@ -874,15 +833,11 @@ built-ins/Object 140/3150 (4.44%) getOwnPropertyDescriptor/15.2.3.3-4-215.js getOwnPropertyDescriptor/15.2.3.3-4-249.js getOwnPropertyDescriptor/15.2.3.3-4-250.js - getOwnPropertyNames/15.2.3.4-4-44.js - getOwnPropertyNames/15.2.3.4-4-49.js - getOwnPropertyNames/15.2.3.4-4-b-2.js getOwnPropertyNames/order-after-define-property.js getOwnPropertyNames/proxy-invariant-absent-not-configurable-symbol-key.js {unsupported: [Proxy]} getOwnPropertyNames/proxy-invariant-duplicate-symbol-entry.js {unsupported: [Proxy]} getOwnPropertyNames/proxy-invariant-not-extensible-absent-symbol-key.js {unsupported: [Proxy]} getOwnPropertyNames/proxy-invariant-not-extensible-extra-symbol-key.js {unsupported: [Proxy]} - getOwnPropertySymbols/order-after-define-property.js getOwnPropertySymbols/proxy-invariant-absent-not-configurable-string-key.js {unsupported: [Proxy]} getOwnPropertySymbols/proxy-invariant-duplicate-string-entry.js {unsupported: [Proxy]} getOwnPropertySymbols/proxy-invariant-not-extensible-absent-string-key.js {unsupported: [Proxy]} @@ -899,7 +854,6 @@ built-ins/Object 140/3150 (4.44%) keys/proxy-non-enumerable-prop-invariant-1.js {unsupported: [Proxy]} keys/proxy-non-enumerable-prop-invariant-2.js {unsupported: [Proxy]} keys/proxy-non-enumerable-prop-invariant-3.js {unsupported: [Proxy]} - keys/return-order.js preventExtensions/abrupt-completion.js {unsupported: [Proxy]} preventExtensions/throws-when-false.js prototype/hasOwnProperty/symbol_property_toPrimitive.js @@ -938,7 +892,6 @@ built-ins/Object 140/3150 (4.44%) setPrototypeOf/set-error.js {unsupported: [Proxy]} values/observable-operations.js {unsupported: [Proxy]} values/order-after-define-property.js - values/return-order.js proto-from-ctor-realm.js {unsupported: [Reflect]} subclass-object-arg.js {unsupported: [Reflect.construct, Reflect, class]} @@ -1602,7 +1555,7 @@ built-ins/SetIteratorPrototype 0/11 (0.0%) ~built-ins/SharedArrayBuffer -built-ins/String 121/1114 (10.86%) +built-ins/String 120/1114 (10.77%) prototype/endsWith/return-abrupt-from-searchstring-regexp-test.js prototype/includes/return-abrupt-from-searchstring-regexp-test.js prototype/indexOf/position-tointeger-bigint.js {unsupported: [computed-property-names]} @@ -1627,7 +1580,6 @@ built-ins/String 121/1114 (10.86%) prototype/search/invoke-builtin-search-searcher-undef.js prototype/split/cstm-split-get-err.js prototype/split/cstm-split-invocation.js - prototype/split/cstm-split-is-null.js prototype/split/limit-touint32-error.js prototype/split/separator-tostring-error.js prototype/split/this-value-tostring-error.js @@ -1706,7 +1658,7 @@ built-ins/ThrowTypeError 7/13 (53.85%) unique-per-realm-non-simple.js unique-per-realm-unmapped-args.js -built-ins/TypedArray 1005/1070 (93.93%) +built-ins/TypedArray 992/1070 (92.71%) from/arylk-get-length-error.js from/arylk-to-length-error.js from/iter-access-error.js @@ -2094,7 +2046,6 @@ built-ins/TypedArray 1005/1070 (93.93%) prototype/reverse 12/12 (100.0%) prototype/set/BigInt 48/48 (100.0%) prototype/set/array-arg-negative-integer-offset-throws.js - prototype/set/array-arg-offset-tointeger.js prototype/set/array-arg-primitive-toobject.js prototype/set/array-arg-return-abrupt-from-src-get-length.js prototype/set/array-arg-return-abrupt-from-src-get-value.js @@ -2106,13 +2057,11 @@ built-ins/TypedArray 1005/1070 (93.93%) prototype/set/array-arg-set-values.js prototype/set/array-arg-set-values-in-order.js prototype/set/array-arg-src-tonumber-value-conversions.js - prototype/set/array-arg-src-tonumber-value-type-conversions.js prototype/set/array-arg-src-values-are-not-cached.js prototype/set/array-arg-target-arraylength-internal.js prototype/set/array-arg-targetbuffer-detached-on-get-src-value-throws.js prototype/set/array-arg-targetbuffer-detached-on-tointeger-offset-throws.js prototype/set/array-arg-targetbuffer-detached-throws.js - prototype/set/bit-precision.js prototype/set/invoked-as-func.js prototype/set/invoked-as-method.js prototype/set/length.js @@ -2122,14 +2071,10 @@ built-ins/TypedArray 1005/1070 (93.93%) prototype/set/this-is-not-object.js prototype/set/this-is-not-typedarray-instance.js prototype/set/typedarray-arg-negative-integer-offset-throws.js - prototype/set/typedarray-arg-offset-tointeger.js - prototype/set/typedarray-arg-set-values-diff-buffer-other-type.js prototype/set/typedarray-arg-set-values-diff-buffer-other-type-conversions-sab.js {unsupported: [SharedArrayBuffer]} prototype/set/typedarray-arg-set-values-diff-buffer-other-type-sab.js {unsupported: [SharedArrayBuffer]} - prototype/set/typedarray-arg-set-values-diff-buffer-same-type.js prototype/set/typedarray-arg-set-values-diff-buffer-same-type-sab.js {unsupported: [SharedArrayBuffer]} prototype/set/typedarray-arg-set-values-same-buffer-other-type.js - prototype/set/typedarray-arg-set-values-same-buffer-same-type.js prototype/set/typedarray-arg-set-values-same-buffer-same-type-sab.js {unsupported: [SharedArrayBuffer]} prototype/set/typedarray-arg-src-arraylength-internal.js prototype/set/typedarray-arg-src-byteoffset-internal.js @@ -2226,12 +2171,8 @@ built-ins/TypedArray 1005/1070 (93.93%) prototype/subarray/invoked-as-func.js prototype/subarray/invoked-as-method.js prototype/subarray/length.js - prototype/subarray/minus-zero.js prototype/subarray/name.js prototype/subarray/prop-desc.js - prototype/subarray/result-is-new-instance-from-same-ctor.js - prototype/subarray/result-is-new-instance-with-shared-buffer.js - prototype/subarray/results-with-different-length.js prototype/subarray/speciesctor-get-ctor.js prototype/subarray/speciesctor-get-ctor-abrupt.js prototype/subarray/speciesctor-get-ctor-inherited.js @@ -2246,8 +2187,6 @@ built-ins/TypedArray 1005/1070 (93.93%) prototype/subarray/speciesctor-get-species-use-default-ctor.js {unsupported: [Symbol.species]} prototype/subarray/this-is-not-object.js prototype/subarray/this-is-not-typedarray-instance.js - prototype/subarray/tointeger-begin.js - prototype/subarray/tointeger-end.js prototype/Symbol.toStringTag/BigInt 9/9 (100.0%) prototype/Symbol.toStringTag 9/9 (100.0%) prototype/toLocaleString/BigInt 13/13 (100.0%) @@ -2279,7 +2218,7 @@ built-ins/TypedArray 1005/1070 (93.93%) name.js prototype.js -built-ins/TypedArrayConstructors 530/684 (77.49%) +built-ins/TypedArrayConstructors 529/684 (77.34%) BigInt64Array/prototype 4/4 (100.0%) BigInt64Array 7/7 (100.0%) BigUint64Array/prototype 4/4 (100.0%) @@ -2336,7 +2275,6 @@ built-ins/TypedArrayConstructors 530/684 (77.49%) ctors/no-args/use-custom-proto-if-object.js {unsupported: [Reflect]} ctors/no-args/use-default-proto-if-custom-proto-is-not-object.js ctors/object-arg/as-generator-iterable-returns.js - ctors/object-arg/conversion-operation-consistent-nan.js ctors/object-arg/custom-proto-access-throws.js {unsupported: [Reflect]} ctors/object-arg/iterating-throws.js ctors/object-arg/iterator-is-null-as-array-like.js @@ -5752,7 +5690,7 @@ language/statements/for 263/384 (68.49%) tco-lhs-body.js {unsupported: [tail-call-optimization]} tco-var-body.js {unsupported: [tail-call-optimization]} -language/statements/for-in 43/114 (37.72%) +language/statements/for-in 39/114 (34.21%) dstr/obj-rest-not-last-element-invalid.js {unsupported: [object-rest]} 12.6.4-2.js cptn-decl-abrupt-empty.js @@ -5784,11 +5722,7 @@ language/statements/for-in 43/114 (37.72%) let-array-with-newline.js non-strict let-block-with-newline.js non-strict let-identifier-with-newline.js non-strict - order-after-define-property.js order-enumerable-shadowed.js - order-property-added.js - order-property-on-prototype.js - order-simple-object.js scope-body-lex-boundary.js scope-body-lex-close.js scope-body-lex-open.js