summaryrefslogtreecommitdiff
path: root/test/built-ins
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins')
-rw-r--r--test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-end.js24
-rw-r--r--test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-start.js32
-rw-r--r--test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-target.js32
-rw-r--r--test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-end.js32
-rw-r--r--test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-end.js40
-rw-r--r--test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-start.js32
-rw-r--r--test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-target.js16
-rw-r--r--test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-start.js24
-rw-r--r--test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-target.js12
-rw-r--r--test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-end.js16
-rw-r--r--test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-target-and-start.js28
-rw-r--r--test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-and-start.js16
-rw-r--r--test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-start-and-end.js20
-rw-r--r--test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-this.js2
-rw-r--r--test/built-ins/TypedArray/prototype/copyWithin/BigInt/undefined-end.js8
-rw-r--r--test/built-ins/TypedArray/prototype/entries/BigInt/iter-prototype.js2
-rw-r--r--test/built-ins/TypedArray/prototype/entries/BigInt/return-itor.js6
-rw-r--r--test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-with-thisarg.js8
-rw-r--r--test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-without-thisarg.js8
-rw-r--r--test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-no-interaction-over-non-integer.js6
-rw-r--r--test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-return-does-not-change-instance.js8
-rw-r--r--test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-set-value-during-interaction.js10
-rw-r--r--test/built-ins/TypedArray/prototype/every/BigInt/get-length-uses-internal-arraylength.js2
-rw-r--r--test/built-ins/TypedArray/prototype/every/BigInt/values-are-not-cached.js6
-rw-r--r--test/built-ins/TypedArray/prototype/fill/BigInt/coerced-indexes.js28
-rw-r--r--test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-once.js4
-rw-r--r--test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-custom-start-and-end.js10
-rw-r--r--test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-non-numeric.js22
-rw-r--r--test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-end.js8
-rw-r--r--test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-start.js8
-rw-r--r--test/built-ins/TypedArray/prototype/fill/BigInt/fill-values.js4
-rw-r--r--test/built-ins/TypedArray/prototype/fill/BigInt/get-length-ignores-length-prop.js2
-rw-r--r--test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end.js2
-rw-r--r--test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-set-value.js2
-rw-r--r--test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start.js2
-rw-r--r--test/built-ins/TypedArray/prototype/fill/BigInt/return-this.js4
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-with-thisarg.js8
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-without-thisarg.js8
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-no-iteration-over-non-integer.js6
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-return-does-not-change-instance.js8
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-set-value-during-iteration.js10
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/result-does-not-share-buffer.js2
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/result-full-callbackfn-returns-true.js2
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-abrupt.js2
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-inherited.js2
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-returns-throws.js2
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor.js2
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-invocation.js4
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js2
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor.js4
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/values-are-not-cached.js6
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/values-are-set.js8
-rw-r--r--test/built-ins/TypedArray/prototype/find/BigInt/get-length-ignores-length-prop.js4
-rw-r--r--test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-changes-value.js22
-rw-r--r--test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-parameters.js8
-rw-r--r--test/built-ins/TypedArray/prototype/find/BigInt/return-found-value-predicate-result-is-true.js18
-rw-r--r--test/built-ins/TypedArray/prototype/findIndex/BigInt/get-length-ignores-length-prop.js2
-rw-r--r--test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-changes-value.js16
-rw-r--r--test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-parameters.js8
-rw-r--r--test/built-ins/TypedArray/prototype/findIndex/BigInt/return-index-predicate-result-is-true.js4
-rw-r--r--test/built-ins/TypedArray/prototype/findIndex/BigInt/return-negative-one-if-predicate-returns-false-value.js2
-rw-r--r--test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-with-thisarg.js8
-rw-r--r--test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-without-thisarg.js8
-rw-r--r--test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-no-interaction-over-non-integer.js6
-rw-r--r--test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-return-does-not-change-instance.js8
-rw-r--r--test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-set-value-during-interaction.js10
-rw-r--r--test/built-ins/TypedArray/prototype/forEach/BigInt/values-are-not-cached.js6
-rw-r--r--test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-infinity.js6
-rw-r--r--test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-minus-zero.js8
-rw-r--r--test/built-ins/TypedArray/prototype/includes/BigInt/get-length-uses-internal-arraylength.js4
-rw-r--r--test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex-symbol.js4
-rw-r--r--test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex.js4
-rw-r--r--test/built-ins/TypedArray/prototype/includes/BigInt/search-found-returns-true.js20
-rw-r--r--test/built-ins/TypedArray/prototype/includes/BigInt/search-not-found-returns-false.js14
-rw-r--r--test/built-ins/TypedArray/prototype/includes/BigInt/tointeger-fromindex.js34
-rw-r--r--test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-infinity.js6
-rw-r--r--test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-minus-zero.js6
-rw-r--r--test/built-ins/TypedArray/prototype/indexOf/BigInt/get-length-uses-internal-arraylength.js4
-rw-r--r--test/built-ins/TypedArray/prototype/indexOf/BigInt/search-found-returns-index.js20
-rw-r--r--test/built-ins/TypedArray/prototype/indexOf/BigInt/search-not-found-returns-minus-one.js14
-rw-r--r--test/built-ins/TypedArray/prototype/indexOf/BigInt/tointeger-fromindex.js34
-rw-r--r--test/built-ins/TypedArray/prototype/join/BigInt/custom-separator-result-from-tostring-on-each-simple-value.js2
-rw-r--r--test/built-ins/TypedArray/prototype/join/BigInt/get-length-uses-internal-arraylength.js2
-rw-r--r--test/built-ins/TypedArray/prototype/join/BigInt/result-from-tostring-on-each-simple-value.js2
-rw-r--r--test/built-ins/TypedArray/prototype/keys/BigInt/iter-prototype.js2
-rw-r--r--test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-infinity.js6
-rw-r--r--test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-minus-zero.js6
-rw-r--r--test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/get-length-uses-internal-arraylength.js4
-rw-r--r--test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-found-returns-index.js46
-rw-r--r--test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-not-found-returns-minus-one.js22
-rw-r--r--test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/tointeger-fromindex.js34
-rw-r--r--test/built-ins/TypedArray/prototype/map/BigInt/arraylength-internal.js4
-rw-r--r--test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-with-thisarg.js10
-rw-r--r--test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-without-thisarg.js10
-rw-r--r--test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-detachbuffer.js2
-rw-r--r--test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-no-interaction-over-non-integer-properties.js8
-rw-r--r--test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-affects-returned-object.js10
-rw-r--r--test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-change-instance.js10
-rw-r--r--test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-copy-non-integer-properties.js4
-rw-r--r--test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-set-value-during-interaction.js12
-rw-r--r--test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-this.js4
-rw-r--r--test/built-ins/TypedArray/prototype/map/BigInt/values-are-not-cached.js8
-rw-r--r--test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-custom-accumulator.js8
-rw-r--r--test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-default-accumulator.js12
-rw-r--r--test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-no-iteration-over-non-integer-properties.js6
-rw-r--r--test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-return-does-not-change-instance.js8
-rw-r--r--test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-set-value-during-iteration.js10
-rw-r--r--test/built-ins/TypedArray/prototype/reduce/BigInt/get-length-uses-internal-arraylength.js2
-rw-r--r--test/built-ins/TypedArray/prototype/reduce/BigInt/result-is-last-callbackfn-return.js4
-rw-r--r--test/built-ins/TypedArray/prototype/reduce/BigInt/result-of-any-type.js2
-rw-r--r--test/built-ins/TypedArray/prototype/reduce/BigInt/return-first-value-without-callbackfn.js4
-rw-r--r--test/built-ins/TypedArray/prototype/reduce/BigInt/values-are-not-cached.js6
-rw-r--r--test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-custom-accumulator.js8
-rw-r--r--test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-default-accumulator.js12
-rw-r--r--test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-no-iteration-over-non-integer-properties.js6
-rw-r--r--test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-return-does-not-change-instance.js8
-rw-r--r--test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-set-value-during-iteration.js10
-rw-r--r--test/built-ins/TypedArray/prototype/reduceRight/BigInt/get-length-uses-internal-arraylength.js2
-rw-r--r--test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-is-last-callbackfn-return.js4
-rw-r--r--test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-of-any-type.js2
-rw-r--r--test/built-ins/TypedArray/prototype/reduceRight/BigInt/return-first-value-without-callbackfn.js4
-rw-r--r--test/built-ins/TypedArray/prototype/reduceRight/BigInt/values-are-not-cached.js6
-rw-r--r--test/built-ins/TypedArray/prototype/reverse/BigInt/get-length-uses-internal-arraylength.js2
-rw-r--r--test/built-ins/TypedArray/prototype/reverse/BigInt/reverts.js28
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/array-arg-offset-tointeger.js108
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-length.js2
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-value.js10
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length-symbol.js2
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length.js2
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value-symbol.js10
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value.js10
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-toobject-offset.js2
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values-in-order.js8
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values.js30
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-type-conversions.js2
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-values-are-not-cached.js20
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/array-arg-target-arraylength-internal.js2
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/array-arg-targetbuffer-detached-on-get-src-value-throws.js4
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-offset-tointeger.js74
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type.js14
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type.js14
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type.js12
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-arraylength-internal.js2
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-byteoffset-internal.js4
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-arraylength-internal.js2
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-byteoffset-internal.js4
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/arraylength-internal.js6
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/infinity.js6
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/minus-zero.js6
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/result-does-not-copy-ordinary-properties.js2
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/results-with-different-length.js58
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/results-with-empty-length.js2
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/results-with-same-length.js10
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-abrupt.js2
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-inherited.js2
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-returns-throws.js2
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor.js2
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-invocation.js2
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js2
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor.js4
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-end.js18
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-start.js28
-rw-r--r--test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-with-thisarg.js8
-rw-r--r--test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-without-thisarg.js8
-rw-r--r--test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-no-interaction-over-non-integer.js6
-rw-r--r--test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-return-does-not-change-instance.js8
-rw-r--r--test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-set-value-during-interaction.js10
-rw-r--r--test/built-ins/TypedArray/prototype/some/BigInt/get-length-uses-internal-arraylength.js2
-rw-r--r--test/built-ins/TypedArray/prototype/some/BigInt/values-are-not-cached.js6
-rw-r--r--test/built-ins/TypedArray/prototype/sort/BigInt/arraylength-internal.js2
-rw-r--r--test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-call-throws.js2
-rw-r--r--test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-calls.js6
-rw-r--r--test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-nonfunction-call-throws.js2
-rw-r--r--test/built-ins/TypedArray/prototype/sort/BigInt/return-same-instance.js2
-rw-r--r--test/built-ins/TypedArray/prototype/sort/BigInt/sortcompare-with-no-tostring.js4
-rw-r--r--test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js14
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/infinity.js6
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/minus-zero.js6
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/result-does-not-copy-ordinary-properties.js2
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-from-same-ctor.js4
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-with-shared-buffer.js10
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-different-length.js58
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-empty-length.js2
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-same-length.js10
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-abrupt.js2
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-inherited.js2
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-returns-throws.js2
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor.js2
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-invocation.js2
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js2
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor.js4
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-begin.js28
-rw-r--r--test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-end.js18
-rw-r--r--test/built-ins/TypedArray/prototype/toLocaleString/BigInt/get-length-uses-internal-arraylength.js2
-rw-r--r--test/built-ins/TypedArray/prototype/values/BigInt/iter-prototype.js2
-rw-r--r--test/built-ins/TypedArray/prototype/values/BigInt/return-itor.js6
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/length-arg/init-zeros.js18
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-array-returns.js4
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-generator-iterable-returns.js6
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-new-instance-extensibility.js6
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-from-property.js4
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive-typeerror.js2
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive.js2
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-tostring.js2
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof-typeerror.js2
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof.js2
-rw-r--r--test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-property.js4
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/custom-ctor-returns-other-instance.js6
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/mapfn-arguments.js2
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/mapfn-this-with-thisarg.js2
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/mapfn-this-without-thisarg-strict.js2
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/new-instance-using-custom-ctor.js6
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/new-instance-with-mapfn.js6
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/new-instance-without-mapfn.js6
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/set-value-abrupt-completion.js2
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/desc-value-throws.js2
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-greater-than-last-index.js2
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-lower-than-zero.js2
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-minus-zero.js2
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-not-canonical-index.js4
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-not-integer.js14
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-not-numeric-index.js2
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-accessor-desc.js6
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-configurable.js2
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-enumerable.js2
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-writable.js2
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex.js8
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-symbol.js2
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/non-extensible-new-key.js2
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/non-extensible-redefine-key.js2
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/set-value.js10
-rw-r--r--test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/this-is-not-extensible.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Get/BigInt/detached-buffer-key-is-not-numeric-index.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Get/BigInt/detached-buffer-key-is-symbol.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Get/BigInt/detached-buffer.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Get/BigInt/indexed-value-sab.js6
-rw-r--r--test/built-ins/TypedArrays/internals/Get/BigInt/indexed-value.js6
-rw-r--r--test/built-ins/TypedArrays/internals/Get/BigInt/key-is-not-integer.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Get/BigInt/key-is-not-minus-zero.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Get/BigInt/key-is-not-numeric-index.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Get/BigInt/key-is-out-of-bounds.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Get/BigInt/key-is-symbol.js2
-rw-r--r--test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/detached-buffer-key-is-not-number.js2
-rw-r--r--test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/detached-buffer-key-is-symbol.js2
-rw-r--r--test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/index-prop-desc.js6
-rw-r--r--test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-minus-zero.js2
-rw-r--r--test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-not-canonical-index.js2
-rw-r--r--test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-not-integer.js2
-rw-r--r--test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-not-numeric-index.js2
-rw-r--r--test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-out-of-bounds.js2
-rw-r--r--test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-symbol.js2
-rw-r--r--test/built-ins/TypedArrays/internals/HasProperty/BigInt/detached-buffer-key-is-not-number.js2
-rw-r--r--test/built-ins/TypedArrays/internals/HasProperty/BigInt/detached-buffer-key-is-symbol.js2
-rw-r--r--test/built-ins/TypedArrays/internals/HasProperty/BigInt/indexed-value.js2
-rw-r--r--test/built-ins/TypedArrays/internals/HasProperty/BigInt/key-is-not-canonical-index.js2
-rw-r--r--test/built-ins/TypedArrays/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-and-symbol-keys-.js2
-rw-r--r--test/built-ins/TypedArrays/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-keys.js2
-rw-r--r--test/built-ins/TypedArrays/internals/OwnPropertyKeys/BigInt/integer-indexes.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Set/BigInt/detached-buffer-key-is-not-numeric-index.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Set/BigInt/detached-buffer-key-is-symbol.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Set/BigInt/detached-buffer.js14
-rw-r--r--test/built-ins/TypedArrays/internals/Set/BigInt/indexed-value.js10
-rw-r--r--test/built-ins/TypedArrays/internals/Set/BigInt/key-is-minus-zero.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-canonical-index.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-integer.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-numeric-index.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Set/BigInt/key-is-out-of-bounds.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Set/BigInt/key-is-symbol.js2
-rw-r--r--test/built-ins/TypedArrays/internals/Set/BigInt/tonumber-value-throws.js2
-rw-r--r--test/built-ins/TypedArrays/of/BigInt/argument-number-value-throws.js2
-rw-r--r--test/built-ins/TypedArrays/of/BigInt/custom-ctor-returns-other-instance.js4
-rw-r--r--test/built-ins/TypedArrays/of/BigInt/new-instance-using-custom-ctor.js8
-rw-r--r--test/built-ins/TypedArrays/of/BigInt/new-instance.js8
273 files changed, 1125 insertions, 1125 deletions
diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-end.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-end.js
index c713fdf95..6060fab6e 100644
--- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-end.js
+++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-end.js
@@ -29,48 +29,48 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(1, 0, null),
- convertToBigInt([0, 1, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(1, 0, null),
+ [0n, 1n, 2n, 3n]
),
'null value coerced to 0'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(1, 0, NaN),
- convertToBigInt([0, 1, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(1, 0, NaN),
+ [0n, 1n, 2n, 3n]
),
'NaN value coerced to 0'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(1, 0, false),
- convertToBigInt([0, 1, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(1, 0, false),
+ [0n, 1n, 2n, 3n]
),
'false value coerced to 0'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(1, 0, true),
- convertToBigInt([0, 0, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(1, 0, true),
+ [0n, 0n, 2n, 3n]
),
'true value coerced to 1'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(1, 0, '-2'),
- convertToBigInt([0, 0, 1, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(1, 0, '-2'),
+ [0n, 0n, 1n, 3n]
),
'string "-2" value coerced to integer -2'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(1, 0, -2.5),
- convertToBigInt([0, 0, 1, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(1, 0, -2.5),
+ [0n, 0n, 1n, 3n]
),
'float -2.5 value coerced to integer -2'
);
diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-start.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-start.js
index 6ad29124a..6cd12a381 100644
--- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-start.js
+++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-start.js
@@ -28,64 +28,64 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(1, undefined),
- convertToBigInt([0, 0, 1, 2])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(1, undefined),
+ [0n, 0n, 1n, 2n]
),
'undefined value coerced to 0'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(1, false),
- convertToBigInt([0, 0, 1, 2])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(1, false),
+ [0n, 0n, 1n, 2n]
),
'false value coerced to 0'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(1, NaN),
- convertToBigInt([0, 0, 1, 2])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(1, NaN),
+ [0n, 0n, 1n, 2n]
),
'NaN value coerced to 0'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(1, null),
- convertToBigInt([0, 0, 1, 2])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(1, null),
+ [0n, 0n, 1n, 2n]
),
'null value coerced to 0'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0, true),
- convertToBigInt([1, 2, 3, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0, true),
+ [1n, 2n, 3n, 3n]
),
'true value coerced to 1'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0, '1'),
- convertToBigInt([1, 2, 3, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0, '1'),
+ [1n, 2n, 3n, 3n]
),
'string "1" value coerced to 1'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(1, 0.5),
- convertToBigInt([0, 0, 1, 2])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(1, 0.5),
+ [0n, 0n, 1n, 2n]
),
'0.5 float value coerced to integer 0'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0, 1.5),
- convertToBigInt([1, 2, 3, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0, 1.5),
+ [1n, 2n, 3n, 3n]
),
'1.5 float value coerced to integer 1'
);
diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-target.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-target.js
index caaa2214e..92d409a46 100644
--- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-target.js
+++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/coerced-values-target.js
@@ -28,64 +28,64 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(undefined, 1),
- convertToBigInt([1, 2, 3, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(undefined, 1),
+ [1n, 2n, 3n, 3n]
),
'undefined value coerced to 0'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(false, 1),
- convertToBigInt([1, 2, 3, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(false, 1),
+ [1n, 2n, 3n, 3n]
),
'false value coerced to 0'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(NaN, 1),
- convertToBigInt([1, 2, 3, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(NaN, 1),
+ [1n, 2n, 3n, 3n]
),
'NaN value coerced to 0'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(null, 1),
- convertToBigInt([1, 2, 3, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(null, 1),
+ [1n, 2n, 3n, 3n]
),
'null value coerced to 0'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(true, 0),
- convertToBigInt([0, 0, 1, 2])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(true, 0),
+ [0n, 0n, 1n, 2n]
),
'true value coerced to 1'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin('1', 0),
- convertToBigInt([0, 0, 1, 2])
+ new TA([0n, 1n, 2n, 3n]).copyWithin('1', 0),
+ [0n, 0n, 1n, 2n]
),
'string "1" value coerced to 1'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0.5, 1),
- convertToBigInt([1, 2, 3, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0.5, 1),
+ [1n, 2n, 3n, 3n]
),
'0.5 float value coerced to integer 0'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(1.5, 0),
- convertToBigInt([0, 0, 1, 2])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(1.5, 0),
+ [0n, 0n, 1n, 2n]
),
'1.5 float value coerced to integer 1'
);
diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-end.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-end.js
index 5a01aec33..78a8c9c9a 100644
--- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-end.js
+++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-end.js
@@ -31,64 +31,64 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0, 1, -1),
- convertToBigInt([1, 2, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0, 1, -1),
+ [1n, 2n, 2n, 3n]
),
'[0, 1, 2, 3].copyWithin(0, 1, -1) -> [1, 2, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4])).copyWithin(2, 0, -1),
- convertToBigInt([0, 1, 0, 1, 2])
+ new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(2, 0, -1),
+ [0n, 1n, 0n, 1n, 2n]
),
'[0, 1, 2, 3, 4].copyWithin(2, 0, -1) -> [0, 1, 0, 1, 2]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4])).copyWithin(1, 2, -2),
- convertToBigInt([0, 2, 2, 3, 4])
+ new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(1, 2, -2),
+ [0n, 2n, 2n, 3n, 4n]
),
'[0, 1, 2, 3, 4].copyWithin(1, 2, -2) -> [0, 2, 2, 3, 4]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0, -2, -1),
- convertToBigInt([2, 1, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0, -2, -1),
+ [2n, 1n, 2n, 3n]
),
'[0, 1, 2, 3].copyWithin(0, -2, -1) -> [2, 1, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4])).copyWithin(2, -2, -1),
- convertToBigInt([0, 1, 3, 3, 4])
+ new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(2, -2, -1),
+ [0n, 1n, 3n, 3n, 4n]
),
'[0, 1, 2, 3, 4].copyWithin(2, -2, 1) -> [0, 1, 3, 3, 4]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(-3, -2, -1),
- convertToBigInt([0, 2, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(-3, -2, -1),
+ [0n, 2n, 2n, 3n]
),
'[0, 1, 2, 3].copyWithin(-3, -2, -1) -> [0, 2, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4])).copyWithin(-2, -3, -1),
- convertToBigInt([0, 1, 2, 2, 3])
+ new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(-2, -3, -1),
+ [0n, 1n, 2n, 2n, 3n]
),
'[0, 1, 2, 3, 4].copyWithin(-2, -3, -1) -> [0, 1, 2, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4])).copyWithin(-5, -2, -1),
- convertToBigInt([3, 1, 2, 3, 4])
+ new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(-5, -2, -1),
+ [3n, 1n, 2n, 3n, 4n]
),
'[0, 1, 2, 3, 4].copyWithin(-5, -2, -1) -> [3, 1, 2, 3, 4]'
);
diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-end.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-end.js
index 245f6f482..ae1309824 100644
--- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-end.js
+++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-end.js
@@ -31,80 +31,80 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0, 1, -10),
- convertToBigInt([0, 1, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0, 1, -10),
+ [0n, 1n, 2n, 3n]
),
'[0, 1, 2, 3].copyWithin(0, 1, -10) -> [0, 1, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5])).copyWithin(0, 1, -Infinity),
- convertToBigInt([1, 2, 3, 4, 5])
+ new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(0, 1, -Infinity),
+ [1n, 2n, 3n, 4n, 5n]
),
'[1, 2, 3, 4, 5].copyWithin(0, 1, -Infinity) -> [1, 2, 3, 4, 5]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0, -2, -10),
- convertToBigInt([0, 1, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0, -2, -10),
+ [0n, 1n, 2n, 3n]
),
'[0, 1, 2, 3].copyWithin(0, -2, -10) -> [0, 1, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5])).copyWithin(0, -2, -Infinity),
- convertToBigInt([1, 2, 3, 4, 5])
+ new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(0, -2, -Infinity),
+ [1n, 2n, 3n, 4n, 5n]
),
'[1, 2, 3, 4, 5].copyWithin(0, -2, -Infinity) -> [1, 2, 3, 4, 5]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0, -9, -10),
- convertToBigInt([0, 1, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0, -9, -10),
+ [0n, 1n, 2n, 3n]
),
'[0, 1, 2, 3].copyWithin(0, -9, -10) -> [0, 1, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5])).copyWithin(0, -9, -Infinity),
- convertToBigInt([1, 2, 3, 4, 5])
+ new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(0, -9, -Infinity),
+ [1n, 2n, 3n, 4n, 5n]
),
'[1, 2, 3, 4, 5].copyWithin(0, -9, -Infinity) -> [1, 2, 3, 4, 5]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(-3, -2, -10),
- convertToBigInt([0, 1, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(-3, -2, -10),
+ [0n, 1n, 2n, 3n]
),
'[0, 1, 2, 3].copyWithin(-3, -2, -10) -> [0, 1, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5])).copyWithin(-3, -2, -Infinity),
- convertToBigInt([1, 2, 3, 4, 5])
+ new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(-3, -2, -Infinity),
+ [1n, 2n, 3n, 4n, 5n]
),
'[1, 2, 3, 4, 5].copyWithin(-3, -2, -Infinity) -> [1, 2, 3, 4, 5]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(-7, -8, -9),
- convertToBigInt([0, 1, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(-7, -8, -9),
+ [0n, 1n, 2n, 3n]
),
'[0, 1, 2, 3].copyWithin(-7, -8, -9) -> [0, 1, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5])).copyWithin(-7, -8, -Infinity),
- convertToBigInt([1, 2, 3, 4, 5])
+ new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(-7, -8, -Infinity),
+ [1n, 2n, 3n, 4n, 5n]
),
'[1, 2, 3, 4, 5].copyWithin(-7, -8, -Infinity) -> [1, 2, 3, 4, 5]'
);
diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-start.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-start.js
index 11f5b47ee..06ec98f34 100644
--- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-start.js
+++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-start.js
@@ -29,64 +29,64 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0, -10),
- convertToBigInt([0, 1, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0, -10),
+ [0n, 1n, 2n, 3n]
),
'[0, 1, 2, 3]).copyWithin(0, -10) -> [0, 1, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5])).copyWithin(0, -Infinity),
- convertToBigInt([1, 2, 3, 4, 5])
+ new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(0, -Infinity),
+ [1n, 2n, 3n, 4n, 5n]
),
'[1, 2, 3, 4, 5]).copyWithin(0, -Infinity) -> [1, 2, 3, 4, 5]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4])).copyWithin(2, -10),
- convertToBigInt([0, 1, 0, 1, 2])
+ new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(2, -10),
+ [0n, 1n, 0n, 1n, 2n]
),
'[0, 1, 2, 3, 4]).copyWithin(2, -2) -> [0, 1, 0, 1, 2]'
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5])).copyWithin(2, -Infinity),
- convertToBigInt([1, 2, 1, 2, 3])
+ new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(2, -Infinity),
+ [1n, 2n, 1n, 2n, 3n]
),
'[1, 2, 3, 4, 5]).copyWithin(2, -Infinity) -> [1, 2, 1, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4])).copyWithin(10, -10),
- convertToBigInt([0, 1, 2, 3, 4])
+ new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(10, -10),
+ [0n, 1n, 2n, 3n, 4n]
),
'[0, 1, 2, 3, 4]).copyWithin(10, -10) -> [0, 1, 2, 3, 4]'
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5])).copyWithin(10, -Infinity),
- convertToBigInt([1, 2, 3, 4, 5])
+ new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(10, -Infinity),
+ [1n, 2n, 3n, 4n, 5n]
),
'[1, 2, 3, 4, 5]).copyWithin(10, -Infinity) -> [1, 2, 3, 4, 5]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(-9, -10),
- convertToBigInt([0, 1, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(-9, -10),
+ [0n, 1n, 2n, 3n]
),
'[0, 1, 2, 3].copyWithin(-9, -10) -> [0, 1, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5])).copyWithin(-9, -Infinity),
- convertToBigInt([1, 2, 3, 4, 5])
+ new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(-9, -Infinity),
+ [1n, 2n, 3n, 4n, 5n]
),
'[1, 2, 3, 4, 5].copyWithin(-9, -Infinity) -> [1, 2, 3, 4, 5]'
);
diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-target.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-target.js
index 34c2759fe..91e2b0e5b 100644
--- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-target.js
+++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-out-of-bounds-target.js
@@ -29,32 +29,32 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(-10, 0),
- convertToBigInt([0, 1, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(-10, 0),
+ [0n, 1n, 2n, 3n]
),
'[0, 1, 2, 3].copyWithin(-10, 0) -> [0, 1, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5])).copyWithin(-Infinity, 0),
- convertToBigInt([1, 2, 3, 4, 5])
+ new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(-Infinity, 0),
+ [1n, 2n, 3n, 4n, 5n]
),
'[1, 2, 3, 4, 5].copyWithin(-Infinity, 0) -> [1, 2, 3, 4, 5]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4])).copyWithin(-10, 2),
- convertToBigInt([2, 3, 4, 3, 4])
+ new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(-10, 2),
+ [2n, 3n, 4n, 3n, 4n]
),
'[0, 1, 2, 3, 4].copyWithin(-10, 2) -> [2, 3, 4, 3, 4]'
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5])).copyWithin(-Infinity, 2),
- convertToBigInt([3, 4, 5, 4, 5])
+ new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(-Infinity, 2),
+ [3n, 4n, 5n, 4n, 5n]
),
'[1, 2, 3, 4, 5].copyWithin(-Infinity, 2) -> [3, 4, 5, 4, 5]'
);
diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-start.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-start.js
index 3ec8bf03e..36d5f2226 100644
--- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-start.js
+++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-start.js
@@ -29,48 +29,48 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0, -1),
- convertToBigInt([3, 1, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0, -1),
+ [3n, 1n, 2n, 3n]
),
'[0, 1, 2, 3].copyWithin(0, -1) -> [3, 1, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4])).copyWithin(2, -2),
- convertToBigInt([0, 1, 3, 4, 4])
+ new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(2, -2),
+ [0n, 1n, 3n, 4n, 4n]
),
'[0, 1, 2, 3, 4].copyWithin(2, -2) -> [0, 1, 3, 4, 4]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4])).copyWithin(1, -2),
- convertToBigInt([0, 3, 4, 3, 4])
+ new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(1, -2),
+ [0n, 3n, 4n, 3n, 4n]
),
'[0, 1, 2, 3, 4].copyWithin(1, -2) -> [0, 3, 4, 3, 4]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(-1, -2),
- convertToBigInt([0, 1, 2, 2])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(-1, -2),
+ [0n, 1n, 2n, 2n]
),
'[0, 1, 2, 3].copyWithin(-1, -2) -> [ 0, 1, 2, 2 ]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4])).copyWithin(-2, -3),
- convertToBigInt([0, 1, 2, 2, 3])
+ new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(-2, -3),
+ [0n, 1n, 2n, 2n, 3n]
),
'[0, 1, 2, 3, 4].copyWithin(-2, -3) -> [0, 1, 2, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4])).copyWithin(-5, -2),
- convertToBigInt([3, 4, 2, 3, 4])
+ new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(-5, -2),
+ [3n, 4n, 2n, 3n, 4n]
),
'[0, 1, 2, 3, 4].copyWithin(-5, -2) -> [3, 4, 2, 3, 4]'
);
diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-target.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-target.js
index 9227f3e6d..ec6adaedb 100644
--- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-target.js
+++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/negative-target.js
@@ -29,24 +29,24 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(-1, 0),
- convertToBigInt([0, 1, 2, 0])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(-1, 0),
+ [0n, 1n, 2n, 0n]
),
'[0, 1, 2, 3].copyWithin(-1, 0) -> [0, 1, 2, 0]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4])).copyWithin(-2, 2),
- convertToBigInt([0, 1, 2, 2, 3])
+ new TA([0n, 1n, 2n, 3n, 4n]).copyWithin(-2, 2),
+ [0n, 1n, 2n, 2n, 3n]
),
'[0, 1, 2, 3, 4].copyWithin(-2, 2) -> [0, 1, 2, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(-1, 2),
- convertToBigInt([0, 1, 2, 2])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(-1, 2),
+ [0n, 1n, 2n, 2n]
),
'[0, 1, 2, 3].copyWithin(-1, 2) -> [0, 1, 2, 2]'
);
diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-end.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-end.js
index dcbe8f800..16d68d51b 100644
--- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-end.js
+++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-end.js
@@ -22,32 +22,32 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0, 1, 6),
- convertToBigInt([1, 2, 3, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0, 1, 6),
+ [1n, 2n, 3n, 3n]
),
'[0, 1, 2, 3].copyWithin(0, 1, 6) -> [1, 2, 3, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5])).copyWithin(0, 1, Infinity),
- convertToBigInt([2, 3, 4, 5, 5])
+ new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(0, 1, Infinity),
+ [2n, 3n, 4n, 5n, 5n]
),
'[1, 2, 3, 4, 5].copyWithin(0, 1, Infinity) -> [2, 3, 4, 5, 5]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4, 5])).copyWithin(1, 3, 6),
- convertToBigInt([0, 3, 4, 5, 4, 5])
+ new TA([0n, 1n, 2n, 3n, 4n, 5n]).copyWithin(1, 3, 6),
+ [0n, 3n, 4n, 5n, 4n, 5n]
),
'[0, 1, 2, 3, 4, 5].copyWithin(1, 3, 6) -> [0, 3, 4, 5, 4, 5]'
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5])).copyWithin(1, 3, Infinity),
- convertToBigInt([1, 4, 5, 4, 5])
+ new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(1, 3, Infinity),
+ [1n, 4n, 5n, 4n, 5n]
),
'[1, 2, 3, 4, 5].copyWithin(1, 3, Infinity) -> [1, 4, 5, 4, 5]'
);
diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-target-and-start.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-target-and-start.js
index 63fd382cf..fcb603491 100644
--- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-target-and-start.js
+++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-out-of-bounds-target-and-start.js
@@ -22,52 +22,52 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4, 5])).copyWithin(6, 0),
- convertToBigInt([0, 1, 2, 3, 4, 5])
+ new TA([0n, 1n, 2n, 3n, 4n, 5n]).copyWithin(6, 0),
+ [0n, 1n, 2n, 3n, 4n, 5n]
)
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5])).copyWithin(Infinity, 0),
- convertToBigInt([1, 2, 3, 4, 5])
+ new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(Infinity, 0),
+ [1n, 2n, 3n, 4n, 5n]
),
'[1, 2, 3, 4, 5].copyWithin(Infinity, 0) -> [1, 2, 3, 4, 5]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4, 5])).copyWithin(0, 6),
- convertToBigInt([0, 1, 2, 3, 4, 5])
+ new TA([0n, 1n, 2n, 3n, 4n, 5n]).copyWithin(0, 6),
+ [0n, 1n, 2n, 3n, 4n, 5n]
)
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5])).copyWithin(0, Infinity),
- convertToBigInt([1, 2, 3, 4, 5])
+ new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(0, Infinity),
+ [1n, 2n, 3n, 4n, 5n]
),
'[1, 2, 3, 4, 5].copyWithin(0, Infinity) -> [1, 2, 3, 4, 5]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4, 5])).copyWithin(6, 6),
- convertToBigInt([0, 1, 2, 3, 4, 5])
+ new TA([0n, 1n, 2n, 3n, 4n, 5n]).copyWithin(6, 6),
+ [0n, 1n, 2n, 3n, 4n, 5n]
)
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4, 5])).copyWithin(10, 10),
- convertToBigInt([0, 1, 2, 3, 4, 5])
+ new TA([0n, 1n, 2n, 3n, 4n, 5n]).copyWithin(10, 10),
+ [0n, 1n, 2n, 3n, 4n, 5n]
)
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5])).copyWithin(Infinity, Infinity),
- convertToBigInt([1, 2, 3, 4, 5])
+ new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(Infinity, Infinity),
+ [1n, 2n, 3n, 4n, 5n]
),
'[1, 2, 3, 4, 5].copyWithin(Infinity, Infinity) -> [1, 2, 3, 4, 5]'
);
diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-and-start.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-and-start.js
index 30190b3f4..27385c45e 100644
--- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-and-start.js
+++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-and-start.js
@@ -22,29 +22,29 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5, 6])).copyWithin(0, 0),
- convertToBigInt([1, 2, 3, 4, 5, 6])
+ new TA([1n, 2n, 3n, 4n, 5n, 6n]).copyWithin(0, 0),
+ [1n, 2n, 3n, 4n, 5n, 6n]
)
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5, 6])).copyWithin(0, 2),
- convertToBigInt([3, 4, 5, 6, 5, 6])
+ new TA([1n, 2n, 3n, 4n, 5n, 6n]).copyWithin(0, 2),
+ [3n, 4n, 5n, 6n, 5n, 6n]
)
);
assert(
compareArray(
- new TA(convertToBigInt([1, 2, 3, 4, 5, 6])).copyWithin(3, 0),
- convertToBigInt([1, 2, 3, 1, 2, 3])
+ new TA([1n, 2n, 3n, 4n, 5n, 6n]).copyWithin(3, 0),
+ [1n, 2n, 3n, 1n, 2n, 3n]
)
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4, 5])).copyWithin(1, 4),
- convertToBigInt([0, 4, 5, 3, 4, 5])
+ new TA([0n, 1n, 2n, 3n, 4n, 5n]).copyWithin(1, 4),
+ [0n, 4n, 5n, 3n, 4n, 5n]
)
);
});
diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-start-and-end.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-start-and-end.js
index 25df02789..befa6e752 100644
--- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-start-and-end.js
+++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/non-negative-target-start-and-end.js
@@ -22,24 +22,24 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0, 0, 0),
- convertToBigInt([0, 1, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0, 0, 0),
+ [0n, 1n, 2n, 3n]
),
'[0, 1, 2, 3].copyWithin(0, 0, 0) -> [0, 1, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0, 0, 2),
- convertToBigInt([0, 1, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0, 0, 2),
+ [0n, 1n, 2n, 3n]
),
'[0, 1, 2, 3].copyWithin(0, 0, 2) -> [0, 1, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0, 1, 2),
- convertToBigInt([1, 1, 2, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0, 1, 2),
+ [1n, 1n, 2n, 3n]
),
'[0, 1, 2, 3].copyWithin(0, 1, 2) -> [1, 1, 2, 3]'
);
@@ -57,16 +57,16 @@ testWithBigIntTypedArrayConstructors(function(TA) {
*/
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(1, 0, 2),
- convertToBigInt([0, 0, 1, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(1, 0, 2),
+ [0n, 0n, 1n, 3n]
),
'[0, 1, 2, 3].copyWithin(1, 0, 2) -> [0, 0, 1, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3, 4, 5])).copyWithin(1, 3, 5),
- convertToBigInt([0, 3, 4, 3, 4, 5])
+ new TA([0n, 1n, 2n, 3n, 4n, 5n]).copyWithin(1, 3, 5),
+ [0n, 3n, 4n, 3n, 4n, 5n]
),
'[0, 1, 2, 3, 4, 5].copyWithin(1, 3, 5) -> [0, 3, 4, 3, 4, 5]'
);
diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-this.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-this.js
index d61c44ad8..2e5c40fa4 100644
--- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-this.js
+++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/return-this.js
@@ -29,7 +29,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(result1, sample1);
- var sample2 = new TA(convertToBigInt([1, 2, 3]));
+ var sample2 = new TA([1n, 2n, 3n]);
var result2 = sample2.copyWithin(1, 0);
assert.sameValue(result2, sample2);
diff --git a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/undefined-end.js b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/undefined-end.js
index 513e762c3..360d3125f 100644
--- a/test/built-ins/TypedArray/prototype/copyWithin/BigInt/undefined-end.js
+++ b/test/built-ins/TypedArray/prototype/copyWithin/BigInt/undefined-end.js
@@ -29,16 +29,16 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0, 1, undefined),
- convertToBigInt([1, 2, 3, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0, 1, undefined),
+ [1n, 2n, 3n, 3n]
),
'[0, 1, 2, 3].copyWithin(0, 1, undefined) -> [1, 2, 3]'
);
assert(
compareArray(
- new TA(convertToBigInt([0, 1, 2, 3])).copyWithin(0, 1),
- convertToBigInt([1, 2, 3, 3])
+ new TA([0n, 1n, 2n, 3n]).copyWithin(0, 1),
+ [1n, 2n, 3n, 3n]
),
'[0, 1, 2, 3].copyWithin(0, 1) -> [1, 2, 3, 3]'
);
diff --git a/test/built-ins/TypedArray/prototype/entries/BigInt/iter-prototype.js b/test/built-ins/TypedArray/prototype/entries/BigInt/iter-prototype.js
index dbce25ad3..40e4f8f5f 100644
--- a/test/built-ins/TypedArray/prototype/entries/BigInt/iter-prototype.js
+++ b/test/built-ins/TypedArray/prototype/entries/BigInt/iter-prototype.js
@@ -17,7 +17,7 @@ features: [BigInt, Symbol.iterator, TypedArray]
var ArrayIteratorProto = Object.getPrototypeOf([][Symbol.iterator]());
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([0, 42, 64]));
+ var sample = new TA([0n, 42n, 64n]);
var iter = sample.entries();
assert.sameValue(Object.getPrototypeOf(iter), ArrayIteratorProto);
diff --git a/test/built-ins/TypedArray/prototype/entries/BigInt/return-itor.js b/test/built-ins/TypedArray/prototype/entries/BigInt/return-itor.js
index 015595422..bca03654b 100644
--- a/test/built-ins/TypedArray/prototype/entries/BigInt/return-itor.js
+++ b/test/built-ins/TypedArray/prototype/entries/BigInt/return-itor.js
@@ -19,15 +19,15 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var itor = typedArray.entries();
var next = itor.next();
- assert(compareArray(next.value, [0, convertToBigInt(0)]));
+ assert(compareArray(next.value, [0, 0n]));
assert.sameValue(next.done, false);
next = itor.next();
- assert(compareArray(next.value, [1, convertToBigInt(42)]));
+ assert(compareArray(next.value, [1, 42n]));
assert.sameValue(next.done, false);
next = itor.next();
- assert(compareArray(next.value, [2, convertToBigInt(64)]));
+ assert(compareArray(next.value, [2, 64n]));
assert.sameValue(next.done, false);
next = itor.next();
diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-with-thisarg.js b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-with-thisarg.js
index e6a878b01..18ee71106 100644
--- a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-with-thisarg.js
+++ b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-with-thisarg.js
@@ -26,7 +26,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var results = [];
var thisArg = ["test262", 0, "ecma262", 0];
@@ -40,17 +40,17 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(thisArg.length, 4, "thisArg.length");
assert.sameValue(results[0].length, 3, "results[0].length");
- assert.sameValue(results[0][0], convertToBigInt(42), "results[0][0] - kValue");
+ assert.sameValue(results[0][0], 42n, "results[0][0] - kValue");
assert.sameValue(results[0][1], 0, "results[0][1] - k");
assert.sameValue(results[0][2], sample, "results[0][2] - this");
assert.sameValue(results[1].length, 3, "results[1].length");
- assert.sameValue(results[1][0], convertToBigInt(43), "results[1][0] - kValue");
+ assert.sameValue(results[1][0], 43n, "results[1][0] - kValue");
assert.sameValue(results[1][1], 1, "results[1][1] - k");
assert.sameValue(results[1][2], sample, "results[1][2] - this");
assert.sameValue(results[2].length, 3, "results[2].length");
- assert.sameValue(results[2][0], convertToBigInt(44), "results[2][0] - kValue");
+ assert.sameValue(results[2][0], 44n, "results[2][0] - kValue");
assert.sameValue(results[2][1], 2, "results[2][1] - k");
assert.sameValue(results[2][2], sample, "results[2][2] - this");
});
diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-without-thisarg.js b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-without-thisarg.js
index 1f2dce111..2a69123a2 100644
--- a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-without-thisarg.js
+++ b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-arguments-without-thisarg.js
@@ -26,7 +26,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var results = [];
@@ -38,17 +38,17 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(results.length, 3, "results.length");
assert.sameValue(results[0].length, 3, "results[0].length");
- assert.sameValue(results[0][0], convertToBigInt(42), "results[0][0] - kValue");
+ assert.sameValue(results[0][0], 42n, "results[0][0] - kValue");
assert.sameValue(results[0][1], 0, "results[0][1] - k");
assert.sameValue(results[0][2], sample, "results[0][2] - this");
assert.sameValue(results[1].length, 3, "results[1].length");
- assert.sameValue(results[1][0], convertToBigInt(43), "results[1][0] - kValue");
+ assert.sameValue(results[1][0], 43n, "results[1][0] - kValue");
assert.sameValue(results[1][1], 1, "results[1][1] - k");
assert.sameValue(results[1][2], sample, "results[1][2] - this");
assert.sameValue(results[2].length, 3, "results[2].length");
- assert.sameValue(results[2][0], convertToBigInt(44), "results[2][0] - kValue");
+ assert.sameValue(results[2][0], 44n, "results[2][0] - kValue");
assert.sameValue(results[2][1], 2, "results[2][1] - k");
assert.sameValue(results[2][2], sample, "results[2][2] - this");
});
diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-no-interaction-over-non-integer.js b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-no-interaction-over-non-integer.js
index 678605aef..1a838503d 100644
--- a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-no-interaction-over-non-integer.js
+++ b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-no-interaction-over-non-integer.js
@@ -19,7 +19,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([7, 8]));
+ var sample = new TA([7n, 8n]);
var results = [];
@@ -36,6 +36,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(results[0][1], 0, "results[0][1] - key");
assert.sameValue(results[1][1], 1, "results[1][1] - key");
- assert.sameValue(results[0][0], convertToBigInt(7), "results[0][0] - value");
- assert.sameValue(results[1][0], convertToBigInt(8), "results[1][0] - value");
+ assert.sameValue(results[0][0], 7n, "results[0][0] - value");
+ assert.sameValue(results[1][0], 8n, "results[1][0] - value");
});
diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-return-does-not-change-instance.js
index b46f77ad0..a6396cd4d 100644
--- a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-return-does-not-change-instance.js
+++ b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-return-does-not-change-instance.js
@@ -26,13 +26,13 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42]));
+ var sample = new TA([40n, 41n, 42n]);
sample.every(function() {
return 43;
});
- assert.sameValue(sample[0], convertToBigInt(40), "[0] == 40");
- assert.sameValue(sample[1], convertToBigInt(41), "[1] == 41");
- assert.sameValue(sample[2], convertToBigInt(42), "[2] == 42");
+ assert.sameValue(sample[0], 40n, "[0] == 40");
+ assert.sameValue(sample[1], 41n, "[1] == 41");
+ assert.sameValue(sample[2], 42n, "[2] == 42");
});
diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-set-value-during-interaction.js
index 8949bb2f1..12f7d7a6e 100644
--- a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-set-value-during-interaction.js
+++ b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-set-value-during-interaction.js
@@ -26,7 +26,7 @@ features: [BigInt, Reflect.set, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var newVal = 0;
sample.every(function(val, i) {
@@ -36,7 +36,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
"get the changed value during the loop"
);
assert.sameValue(
- Reflect.set(sample, 0, convertToBigInt(7)),
+ Reflect.set(sample, 0, 7n),
true,
"re-set a value for sample[0]"
);
@@ -52,7 +52,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
return true;
});
- assert.sameValue(sample[0], convertToBigInt(7), "changed values after iteration [0] == 7");
- assert.sameValue(sample[1], convertToBigInt(1), "changed values after iteration [1] == 1");
- assert.sameValue(sample[2], convertToBigInt(2), "changed values after iteration [2] == 2");
+ assert.sameValue(sample[0], 7n, "changed values after iteration [0] == 7");
+ assert.sameValue(sample[1], 1n, "changed values after iteration [1] == 1");
+ assert.sameValue(sample[2], 2n, "changed values after iteration [2] == 2");
});
diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/every/BigInt/get-length-uses-internal-arraylength.js
index af887bf1e..1dc89c06c 100644
--- a/test/built-ins/TypedArray/prototype/every/BigInt/get-length-uses-internal-arraylength.js
+++ b/test/built-ins/TypedArray/prototype/every/BigInt/get-length-uses-internal-arraylength.js
@@ -31,7 +31,7 @@ var desc = {
Object.defineProperty(TypedArray.prototype, "length", desc);
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
var calls = 0;
Object.defineProperty(TA.prototype, "length", desc);
diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/every/BigInt/values-are-not-cached.js
index 5be553d1d..7eb35f741 100644
--- a/test/built-ins/TypedArray/prototype/every/BigInt/values-are-not-cached.js
+++ b/test/built-ins/TypedArray/prototype/every/BigInt/values-are-not-cached.js
@@ -27,15 +27,15 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
sample.every(function(v, i) {
if (i < sample.length - 1) {
- sample[i+1] = convertToBigInt(42);
+ sample[i+1] = 42n;
}
assert.sameValue(
- v, convertToBigInt(42), "method does not cache values before callbackfn calls"
+ v, 42n, "method does not cache values before callbackfn calls"
);
return true;
});
diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/coerced-indexes.js b/test/built-ins/TypedArray/prototype/fill/BigInt/coerced-indexes.js
index 75bd12543..5467a89cd 100644
--- a/test/built-ins/TypedArray/prototype/fill/BigInt/coerced-indexes.js
+++ b/test/built-ins/TypedArray/prototype/fill/BigInt/coerced-indexes.js
@@ -33,72 +33,72 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
- compareArray(new TA(convertToBigInt([0, 0])).fill(convertToBigInt(1), undefined), convertToBigInt([1, 1])),
+ compareArray(new TA([0n, 0n]).fill(1n, undefined), [1n, 1n]),
'`undefined` start coerced to 0'
);
assert(
- compareArray(new TA(convertToBigInt([0, 0])).fill(convertToBigInt(1), 0, undefined), convertToBigInt([1, 1])),
+ compareArray(new TA([0n, 0n]).fill(1n, 0, undefined), [1n, 1n]),
'If end is undefined, let relativeEnd be len'
);
assert(
- compareArray(new TA(convertToBigInt([0, 0])).fill(convertToBigInt(1), null), convertToBigInt([1, 1])),
+ compareArray(new TA([0n, 0n]).fill(1n, null), [1n, 1n]),
'`null` start coerced to 0'
);
assert(
- compareArray(new TA(convertToBigInt([0, 0])).fill(convertToBigInt(1), 0, null), convertToBigInt([0, 0])),
+ compareArray(new TA([0n, 0n]).fill(1n, 0, null), [0n, 0n]),
'`null` end coerced to 0'
);
assert(
- compareArray(new TA(convertToBigInt([0, 0])).fill(convertToBigInt(1), true), convertToBigInt([0, 1])),
+ compareArray(new TA([0n, 0n]).fill(1n, true), [0n, 1n]),
'`true` start coerced to 1'
);
assert(
- compareArray(new TA(convertToBigInt([0, 0])).fill(convertToBigInt(1), 0, true), convertToBigInt([1, 0])),
+ compareArray(new TA([0n, 0n]).fill(1n, 0, true), [1n, 0n]),
'`true` end coerced to 1'
);
assert(
- compareArray(new TA(convertToBigInt([0, 0])).fill(convertToBigInt(1), false), convertToBigInt([1, 1])),
+ compareArray(new TA([0n, 0n]).fill(1n, false), [1n, 1n]),
'`false` start coerced to 0'
);
assert(
- compareArray(new TA(convertToBigInt([0, 0])).fill(convertToBigInt(1), 0, false), convertToBigInt([0, 0])),
+ compareArray(new TA([0n, 0n]).fill(1n, 0, false), [0n, 0n]),
'`false` end coerced to 0'
);
assert(
- compareArray(new TA(convertToBigInt([0, 0])).fill(convertToBigInt(1), NaN), convertToBigInt([1, 1])),
+ compareArray(new TA([0n, 0n]).fill(1n, NaN), [1n, 1n]),
'`NaN` start coerced to 0'
);
assert(
- compareArray(new TA(convertToBigInt([0, 0])).fill(convertToBigInt(1), 0, NaN), convertToBigInt([0, 0])),
+ compareArray(new TA([0n, 0n]).fill(1n, 0, NaN), [0n, 0n]),
'`NaN` end coerced to 0'
);
assert(
- compareArray(new TA(convertToBigInt([0, 0])).fill(convertToBigInt(1), '1'), convertToBigInt([0, 1])),
+ compareArray(new TA([0n, 0n]).fill(1n, '1'), [0n, 1n]),
'string start coerced'
);
assert(
- compareArray(new TA(convertToBigInt([0, 0])).fill(convertToBigInt(1), 0, '1'), convertToBigInt([1, 0])),
+ compareArray(new TA([0n, 0n]).fill(1n, 0, '1'), [1n, 0n]),
'string end coerced'
);
assert(
- compareArray(new TA(convertToBigInt([0, 0])).fill(convertToBigInt(1), 1.5), convertToBigInt([0, 1])),
+ compareArray(new TA([0n, 0n]).fill(1n, 1.5), [0n, 1n]),
'start as a float number coerced'
);
assert(
- compareArray(new TA(convertToBigInt([0, 0])).fill(convertToBigInt(1), 0, 1.5), convertToBigInt([1, 0])),
+ compareArray(new TA([0n, 0n]).fill(1n, 0, 1.5), [1n, 0n]),
'end as a float number coerced'
);
});
diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-once.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-once.js
index f26998f76..2f8bfa008 100644
--- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-once.js
+++ b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-once.js
@@ -21,7 +21,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
sample.fill({ valueOf() { return convertToBigInt(n++); } });
assert.sameValue(n, 2, "additional unexpected ToNumber() calls");
- assert.sameValue(sample[0], convertToBigInt(1), "incorrect ToNumber result in index 0");
- assert.sameValue(sample[1], convertToBigInt(1), "incorrect ToNumber result in index 1");
+ assert.sameValue(sample[0], 1n, "incorrect ToNumber result in index 0");
+ assert.sameValue(sample[1], 1n, "incorrect ToNumber result in index 1");
});
diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-custom-start-and-end.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-custom-start-and-end.js
index d429dc11e..a981ab00b 100644
--- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-custom-start-and-end.js
+++ b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-custom-start-and-end.js
@@ -34,9 +34,9 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- assert(compareArray(new TA(convertToBigInt([0, 0, 0])).fill(convertToBigInt(8), 1, 2), convertToBigInt([0, 8, 0])));
- assert(compareArray(new TA(convertToBigInt([0, 0, 0, 0, 0])).fill(convertToBigInt(8), -3, 4), convertToBigInt([0, 0, 8, 8, 0])));
- assert(compareArray(new TA(convertToBigInt([0, 0, 0, 0, 0])).fill(convertToBigInt(8), -2, -1), convertToBigInt([0, 0, 0, 8, 0])));
- assert(compareArray(new TA(convertToBigInt([0, 0, 0, 0, 0])).fill(convertToBigInt(8), -1, -3), convertToBigInt([0, 0, 0, 0, 0])));
- assert(compareArray(new TA(convertToBigInt([0, 0, 0, 0, 0])).fill(convertToBigInt(8), 1, 3), convertToBigInt([0, 8, 8, 0, 0])));
+ assert(compareArray(new TA([0n, 0n, 0n]).fill(8n, 1, 2), [0n, 8n, 0n]));
+ assert(compareArray(new TA([0n, 0n, 0n, 0n, 0n]).fill(8n, -3, 4), [0n, 0n, 8n, 8n, 0n]));
+ assert(compareArray(new TA([0n, 0n, 0n, 0n, 0n]).fill(8n, -2, -1), [0n, 0n, 0n, 8n, 0n]));
+ assert(compareArray(new TA([0n, 0n, 0n, 0n, 0n]).fill(8n, -1, -3), [0n, 0n, 0n, 0n, 0n]));
+ assert(compareArray(new TA([0n, 0n, 0n, 0n, 0n]).fill(8n, 1, 3), [0n, 8n, 8n, 0n, 0n]));
});
diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-non-numeric.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-non-numeric.js
index fdfa47987..4719ac67e 100644
--- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-non-numeric.js
+++ b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-non-numeric.js
@@ -39,34 +39,34 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample;
- sample = new TA(convertToBigInt([42]));
+ sample = new TA([42n]);
sample.fill(false);
- assert.sameValue(sample[0], convertToBigInt(0), "false => 0");
+ assert.sameValue(sample[0], 0n, "false => 0");
- sample = new TA(convertToBigInt([42]));
+ sample = new TA([42n]);
sample.fill(true);
- assert.sameValue(sample[0], convertToBigInt(1), "true => 1");
+ assert.sameValue(sample[0], 1n, "true => 1");
- sample = new TA(convertToBigInt([42]));
+ sample = new TA([42n]);
sample.fill("7");
- assert.sameValue(sample[0], convertToBigInt(7), "string conversion");
+ assert.sameValue(sample[0], 7n, "string conversion");
- sample = new TA(convertToBigInt([42]));
+ sample = new TA([42n]);
sample.fill({
toString: function() {
return "1";
},
valueOf: function() {
- return convertToBigInt(7);
+ return 7n;
}
});
- assert.sameValue(sample[0], convertToBigInt(7), "object valueOf conversion before toString");
+ assert.sameValue(sample[0], 7n, "object valueOf conversion before toString");
- sample = new TA(convertToBigInt([42]));
+ sample = new TA([42n]);
sample.fill({
toString: function() {
return "7";
}
});
- assert.sameValue(sample[0], convertToBigInt(7), "object toString when valueOf is absent");
+ assert.sameValue(sample[0], 7n, "object toString when valueOf is absent");
});
diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-end.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-end.js
index 0f92f444b..a4cac9ffb 100644
--- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-end.js
+++ b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-end.js
@@ -32,22 +32,22 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
- compareArray(new TA(convertToBigInt([0, 0, 0])).fill(convertToBigInt(8), 0, 1), convertToBigInt([8, 0, 0])),
+ compareArray(new TA([0n, 0n, 0n]).fill(8n, 0, 1), [8n, 0n, 0n]),
"Fill elements from custom end position"
);
assert(
- compareArray(new TA(convertToBigInt([0, 0, 0])).fill(convertToBigInt(8), 0, -1), convertToBigInt([8, 8, 0])),
+ compareArray(new TA([0n, 0n, 0n]).fill(8n, 0, -1), [8n, 8n, 0n]),
"negative end sets final position to max((length + relativeEnd), 0)"
);
assert(
- compareArray(new TA(convertToBigInt([0, 0, 0])).fill(convertToBigInt(8), 0, 5), convertToBigInt([8, 8, 8])),
+ compareArray(new TA([0n, 0n, 0n]).fill(8n, 0, 5), [8n, 8n, 8n]),
"end position is never higher than of length"
);
assert(
- compareArray(new TA(convertToBigInt([0, 0, 0])).fill(convertToBigInt(8), 0, -4), convertToBigInt([0, 0, 0])),
+ compareArray(new TA([0n, 0n, 0n]).fill(8n, 0, -4), [0n, 0n, 0n]),
"end position is 0 when (len + relativeEnd) < 0"
);
});
diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-start.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-start.js
index 0d6b6f397..790d1a5f2 100644
--- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-start.js
+++ b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-relative-start.js
@@ -30,22 +30,22 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
- compareArray(new TA(convertToBigInt([0, 0, 0])).fill(convertToBigInt(8), 1), convertToBigInt([0, 8, 8])),
+ compareArray(new TA([0n, 0n, 0n]).fill(8n, 1), [0n, 8n, 8n]),
"Fill elements from custom start position"
);
assert(
- compareArray(new TA(convertToBigInt([0, 0, 0])).fill(convertToBigInt(8), 4), convertToBigInt([0, 0, 0])),
+ compareArray(new TA([0n, 0n, 0n]).fill(8n, 4), [0n, 0n, 0n]),
"start position is never higher than length"
);
assert(
- compareArray(new TA(convertToBigInt([0, 0, 0])).fill(convertToBigInt(8), -1), convertToBigInt([0, 0, 8])),
+ compareArray(new TA([0n, 0n, 0n]).fill(8n, -1), [0n, 0n, 8n]),
"start < 0 sets initial position to max((len + relativeStart), 0)"
);
assert(
- compareArray(new TA(convertToBigInt([0, 0, 0])).fill(convertToBigInt(8), -5), convertToBigInt([8, 8, 8])),
+ compareArray(new TA([0n, 0n, 0n]).fill(8n, -5), [8n, 8n, 8n]),
"start position is 0 when (len + relativeStart) < 0"
);
});
diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values.js
index a9c337df9..ec390d28b 100644
--- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values.js
+++ b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values.js
@@ -31,14 +31,14 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
assert(
compareArray(
- new TA().fill(convertToBigInt(8)),
+ new TA().fill(8n),
[]
),
"does not fill an empty instance"
);
assert(
- compareArray(new TA(convertToBigInt([0, 0, 0])).fill(convertToBigInt(8)), convertToBigInt([8, 8, 8])),
+ compareArray(new TA([0n, 0n, 0n]).fill(8n), [8n, 8n, 8n]),
"Default start and end indexes are 0 and this.length"
);
});
diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/get-length-ignores-length-prop.js b/test/built-ins/TypedArray/prototype/fill/BigInt/get-length-ignores-length-prop.js
index 5aa9a3a82..ec7637bc5 100644
--- a/test/built-ins/TypedArray/prototype/fill/BigInt/get-length-ignores-length-prop.js
+++ b/test/built-ins/TypedArray/prototype/fill/BigInt/get-length-ignores-length-prop.js
@@ -47,5 +47,5 @@ testWithBigIntTypedArrayConstructors(function(TA) {
}
});
- assert.sameValue(sample.fill(convertToBigInt(1), 0), sample);
+ assert.sameValue(sample.fill(1n, 0), sample);
});
diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end.js b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end.js
index a97eebf74..9dd7dd553 100644
--- a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end.js
+++ b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-end.js
@@ -37,6 +37,6 @@ var end = {
testWithBigIntTypedArrayConstructors(function(TA) {
var sample = new TA();
assert.throws(Test262Error, function() {
- sample.fill(convertToBigInt(1), 0, end);
+ sample.fill(1n, 0, end);
});
});
diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-set-value.js b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-set-value.js
index a1c8b8bbf..c30cbf097 100644
--- a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-set-value.js
+++ b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-set-value.js
@@ -37,7 +37,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42]));
+ var sample = new TA([42n]);
var obj = {
valueOf: function() {
throw new Test262Error();
diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start.js b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start.js
index 8003e7e91..c5731f2f5 100644
--- a/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start.js
+++ b/test/built-ins/TypedArray/prototype/fill/BigInt/return-abrupt-from-start.js
@@ -36,6 +36,6 @@ var start = {
testWithBigIntTypedArrayConstructors(function(TA) {
var sample = new TA();
assert.throws(Test262Error, function() {
- sample.fill(convertToBigInt(1), start);
+ sample.fill(1n, start);
});
});
diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/return-this.js b/test/built-ins/TypedArray/prototype/fill/BigInt/return-this.js
index 20697ddc3..83895854f 100644
--- a/test/built-ins/TypedArray/prototype/fill/BigInt/return-this.js
+++ b/test/built-ins/TypedArray/prototype/fill/BigInt/return-this.js
@@ -10,11 +10,11 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample1 = new TA();
- var result1 = sample1.fill(convertToBigInt(1));
+ var result1 = sample1.fill(1n);
assert.sameValue(result1, sample1);
var sample2 = new TA(42);
- var result2 = sample2.fill(convertToBigInt(7));
+ var result2 = sample2.fill(7n);
assert.sameValue(result2, sample2);
});
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-with-thisarg.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-with-thisarg.js
index d0d796be5..2d32a8a78 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-with-thisarg.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-with-thisarg.js
@@ -17,7 +17,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var results = [];
var thisArg = ["test262", 0, "ecma262", 0];
@@ -30,17 +30,17 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(thisArg.length, 4, "thisArg.length");
assert.sameValue(results[0].length, 3, "results[0].length");
- assert.sameValue(results[0][0], convertToBigInt(42), "results[0][0] - kValue");
+ assert.sameValue(results[0][0], 42n, "results[0][0] - kValue");
assert.sameValue(results[0][1], 0, "results[0][1] - k");
assert.sameValue(results[0][2], sample, "results[0][2] - this");
assert.sameValue(results[1].length, 3, "results[1].length");
- assert.sameValue(results[1][0], convertToBigInt(43), "results[1][0] - kValue");
+ assert.sameValue(results[1][0], 43n, "results[1][0] - kValue");
assert.sameValue(results[1][1], 1, "results[1][1] - k");
assert.sameValue(results[1][2], sample, "results[1][2] - this");
assert.sameValue(results[2].length, 3, "results[2].length");
- assert.sameValue(results[2][0], convertToBigInt(44), "results[2][0] - kValue");
+ assert.sameValue(results[2][0], 44n, "results[2][0] - kValue");
assert.sameValue(results[2][1], 2, "results[2][1] - k");
assert.sameValue(results[2][2], sample, "results[2][2] - this");
});
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-without-thisarg.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-without-thisarg.js
index ca3e078d2..5c9d91b6d 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-without-thisarg.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-arguments-without-thisarg.js
@@ -17,7 +17,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var results = [];
@@ -28,17 +28,17 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(results.length, 3, "results.length");
assert.sameValue(results[0].length, 3, "results[0].length");
- assert.sameValue(results[0][0], convertToBigInt(42), "results[0][0] - kValue");
+ assert.sameValue(results[0][0], 42n, "results[0][0] - kValue");
assert.sameValue(results[0][1], 0, "results[0][1] - k");
assert.sameValue(results[0][2], sample, "results[0][2] - this");
assert.sameValue(results[1].length, 3, "results[1].length");
- assert.sameValue(results[1][0], convertToBigInt(43), "results[1][0] - kValue");
+ assert.sameValue(results[1][0], 43n, "results[1][0] - kValue");
assert.sameValue(results[1][1], 1, "results[1][1] - k");
assert.sameValue(results[1][2], sample, "results[1][2] - this");
assert.sameValue(results[2].length, 3, "results[2].length");
- assert.sameValue(results[2][0], convertToBigInt(44), "results[2][0] - kValue");
+ assert.sameValue(results[2][0], 44n, "results[2][0] - kValue");
assert.sameValue(results[2][1], 2, "results[2][1] - k");
assert.sameValue(results[2][2], sample, "results[2][2] - this");
});
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-no-iteration-over-non-integer.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-no-iteration-over-non-integer.js
index b980efe72..2162cbe16 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-no-iteration-over-non-integer.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-no-iteration-over-non-integer.js
@@ -17,7 +17,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([7, 8]));
+ var sample = new TA([7n, 8n]);
var results = [];
@@ -33,6 +33,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(results[0][1], 0, "results[0][1] - k");
assert.sameValue(results[1][1], 1, "results[1][1] - k");
- assert.sameValue(results[0][0], convertToBigInt(7), "results[0][0] - kValue");
- assert.sameValue(results[1][0], convertToBigInt(8), "results[1][0] - kValue");
+ assert.sameValue(results[0][0], 7n, "results[0][0] - kValue");
+ assert.sameValue(results[1][0], 8n, "results[1][0] - kValue");
});
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-return-does-not-change-instance.js
index 4bac77886..4ace9cecc 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-return-does-not-change-instance.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-return-does-not-change-instance.js
@@ -11,13 +11,13 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample1 = new TA(3);
- sample1[1] = convertToBigInt(1);
+ sample1[1] = 1n;
sample1.filter(function() {
return 42;
});
- assert.sameValue(sample1[0], convertToBigInt(0), "[0] == 0");
- assert.sameValue(sample1[1], convertToBigInt(1), "[1] == 1");
- assert.sameValue(sample1[2], convertToBigInt(0), "[2] == 0");
+ assert.sameValue(sample1[0], 0n, "[0] == 0");
+ assert.sameValue(sample1[1], 1n, "[1] == 1");
+ assert.sameValue(sample1[2], 0n, "[2] == 0");
});
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-set-value-during-iteration.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-set-value-during-iteration.js
index a4e86b427..c8435afa6 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-set-value-during-iteration.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-set-value-during-iteration.js
@@ -17,7 +17,7 @@ features: [BigInt, Reflect.set, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var newVal = 0;
sample.filter(function(val, i) {
@@ -27,7 +27,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
"get the changed value during the loop"
);
assert.sameValue(
- Reflect.set(sample, 0, convertToBigInt(7)),
+ Reflect.set(sample, 0, 7n),
true,
"re-set a value for sample[0]"
);
@@ -41,7 +41,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
newVal++;
});
- assert.sameValue(sample[0], convertToBigInt(7), "changed values after interaction [0] == 7");
- assert.sameValue(sample[1], convertToBigInt(1), "changed values after interaction [1] == 1");
- assert.sameValue(sample[2], convertToBigInt(2), "changed values after interaction [2] == 2");
+ assert.sameValue(sample[0], 7n, "changed values after interaction [0] == 7");
+ assert.sameValue(sample[1], 1n, "changed values after interaction [1] == 1");
+ assert.sameValue(sample[2], 2n, "changed values after interaction [2] == 2");
});
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/result-does-not-share-buffer.js b/test/built-ins/TypedArray/prototype/filter/BigInt/result-does-not-share-buffer.js
index 1a84196dc..70c11fca3 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/result-does-not-share-buffer.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/result-does-not-share-buffer.js
@@ -16,7 +16,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42]));
+ var sample = new TA([40n, 41n, 42n]);
var result;
result = sample.filter(function() { return true; });
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/result-full-callbackfn-returns-true.js b/test/built-ins/TypedArray/prototype/filter/BigInt/result-full-callbackfn-returns-true.js
index d63ba8691..b539ca2ec 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/result-full-callbackfn-returns-true.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/result-full-callbackfn-returns-true.js
@@ -17,7 +17,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42]));
+ var sample = new TA([40n, 41n, 42n]);
[
true,
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-abrupt.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-abrupt.js
index 9b7bc9dfc..ea71fee89 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-abrupt.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-abrupt.js
@@ -27,7 +27,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
Object.defineProperty(sample, "constructor", {
get: function() {
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-inherited.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-inherited.js
index 35fe965b0..7de9e3d69 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-inherited.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-inherited.js
@@ -27,7 +27,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
var calls = 0;
var result;
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-returns-throws.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-returns-throws.js
index 79e40b47c..52fb99998 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-returns-throws.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor-returns-throws.js
@@ -31,7 +31,7 @@ features: [BigInt, Symbol, TypedArray]
var callbackfn = function() { return true; };
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
sample.constructor = 42;
assert.throws(TypeError, function() {
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor.js
index 0b64ac3ca..2fa985b26 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-ctor.js
@@ -27,7 +27,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
var calls = 0;
var result;
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-invocation.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-invocation.js
index 1efefe1be..5b3f2af2b 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-invocation.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-invocation.js
@@ -37,7 +37,7 @@ features: [BigInt, Symbol.species, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 42, 42]));
+ var sample = new TA([40n, 42n, 42n]);
var result, ctorThis;
sample.constructor = {};
@@ -47,7 +47,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
return new TA(count);
};
- sample.filter(function(v) { return v === convertToBigInt(42); });
+ sample.filter(function(v) { return v === 42n; });
assert.sameValue(result.length, 1, "called with 1 argument");
assert.sameValue(result[0], 2, "[0] is the new captured length");
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js
index 31f2887b3..8ad970667 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js
@@ -37,7 +37,7 @@ features: [BigInt, Symbol.species, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40]));
+ var sample = new TA([40n]);
var otherTA = TA === Int8Array ? Int16Array : Int8Array;
var other = new otherTA([1, 0, 1]);
var result;
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor.js
index f881f792d..4e4da9bee 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor.js
@@ -37,7 +37,7 @@ features: [BigInt, Symbol.species, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42]));
+ var sample = new TA([40n, 41n, 42n]);
var calls = 0;
var other, result;
@@ -52,5 +52,5 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(calls, 1, "ctor called once");
assert.sameValue(result, other, "return is instance of custom constructor");
- assert(compareArray(result, convertToBigInt([40, 41, 42])), "values are set on the new obj");
+ assert(compareArray(result, [40n, 41n, 42n]), "values are set on the new obj");
});
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/filter/BigInt/values-are-not-cached.js
index 25b7eb24a..d2a982a31 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/values-are-not-cached.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/values-are-not-cached.js
@@ -17,15 +17,15 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
sample.filter(function(v, i) {
if (i < sample.length - 1) {
- sample[i+1] = convertToBigInt(42);
+ sample[i+1] = 42n;
}
assert.sameValue(
- v, convertToBigInt(42), "method does not cache values before callbackfn calls"
+ v, 42n, "method does not cache values before callbackfn calls"
);
});
});
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/values-are-set.js b/test/built-ins/TypedArray/prototype/filter/BigInt/values-are-set.js
index b7f2775f2..49c65cacf 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/values-are-set.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/values-are-set.js
@@ -17,14 +17,14 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([41, 1, 42, 7]));
+ var sample = new TA([41n, 1n, 42n, 7n]);
var result;
result = sample.filter(function() { return true; });
- assert(compareArray(result, convertToBigInt([41, 1, 42, 7])), "values are set #1");
+ assert(compareArray(result, [41n, 1n, 42n, 7n]), "values are set #1");
result = sample.filter(function(v) {
- return v > convertToBigInt(40);
+ return v > 40n;
});
- assert(compareArray(result, convertToBigInt([41, 42])), "values are set #2");
+ assert(compareArray(result, [41n, 42n]), "values are set #2");
});
diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/get-length-ignores-length-prop.js b/test/built-ins/TypedArray/prototype/find/BigInt/get-length-ignores-length-prop.js
index aa522e378..ebdbdf05e 100644
--- a/test/built-ins/TypedArray/prototype/find/BigInt/get-length-ignores-length-prop.js
+++ b/test/built-ins/TypedArray/prototype/find/BigInt/get-length-ignores-length-prop.js
@@ -38,7 +38,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
}
});
- var sample = new TA(convertToBigInt([42]));
+ var sample = new TA([42n]);
Object.defineProperty(sample, "length", {
get: function() {
@@ -49,6 +49,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(
sample.find(function() { return true; }),
- convertToBigInt(42)
+ 42n
);
});
diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-changes-value.js b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-changes-value.js
index 4fd9ec6f1..86be70f05 100644
--- a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-changes-value.js
+++ b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-changes-value.js
@@ -30,7 +30,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var arr = convertToBigInt([1, 2, 3]);
+ var arr = [1n, 2n, 3n];
var sample;
var result;
@@ -38,41 +38,41 @@ testWithBigIntTypedArrayConstructors(function(TA) {
sample.find(function(val, i) {
sample[i] = arr[i];
- assert.sameValue(val, convertToBigInt(0), "value is not mapped to instance");
+ assert.sameValue(val, 0n, "value is not mapped to instance");
});
assert(compareArray(sample, arr), "values set during each predicate call");
sample = new TA(arr);
result = sample.find(function(val, i) {
if ( i === 0 ) {
- sample[2] = convertToBigInt(7);
+ sample[2] = 7n;
}
- return val === convertToBigInt(7);
+ return val === 7n;
});
- assert.sameValue(result, convertToBigInt(7), "value found");
+ assert.sameValue(result, 7n, "value found");
sample = new TA(arr);
result = sample.find(function(val, i) {
if ( i === 0 ) {
- sample[2] = convertToBigInt(7);
+ sample[2] = 7n;
}
- return val === convertToBigInt(3);
+ return val === 3n;
});
assert.sameValue(result, undefined, "value not found");
sample = new TA(arr);
result = sample.find(function(val, i) {
if ( i > 0 ) {
- sample[0] = convertToBigInt(7);
+ sample[0] = 7n;
}
- return val === convertToBigInt(7);
+ return val === 7n;
});
assert.sameValue(result, undefined, "value not found - changed after call");
sample = new TA(arr);
result = sample.find(function() {
- sample[0] = convertToBigInt(7);
+ sample[0] = 7n;
return true;
});
- assert.sameValue(result, convertToBigInt(1), "find() returns previous found value");
+ assert.sameValue(result, 1n, "find() returns previous found value");
});
diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-parameters.js b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-parameters.js
index fb1741af5..8fc8c558b 100644
--- a/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-parameters.js
+++ b/test/built-ins/TypedArray/prototype/find/BigInt/predicate-call-parameters.js
@@ -30,7 +30,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([39, 2, 62]));
+ var sample = new TA([39n, 2n, 62n]);
var results = [];
var result;
@@ -43,19 +43,19 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(results.length, 3, "predicate is called for each index");
result = results[0];
- assert.sameValue(result[0], convertToBigInt(39), "results[0][0] === 39, value");
+ assert.sameValue(result[0], 39n, "results[0][0] === 39, value");
assert.sameValue(result[1], 0, "results[0][1] === 0, index");
assert.sameValue(result[2], sample, "results[0][2] === sample, instance");
assert.sameValue(result.length, 3, "results[0].length === 3 arguments");
result = results[1];
- assert.sameValue(result[0], convertToBigInt(2), "results[1][0] === 2, value");
+ assert.sameValue(result[0], 2n, "results[1][0] === 2, value");
assert.sameValue(result[1], 1, "results[1][1] === 1, index");
assert.sameValue(result[2], sample, "results[1][2] === sample, instance");
assert.sameValue(result.length, 3, "results[1].length === 3 arguments");
result = results[2];
- assert.sameValue(result[0], convertToBigInt(62), "results[2][0] === 62, value");
+ assert.sameValue(result[0], 62n, "results[2][0] === 62, value");
assert.sameValue(result[1], 2, "results[2][1] === 2, index");
assert.sameValue(result[2], sample, "results[2][2] === sample, instance");
assert.sameValue(result.length, 3, "results[2].length === 3 arguments");
diff --git a/test/built-ins/TypedArray/prototype/find/BigInt/return-found-value-predicate-result-is-true.js b/test/built-ins/TypedArray/prototype/find/BigInt/return-found-value-predicate-result-is-true.js
index c4469ae2e..32ea9abd1 100644
--- a/test/built-ins/TypedArray/prototype/find/BigInt/return-found-value-predicate-result-is-true.js
+++ b/test/built-ins/TypedArray/prototype/find/BigInt/return-found-value-predicate-result-is-true.js
@@ -29,7 +29,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([39, 2, 62]));
+ var sample = new TA([39n, 2n, 62n]);
var called, result;
called = 0;
@@ -37,29 +37,29 @@ testWithBigIntTypedArrayConstructors(function(TA) {
called++;
return true;
});
- assert.sameValue(result, convertToBigInt(39), "returned true on sample[0]");
+ assert.sameValue(result, 39n, "returned true on sample[0]");
assert.sameValue(called, 1, "predicate was called once");
called = 0;
result = sample.find(function(val) {
called++;
- return val === convertToBigInt(62);
+ return val === 62n;
});
assert.sameValue(called, 3, "predicate was called three times");
- assert.sameValue(result, convertToBigInt(62), "returned true on sample[3]");
+ assert.sameValue(result, 62n, "returned true on sample[3]");
result = sample.find(function() { return "string"; });
- assert.sameValue(result, convertToBigInt(39), "ToBoolean(string)");
+ assert.sameValue(result, 39n, "ToBoolean(string)");
result = sample.find(function() { return {}; });
- assert.sameValue(result, convertToBigInt(39), "ToBoolean(object)");
+ assert.sameValue(result, 39n, "ToBoolean(object)");
result = sample.find(function() { return Symbol(""); });
- assert.sameValue(result, convertToBigInt(39), "ToBoolean(symbol)");
+ assert.sameValue(result, 39n, "ToBoolean(symbol)");
result = sample.find(function() { return 1; });
- assert.sameValue(result, convertToBigInt(39), "ToBoolean(number)");
+ assert.sameValue(result, 39n, "ToBoolean(number)");
result = sample.find(function() { return -1; });
- assert.sameValue(result, convertToBigInt(39), "ToBoolean(negative number)");
+ assert.sameValue(result, 39n, "ToBoolean(negative number)");
});
diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/get-length-ignores-length-prop.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/get-length-ignores-length-prop.js
index 47ea12773..d4287dfbd 100644
--- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/get-length-ignores-length-prop.js
+++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/get-length-ignores-length-prop.js
@@ -36,7 +36,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
}
});
- var sample = new TA(convertToBigInt([42]));
+ var sample = new TA([42n]);
Object.defineProperty(sample, "length", {
get: function() {
diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-changes-value.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-changes-value.js
index d20b670eb..2fa760323 100644
--- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-changes-value.js
+++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-changes-value.js
@@ -26,7 +26,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var arr = convertToBigInt([10, 20, 30]);
+ var arr = [10n, 20n, 30n];
var sample;
var result;
@@ -34,34 +34,34 @@ testWithBigIntTypedArrayConstructors(function(TA) {
sample.findIndex(function(val, i) {
sample[i] = arr[i];
- assert.sameValue(val, convertToBigInt(0), "value is not mapped to instance");
+ assert.sameValue(val, 0n, "value is not mapped to instance");
});
assert(compareArray(sample, arr), "values set during each predicate call");
sample = new TA(arr);
result = sample.findIndex(function(val, i) {
if ( i === 0 ) {
- sample[2] = convertToBigInt(7);
+ sample[2] = 7n;
}
- return val === convertToBigInt(7);
+ return val === 7n;
});
assert.sameValue(result, 2, "value found");
sample = new TA(arr);
result = sample.findIndex(function(val, i) {
if ( i === 0 ) {
- sample[2] = convertToBigInt(7);
+ sample[2] = 7n;
}
- return val === convertToBigInt(30);
+ return val === 30n;
});
assert.sameValue(result, -1, "value not found");
sample = new TA(arr);
result = sample.findIndex(function(val, i) {
if ( i > 0 ) {
- sample[0] = convertToBigInt(7);
+ sample[0] = 7n;
}
- return val === convertToBigInt(7);
+ return val === 7n;
});
assert.sameValue(result, -1, "value not found - changed after call");
});
diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-parameters.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-parameters.js
index eb73cd7e1..1025bbb24 100644
--- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-parameters.js
+++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-call-parameters.js
@@ -28,7 +28,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([39, 2, 62]));
+ var sample = new TA([39n, 2n, 62n]);
var results = [];
var result;
@@ -41,19 +41,19 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(results.length, 3, "predicate is called for each index");
result = results[0];
- assert.sameValue(result[0], convertToBigInt(39), "results[0][0] === 39, value");
+ assert.sameValue(result[0], 39n, "results[0][0] === 39, value");
assert.sameValue(result[1], 0, "results[0][1] === 0, index");
assert.sameValue(result[2], sample, "results[0][2] === sample, instance");
assert.sameValue(result.length, 3, "results[0].length === 3, arguments");
result = results[1];
- assert.sameValue(result[0], convertToBigInt(2), "results[1][0] === 2, value");
+ assert.sameValue(result[0], 2n, "results[1][0] === 2, value");
assert.sameValue(result[1], 1, "results[1][1] === 1, index");
assert.sameValue(result[2], sample, "results[1][2] === sample, instance");
assert.sameValue(result.length, 3, "results[1].length === 3, arguments");
result = results[2];
- assert.sameValue(result[0], convertToBigInt(62), "results[2][0] === 62, value");
+ assert.sameValue(result[0], 62n, "results[2][0] === 62, value");
assert.sameValue(result[1], 2, "results[2][1] === 2, index");
assert.sameValue(result[2], sample, "results[2][2] === sample, instance");
assert.sameValue(result.length, 3, "results[2].length === 3, arguments");
diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-index-predicate-result-is-true.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-index-predicate-result-is-true.js
index f19c09910..25e26d808 100644
--- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-index-predicate-result-is-true.js
+++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-index-predicate-result-is-true.js
@@ -28,7 +28,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([39, 3, 9]));
+ var sample = new TA([39n, 3n, 9n]);
var called = 0;
var result = sample.findIndex(function() {
@@ -42,7 +42,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
called = 0;
result = sample.findIndex(function(val) {
called++;
- return val === convertToBigInt(9);
+ return val === 9n;
});
assert.sameValue(called, 3, "predicate was called three times");
diff --git a/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-negative-one-if-predicate-returns-false-value.js b/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-negative-one-if-predicate-returns-false-value.js
index 933985462..fcf5d800c 100644
--- a/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-negative-one-if-predicate-returns-false-value.js
+++ b/test/built-ins/TypedArray/prototype/findIndex/BigInt/return-negative-one-if-predicate-returns-false-value.js
@@ -27,7 +27,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([1, 2, 3]));
+ var sample = new TA([1n, 2n, 3n]);
var called = 0;
var result = sample.findIndex(function() {
diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-with-thisarg.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-with-thisarg.js
index ada379de2..07478cadf 100644
--- a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-with-thisarg.js
+++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-with-thisarg.js
@@ -26,7 +26,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var results = [];
var thisArg = ["test262", 0, "ecma262", 0];
@@ -39,17 +39,17 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(thisArg.length, 4, "thisArg.length");
assert.sameValue(results[0].length, 3, "results[0].length");
- assert.sameValue(results[0][0], convertToBigInt(42), "results[0][0] - kValue");
+ assert.sameValue(results[0][0], 42n, "results[0][0] - kValue");
assert.sameValue(results[0][1], 0, "results[0][1] - k");
assert.sameValue(results[0][2], sample, "results[0][2] - this");
assert.sameValue(results[1].length, 3, "results[1].length");
- assert.sameValue(results[1][0], convertToBigInt(43), "results[1][0] - kValue");
+ assert.sameValue(results[1][0], 43n, "results[1][0] - kValue");
assert.sameValue(results[1][1], 1, "results[1][1] - k");
assert.sameValue(results[1][2], sample, "results[1][2] - this");
assert.sameValue(results[2].length, 3, "results[2].length");
- assert.sameValue(results[2][0], convertToBigInt(44), "results[2][0] - kValue");
+ assert.sameValue(results[2][0], 44n, "results[2][0] - kValue");
assert.sameValue(results[2][1], 2, "results[2][1] - k");
assert.sameValue(results[2][2], sample, "results[2][2] - this");
});
diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-without-thisarg.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-without-thisarg.js
index 81011139e..6b6bdec5c 100644
--- a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-without-thisarg.js
+++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-arguments-without-thisarg.js
@@ -26,7 +26,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var results = [];
@@ -37,17 +37,17 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(results.length, 3, "results.length");
assert.sameValue(results[0].length, 3, "results[0].length");
- assert.sameValue(results[0][0], convertToBigInt(42), "results[0][0] - kValue");
+ assert.sameValue(results[0][0], 42n, "results[0][0] - kValue");
assert.sameValue(results[0][1], 0, "results[0][1] - k");
assert.sameValue(results[0][2], sample, "results[0][2] - this");
assert.sameValue(results[1].length, 3, "results[1].length");
- assert.sameValue(results[1][0], convertToBigInt(43), "results[1][0] - kValue");
+ assert.sameValue(results[1][0], 43n, "results[1][0] - kValue");
assert.sameValue(results[1][1], 1, "results[1][1] - k");
assert.sameValue(results[1][2], sample, "results[1][2] - this");
assert.sameValue(results[2].length, 3, "results[2].length");
- assert.sameValue(results[2][0], convertToBigInt(44), "results[2][0] - kValue");
+ assert.sameValue(results[2][0], 44n, "results[2][0] - kValue");
assert.sameValue(results[2][1], 2, "results[2][1] - k");
assert.sameValue(results[2][2], sample, "results[2][2] - this");
});
diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-no-interaction-over-non-integer.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-no-interaction-over-non-integer.js
index 95c7e4b37..9edd63e09 100644
--- a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-no-interaction-over-non-integer.js
+++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-no-interaction-over-non-integer.js
@@ -20,7 +20,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([7, 8]));
+ var sample = new TA([7n, 8n]);
var results = [];
@@ -36,6 +36,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(results[0][1], 0, "results[0][1] - k");
assert.sameValue(results[1][1], 1, "results[1][1] - k");
- assert.sameValue(results[0][0], convertToBigInt(7), "results[0][0] - kValue");
- assert.sameValue(results[1][0], convertToBigInt(8), "results[1][0] - kValue");
+ assert.sameValue(results[0][0], 7n, "results[0][0] - kValue");
+ assert.sameValue(results[1][0], 8n, "results[1][0] - kValue");
});
diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-return-does-not-change-instance.js
index 82da435a1..341a7decd 100644
--- a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-return-does-not-change-instance.js
+++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-return-does-not-change-instance.js
@@ -18,13 +18,13 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample1 = new TA(3);
- sample1[1] = convertToBigInt(1);
+ sample1[1] = 1n;
sample1.forEach(function() {
return 42;
});
- assert.sameValue(sample1[0], convertToBigInt(0), "[0] == 0");
- assert.sameValue(sample1[1], convertToBigInt(1), "[1] == 1");
- assert.sameValue(sample1[2], convertToBigInt(0), "[2] == 0");
+ assert.sameValue(sample1[0], 0n, "[0] == 0");
+ assert.sameValue(sample1[1], 1n, "[1] == 1");
+ assert.sameValue(sample1[2], 0n, "[2] == 0");
});
diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-set-value-during-interaction.js
index 2b2865b4c..9d7acf91b 100644
--- a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-set-value-during-interaction.js
+++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-set-value-during-interaction.js
@@ -17,7 +17,7 @@ features: [BigInt, Reflect.set, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var newVal = 0;
sample.forEach(function(val, i) {
@@ -27,7 +27,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
"get the changed value during the loop"
);
assert.sameValue(
- Reflect.set(sample, 0, convertToBigInt(7)),
+ Reflect.set(sample, 0, 7n),
true,
"re-set a value for sample[0]"
);
@@ -41,7 +41,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
newVal++;
});
- assert.sameValue(sample[0], convertToBigInt(7), "changed values after iteration [0] == 7");
- assert.sameValue(sample[1], convertToBigInt(1), "changed values after iteration [1] == 1");
- assert.sameValue(sample[2], convertToBigInt(2), "changed values after iteration [2] == 2");
+ assert.sameValue(sample[0], 7n, "changed values after iteration [0] == 7");
+ assert.sameValue(sample[1], 1n, "changed values after iteration [1] == 1");
+ assert.sameValue(sample[2], 2n, "changed values after iteration [2] == 2");
});
diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/values-are-not-cached.js
index d937cf44f..1fcc724f8 100644
--- a/test/built-ins/TypedArray/prototype/forEach/BigInt/values-are-not-cached.js
+++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/values-are-not-cached.js
@@ -17,15 +17,15 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
sample.forEach(function(v, i) {
if (i < sample.length - 1) {
- sample[i+1] = convertToBigInt(42);
+ sample[i+1] = 42n;
}
assert.sameValue(
- v, convertToBigInt(42), "method does not cache values before callbackfn calls"
+ v, 42n, "method does not cache values before callbackfn calls"
);
});
});
diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-infinity.js b/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-infinity.js
index 0d44d7a65..56dd73515 100644
--- a/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-infinity.js
+++ b/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-infinity.js
@@ -30,15 +30,15 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 43, 41]));
+ var sample = new TA([42n, 43n, 43n, 41n]);
assert.sameValue(
- sample.includes(convertToBigInt(43), Infinity),
+ sample.includes(43n, Infinity),
false,
"includes(43, Infinity)"
);
assert.sameValue(
- sample.includes(convertToBigInt(43), -Infinity),
+ sample.includes(43n, -Infinity),
true,
"includes(43, -Infinity)");
});
diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-minus-zero.js b/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-minus-zero.js
index 285a7c316..83ee261a7 100644
--- a/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-minus-zero.js
+++ b/test/built-ins/TypedArray/prototype/includes/BigInt/fromIndex-minus-zero.js
@@ -27,8 +27,8 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample;
- sample = new TA(convertToBigInt([42, 43]));
- assert.sameValue(sample.includes(convertToBigInt(42), -0), true, "-0 [0]");
- assert.sameValue(sample.includes(convertToBigInt(43), -0), true, "-0 [1]");
- assert.sameValue(sample.includes(convertToBigInt(44), -0), false, "-0 [2]");
+ sample = new TA([42n, 43n]);
+ assert.sameValue(sample.includes(42n, -0), true, "-0 [0]");
+ assert.sameValue(sample.includes(43n, -0), true, "-0 [1]");
+ assert.sameValue(sample.includes(44n, -0), false, "-0 [2]");
});
diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/includes/BigInt/get-length-uses-internal-arraylength.js
index 85ab71b09..2117ea212 100644
--- a/test/built-ins/TypedArray/prototype/includes/BigInt/get-length-uses-internal-arraylength.js
+++ b/test/built-ins/TypedArray/prototype/includes/BigInt/get-length-uses-internal-arraylength.js
@@ -24,10 +24,10 @@ features: [BigInt, TypedArray]
Object.defineProperty(TypedArray.prototype, "length", {value: 0});
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([7]));
+ var sample = new TA([7n]);
Object.defineProperty(TA.prototype, "length", {value: 0});
Object.defineProperty(sample, "length", {value: 0});
- assert.sameValue(sample.includes(convertToBigInt(7)), true);
+ assert.sameValue(sample.includes(7n), true);
});
diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex-symbol.js b/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex-symbol.js
index 33c8861ab..0625bfbcf 100644
--- a/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex-symbol.js
+++ b/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex-symbol.js
@@ -25,9 +25,9 @@ features: [BigInt, Symbol, TypedArray]
var fromIndex = Symbol("1");
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([7]));
+ var sample = new TA([7n]);
assert.throws(TypeError, function() {
- sample.includes(convertToBigInt(7), fromIndex);
+ sample.includes(7n, fromIndex);
});
});
diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex.js
index 6ddcb1f70..1013df57e 100644
--- a/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex.js
+++ b/test/built-ins/TypedArray/prototype/includes/BigInt/return-abrupt-tointeger-fromindex.js
@@ -29,9 +29,9 @@ var fromIndex = {
};
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([7]));
+ var sample = new TA([7n]);
assert.throws(Test262Error, function() {
- sample.includes(convertToBigInt(7), fromIndex);
+ sample.includes(7n, fromIndex);
});
});
diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/search-found-returns-true.js b/test/built-ins/TypedArray/prototype/includes/BigInt/search-found-returns-true.js
index f11212ce4..3d1140a0a 100644
--- a/test/built-ins/TypedArray/prototype/includes/BigInt/search-found-returns-true.js
+++ b/test/built-ins/TypedArray/prototype/includes/BigInt/search-found-returns-true.js
@@ -30,15 +30,15 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 42, 41]));
- assert.sameValue(sample.includes(convertToBigInt(42)), true, "includes(42)");
- assert.sameValue(sample.includes(convertToBigInt(43)), true, "includes(43)");
- assert.sameValue(sample.includes(convertToBigInt(43), 1), true, "includes(43, 1)");
- assert.sameValue(sample.includes(convertToBigInt(42), 1), true, "includes(42, 1)");
- assert.sameValue(sample.includes(convertToBigInt(42), 2), true, "includes(42, 2)");
+ var sample = new TA([42n, 43n, 42n, 41n]);
+ assert.sameValue(sample.includes(42n), true, "includes(42)");
+ assert.sameValue(sample.includes(43n), true, "includes(43)");
+ assert.sameValue(sample.includes(43n, 1), true, "includes(43, 1)");
+ assert.sameValue(sample.includes(42n, 1), true, "includes(42, 1)");
+ assert.sameValue(sample.includes(42n, 2), true, "includes(42, 2)");
- assert.sameValue(sample.includes(convertToBigInt(42), -4), true, "includes(42, -4)");
- assert.sameValue(sample.includes(convertToBigInt(42), -3), true, "includes(42, -3)");
- assert.sameValue(sample.includes(convertToBigInt(42), -2), true, "includes(42, -2)");
- assert.sameValue(sample.includes(convertToBigInt(42), -5), true, "includes(42, -5)");
+ assert.sameValue(sample.includes(42n, -4), true, "includes(42, -4)");
+ assert.sameValue(sample.includes(42n, -3), true, "includes(42, -3)");
+ assert.sameValue(sample.includes(42n, -2), true, "includes(42, -2)");
+ assert.sameValue(sample.includes(42n, -5), true, "includes(42, -5)");
});
diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/search-not-found-returns-false.js b/test/built-ins/TypedArray/prototype/includes/BigInt/search-not-found-returns-false.js
index 5bf3b9086..9d4673e8c 100644
--- a/test/built-ins/TypedArray/prototype/includes/BigInt/search-not-found-returns-false.js
+++ b/test/built-ins/TypedArray/prototype/includes/BigInt/search-not-found-returns-false.js
@@ -32,11 +32,11 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample;
- sample = new TA(convertToBigInt([42, 43, 42, 41]));
- assert.sameValue(sample.includes(convertToBigInt(44)), false, "includes(44)");
- assert.sameValue(sample.includes(convertToBigInt(43), 2), false, "includes(43, 2)");
- assert.sameValue(sample.includes(convertToBigInt(42), 3), false, "includes(42, 3)");
- assert.sameValue(sample.includes(convertToBigInt(44), -4), false, "includes(44, -4)");
- assert.sameValue(sample.includes(convertToBigInt(44), -5), false, "includes(44, -5)");
- assert.sameValue(sample.includes(convertToBigInt(42), -1), false, "includes(42, -1)");
+ sample = new TA([42n, 43n, 42n, 41n]);
+ assert.sameValue(sample.includes(44n), false, "includes(44)");
+ assert.sameValue(sample.includes(43n, 2), false, "includes(43, 2)");
+ assert.sameValue(sample.includes(42n, 3), false, "includes(42, 3)");
+ assert.sameValue(sample.includes(44n, -4), false, "includes(44, -4)");
+ assert.sameValue(sample.includes(44n, -5), false, "includes(44, -5)");
+ assert.sameValue(sample.includes(42n, -1), false, "includes(42, -1)");
});
diff --git a/test/built-ins/TypedArray/prototype/includes/BigInt/tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/includes/BigInt/tointeger-fromindex.js
index 67fbd38da..4c5872be6 100644
--- a/test/built-ins/TypedArray/prototype/includes/BigInt/tointeger-fromindex.js
+++ b/test/built-ins/TypedArray/prototype/includes/BigInt/tointeger-fromindex.js
@@ -38,28 +38,28 @@ var obj = {
testWithBigIntTypedArrayConstructors(function(TA) {
var sample;
- sample = new TA(convertToBigInt([42, 43]));
- assert.sameValue(sample.includes(convertToBigInt(42), "1"), false, "string [0]");
- assert.sameValue(sample.includes(convertToBigInt(43), "1"), true, "string [1]");
+ sample = new TA([42n, 43n]);
+ assert.sameValue(sample.includes(42n, "1"), false, "string [0]");
+ assert.sameValue(sample.includes(43n, "1"), true, "string [1]");
- assert.sameValue(sample.includes(convertToBigInt(42), true), false, "true [0]");
- assert.sameValue(sample.includes(convertToBigInt(43), true), true, "true [1]");
+ assert.sameValue(sample.includes(42n, true), false, "true [0]");
+ assert.sameValue(sample.includes(43n, true), true, "true [1]");
- assert.sameValue(sample.includes(convertToBigInt(42), false), true, "false [0]");
- assert.sameValue(sample.includes(convertToBigInt(43), false), true, "false [1]");
+ assert.sameValue(sample.includes(42n, false), true, "false [0]");
+ assert.sameValue(sample.includes(43n, false), true, "false [1]");
- assert.sameValue(sample.includes(convertToBigInt(42), NaN), true, "NaN [0]");
- assert.sameValue(sample.includes(convertToBigInt(43), NaN), true, "NaN [1]");
+ assert.sameValue(sample.includes(42n, NaN), true, "NaN [0]");
+ assert.sameValue(sample.includes(43n, NaN), true, "NaN [1]");
- assert.sameValue(sample.includes(convertToBigInt(42), null), true, "null [0]");
- assert.sameValue(sample.includes(convertToBigInt(43), null), true, "null [1]");
+ assert.sameValue(sample.includes(42n, null), true, "null [0]");
+ assert.sameValue(sample.includes(43n, null), true, "null [1]");
- assert.sameValue(sample.includes(convertToBigInt(42), undefined), true, "undefined [0]");
- assert.sameValue(sample.includes(convertToBigInt(43), undefined), true, "undefined [1]");
+ assert.sameValue(sample.includes(42n, undefined), true, "undefined [0]");
+ assert.sameValue(sample.includes(43n, undefined), true, "undefined [1]");
- assert.sameValue(sample.includes(convertToBigInt(42), null), true, "null [0]");
- assert.sameValue(sample.includes(convertToBigInt(43), null), true, "null [1]");
+ assert.sameValue(sample.includes(42n, null), true, "null [0]");
+ assert.sameValue(sample.includes(43n, null), true, "null [1]");
- assert.sameValue(sample.includes(convertToBigInt(42), obj), false, "object [0]");
- assert.sameValue(sample.includes(convertToBigInt(43), obj), true, "object [1]");
+ assert.sameValue(sample.includes(42n, obj), false, "object [0]");
+ assert.sameValue(sample.includes(43n, obj), true, "object [1]");
});
diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-infinity.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-infinity.js
index 38a6515cf..07bcd38a4 100644
--- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-infinity.js
+++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-infinity.js
@@ -32,8 +32,8 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 43, 41]));
+ var sample = new TA([42n, 43n, 43n, 41n]);
- assert.sameValue(sample.indexOf(convertToBigInt(43), Infinity), -1, "indexOf(43, Infinity)");
- assert.sameValue(sample.indexOf(convertToBigInt(43), -Infinity), 1, "indexOf(43, -Infinity)");
+ assert.sameValue(sample.indexOf(43n, Infinity), -1, "indexOf(43, Infinity)");
+ assert.sameValue(sample.indexOf(43n, -Infinity), 1, "indexOf(43, -Infinity)");
});
diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-minus-zero.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-minus-zero.js
index bd141027d..90dc45150 100644
--- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-minus-zero.js
+++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/fromIndex-minus-zero.js
@@ -24,7 +24,7 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample;
- sample = new TA(convertToBigInt([42, 43]));
- assert.sameValue(sample.indexOf(convertToBigInt(42), -0), 0, "-0 [0]");
- assert.sameValue(sample.indexOf(convertToBigInt(43), -0), 1, "-0 [1]");
+ sample = new TA([42n, 43n]);
+ assert.sameValue(sample.indexOf(42n, -0), 0, "-0 [0]");
+ assert.sameValue(sample.indexOf(43n, -0), 1, "-0 [1]");
});
diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/get-length-uses-internal-arraylength.js
index 61a961bd4..9c386b222 100644
--- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/get-length-uses-internal-arraylength.js
+++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/get-length-uses-internal-arraylength.js
@@ -23,10 +23,10 @@ features: [BigInt, TypedArray]
Object.defineProperty(TypedArray.prototype, "length", {value: 0});
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([7]));
+ var sample = new TA([7n]);
Object.defineProperty(TA.prototype, "length", {value: 0});
Object.defineProperty(sample, "length", {value: 0});
- assert.sameValue(sample.indexOf(convertToBigInt(7)), 0);
+ assert.sameValue(sample.indexOf(7n), 0);
});
diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/search-found-returns-index.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/search-found-returns-index.js
index e932c2689..484e16f5c 100644
--- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/search-found-returns-index.js
+++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/search-found-returns-index.js
@@ -32,15 +32,15 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 42, 41]));
- assert.sameValue(sample.indexOf(convertToBigInt(42)), 0, "indexOf(42)");
- assert.sameValue(sample.indexOf(convertToBigInt(43)), 1, "indexOf(43)");
- assert.sameValue(sample.indexOf(convertToBigInt(43), 1), 1, "indexOf(43, 1)");
- assert.sameValue(sample.indexOf(convertToBigInt(42), 1), 2, "indexOf(42, 1)");
- assert.sameValue(sample.indexOf(convertToBigInt(42), 2), 2, "indexOf(42, 2)");
+ var sample = new TA([42n, 43n, 42n, 41n]);
+ assert.sameValue(sample.indexOf(42n), 0, "indexOf(42)");
+ assert.sameValue(sample.indexOf(43n), 1, "indexOf(43)");
+ assert.sameValue(sample.indexOf(43n, 1), 1, "indexOf(43, 1)");
+ assert.sameValue(sample.indexOf(42n, 1), 2, "indexOf(42, 1)");
+ assert.sameValue(sample.indexOf(42n, 2), 2, "indexOf(42, 2)");
- assert.sameValue(sample.indexOf(convertToBigInt(42), -4), 0, "indexOf(42, -4)");
- assert.sameValue(sample.indexOf(convertToBigInt(42), -3), 2, "indexOf(42, -3)");
- assert.sameValue(sample.indexOf(convertToBigInt(42), -2), 2, "indexOf(42, -2)");
- assert.sameValue(sample.indexOf(convertToBigInt(42), -5), 0, "indexOf(42, -5)");
+ assert.sameValue(sample.indexOf(42n, -4), 0, "indexOf(42, -4)");
+ assert.sameValue(sample.indexOf(42n, -3), 2, "indexOf(42, -3)");
+ assert.sameValue(sample.indexOf(42n, -2), 2, "indexOf(42, -2)");
+ assert.sameValue(sample.indexOf(42n, -5), 0, "indexOf(42, -5)");
});
diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/search-not-found-returns-minus-one.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/search-not-found-returns-minus-one.js
index 94dc9285e..2ef363213 100644
--- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/search-not-found-returns-minus-one.js
+++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/search-not-found-returns-minus-one.js
@@ -28,11 +28,11 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample;
- sample = new TA(convertToBigInt([42, 43, 42, 41]));
- assert.sameValue(sample.indexOf(convertToBigInt(44)), -1, "indexOf(44)");
- assert.sameValue(sample.indexOf(convertToBigInt(43), 2), -1, "indexOf(43, 2)");
- assert.sameValue(sample.indexOf(convertToBigInt(42), 3), -1, "indexOf(42, 3)");
- assert.sameValue(sample.indexOf(convertToBigInt(44), -4), -1, "indexOf(44, -4)");
- assert.sameValue(sample.indexOf(convertToBigInt(44), -5), -1, "indexOf(44, -5)");
- assert.sameValue(sample.indexOf(convertToBigInt(42), -1), -1, "indexOf(42, -1)");
+ sample = new TA([42n, 43n, 42n, 41n]);
+ assert.sameValue(sample.indexOf(44n), -1, "indexOf(44)");
+ assert.sameValue(sample.indexOf(43n, 2), -1, "indexOf(43, 2)");
+ assert.sameValue(sample.indexOf(42n, 3), -1, "indexOf(42, 3)");
+ assert.sameValue(sample.indexOf(44n, -4), -1, "indexOf(44, -4)");
+ assert.sameValue(sample.indexOf(44n, -5), -1, "indexOf(44, -5)");
+ assert.sameValue(sample.indexOf(42n, -1), -1, "indexOf(42, -1)");
});
diff --git a/test/built-ins/TypedArray/prototype/indexOf/BigInt/tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/indexOf/BigInt/tointeger-fromindex.js
index e338bf1a4..dd62589c5 100644
--- a/test/built-ins/TypedArray/prototype/indexOf/BigInt/tointeger-fromindex.js
+++ b/test/built-ins/TypedArray/prototype/indexOf/BigInt/tointeger-fromindex.js
@@ -30,28 +30,28 @@ var obj = {
testWithBigIntTypedArrayConstructors(function(TA) {
var sample;
- sample = new TA(convertToBigInt([42, 43]));
- assert.sameValue(sample.indexOf(convertToBigInt(42), "1"), -1, "string [0]");
- assert.sameValue(sample.indexOf(convertToBigInt(43), "1"), 1, "string [1]");
+ sample = new TA([42n, 43n]);
+ assert.sameValue(sample.indexOf(42n, "1"), -1, "string [0]");
+ assert.sameValue(sample.indexOf(43n, "1"), 1, "string [1]");
- assert.sameValue(sample.indexOf(convertToBigInt(42), true), -1, "true [0]");
- assert.sameValue(sample.indexOf(convertToBigInt(43), true), 1, "true [1]");
+ assert.sameValue(sample.indexOf(42n, true), -1, "true [0]");
+ assert.sameValue(sample.indexOf(43n, true), 1, "true [1]");
- assert.sameValue(sample.indexOf(convertToBigInt(42), false), 0, "false [0]");
- assert.sameValue(sample.indexOf(convertToBigInt(43), false), 1, "false [1]");
+ assert.sameValue(sample.indexOf(42n, false), 0, "false [0]");
+ assert.sameValue(sample.indexOf(43n, false), 1, "false [1]");
- assert.sameValue(sample.indexOf(convertToBigInt(42), NaN), 0, "NaN [0]");
- assert.sameValue(sample.indexOf(convertToBigInt(43), NaN), 1, "NaN [1]");
+ assert.sameValue(sample.indexOf(42n, NaN), 0, "NaN [0]");
+ assert.sameValue(sample.indexOf(43n, NaN), 1, "NaN [1]");
- assert.sameValue(sample.indexOf(convertToBigInt(42), null), 0, "null [0]");
- assert.sameValue(sample.indexOf(convertToBigInt(43), null), 1, "null [1]");
+ assert.sameValue(sample.indexOf(42n, null), 0, "null [0]");
+ assert.sameValue(sample.indexOf(43n, null), 1, "null [1]");
- assert.sameValue(sample.indexOf(convertToBigInt(42), undefined), 0, "undefined [0]");
- assert.sameValue(sample.indexOf(convertToBigInt(43), undefined), 1, "undefined [1]");
+ assert.sameValue(sample.indexOf(42n, undefined), 0, "undefined [0]");
+ assert.sameValue(sample.indexOf(43n, undefined), 1, "undefined [1]");
- assert.sameValue(sample.indexOf(convertToBigInt(42), null), 0, "null [0]");
- assert.sameValue(sample.indexOf(convertToBigInt(43), null), 1, "null [1]");
+ assert.sameValue(sample.indexOf(42n, null), 0, "null [0]");
+ assert.sameValue(sample.indexOf(43n, null), 1, "null [1]");
- assert.sameValue(sample.indexOf(convertToBigInt(42), obj), -1, "object [0]");
- assert.sameValue(sample.indexOf(convertToBigInt(43), obj), 1, "object [1]");
+ assert.sameValue(sample.indexOf(42n, obj), -1, "object [0]");
+ assert.sameValue(sample.indexOf(43n, obj), 1, "object [1]");
});
diff --git a/test/built-ins/TypedArray/prototype/join/BigInt/custom-separator-result-from-tostring-on-each-simple-value.js b/test/built-ins/TypedArray/prototype/join/BigInt/custom-separator-result-from-tostring-on-each-simple-value.js
index 2f611e46f..df053b194 100644
--- a/test/built-ins/TypedArray/prototype/join/BigInt/custom-separator-result-from-tostring-on-each-simple-value.js
+++ b/test/built-ins/TypedArray/prototype/join/BigInt/custom-separator-result-from-tostring-on-each-simple-value.js
@@ -30,7 +30,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([1, 0, 2, 3, 42, 127]));
+ var sample = new TA([1n, 0n, 2n, 3n, 42n, 127n]);
var result;
diff --git a/test/built-ins/TypedArray/prototype/join/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/join/BigInt/get-length-uses-internal-arraylength.js
index 24ca6f0e3..87e785727 100644
--- a/test/built-ins/TypedArray/prototype/join/BigInt/get-length-uses-internal-arraylength.js
+++ b/test/built-ins/TypedArray/prototype/join/BigInt/get-length-uses-internal-arraylength.js
@@ -33,7 +33,7 @@ var desc = {
Object.defineProperty(TypedArray.prototype, "length", desc);
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
Object.defineProperty(TA.prototype, "length", desc);
Object.defineProperty(sample, "length", desc);
diff --git a/test/built-ins/TypedArray/prototype/join/BigInt/result-from-tostring-on-each-simple-value.js b/test/built-ins/TypedArray/prototype/join/BigInt/result-from-tostring-on-each-simple-value.js
index 186585603..ca80064ec 100644
--- a/test/built-ins/TypedArray/prototype/join/BigInt/result-from-tostring-on-each-simple-value.js
+++ b/test/built-ins/TypedArray/prototype/join/BigInt/result-from-tostring-on-each-simple-value.js
@@ -29,7 +29,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([1, 0, 2, 3, 42, 127]));
+ var sample = new TA([1n, 0n, 2n, 3n, 42n, 127n]);
var result = sample.join();
diff --git a/test/built-ins/TypedArray/prototype/keys/BigInt/iter-prototype.js b/test/built-ins/TypedArray/prototype/keys/BigInt/iter-prototype.js
index fd5e0a5ec..c8e5f11d8 100644
--- a/test/built-ins/TypedArray/prototype/keys/BigInt/iter-prototype.js
+++ b/test/built-ins/TypedArray/prototype/keys/BigInt/iter-prototype.js
@@ -18,7 +18,7 @@ features: [BigInt, Symbol.iterator, TypedArray]
var ArrayIteratorProto = Object.getPrototypeOf([][Symbol.iterator]());
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([0, 42, 64]));
+ var sample = new TA([0n, 42n, 64n]);
var iter = sample.keys();
assert.sameValue(Object.getPrototypeOf(iter), ArrayIteratorProto);
diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-infinity.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-infinity.js
index d7c28b130..1c0488a76 100644
--- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-infinity.js
+++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-infinity.js
@@ -25,8 +25,8 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 43, 41]));
+ var sample = new TA([42n, 43n, 43n, 41n]);
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), Infinity), 2, "lastIndexOf(43, Infinity)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), -Infinity), -1, "lastIndexOf(43, -Infinity)");
+ assert.sameValue(sample.lastIndexOf(43n, Infinity), 2, "lastIndexOf(43, Infinity)");
+ assert.sameValue(sample.lastIndexOf(43n, -Infinity), -1, "lastIndexOf(43, -Infinity)");
});
diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-minus-zero.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-minus-zero.js
index 284d49930..bd42c0272 100644
--- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-minus-zero.js
+++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/fromIndex-minus-zero.js
@@ -24,7 +24,7 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample;
- sample = new TA(convertToBigInt([42, 43]));
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), -0), 0, "-0 [0]");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), -0), -1, "-0 [1]");
+ sample = new TA([42n, 43n]);
+ assert.sameValue(sample.lastIndexOf(42n, -0), 0, "-0 [0]");
+ assert.sameValue(sample.lastIndexOf(43n, -0), -1, "-0 [1]");
});
diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/get-length-uses-internal-arraylength.js
index 2b4daf2dd..ee9f23ff0 100644
--- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/get-length-uses-internal-arraylength.js
+++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/get-length-uses-internal-arraylength.js
@@ -23,10 +23,10 @@ features: [BigInt, TypedArray]
Object.defineProperty(TypedArray.prototype, "length", {value: 0});
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([7]));
+ var sample = new TA([7n]);
Object.defineProperty(TA.prototype, "length", {value: 0});
Object.defineProperty(sample, "length", {value: 0});
- assert.sameValue(sample.lastIndexOf(convertToBigInt(7)), 0);
+ assert.sameValue(sample.lastIndexOf(7n), 0);
});
diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-found-returns-index.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-found-returns-index.js
index 255672fa4..91ce88731 100644
--- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-found-returns-index.js
+++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-found-returns-index.js
@@ -31,27 +31,27 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 42, 41]));
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42)), 2, "lastIndexOf(42)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43)), 1, "lastIndexOf(43)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(41)), 3, "lastIndexOf(41)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(41), 3), 3, "lastIndexOf(41, 3)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(41), 4), 3, "lastIndexOf(41, 4)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), 1), 1, "lastIndexOf(43, 1)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), 2), 1, "lastIndexOf(43, 2)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), 3), 1, "lastIndexOf(43, 3)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), 4), 1, "lastIndexOf(43, 4)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), 0), 0, "lastIndexOf(42, 0)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), 1), 0, "lastIndexOf(42, 1)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), 2), 2, "lastIndexOf(42, 2)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), 3), 2, "lastIndexOf(42, 3)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), 4), 2, "lastIndexOf(42, 4)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), -4), 0, "lastIndexOf(42, -4)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), -3), 0, "lastIndexOf(42, -3)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), -2), 2, "lastIndexOf(42, -2)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), -1), 2, "lastIndexOf(42, -1)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), -3), 1, "lastIndexOf(43, -3)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), -2), 1, "lastIndexOf(43, -2)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), -1), 1, "lastIndexOf(43, -1)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(41), -1), 3, "lastIndexOf(41, -1)");
+ var sample = new TA([42n, 43n, 42n, 41n]);
+ assert.sameValue(sample.lastIndexOf(42n), 2, "lastIndexOf(42)");
+ assert.sameValue(sample.lastIndexOf(43n), 1, "lastIndexOf(43)");
+ assert.sameValue(sample.lastIndexOf(41n), 3, "lastIndexOf(41)");
+ assert.sameValue(sample.lastIndexOf(41n, 3), 3, "lastIndexOf(41, 3)");
+ assert.sameValue(sample.lastIndexOf(41n, 4), 3, "lastIndexOf(41, 4)");
+ assert.sameValue(sample.lastIndexOf(43n, 1), 1, "lastIndexOf(43, 1)");
+ assert.sameValue(sample.lastIndexOf(43n, 2), 1, "lastIndexOf(43, 2)");
+ assert.sameValue(sample.lastIndexOf(43n, 3), 1, "lastIndexOf(43, 3)");
+ assert.sameValue(sample.lastIndexOf(43n, 4), 1, "lastIndexOf(43, 4)");
+ assert.sameValue(sample.lastIndexOf(42n, 0), 0, "lastIndexOf(42, 0)");
+ assert.sameValue(sample.lastIndexOf(42n, 1), 0, "lastIndexOf(42, 1)");
+ assert.sameValue(sample.lastIndexOf(42n, 2), 2, "lastIndexOf(42, 2)");
+ assert.sameValue(sample.lastIndexOf(42n, 3), 2, "lastIndexOf(42, 3)");
+ assert.sameValue(sample.lastIndexOf(42n, 4), 2, "lastIndexOf(42, 4)");
+ assert.sameValue(sample.lastIndexOf(42n, -4), 0, "lastIndexOf(42, -4)");
+ assert.sameValue(sample.lastIndexOf(42n, -3), 0, "lastIndexOf(42, -3)");
+ assert.sameValue(sample.lastIndexOf(42n, -2), 2, "lastIndexOf(42, -2)");
+ assert.sameValue(sample.lastIndexOf(42n, -1), 2, "lastIndexOf(42, -1)");
+ assert.sameValue(sample.lastIndexOf(43n, -3), 1, "lastIndexOf(43, -3)");
+ assert.sameValue(sample.lastIndexOf(43n, -2), 1, "lastIndexOf(43, -2)");
+ assert.sameValue(sample.lastIndexOf(43n, -1), 1, "lastIndexOf(43, -1)");
+ assert.sameValue(sample.lastIndexOf(41n, -1), 3, "lastIndexOf(41, -1)");
});
diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-not-found-returns-minus-one.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-not-found-returns-minus-one.js
index d53260ab8..823e43174 100644
--- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-not-found-returns-minus-one.js
+++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/search-not-found-returns-minus-one.js
@@ -28,15 +28,15 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample;
- sample = new TA(convertToBigInt([42, 43, 42, 41]));
- assert.sameValue(sample.lastIndexOf(convertToBigInt(44)), -1, "lastIndexOf(44)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(44), -4), -1, "lastIndexOf(44, -4)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(44), -5), -1, "lastIndexOf(44, -5)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), -5), -1, "lastIndexOf(42, -5)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), -4), -1, "lastIndexOf(43, -4)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), -5), -1, "lastIndexOf(43, -5)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(41), 0), -1, "lastIndexOf(41, 0)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(41), 1), -1, "lastIndexOf(41, 1)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(41), 2), -1, "lastIndexOf(41, 2)");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), 0), -1, "lastIndexOf(43, 0)");
+ sample = new TA([42n, 43n, 42n, 41n]);
+ assert.sameValue(sample.lastIndexOf(44n), -1, "lastIndexOf(44)");
+ assert.sameValue(sample.lastIndexOf(44n, -4), -1, "lastIndexOf(44, -4)");
+ assert.sameValue(sample.lastIndexOf(44n, -5), -1, "lastIndexOf(44, -5)");
+ assert.sameValue(sample.lastIndexOf(42n, -5), -1, "lastIndexOf(42, -5)");
+ assert.sameValue(sample.lastIndexOf(43n, -4), -1, "lastIndexOf(43, -4)");
+ assert.sameValue(sample.lastIndexOf(43n, -5), -1, "lastIndexOf(43, -5)");
+ assert.sameValue(sample.lastIndexOf(41n, 0), -1, "lastIndexOf(41, 0)");
+ assert.sameValue(sample.lastIndexOf(41n, 1), -1, "lastIndexOf(41, 1)");
+ assert.sameValue(sample.lastIndexOf(41n, 2), -1, "lastIndexOf(41, 2)");
+ assert.sameValue(sample.lastIndexOf(43n, 0), -1, "lastIndexOf(43, 0)");
});
diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/tointeger-fromindex.js
index 8c591c1a7..a51656722 100644
--- a/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/tointeger-fromindex.js
+++ b/test/built-ins/TypedArray/prototype/lastIndexOf/BigInt/tointeger-fromindex.js
@@ -30,28 +30,28 @@ var obj = {
testWithBigIntTypedArrayConstructors(function(TA) {
var sample;
- sample = new TA(convertToBigInt([42, 43]));
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), "1"), 0, "string [0]");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), "1"), 1, "string [1]");
+ sample = new TA([42n, 43n]);
+ assert.sameValue(sample.lastIndexOf(42n, "1"), 0, "string [0]");
+ assert.sameValue(sample.lastIndexOf(43n, "1"), 1, "string [1]");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), true), 0, "true [0]");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), true), 1, "true [1]");
+ assert.sameValue(sample.lastIndexOf(42n, true), 0, "true [0]");
+ assert.sameValue(sample.lastIndexOf(43n, true), 1, "true [1]");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), false), 0, "false [0]");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), false), -1, "false [1]");
+ assert.sameValue(sample.lastIndexOf(42n, false), 0, "false [0]");
+ assert.sameValue(sample.lastIndexOf(43n, false), -1, "false [1]");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), NaN), 0, "NaN [0]");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), NaN), -1, "NaN [1]");
+ assert.sameValue(sample.lastIndexOf(42n, NaN), 0, "NaN [0]");
+ assert.sameValue(sample.lastIndexOf(43n, NaN), -1, "NaN [1]");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), null), 0, "null [0]");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), null), -1, "null [1]");
+ assert.sameValue(sample.lastIndexOf(42n, null), 0, "null [0]");
+ assert.sameValue(sample.lastIndexOf(43n, null), -1, "null [1]");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), undefined), 0, "undefined [0]");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), undefined), -1, "undefined [1]");
+ assert.sameValue(sample.lastIndexOf(42n, undefined), 0, "undefined [0]");
+ assert.sameValue(sample.lastIndexOf(43n, undefined), -1, "undefined [1]");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), null), 0, "null [0]");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), null), -1, "null [1]");
+ assert.sameValue(sample.lastIndexOf(42n, null), 0, "null [0]");
+ assert.sameValue(sample.lastIndexOf(43n, null), -1, "null [1]");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(42), obj), 0, "object [0]");
- assert.sameValue(sample.lastIndexOf(convertToBigInt(43), obj), 1, "object [1]");
+ assert.sameValue(sample.lastIndexOf(42n, obj), 0, "object [0]");
+ assert.sameValue(sample.lastIndexOf(43n, obj), 1, "object [1]");
});
diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/arraylength-internal.js b/test/built-ins/TypedArray/prototype/map/BigInt/arraylength-internal.js
index c74501315..a23cca257 100644
--- a/test/built-ins/TypedArray/prototype/map/BigInt/arraylength-internal.js
+++ b/test/built-ins/TypedArray/prototype/map/BigInt/arraylength-internal.js
@@ -22,7 +22,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
sample1.map(function() {
loop++;
- return convertToBigInt(0);
+ return 0n;
});
assert.sameValue(loop, 42, "data descriptor");
@@ -38,7 +38,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
sample2.map(function() {
loop++;
- return convertToBigInt(0);
+ return 0n;
});
assert.sameValue(loop, 4, "accessor descriptor");
});
diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-with-thisarg.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-with-thisarg.js
index 85ff13e4e..169a83dee 100644
--- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-with-thisarg.js
+++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-with-thisarg.js
@@ -18,31 +18,31 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var results = [];
var thisArg = ["test262", 0, "ecma262", 0];
sample.map(function() {
results.push(arguments);
- return convertToBigInt(0);
+ return 0n;
}, thisArg);
assert.sameValue(results.length, 3, "results.length");
assert.sameValue(thisArg.length, 4, "thisArg.length");
assert.sameValue(results[0].length, 3, "results[0].length");
- assert.sameValue(results[0][0], convertToBigInt(42), "results[0][0] - kValue");
+ assert.sameValue(results[0][0], 42n, "results[0][0] - kValue");
assert.sameValue(results[0][1], 0, "results[0][1] - k");
assert.sameValue(results[0][2], sample, "results[0][2] - this");
assert.sameValue(results[1].length, 3, "results[1].length");
- assert.sameValue(results[1][0], convertToBigInt(43), "results[1][0] - kValue");
+ assert.sameValue(results[1][0], 43n, "results[1][0] - kValue");
assert.sameValue(results[1][1], 1, "results[1][1] - k");
assert.sameValue(results[1][2], sample, "results[1][2] - this");
assert.sameValue(results[2].length, 3, "results[2].length");
- assert.sameValue(results[2][0], convertToBigInt(44), "results[2][0] - kValue");
+ assert.sameValue(results[2][0], 44n, "results[2][0] - kValue");
assert.sameValue(results[2][1], 2, "results[2][1] - k");
assert.sameValue(results[2][2], sample, "results[2][2] - this");
});
diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-without-thisarg.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-without-thisarg.js
index 1e12f5551..13e7c1500 100644
--- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-without-thisarg.js
+++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-arguments-without-thisarg.js
@@ -18,29 +18,29 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var results = [];
sample.map(function() {
results.push(arguments);
- return convertToBigInt(0);
+ return 0n;
});
assert.sameValue(results.length, 3, "results.length");
assert.sameValue(results[0].length, 3, "results[0].length");
- assert.sameValue(results[0][0], convertToBigInt(42), "results[0][0] - kValue");
+ assert.sameValue(results[0][0], 42n, "results[0][0] - kValue");
assert.sameValue(results[0][1], 0, "results[0][1] - k");
assert.sameValue(results[0][2], sample, "results[0][2] - this");
assert.sameValue(results[1].length, 3, "results[1].length");
- assert.sameValue(results[1][0], convertToBigInt(43), "results[1][0] - kValue");
+ assert.sameValue(results[1][0], 43n, "results[1][0] - kValue");
assert.sameValue(results[1][1], 1, "results[1][1] - k");
assert.sameValue(results[1][2], sample, "results[1][2] - this");
assert.sameValue(results[2].length, 3, "results[2].length");
- assert.sameValue(results[2][0], convertToBigInt(44), "results[2][0] - kValue");
+ assert.sameValue(results[2][0], 44n, "results[2][0] - kValue");
assert.sameValue(results[2][1], 2, "results[2][1] - k");
assert.sameValue(results[2][2], sample, "results[2][2] - this");
});
diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-detachbuffer.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-detachbuffer.js
index 94bf74867..d8abe4bd4 100644
--- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-detachbuffer.js
+++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-detachbuffer.js
@@ -28,7 +28,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
}
$DETACHBUFFER(sample.buffer);
loops++;
- return convertToBigInt(0);
+ return 0n;
});
});
diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-no-interaction-over-non-integer-properties.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-no-interaction-over-non-integer-properties.js
index a1b5639f1..e8bf86d04 100644
--- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-no-interaction-over-non-integer-properties.js
+++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-no-interaction-over-non-integer-properties.js
@@ -19,7 +19,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([7, 8]));
+ var sample = new TA([7n, 8n]);
var results = [];
@@ -28,7 +28,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
sample.map(function() {
results.push(arguments);
- return convertToBigInt(0);
+ return 0n;
});
assert.sameValue(results.length, 2, "results.length");
@@ -36,6 +36,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(results[0][1], 0, "results[0][1] - k");
assert.sameValue(results[1][1], 1, "results[1][1] - k");
- assert.sameValue(results[0][0], convertToBigInt(7), "results[0][0] - kValue");
- assert.sameValue(results[1][0], convertToBigInt(8), "results[1][0] - kValue");
+ assert.sameValue(results[0][0], 7n, "results[0][0] - kValue");
+ assert.sameValue(results[1][0], 8n, "results[1][0] - kValue");
});
diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-affects-returned-object.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-affects-returned-object.js
index cfd180d1f..f2f679a6d 100644
--- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-affects-returned-object.js
+++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-affects-returned-object.js
@@ -20,12 +20,12 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([1, 2, 4]));
+ var sample = new TA([1n, 2n, 4n]);
var result = sample.map(function(v) {
- return v * convertToBigInt(3);
+ return v * 3n;
});
- assert.sameValue(result[0], convertToBigInt(3), "result[0] == 3");
- assert.sameValue(result[1], convertToBigInt(6), "result[1] == 6");
- assert.sameValue(result[2], convertToBigInt(12), "result[2] == 12");
+ assert.sameValue(result[0], 3n, "result[0] == 3");
+ assert.sameValue(result[1], 6n, "result[1] == 6");
+ assert.sameValue(result[2], 12n, "result[2] == 12");
});
diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-change-instance.js
index bc0f6f32b..dfd441f3c 100644
--- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-change-instance.js
+++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-change-instance.js
@@ -13,13 +13,13 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample1 = new TA(3);
- sample1[1] = convertToBigInt(1);
+ sample1[1] = 1n;
sample1.map(function() {
- return convertToBigInt(42);
+ return 42n;
});
- assert.sameValue(sample1[0], convertToBigInt(0), "[0] == 0");
- assert.sameValue(sample1[1], convertToBigInt(1), "[1] == 1");
- assert.sameValue(sample1[2], convertToBigInt(0), "[2] == 0");
+ assert.sameValue(sample1[0], 0n, "[0] == 0");
+ assert.sameValue(sample1[1], 1n, "[1] == 1");
+ assert.sameValue(sample1[2], 0n, "[2] == 0");
});
diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-copy-non-integer-properties.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-copy-non-integer-properties.js
index a672b35bd..4783a2a1e 100644
--- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-copy-non-integer-properties.js
+++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-return-does-not-copy-non-integer-properties.js
@@ -18,14 +18,14 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([7, 8]));
+ var sample = new TA([7n, 8n]);
var bar = Symbol("1");
sample.foo = 42;
sample[bar] = 1;
var result = sample.map(function() {
- return convertToBigInt(0);
+ return 0n;
});
assert.sameValue(result.length, 2, "result.length");
diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-set-value-during-interaction.js
index 2e0f7eed1..9e140cd82 100644
--- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-set-value-during-interaction.js
+++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-set-value-during-interaction.js
@@ -12,7 +12,7 @@ features: [BigInt, Reflect.set, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var newVal = 0;
sample.map(function(val, i) {
@@ -22,7 +22,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
"get the changed value during the loop"
);
assert.sameValue(
- Reflect.set(sample, 0, convertToBigInt(7)),
+ Reflect.set(sample, 0, 7n),
true,
"re-set a value for sample[0]"
);
@@ -34,10 +34,10 @@ testWithBigIntTypedArrayConstructors(function(TA) {
);
newVal++;
- return convertToBigInt(0);
+ return 0n;
});
- assert.sameValue(sample[0], convertToBigInt(7), "changed values after iteration [0] == 7");
- assert.sameValue(sample[1], convertToBigInt(1), "changed values after iteration [1] == 1");
- assert.sameValue(sample[2], convertToBigInt(2), "changed values after iteration [2] == 2");
+ assert.sameValue(sample[0], 7n, "changed values after iteration [0] == 7");
+ assert.sameValue(sample[1], 1n, "changed values after iteration [1] == 1");
+ assert.sameValue(sample[2], 2n, "changed values after iteration [2] == 2");
});
diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-this.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-this.js
index e5ee5393c..820dfb198 100644
--- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-this.js
+++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-this.js
@@ -28,7 +28,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
sample.map(function() {
results1.push(this);
- return convertToBigInt(0);
+ return 0n;
});
assert.sameValue(results1.length, 3, "results1");
@@ -40,7 +40,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
sample.map(function() {
results2.push(this);
- return convertToBigInt(0);
+ return 0n;
}, thisArg);
assert.sameValue(results2.length, 3, "results2");
diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/map/BigInt/values-are-not-cached.js
index a8665d931..6b6728228 100644
--- a/test/built-ins/TypedArray/prototype/map/BigInt/values-are-not-cached.js
+++ b/test/built-ins/TypedArray/prototype/map/BigInt/values-are-not-cached.js
@@ -12,17 +12,17 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
sample.map(function(v, i) {
if (i < sample.length - 1) {
- sample[i+1] = convertToBigInt(42);
+ sample[i+1] = 42n;
}
assert.sameValue(
- v, convertToBigInt(42), "method does not cache values before callbackfn calls"
+ v, 42n, "method does not cache values before callbackfn calls"
);
- return convertToBigInt(0);
+ return 0n;
});
});
diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-custom-accumulator.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-custom-accumulator.js
index 8527302fd..6b54c191c 100644
--- a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-custom-accumulator.js
+++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-custom-accumulator.js
@@ -27,7 +27,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var results = [];
@@ -40,19 +40,19 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(results[0].length, 4, "results[0].length");
assert.sameValue(results[0][0], 7, "results[0][0] - accumulator");
- assert.sameValue(results[0][1], convertToBigInt(42), "results[0][1] - kValue");
+ assert.sameValue(results[0][1], 42n, "results[0][1] - kValue");
assert.sameValue(results[0][2], 0, "results[0][2] - k");
assert.sameValue(results[0][3], sample, "results[0][3] - this");
assert.sameValue(results[1].length, 4, "results[1].length");
assert.sameValue(results[1][0], 8, "results[1][0] - accumulator");
- assert.sameValue(results[1][1], convertToBigInt(43), "results[1][1] - kValue");
+ assert.sameValue(results[1][1], 43n, "results[1][1] - kValue");
assert.sameValue(results[1][2], 1, "results[1][2] - k");
assert.sameValue(results[1][3], sample, "results[1][3] - this");
assert.sameValue(results[2].length, 4, "results[2].length");
assert.sameValue(results[2][0], 9, "results[2][0] - accumulator");
- assert.sameValue(results[2][1], convertToBigInt(44), "results[2][1] - kValue");
+ assert.sameValue(results[2][1], 44n, "results[2][1] - kValue");
assert.sameValue(results[2][2], 2, "results[2][2] - k");
assert.sameValue(results[2][3], sample, "results[2][3] - this");
});
diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-default-accumulator.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-default-accumulator.js
index b4514895a..ab9e5a286 100644
--- a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-default-accumulator.js
+++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-arguments-default-accumulator.js
@@ -34,26 +34,26 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var results = [];
sample.reduce(function(accumulator) {
results.push(arguments);
- return accumulator - convertToBigInt(1);
+ return accumulator - 1n;
});
assert.sameValue(results.length, 2, "results.length");
assert.sameValue(results[0].length, 4, "results[1].length");
- assert.sameValue(results[0][0], convertToBigInt(42), "results[1][0] - accumulator");
- assert.sameValue(results[0][1], convertToBigInt(43), "results[1][1] - kValue");
+ assert.sameValue(results[0][0], 42n, "results[1][0] - accumulator");
+ assert.sameValue(results[0][1], 43n, "results[1][1] - kValue");
assert.sameValue(results[0][2], 1, "results[1][2] - k");
assert.sameValue(results[0][3], sample, "results[1][3] - this");
assert.sameValue(results[1].length, 4, "results[2].length");
- assert.sameValue(results[1][0], convertToBigInt(41), "results[2][0] - accumulator");
- assert.sameValue(results[1][1], convertToBigInt(44), "results[2][1] - kValue");
+ assert.sameValue(results[1][0], 41n, "results[2][0] - accumulator");
+ assert.sameValue(results[1][1], 44n, "results[2][1] - kValue");
assert.sameValue(results[1][2], 2, "results[2][2] - k");
assert.sameValue(results[1][3], sample, "results[2][3] - this");
});
diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-no-iteration-over-non-integer-properties.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-no-iteration-over-non-integer-properties.js
index b230de900..f8282a42e 100644
--- a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-no-iteration-over-non-integer-properties.js
+++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-no-iteration-over-non-integer-properties.js
@@ -27,7 +27,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([7, 8]));
+ var sample = new TA([7n, 8n]);
var results = [];
@@ -43,6 +43,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(results[0][2], 0, "results[0][2] - k");
assert.sameValue(results[1][2], 1, "results[1][2] - k");
- assert.sameValue(results[0][1], convertToBigInt(7), "results[0][1] - kValue");
- assert.sameValue(results[1][1], convertToBigInt(8), "results[1][1] - kValue");
+ assert.sameValue(results[0][1], 7n, "results[0][1] - kValue");
+ assert.sameValue(results[1][1], 8n, "results[1][1] - kValue");
});
diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-return-does-not-change-instance.js
index 05a8adddf..31785cec9 100644
--- a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-return-does-not-change-instance.js
+++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-return-does-not-change-instance.js
@@ -9,13 +9,13 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([0, 1, 0]));
+ var sample = new TA([0n, 1n, 0n]);
sample.reduce(function() {
return 42;
}, 7);
- assert.sameValue(sample[0], convertToBigInt(0), "[0] == 0");
- assert.sameValue(sample[1], convertToBigInt(1), "[1] == 1");
- assert.sameValue(sample[2], convertToBigInt(0), "[2] == 0");
+ assert.sameValue(sample[0], 0n, "[0] == 0");
+ assert.sameValue(sample[1], 1n, "[1] == 1");
+ assert.sameValue(sample[2], 0n, "[2] == 0");
});
diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-set-value-during-iteration.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-set-value-during-iteration.js
index 395a5aea7..272879dfb 100644
--- a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-set-value-during-iteration.js
+++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-set-value-during-iteration.js
@@ -19,7 +19,7 @@ features: [BigInt, Reflect.set, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var newVal = 0;
sample.reduce(function(acc, val, i) {
@@ -29,7 +29,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
"get the changed value during the loop"
);
assert.sameValue(
- Reflect.set(sample, 0, convertToBigInt(7)),
+ Reflect.set(sample, 0, 7n),
true,
"re-set a value for sample[0]"
);
@@ -43,7 +43,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
newVal++;
}, 0);
- assert.sameValue(sample[0], convertToBigInt(7), "changed values after iteration [0] == 7");
- assert.sameValue(sample[1], convertToBigInt(1), "changed values after iteration [1] == 1");
- assert.sameValue(sample[2], convertToBigInt(2), "changed values after iteration [2] == 2");
+ assert.sameValue(sample[0], 7n, "changed values after iteration [0] == 7");
+ assert.sameValue(sample[1], 1n, "changed values after iteration [1] == 1");
+ assert.sameValue(sample[2], 2n, "changed values after iteration [2] == 2");
});
diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/get-length-uses-internal-arraylength.js
index a4f6c763e..98ff2510d 100644
--- a/test/built-ins/TypedArray/prototype/reduce/BigInt/get-length-uses-internal-arraylength.js
+++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/get-length-uses-internal-arraylength.js
@@ -31,7 +31,7 @@ var desc = {
Object.defineProperty(TypedArray.prototype, "length", desc);
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
var calls = 0;
Object.defineProperty(TA.prototype, "length", desc);
diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/result-is-last-callbackfn-return.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/result-is-last-callbackfn-return.js
index 83e9a723f..2c424d4c8 100644
--- a/test/built-ins/TypedArray/prototype/reduce/BigInt/result-is-last-callbackfn-return.js
+++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/result-is-last-callbackfn-return.js
@@ -38,7 +38,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var calls, result;
calls = 0;
- result = new TA(convertToBigInt([1, 2, 3])).reduce(function() {
+ result = new TA([1n, 2n, 3n]).reduce(function() {
calls++;
if (calls == 2) {
@@ -48,7 +48,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(result, 42, "using default accumulator");
calls = 0;
- result = new TA(convertToBigInt([1, 2, 3])).reduce(function() {
+ result = new TA([1n, 2n, 3n]).reduce(function() {
calls++;
if (calls == 3) {
diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/result-of-any-type.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/result-of-any-type.js
index 370a5b052..e67a68dc3 100644
--- a/test/built-ins/TypedArray/prototype/reduce/BigInt/result-of-any-type.js
+++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/result-of-any-type.js
@@ -35,7 +35,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
[
["test262", "string"],
["", "empty string"],
diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/return-first-value-without-callbackfn.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/return-first-value-without-callbackfn.js
index 7fbd76fa0..766bcdb62 100644
--- a/test/built-ins/TypedArray/prototype/reduce/BigInt/return-first-value-without-callbackfn.js
+++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/return-first-value-without-callbackfn.js
@@ -33,10 +33,10 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var called = false;
- var result = new TA(convertToBigInt([42])).reduce(function() {
+ var result = new TA([42n]).reduce(function() {
called = true;
});
- assert.sameValue(result, convertToBigInt(42));
+ assert.sameValue(result, 42n);
assert.sameValue(called, false);
});
diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/values-are-not-cached.js
index 7b602dd9d..5362bf1dd 100644
--- a/test/built-ins/TypedArray/prototype/reduce/BigInt/values-are-not-cached.js
+++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/values-are-not-cached.js
@@ -27,15 +27,15 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
sample.reduce(function(a, v, i) {
if (i < sample.length - 1) {
- sample[i+1] = convertToBigInt(42);
+ sample[i+1] = 42n;
}
assert.sameValue(
- v, convertToBigInt(42), "method does not cache values before callbackfn calls"
+ v, 42n, "method does not cache values before callbackfn calls"
);
}, 0);
});
diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-custom-accumulator.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-custom-accumulator.js
index 8ecb1ff4f..1d5d7dfbf 100644
--- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-custom-accumulator.js
+++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-custom-accumulator.js
@@ -28,7 +28,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var results = [];
@@ -41,19 +41,19 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(results[0].length, 4, "results[0].length");
assert.sameValue(results[0][0], 7, "results[0][0] - accumulator");
- assert.sameValue(results[0][1], convertToBigInt(44), "results[0][1] - kValue");
+ assert.sameValue(results[0][1], 44n, "results[0][1] - kValue");
assert.sameValue(results[0][2], 2, "results[0][2] - k");
assert.sameValue(results[0][3], sample, "results[0][3] - this");
assert.sameValue(results[1].length, 4, "results[1].length");
assert.sameValue(results[1][0], 8, "results[1][0] - accumulator");
- assert.sameValue(results[1][1], convertToBigInt(43), "results[1][1] - kValue");
+ assert.sameValue(results[1][1], 43n, "results[1][1] - kValue");
assert.sameValue(results[1][2], 1, "results[1][2] - k");
assert.sameValue(results[1][3], sample, "results[1][3] - this");
assert.sameValue(results[2].length, 4, "results[2].length");
assert.sameValue(results[2][0], 9, "results[2][0] - accumulator");
- assert.sameValue(results[2][1], convertToBigInt(42), "results[2][1] - kValue");
+ assert.sameValue(results[2][1], 42n, "results[2][1] - kValue");
assert.sameValue(results[2][2], 0, "results[2][2] - k");
assert.sameValue(results[2][3], sample, "results[2][3] - this");
});
diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-default-accumulator.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-default-accumulator.js
index d80202ebc..ec251e709 100644
--- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-default-accumulator.js
+++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-arguments-default-accumulator.js
@@ -37,26 +37,26 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var results = [];
sample.reduceRight(function(accumulator) {
results.push(arguments);
- return accumulator + convertToBigInt(1);
+ return accumulator + 1n;
});
assert.sameValue(results.length, 2, "results.length");
assert.sameValue(results[0].length, 4, "results[1].length");
- assert.sameValue(results[0][0], convertToBigInt(44), "results[1][0] - accumulator");
- assert.sameValue(results[0][1], convertToBigInt(43), "results[1][1] - kValue");
+ assert.sameValue(results[0][0], 44n, "results[1][0] - accumulator");
+ assert.sameValue(results[0][1], 43n, "results[1][1] - kValue");
assert.sameValue(results[0][2], 1, "results[1][2] - k");
assert.sameValue(results[0][3], sample, "results[1][3] - this");
assert.sameValue(results[1].length, 4, "results[2].length");
- assert.sameValue(results[1][0], convertToBigInt(45), "results[2][0] - accumulator");
- assert.sameValue(results[1][1], convertToBigInt(42), "results[2][1] - kValue");
+ assert.sameValue(results[1][0], 45n, "results[2][0] - accumulator");
+ assert.sameValue(results[1][1], 42n, "results[2][1] - kValue");
assert.sameValue(results[1][2], 0, "results[2][2] - k");
assert.sameValue(results[1][3], sample, "results[2][3] - this");
});
diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-no-iteration-over-non-integer-properties.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-no-iteration-over-non-integer-properties.js
index a0f2fb513..9dc6d1771 100644
--- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-no-iteration-over-non-integer-properties.js
+++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-no-iteration-over-non-integer-properties.js
@@ -28,7 +28,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([7, 8]));
+ var sample = new TA([7n, 8n]);
var results = [];
@@ -44,6 +44,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(results[0][2], 1, "results[0][2] - k");
assert.sameValue(results[1][2], 0, "results[1][2] - k");
- assert.sameValue(results[0][1], convertToBigInt(8), "results[0][1] - kValue");
- assert.sameValue(results[1][1], convertToBigInt(7), "results[1][1] - kValue");
+ assert.sameValue(results[0][1], 8n, "results[0][1] - kValue");
+ assert.sameValue(results[1][1], 7n, "results[1][1] - kValue");
});
diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-return-does-not-change-instance.js
index 2bf7460bf..2dccce9e3 100644
--- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-return-does-not-change-instance.js
+++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-return-does-not-change-instance.js
@@ -9,13 +9,13 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([0, 1, 0]));
+ var sample = new TA([0n, 1n, 0n]);
sample.reduceRight(function() {
return 42;
}, 7);
- assert.sameValue(sample[0], convertToBigInt(0), "[0] == 0");
- assert.sameValue(sample[1], convertToBigInt(1), "[1] == 1");
- assert.sameValue(sample[2], convertToBigInt(0), "[2] == 0");
+ assert.sameValue(sample[0], 0n, "[0] == 0");
+ assert.sameValue(sample[1], 1n, "[1] == 1");
+ assert.sameValue(sample[2], 0n, "[2] == 0");
});
diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-set-value-during-iteration.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-set-value-during-iteration.js
index d0fd3510f..7b5fc70c2 100644
--- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-set-value-during-iteration.js
+++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-set-value-during-iteration.js
@@ -19,7 +19,7 @@ features: [BigInt, Reflect.set, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var newVal = 0;
sample.reduceRight(function(acc, val, i) {
@@ -29,7 +29,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
"get the changed value during the loop"
);
assert.sameValue(
- Reflect.set(sample, 2, convertToBigInt(7)),
+ Reflect.set(sample, 2, 7n),
true,
"re-set a value for sample[2]"
);
@@ -43,7 +43,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
newVal++;
}, 0);
- assert.sameValue(sample[0], convertToBigInt(2), "changed values after iteration [0] == 2");
- assert.sameValue(sample[1], convertToBigInt(1), "changed values after iteration [1] == 1");
- assert.sameValue(sample[2], convertToBigInt(7), "changed values after iteration [2] == 7");
+ assert.sameValue(sample[0], 2n, "changed values after iteration [0] == 2");
+ assert.sameValue(sample[1], 1n, "changed values after iteration [1] == 1");
+ assert.sameValue(sample[2], 7n, "changed values after iteration [2] == 7");
});
diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/get-length-uses-internal-arraylength.js
index e2cb704a0..2aae5480c 100644
--- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/get-length-uses-internal-arraylength.js
+++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/get-length-uses-internal-arraylength.js
@@ -31,7 +31,7 @@ var desc = {
Object.defineProperty(TypedArray.prototype, "length", desc);
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
var calls = 0;
Object.defineProperty(TA.prototype, "length", desc);
diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-is-last-callbackfn-return.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-is-last-callbackfn-return.js
index feeb92f0f..140b095cb 100644
--- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-is-last-callbackfn-return.js
+++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-is-last-callbackfn-return.js
@@ -40,7 +40,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var calls, result;
calls = 0;
- result = new TA(convertToBigInt([1, 2, 3])).reduceRight(function() {
+ result = new TA([1n, 2n, 3n]).reduceRight(function() {
calls++;
if (calls == 2) {
@@ -50,7 +50,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(result, 42, "using default accumulator");
calls = 0;
- result = new TA(convertToBigInt([1, 2, 3])).reduceRight(function() {
+ result = new TA([1n, 2n, 3n]).reduceRight(function() {
calls++;
if (calls == 3) {
diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-of-any-type.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-of-any-type.js
index d3731ab58..a70a4135d 100644
--- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-of-any-type.js
+++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/result-of-any-type.js
@@ -37,7 +37,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
[
["test262", "string"],
["", "empty string"],
diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/return-first-value-without-callbackfn.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/return-first-value-without-callbackfn.js
index 3219fb682..71ada5949 100644
--- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/return-first-value-without-callbackfn.js
+++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/return-first-value-without-callbackfn.js
@@ -34,10 +34,10 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var called = false;
- var result = new TA(convertToBigInt([42])).reduceRight(function() {
+ var result = new TA([42n]).reduceRight(function() {
called = true;
});
- assert.sameValue(result, convertToBigInt(42));
+ assert.sameValue(result, 42n);
assert.sameValue(called, false);
});
diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/values-are-not-cached.js
index a7f5cda05..c0ae38dd7 100644
--- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/values-are-not-cached.js
+++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/values-are-not-cached.js
@@ -28,15 +28,15 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([44, 43, 42]));
+ var sample = new TA([44n, 43n, 42n]);
sample.reduceRight(function(a, v, i) {
if (i > 0) {
- sample[i-1] = convertToBigInt(42);
+ sample[i-1] = 42n;
}
assert.sameValue(
- v, convertToBigInt(42), "method does not cache values before callbackfn calls"
+ v, 42n, "method does not cache values before callbackfn calls"
);
}, 0);
});
diff --git a/test/built-ins/TypedArray/prototype/reverse/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/reverse/BigInt/get-length-uses-internal-arraylength.js
index 7acdfdfff..0a08956c7 100644
--- a/test/built-ins/TypedArray/prototype/reverse/BigInt/get-length-uses-internal-arraylength.js
+++ b/test/built-ins/TypedArray/prototype/reverse/BigInt/get-length-uses-internal-arraylength.js
@@ -31,7 +31,7 @@ var desc = {
Object.defineProperty(TypedArray.prototype, "length", desc);
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
Object.defineProperty(TA.prototype, "length", desc);
Object.defineProperty(sample, "length", desc);
diff --git a/test/built-ins/TypedArray/prototype/reverse/BigInt/reverts.js b/test/built-ins/TypedArray/prototype/reverse/BigInt/reverts.js
index 660088f02..92aa0eb3e 100644
--- a/test/built-ins/TypedArray/prototype/reverse/BigInt/reverts.js
+++ b/test/built-ins/TypedArray/prototype/reverse/BigInt/reverts.js
@@ -25,33 +25,33 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var sample = new TA(buffer, 0, 4);
var other = new TA(buffer, 0, 5);
- sample[0] = convertToBigInt(42);
- sample[1] = convertToBigInt(43);
- sample[2] = convertToBigInt(2);
- sample[3] = convertToBigInt(1);
- other[4] = convertToBigInt(7);
+ sample[0] = 42n;
+ sample[1] = 43n;
+ sample[2] = 2n;
+ sample[3] = 1n;
+ other[4] = 7n;
sample.reverse();
assert(
- compareArray(sample, convertToBigInt([1, 2, 43, 42]))
+ compareArray(sample, [1n, 2n, 43n, 42n])
);
assert(
- compareArray(other, convertToBigInt([1, 2, 43, 42, 7]))
+ compareArray(other, [1n, 2n, 43n, 42n, 7n])
);
- sample[0] = convertToBigInt(7);
- sample[1] = convertToBigInt(17);
- sample[2] = convertToBigInt(1);
- sample[3] = convertToBigInt(0);
- other[4] = convertToBigInt(42);
+ sample[0] = 7n;
+ sample[1] = 17n;
+ sample[2] = 1n;
+ sample[3] = 0n;
+ other[4] = 42n;
other.reverse();
assert(
- compareArray(other, convertToBigInt([42, 0, 1, 17, 7]))
+ compareArray(other, [42n, 0n, 1n, 17n, 7n])
);
assert(
- compareArray(sample, convertToBigInt([42, 0, 1, 17]))
+ compareArray(sample, [42n, 0n, 1n, 17n])
);
});
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-offset-tointeger.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-offset-tointeger.js
index b47dc9de6..e5d504634 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-offset-tointeger.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-offset-tointeger.js
@@ -21,75 +21,75 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample;
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], "");
- assert(compareArray(sample, convertToBigInt([42, 2])), "the empty string");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], "");
+ assert(compareArray(sample, [42n, 2n]), "the empty string");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], "0");
- assert(compareArray(sample, convertToBigInt([42, 2])), "'0'");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], "0");
+ assert(compareArray(sample, [42n, 2n]), "'0'");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], false);
- assert(compareArray(sample, convertToBigInt([42, 2])), "false");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], false);
+ assert(compareArray(sample, [42n, 2n]), "false");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], 0.1);
- assert(compareArray(sample, convertToBigInt([42, 2])), "0.1");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], 0.1);
+ assert(compareArray(sample, [42n, 2n]), "0.1");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], 0.9);
- assert(compareArray(sample, convertToBigInt([42, 2])), "0.9");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], 0.9);
+ assert(compareArray(sample, [42n, 2n]), "0.9");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], -0.5);
- assert(compareArray(sample, convertToBigInt([42, 2])), "-0.5");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], -0.5);
+ assert(compareArray(sample, [42n, 2n]), "-0.5");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], 1.1);
- assert(compareArray(sample, convertToBigInt([1, 42])), "1.1");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], 1.1);
+ assert(compareArray(sample, [1n, 42n]), "1.1");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], NaN);
- assert(compareArray(sample, convertToBigInt([42, 2])), "NaN");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], NaN);
+ assert(compareArray(sample, [42n, 2n]), "NaN");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], null);
- assert(compareArray(sample, convertToBigInt([42, 2])), "null");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], null);
+ assert(compareArray(sample, [42n, 2n]), "null");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], undefined);
- assert(compareArray(sample, convertToBigInt([42, 2])), "undefined");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], undefined);
+ assert(compareArray(sample, [42n, 2n]), "undefined");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], {});
- assert(compareArray(sample, convertToBigInt([42, 2])), "{}");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], {});
+ assert(compareArray(sample, [42n, 2n]), "{}");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], []);
- assert(compareArray(sample, convertToBigInt([42, 2])), "[]");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], []);
+ assert(compareArray(sample, [42n, 2n]), "[]");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], [0]);
- assert(compareArray(sample, convertToBigInt([42, 2])), "[0]");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], [0]);
+ assert(compareArray(sample, [42n, 2n]), "[0]");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], true);
- assert(compareArray(sample, convertToBigInt([1, 42])), "true");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], true);
+ assert(compareArray(sample, [1n, 42n]), "true");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], "1");
- assert(compareArray(sample, convertToBigInt([1, 42])), "'1'");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], "1");
+ assert(compareArray(sample, [1n, 42n]), "'1'");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], [1]);
- assert(compareArray(sample, convertToBigInt([1, 42])), "[1]");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], [1]);
+ assert(compareArray(sample, [1n, 42n]), "[1]");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], { valueOf: function() {return 1;} });
- assert(compareArray(sample, convertToBigInt([1, 42])), "valueOf");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], { valueOf: function() {return 1;} });
+ assert(compareArray(sample, [1n, 42n]), "valueOf");
- sample = new TA(convertToBigInt([1, 2]));
- sample.set([convertToBigInt(42)], { toString: function() {return 1;} });
- assert(compareArray(sample, convertToBigInt([1, 42])), "toString");
+ sample = new TA([1n, 2n]);
+ sample.set([42n], { toString: function() {return 1;} });
+ assert(compareArray(sample, [1n, 42n]), "toString");
});
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-length.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-length.js
index 2dd5b23ea..bd6a28723 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-length.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-length.js
@@ -25,7 +25,7 @@ Object.defineProperty(obj, "length", {
});
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([1, 2, 3]));
+ var sample = new TA([1n, 2n, 3n]);
assert.throws(Test262Error, function() {
sample.set(obj);
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-value.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-value.js
index 451e7bad1..237c94645 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-value.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-get-value.js
@@ -25,9 +25,9 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var obj = {
length: 4,
- "0": convertToBigInt(42),
- "1": convertToBigInt(43),
- "3": convertToBigInt(44)
+ "0": 42n,
+ "1": 43n,
+ "3": 44n
};
Object.defineProperty(obj, "2", {
get: function() {
@@ -35,14 +35,14 @@ testWithBigIntTypedArrayConstructors(function(TA) {
}
});
- var sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ var sample = new TA([1n, 2n, 3n, 4n]);
assert.throws(Test262Error, function() {
sample.set(obj);
});
assert(
- compareArray(sample, convertToBigInt([42, 43, 3, 4])),
+ compareArray(sample, [42n, 43n, 3n, 4n]),
"values are set until exception"
);
});
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length-symbol.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length-symbol.js
index f1a65b06e..e0393870d 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length-symbol.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length-symbol.js
@@ -22,7 +22,7 @@ var obj = {
};
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([1, 2, 3]));
+ var sample = new TA([1n, 2n, 3n]);
assert.throws(TypeError, function() {
sample.set(obj);
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length.js
index 401a486db..f2bea7374 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-length.js
@@ -34,7 +34,7 @@ var obj2 = {
};
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([1, 2, 3]));
+ var sample = new TA([1n, 2n, 3n]);
assert.throws(Test262Error, function() {
sample.set(obj1);
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value-symbol.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value-symbol.js
index fd9121934..683d318f0 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value-symbol.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value-symbol.js
@@ -25,20 +25,20 @@ features: [BigInt, Symbol, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var obj = {
length: 4,
- "0": convertToBigInt(42),
- "1": convertToBigInt(43),
+ "0": 42n,
+ "1": 43n,
"2": Symbol("1"),
- "3": convertToBigInt(44)
+ "3": 44n
};
- var sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ var sample = new TA([1n, 2n, 3n, 4n]);
assert.throws(TypeError, function() {
sample.set(obj);
});
assert(
- compareArray(sample, convertToBigInt([42, 43, 3, 4])),
+ compareArray(sample, [42n, 43n, 3n, 4n]),
"values are set until exception"
);
});
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value.js
index af1f98349..7195d3f7d 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-src-tonumber-value.js
@@ -25,24 +25,24 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var obj = {
length: 4,
- "0": convertToBigInt(42),
- "1": convertToBigInt(43),
+ "0": 42n,
+ "1": 43n,
"2": {
valueOf: function() {
throw new Test262Error();
}
},
- "3": convertToBigInt(44)
+ "3": 44n
};
- var sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ var sample = new TA([1n, 2n, 3n, 4n]);
assert.throws(Test262Error, function() {
sample.set(obj);
});
assert(
- compareArray(sample, convertToBigInt([42, 43, 3, 4])),
+ compareArray(sample, [42n, 43n, 3n, 4n]),
"values are set until exception"
);
});
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-toobject-offset.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-toobject-offset.js
index 8ee19ce7c..d55c05cd5 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-toobject-offset.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-return-abrupt-from-toobject-offset.js
@@ -18,7 +18,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([1, 2, 3]));
+ var sample = new TA([1n, 2n, 3n]);
assert.throws(TypeError, function() {
sample.set(undefined);
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values-in-order.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values-in-order.js
index 7a5ed9850..3eb5722ef 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values-in-order.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values-in-order.js
@@ -32,7 +32,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
get: function() {
calls.push(0);
calls.push(sample.join());
- return convertToBigInt(42);
+ return 42n;
}
});
@@ -40,7 +40,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
get: function() {
calls.push(1);
calls.push(sample.join());
- return convertToBigInt(43);
+ return 43n;
}
});
@@ -48,7 +48,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
get: function() {
calls.push(2);
calls.push(sample.join());
- return convertToBigInt(44);
+ return 44n;
}
});
@@ -61,7 +61,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
sample.set(obj, 1);
assert(
- compareArray(sample, convertToBigInt([0, 42, 43, 44, 0])),
+ compareArray(sample, [0n, 42n, 43n, 44n, 0n]),
"values are set for src length"
);
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values.js
index 3a5888726..1e3a226f8 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-set-values.js
@@ -23,41 +23,41 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var src = convertToBigInt([42, 43]);
+ var src = [42n, 43n];
var srcObj = {
length: 2,
- '0': convertToBigInt(7),
- '1': convertToBigInt(17)
+ '0': 7n,
+ '1': 17n
};
var sample, result;
- sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ sample = new TA([1n, 2n, 3n, 4n]);
result = sample.set(src, 0);
- assert(compareArray(sample, convertToBigInt([42, 43, 3, 4])), "offset: 0, result: " + sample);
+ assert(compareArray(sample, [42n, 43n, 3n, 4n]), "offset: 0, result: " + sample);
assert.sameValue(result, undefined, "returns undefined");
- sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ sample = new TA([1n, 2n, 3n, 4n]);
result = sample.set(src, 1);
- assert(compareArray(sample, convertToBigInt([1, 42, 43, 4])), "offset: 1, result: " + sample);
+ assert(compareArray(sample, [1n, 42n, 43n, 4n]), "offset: 1, result: " + sample);
assert.sameValue(result, undefined, "returns undefined");
- sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ sample = new TA([1n, 2n, 3n, 4n]);
result = sample.set(src, 2);
- assert(compareArray(sample, convertToBigInt([1, 2, 42, 43])), "offset: 2, result: " + sample);
+ assert(compareArray(sample, [1n, 2n, 42n, 43n]), "offset: 2, result: " + sample);
assert.sameValue(result, undefined, "returns undefined");
- sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ sample = new TA([1n, 2n, 3n, 4n]);
result = sample.set(srcObj, 0);
- assert(compareArray(sample, convertToBigInt([7, 17, 3, 4])), "offset: 0, result: " + sample);
+ assert(compareArray(sample, [7n, 17n, 3n, 4n]), "offset: 0, result: " + sample);
assert.sameValue(result, undefined, "returns undefined");
- sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ sample = new TA([1n, 2n, 3n, 4n]);
result = sample.set(srcObj, 1);
- assert(compareArray(sample, convertToBigInt([1, 7, 17, 4])), "offset: 1, result: " + sample);
+ assert(compareArray(sample, [1n, 7n, 17n, 4n]), "offset: 1, result: " + sample);
assert.sameValue(result, undefined, "returns undefined");
- sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ sample = new TA([1n, 2n, 3n, 4n]);
result = sample.set(srcObj, 2);
- assert(compareArray(sample, convertToBigInt([1, 2, 7, 17])), "offset: 2, result: " + sample);
+ assert(compareArray(sample, [1n, 2n, 7n, 17n]), "offset: 2, result: " + sample);
assert.sameValue(result, undefined, "returns undefined");
});
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-type-conversions.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-type-conversions.js
index a07ffab4f..8deeed826 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-type-conversions.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-type-conversions.js
@@ -25,7 +25,7 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var obj1 = {
valueOf: function() {
- return convertToBigInt(42);
+ return 42n;
}
};
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-values-are-not-cached.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-values-are-not-cached.js
index 3ad61f0b6..d6156af97 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-values-are-not-cached.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-values-are-not-cached.js
@@ -26,22 +26,22 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var sample = new TA(5);
var obj = {
length: 5,
- '1': convertToBigInt(7),
- '2': convertToBigInt(7),
- '3': convertToBigInt(7),
- '4': convertToBigInt(7)
+ '1': 7n,
+ '2': 7n,
+ '3': 7n,
+ '4': 7n
};
Object.defineProperty(obj, 0, {
get: function() {
- obj[1] = convertToBigInt(43);
- obj[2] = convertToBigInt(44);
- obj[3] = convertToBigInt(45);
- obj[4] = convertToBigInt(46);
- return convertToBigInt(42);
+ obj[1] = 43n;
+ obj[2] = 44n;
+ obj[3] = 45n;
+ obj[4] = 46n;
+ return 42n;
}
});
sample.set(obj);
- assert(compareArray(sample, convertToBigInt([42, 43, 44, 45, 46])));
+ assert(compareArray(sample, [42n, 43n, 44n, 45n, 46n]));
});
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-target-arraylength-internal.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-target-arraylength-internal.js
index 95c1a9776..a6e6a3d34 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-target-arraylength-internal.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-target-arraylength-internal.js
@@ -35,7 +35,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
Object.defineProperty(TA.prototype, "length", desc);
Object.defineProperty(sample, "length", desc);
- sample.set(convertToBigInt([42, 43]));
+ sample.set([42n, 43n]);
assert.sameValue(getCalls, 0, "ignores length properties");
});
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-targetbuffer-detached-on-get-src-value-throws.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-targetbuffer-detached-on-get-src-value-throws.js
index 7e53f4221..568e8b9b0 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-targetbuffer-detached-on-get-src-value-throws.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-targetbuffer-detached-on-get-src-value-throws.js
@@ -23,10 +23,10 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([1, 2, 3]));
+ var sample = new TA([1n, 2n, 3n]);
var obj = {
length: 3,
- "0": convertToBigInt(42)
+ "0": 42n
};
Object.defineProperty(obj, 1, {
get: function() {
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-offset-tointeger.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-offset-tointeger.js
index 9d5b2478f..3b191aa4e 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-offset-tointeger.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-offset-tointeger.js
@@ -17,77 +17,77 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample;
- var src = new TA(convertToBigInt([42]));
+ var src = new TA([42n]);
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, "");
- assert(compareArray(sample, convertToBigInt([42, 2])), "the empty string");
+ assert(compareArray(sample, [42n, 2n]), "the empty string");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, "0");
- assert(compareArray(sample, convertToBigInt([42, 2])), "'0'");
+ assert(compareArray(sample, [42n, 2n]), "'0'");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, false);
- assert(compareArray(sample, convertToBigInt([42, 2])), "false");
+ assert(compareArray(sample, [42n, 2n]), "false");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, 0.1);
- assert(compareArray(sample, convertToBigInt([42, 2])), "0.1");
+ assert(compareArray(sample, [42n, 2n]), "0.1");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, 0.9);
- assert(compareArray(sample, convertToBigInt([42, 2])), "0.9");
+ assert(compareArray(sample, [42n, 2n]), "0.9");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, -0.5);
- assert(compareArray(sample, convertToBigInt([42, 2])), "-0.5");
+ assert(compareArray(sample, [42n, 2n]), "-0.5");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, 1.1);
- assert(compareArray(sample, convertToBigInt([1, 42])), "1.1");
+ assert(compareArray(sample, [1n, 42n]), "1.1");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, NaN);
- assert(compareArray(sample, convertToBigInt([42, 2])), "NaN");
+ assert(compareArray(sample, [42n, 2n]), "NaN");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, null);
- assert(compareArray(sample, convertToBigInt([42, 2])), "null");
+ assert(compareArray(sample, [42n, 2n]), "null");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, undefined);
- assert(compareArray(sample, convertToBigInt([42, 2])), "undefined");
+ assert(compareArray(sample, [42n, 2n]), "undefined");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, {});
- assert(compareArray(sample, convertToBigInt([42, 2])), "{}");
+ assert(compareArray(sample, [42n, 2n]), "{}");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, []);
- assert(compareArray(sample, convertToBigInt([42, 2])), "[]");
+ assert(compareArray(sample, [42n, 2n]), "[]");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, [0]);
- assert(compareArray(sample, convertToBigInt([42, 2])), "[0]");
+ assert(compareArray(sample, [42n, 2n]), "[0]");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, true);
- assert(compareArray(sample, convertToBigInt([1, 42])), "true");
+ assert(compareArray(sample, [1n, 42n]), "true");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, "1");
- assert(compareArray(sample, convertToBigInt([1, 42])), "'1'");
+ assert(compareArray(sample, [1n, 42n]), "'1'");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, [1]);
- assert(compareArray(sample, convertToBigInt([1, 42])), "[1]");
+ assert(compareArray(sample, [1n, 42n]), "[1]");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, { valueOf: function() {return 1;} });
- assert(compareArray(sample, convertToBigInt([1, 42])), "valueOf");
+ assert(compareArray(sample, [1n, 42n]), "valueOf");
- sample = new TA(convertToBigInt([1, 2]));
+ sample = new TA([1n, 2n]);
sample.set(src, { toString: function() {return 1;} });
- assert(compareArray(sample, convertToBigInt([1, 42])), "toString");
+ assert(compareArray(sample, [1n, 42n]), "toString");
});
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type.js
index 1b1869345..4456c5dcc 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type.js
@@ -28,21 +28,21 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var other = TA === BigInt64Array ? BigUint64Array : BigInt64Array;
- var src = new other(convertToBigInt([42, 43]));
+ var src = new other([42n, 43n]);
var sample, result;
- sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ sample = new TA([1n, 2n, 3n, 4n]);
result = sample.set(src, 0);
- assert(compareArray(sample, convertToBigInt([42, 43, 3, 4])), "offset: 0, result: " + sample);
+ assert(compareArray(sample, [42n, 43n, 3n, 4n]), "offset: 0, result: " + sample);
assert.sameValue(result, undefined, "returns undefined");
- sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ sample = new TA([1n, 2n, 3n, 4n]);
result = sample.set(src, 1);
- assert(compareArray(sample, convertToBigInt([1, 42, 43, 4])), "offset: 1, result: " + sample);
+ assert(compareArray(sample, [1n, 42n, 43n, 4n]), "offset: 1, result: " + sample);
assert.sameValue(result, undefined, "returns undefined");
- sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ sample = new TA([1n, 2n, 3n, 4n]);
result = sample.set(src, 2);
- assert(compareArray(sample, convertToBigInt([1, 2, 42, 43])), "offset: 2, result: " + sample);
+ assert(compareArray(sample, [1n, 2n, 42n, 43n]), "offset: 2, result: " + sample);
assert.sameValue(result, undefined, "returns undefined");
});
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type.js
index be938ca51..d806b6a6c 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type.js
@@ -31,20 +31,20 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample, result;
- var src = new TA(convertToBigInt([42, 43]));
+ var src = new TA([42n, 43n]);
- sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ sample = new TA([1n, 2n, 3n, 4n]);
result = sample.set(src, 1);
- assert(compareArray(sample, convertToBigInt([1, 42, 43, 4])), "offset: 1, result: " + sample);
+ assert(compareArray(sample, [1n, 42n, 43n, 4n]), "offset: 1, result: " + sample);
assert.sameValue(result, undefined, "returns undefined");
- sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ sample = new TA([1n, 2n, 3n, 4n]);
result = sample.set(src, 0);
- assert(compareArray(sample, convertToBigInt([42, 43, 3, 4])), "offset: 0, result: " + sample);
+ assert(compareArray(sample, [42n, 43n, 3n, 4n]), "offset: 0, result: " + sample);
assert.sameValue(result, undefined, "returns undefined");
- sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ sample = new TA([1n, 2n, 3n, 4n]);
result = sample.set(src, 2);
- assert(compareArray(sample, convertToBigInt([1, 2, 42, 43])), "offset: 2, result: " + sample);
+ assert(compareArray(sample, [1n, 2n, 42n, 43n]), "offset: 2, result: " + sample);
assert.sameValue(result, undefined, "returns undefined");
});
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type.js
index 8daad3956..ab1454760 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type.js
@@ -33,21 +33,21 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample, src, result;
- sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ sample = new TA([1n, 2n, 3n, 4n]);
src = new TA(sample.buffer, 0, 2);
result = sample.set(src, 0);
- assert(compareArray(sample, convertToBigInt([1, 2, 3, 4])), "offset: 0, result: " + sample);
+ assert(compareArray(sample, [1n, 2n, 3n, 4n]), "offset: 0, result: " + sample);
assert.sameValue(result, undefined, "returns undefined");
- sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ sample = new TA([1n, 2n, 3n, 4n]);
src = new TA(sample.buffer, 0, 2);
result = sample.set(src, 1);
- assert(compareArray(sample, convertToBigInt([1, 1, 2, 4])), "offset: 1, result: " + sample);
+ assert(compareArray(sample, [1n, 1n, 2n, 4n]), "offset: 1, result: " + sample);
assert.sameValue(result, undefined, "returns undefined");
- sample = new TA(convertToBigInt([1, 2, 3, 4]));
+ sample = new TA([1n, 2n, 3n, 4n]);
src = new TA(sample.buffer, 0, 2);
result = sample.set(src, 2);
- assert(compareArray(sample, convertToBigInt([1, 2, 1, 2])), "offset: 2, result: " + sample);
+ assert(compareArray(sample, [1n, 2n, 1n, 2n]), "offset: 2, result: " + sample);
assert.sameValue(result, undefined, "returns undefined");
});
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-arraylength-internal.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-arraylength-internal.js
index 9da7cbdcf..96ea335ec 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-arraylength-internal.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-arraylength-internal.js
@@ -30,7 +30,7 @@ Object.defineProperty(TypedArray.prototype, "length", desc);
testWithBigIntTypedArrayConstructors(function(TA) {
var sample = new TA(2);
- var src = new TA(convertToBigInt([42, 43]));
+ var src = new TA([42n, 43n]);
Object.defineProperty(TA.prototype, "length", desc);
Object.defineProperty(src, "length", desc);
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-byteoffset-internal.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-byteoffset-internal.js
index b75cbbd8e..35c3ace2a 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-byteoffset-internal.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-src-byteoffset-internal.js
@@ -27,9 +27,9 @@ Object.defineProperty(TypedArray.prototype, "byteOffset", desc);
testWithBigIntTypedArrayConstructors(function(TA) {
var sample = new TA(2);
- var src = new TA(convertToBigInt([42, 43]));
+ var src = new TA([42n, 43n]);
var other = TA === BigInt64Array ? BigUint64Array : BigInt64Array;
- var src2 = new other(convertToBigInt([42, 43]));
+ var src2 = new other([42n, 43n]);
var src3 = new other(sample.buffer, 0, 2);
Object.defineProperty(TA.prototype, "byteOffset", desc);
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-arraylength-internal.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-arraylength-internal.js
index 7eed1fff1..9f13dc2b1 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-arraylength-internal.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-arraylength-internal.js
@@ -31,7 +31,7 @@ Object.defineProperty(TypedArray.prototype, "length", desc);
testWithBigIntTypedArrayConstructors(function(TA) {
var sample = new TA(2);
- var src = new TA(convertToBigInt([42, 43]));
+ var src = new TA([42n, 43n]);
Object.defineProperty(TA.prototype, "length", desc);
Object.defineProperty(sample, "length", desc);
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-byteoffset-internal.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-byteoffset-internal.js
index ba1909dd5..13b7978fc 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-byteoffset-internal.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-target-byteoffset-internal.js
@@ -28,9 +28,9 @@ Object.defineProperty(TypedArray.prototype, "byteOffset", desc);
testWithBigIntTypedArrayConstructors(function(TA) {
var sample = new TA(2);
- var src = new TA(convertToBigInt([42, 43]));
+ var src = new TA([42n, 43n]);
var other = TA === BigInt64Array ? BigUint64Array : BigInt64Array;
- var src2 = new other(convertToBigInt([42, 43]));
+ var src2 = new other([42n, 43n]);
var src3 = new other(sample.buffer, 0, 2);
Object.defineProperty(TA.prototype, "byteOffset", desc);
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/arraylength-internal.js b/test/built-ins/TypedArray/prototype/slice/BigInt/arraylength-internal.js
index 9f97ab033..505215fb0 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/arraylength-internal.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/arraylength-internal.js
@@ -24,7 +24,7 @@ var desc = {
Object.defineProperty(TypedArray.prototype, "length", desc);
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
Object.defineProperty(TA.prototype, "length", desc);
Object.defineProperty(sample, "length", desc);
@@ -32,7 +32,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var result = sample.slice();
assert.sameValue(getCalls, 0, "ignores length properties");
- assert.sameValue(result[0], convertToBigInt(42));
- assert.sameValue(result[1], convertToBigInt(43));
+ assert.sameValue(result[0], 42n);
+ assert.sameValue(result[1], 43n);
assert.sameValue(result.hasOwnProperty(2), false);
});
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/infinity.js b/test/built-ins/TypedArray/prototype/slice/BigInt/infinity.js
index 07f62263a..adad1dc0f 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/infinity.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/infinity.js
@@ -8,10 +8,10 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
assert(
- compareArray(sample.slice(-Infinity), convertToBigInt([40, 41, 42, 43])),
+ compareArray(sample.slice(-Infinity), [40n, 41n, 42n, 43n]),
"start == -Infinity"
);
assert(
@@ -23,7 +23,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
"end == -Infinity"
);
assert(
- compareArray(sample.slice(0, Infinity), convertToBigInt([40, 41, 42, 43])),
+ compareArray(sample.slice(0, Infinity), [40n, 41n, 42n, 43n]),
"end == Infinity"
);
});
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/minus-zero.js b/test/built-ins/TypedArray/prototype/slice/BigInt/minus-zero.js
index 19657957a..12245c6aa 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/minus-zero.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/minus-zero.js
@@ -10,14 +10,14 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
assert(
- compareArray(sample.slice(-0), convertToBigInt([40, 41, 42, 43])),
+ compareArray(sample.slice(-0), [40n, 41n, 42n, 43n]),
"start == -0"
);
assert(
- compareArray(sample.slice(-0, 4), convertToBigInt([40, 41, 42, 43])),
+ compareArray(sample.slice(-0, 4), [40n, 41n, 42n, 43n]),
"start == -0, end == length"
);
assert(
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/result-does-not-copy-ordinary-properties.js b/test/built-ins/TypedArray/prototype/slice/BigInt/result-does-not-copy-ordinary-properties.js
index 00b6132ac..32f3a2883 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/result-does-not-copy-ordinary-properties.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/result-does-not-copy-ordinary-properties.js
@@ -10,7 +10,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([41, 42, 43, 44]));
+ var sample = new TA([41n, 42n, 43n, 44n]);
sample.foo = 42;
var result = sample.slice();
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-different-length.js b/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-different-length.js
index 22c8a0abe..1db41d601 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-different-length.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-different-length.js
@@ -8,46 +8,46 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
function testRes(result, expected, msg) {
assert(compareArray(result, expected), msg + ", result: [" + result + "]");
}
- testRes(sample.slice(1), convertToBigInt([41, 42, 43]), "begin == 1");
- testRes(sample.slice(2), convertToBigInt([42, 43]), "begin == 2");
- testRes(sample.slice(3), convertToBigInt([43]), "begin == 3");
+ testRes(sample.slice(1), [41n, 42n, 43n], "begin == 1");
+ testRes(sample.slice(2), [42n, 43n], "begin == 2");
+ testRes(sample.slice(3), [43n], "begin == 3");
- testRes(sample.slice(1, 4), convertToBigInt([41, 42, 43]), "begin == 1, end == length");
- testRes(sample.slice(2, 4), convertToBigInt([42, 43]), "begin == 2, end == length");
- testRes(sample.slice(3, 4), convertToBigInt([43]), "begin == 3, end == length");
+ testRes(sample.slice(1, 4), [41n, 42n, 43n], "begin == 1, end == length");
+ testRes(sample.slice(2, 4), [42n, 43n], "begin == 2, end == length");
+ testRes(sample.slice(3, 4), [43n], "begin == 3, end == length");
- testRes(sample.slice(0, 1), convertToBigInt([40]), "begin == 0, end == 1");
- testRes(sample.slice(0, 2), convertToBigInt([40, 41]), "begin == 0, end == 2");
- testRes(sample.slice(0, 3), convertToBigInt([40, 41, 42]), "begin == 0, end == 3");
+ testRes(sample.slice(0, 1), [40n], "begin == 0, end == 1");
+ testRes(sample.slice(0, 2), [40n, 41n], "begin == 0, end == 2");
+ testRes(sample.slice(0, 3), [40n, 41n, 42n], "begin == 0, end == 3");
- testRes(sample.slice(-1), convertToBigInt([43]), "begin == -1");
- testRes(sample.slice(-2), convertToBigInt([42, 43]), "begin == -2");
- testRes(sample.slice(-3), convertToBigInt([41, 42, 43]), "begin == -3");
+ testRes(sample.slice(-1), [43n], "begin == -1");
+ testRes(sample.slice(-2), [42n, 43n], "begin == -2");
+ testRes(sample.slice(-3), [41n, 42n, 43n], "begin == -3");
- testRes(sample.slice(-1, 4), convertToBigInt([43]), "begin == -1, end == length");
- testRes(sample.slice(-2, 4), convertToBigInt([42, 43]), "begin == -2, end == length");
- testRes(sample.slice(-3, 4), convertToBigInt([41, 42, 43]), "begin == -3, end == length");
+ testRes(sample.slice(-1, 4), [43n], "begin == -1, end == length");
+ testRes(sample.slice(-2, 4), [42n, 43n], "begin == -2, end == length");
+ testRes(sample.slice(-3, 4), [41n, 42n, 43n], "begin == -3, end == length");
- testRes(sample.slice(0, -1), convertToBigInt([40, 41, 42]), "begin == 0, end == -1");
- testRes(sample.slice(0, -2), convertToBigInt([40, 41]), "begin == 0, end == -2");
- testRes(sample.slice(0, -3), convertToBigInt([40]), "begin == 0, end == -3");
+ testRes(sample.slice(0, -1), [40n, 41n, 42n], "begin == 0, end == -1");
+ testRes(sample.slice(0, -2), [40n, 41n], "begin == 0, end == -2");
+ testRes(sample.slice(0, -3), [40n], "begin == 0, end == -3");
- testRes(sample.slice(-0, -1), convertToBigInt([40, 41, 42]), "begin == -0, end == -1");
- testRes(sample.slice(-0, -2), convertToBigInt([40, 41]), "begin == -0, end == -2");
- testRes(sample.slice(-0, -3), convertToBigInt([40]), "begin == -0, end == -3");
+ testRes(sample.slice(-0, -1), [40n, 41n, 42n], "begin == -0, end == -1");
+ testRes(sample.slice(-0, -2), [40n, 41n], "begin == -0, end == -2");
+ testRes(sample.slice(-0, -3), [40n], "begin == -0, end == -3");
- testRes(sample.slice(-2, -1), convertToBigInt([42]), "length == 4, begin == -2, end == -1");
- testRes(sample.slice(1, -1), convertToBigInt([41, 42]), "length == 4, begin == 1, end == -1");
- testRes(sample.slice(1, -2), convertToBigInt([41]), "length == 4, begin == 1, end == -2");
- testRes(sample.slice(2, -1), convertToBigInt([42]), "length == 4, begin == 2, end == -1");
+ testRes(sample.slice(-2, -1), [42n], "length == 4, begin == -2, end == -1");
+ testRes(sample.slice(1, -1), [41n, 42n], "length == 4, begin == 1, end == -1");
+ testRes(sample.slice(1, -2), [41n], "length == 4, begin == 1, end == -2");
+ testRes(sample.slice(2, -1), [42n], "length == 4, begin == 2, end == -1");
- testRes(sample.slice(-1, 5), convertToBigInt([43]), "begin == -1, end > length");
- testRes(sample.slice(-2, 4), convertToBigInt([42, 43]), "begin == -2, end > length");
- testRes(sample.slice(-3, 4), convertToBigInt([41, 42, 43]), "begin == -3, end > length");
+ testRes(sample.slice(-1, 5), [43n], "begin == -1, end > length");
+ testRes(sample.slice(-2, 4), [42n, 43n], "begin == -2, end > length");
+ testRes(sample.slice(-3, 4), [41n, 42n, 43n], "begin == -3, end > length");
});
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-empty-length.js b/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-empty-length.js
index 386149b45..901805a84 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-empty-length.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-empty-length.js
@@ -8,7 +8,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
function testRes(result, msg) {
assert.sameValue(result.length, 0, msg);
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-same-length.js b/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-same-length.js
index a8cee48aa..c351ef086 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-same-length.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/results-with-same-length.js
@@ -8,14 +8,14 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
function testRes(result, msg) {
assert.sameValue(result.length, 4, msg);
- assert.sameValue(result[0], convertToBigInt(40), msg + " & result[0] === 40");
- assert.sameValue(result[1], convertToBigInt(41), msg + " & result[1] === 41");
- assert.sameValue(result[2], convertToBigInt(42), msg + " & result[2] === 42");
- assert.sameValue(result[3], convertToBigInt(43), msg + " & result[3] === 43");
+ assert.sameValue(result[0], 40n, msg + " & result[0] === 40");
+ assert.sameValue(result[1], 41n, msg + " & result[1] === 41");
+ assert.sameValue(result[2], 42n, msg + " & result[2] === 42");
+ assert.sameValue(result[3], 43n, msg + " & result[3] === 43");
}
testRes(sample.slice(0), "begin == 0");
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-abrupt.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-abrupt.js
index 6294fa6b1..2a30c8664 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-abrupt.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-abrupt.js
@@ -27,7 +27,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
Object.defineProperty(sample, "constructor", {
get: function() {
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-inherited.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-inherited.js
index 15f1e5765..d686fe084 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-inherited.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-inherited.js
@@ -27,7 +27,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
var calls = 0;
var result;
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-returns-throws.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-returns-throws.js
index 7a742b9b8..6c2a4b88f 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-returns-throws.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor-returns-throws.js
@@ -29,7 +29,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
sample.constructor = 42;
assert.throws(TypeError, function() {
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor.js
index 967579071..9d35910e5 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-ctor.js
@@ -27,7 +27,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
var calls = 0;
var result;
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-invocation.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-invocation.js
index 5187a421f..11ddad9e1 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-invocation.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-invocation.js
@@ -37,7 +37,7 @@ features: [BigInt, Symbol.species, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42]));
+ var sample = new TA([40n, 41n, 42n]);
var result, ctorThis;
sample.constructor = {};
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js
index b323cc7ec..81be8cd76 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js
@@ -37,7 +37,7 @@ features: [BigInt, Symbol.species, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40]));
+ var sample = new TA([40n]);
var other = new Int8Array([1, 0, 1]);
var result;
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor.js
index 00a426e10..5965ce367 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor.js
@@ -37,7 +37,7 @@ features: [BigInt, Symbol.species, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42]));
+ var sample = new TA([40n, 41n, 42n]);
var calls = 0;
var result;
@@ -50,5 +50,5 @@ testWithBigIntTypedArrayConstructors(function(TA) {
result = sample.slice(1);
assert.sameValue(calls, 1, "ctor called once");
- assert(compareArray(result, convertToBigInt([41, 42])), "expected object");
+ assert(compareArray(result, [41n, 42n]), "expected object");
});
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-end.js b/test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-end.js
index 979b2df9f..b43e92dc1 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-end.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-end.js
@@ -21,27 +21,27 @@ var obj = {
};
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
assert(compareArray(sample.slice(0, false), []), "false");
- assert(compareArray(sample.slice(0, true), convertToBigInt([40])), "true");
+ assert(compareArray(sample.slice(0, true), [40n]), "true");
assert(compareArray(sample.slice(0, NaN), []), "NaN");
assert(compareArray(sample.slice(0, null), []), "null");
- assert(compareArray(sample.slice(0, undefined), convertToBigInt([40, 41, 42, 43])), "undefined");
+ assert(compareArray(sample.slice(0, undefined), [40n, 41n, 42n, 43n]), "undefined");
assert(compareArray(sample.slice(0, 0.6), []), "0.6");
- assert(compareArray(sample.slice(0, 1.1), convertToBigInt([40])), "1.1");
- assert(compareArray(sample.slice(0, 1.5), convertToBigInt([40])), "1.5");
+ assert(compareArray(sample.slice(0, 1.1), [40n]), "1.1");
+ assert(compareArray(sample.slice(0, 1.5), [40n]), "1.5");
assert(compareArray(sample.slice(0, -0.6), []), "-0.6");
- assert(compareArray(sample.slice(0, -1.1), convertToBigInt([40, 41, 42])), "-1.1");
- assert(compareArray(sample.slice(0, -1.5), convertToBigInt([40, 41, 42])), "-1.5");
+ assert(compareArray(sample.slice(0, -1.1), [40n, 41n, 42n]), "-1.1");
+ assert(compareArray(sample.slice(0, -1.5), [40n, 41n, 42n]), "-1.5");
- assert(compareArray(sample.slice(0, "3"), convertToBigInt([40, 41, 42])), "string");
+ assert(compareArray(sample.slice(0, "3"), [40n, 41n, 42n]), "string");
assert(
compareArray(
sample.slice(0, obj),
- convertToBigInt([40, 41])
+ [40n, 41n]
),
"object"
);
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-start.js b/test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-start.js
index 8ce0fde83..3b5bb606c 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-start.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/tointeger-start.js
@@ -20,28 +20,28 @@ var obj = {
};
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
- assert(compareArray(sample.slice(false), convertToBigInt([40, 41, 42, 43])), "false");
- assert(compareArray(sample.slice(true), convertToBigInt([41, 42, 43])), "true");
+ assert(compareArray(sample.slice(false), [40n, 41n, 42n, 43n]), "false");
+ assert(compareArray(sample.slice(true), [41n, 42n, 43n]), "true");
- assert(compareArray(sample.slice(NaN), convertToBigInt([40, 41, 42, 43])), "NaN");
- assert(compareArray(sample.slice(null), convertToBigInt([40, 41, 42, 43])), "null");
- assert(compareArray(sample.slice(undefined), convertToBigInt([40, 41, 42, 43])), "undefined");
+ assert(compareArray(sample.slice(NaN), [40n, 41n, 42n, 43n]), "NaN");
+ assert(compareArray(sample.slice(null), [40n, 41n, 42n, 43n]), "null");
+ assert(compareArray(sample.slice(undefined), [40n, 41n, 42n, 43n]), "undefined");
- assert(compareArray(sample.slice(1.1), convertToBigInt([41, 42, 43])), "1.1");
- assert(compareArray(sample.slice(1.5), convertToBigInt([41, 42, 43])), "1.5");
- assert(compareArray(sample.slice(0.6), convertToBigInt([40, 41, 42, 43])), "0.6");
+ assert(compareArray(sample.slice(1.1), [41n, 42n, 43n]), "1.1");
+ assert(compareArray(sample.slice(1.5), [41n, 42n, 43n]), "1.5");
+ assert(compareArray(sample.slice(0.6), [40n, 41n, 42n, 43n]), "0.6");
- assert(compareArray(sample.slice(-1.5), convertToBigInt([43])), "-1.5");
- assert(compareArray(sample.slice(-1.1), convertToBigInt([43])), "-1.1");
- assert(compareArray(sample.slice(-0.6), convertToBigInt([40, 41, 42, 43])), "-0.6");
+ assert(compareArray(sample.slice(-1.5), [43n]), "-1.5");
+ assert(compareArray(sample.slice(-1.1), [43n]), "-1.1");
+ assert(compareArray(sample.slice(-0.6), [40n, 41n, 42n, 43n]), "-0.6");
- assert(compareArray(sample.slice("3"), convertToBigInt([43])), "string");
+ assert(compareArray(sample.slice("3"), [43n]), "string");
assert(
compareArray(
sample.slice(obj),
- convertToBigInt([42, 43])
+ [42n, 43n]
),
"object"
);
diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-with-thisarg.js b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-with-thisarg.js
index df0c06fc3..737691cf6 100644
--- a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-with-thisarg.js
+++ b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-with-thisarg.js
@@ -28,7 +28,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var results = [];
var thisArg = ["test262", 0, "ecma262", 0];
@@ -41,17 +41,17 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(thisArg.length, 4, "thisArg.length");
assert.sameValue(results[0].length, 3, "results[0].length");
- assert.sameValue(results[0][0], convertToBigInt(42), "results[0][0] - kValue");
+ assert.sameValue(results[0][0], 42n, "results[0][0] - kValue");
assert.sameValue(results[0][1], 0, "results[0][1] - k");
assert.sameValue(results[0][2], sample, "results[0][2] - this");
assert.sameValue(results[1].length, 3, "results[1].length");
- assert.sameValue(results[1][0], convertToBigInt(43), "results[1][0] - kValue");
+ assert.sameValue(results[1][0], 43n, "results[1][0] - kValue");
assert.sameValue(results[1][1], 1, "results[1][1] - k");
assert.sameValue(results[1][2], sample, "results[1][2] - this");
assert.sameValue(results[2].length, 3, "results[2].length");
- assert.sameValue(results[2][0], convertToBigInt(44), "results[2][0] - kValue");
+ assert.sameValue(results[2][0], 44n, "results[2][0] - kValue");
assert.sameValue(results[2][1], 2, "results[2][1] - k");
assert.sameValue(results[2][2], sample, "results[2][2] - this");
});
diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-without-thisarg.js b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-without-thisarg.js
index 4f52490ef..08f138ace 100644
--- a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-without-thisarg.js
+++ b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-arguments-without-thisarg.js
@@ -28,7 +28,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var results = [];
@@ -39,17 +39,17 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(results.length, 3, "results.length");
assert.sameValue(results[0].length, 3, "results[0].length");
- assert.sameValue(results[0][0], convertToBigInt(42), "results[0][0] - kValue");
+ assert.sameValue(results[0][0], 42n, "results[0][0] - kValue");
assert.sameValue(results[0][1], 0, "results[0][1] - k");
assert.sameValue(results[0][2], sample, "results[0][2] - this");
assert.sameValue(results[1].length, 3, "results[1].length");
- assert.sameValue(results[1][0], convertToBigInt(43), "results[1][0] - kValue");
+ assert.sameValue(results[1][0], 43n, "results[1][0] - kValue");
assert.sameValue(results[1][1], 1, "results[1][1] - k");
assert.sameValue(results[1][2], sample, "results[1][2] - this");
assert.sameValue(results[2].length, 3, "results[2].length");
- assert.sameValue(results[2][0], convertToBigInt(44), "results[2][0] - kValue");
+ assert.sameValue(results[2][0], 44n, "results[2][0] - kValue");
assert.sameValue(results[2][1], 2, "results[2][1] - k");
assert.sameValue(results[2][2], sample, "results[2][2] - this");
});
diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-no-interaction-over-non-integer.js b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-no-interaction-over-non-integer.js
index b01b5e621..df9b85c7c 100644
--- a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-no-interaction-over-non-integer.js
+++ b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-no-interaction-over-non-integer.js
@@ -19,7 +19,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([7, 8]));
+ var sample = new TA([7n, 8n]);
var results = [];
@@ -35,6 +35,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(results[0][1], 0, "results[0][1] - key");
assert.sameValue(results[1][1], 1, "results[1][1] - key");
- assert.sameValue(results[0][0], convertToBigInt(7), "results[0][0] - value");
- assert.sameValue(results[1][0], convertToBigInt(8), "results[1][0] - value");
+ assert.sameValue(results[0][0], 7n, "results[0][0] - value");
+ assert.sameValue(results[1][0], 8n, "results[1][0] - value");
});
diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-return-does-not-change-instance.js
index 19a6337d0..2ea584f16 100644
--- a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-return-does-not-change-instance.js
+++ b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-return-does-not-change-instance.js
@@ -26,13 +26,13 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42]));
+ var sample = new TA([40n, 41n, 42n]);
sample.some(function() {
return 0;
});
- assert.sameValue(sample[0], convertToBigInt(40), "[0] == 40");
- assert.sameValue(sample[1], convertToBigInt(41), "[1] == 41");
- assert.sameValue(sample[2], convertToBigInt(42), "[2] == 42");
+ assert.sameValue(sample[0], 40n, "[0] == 40");
+ assert.sameValue(sample[1], 41n, "[1] == 41");
+ assert.sameValue(sample[2], 42n, "[2] == 42");
});
diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-set-value-during-interaction.js
index 4a2331d42..641b2a0cb 100644
--- a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-set-value-during-interaction.js
+++ b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-set-value-during-interaction.js
@@ -26,7 +26,7 @@ features: [BigInt, Reflect.set, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
var newVal = 0;
sample.some(function(val, i) {
@@ -36,7 +36,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
"get the changed value during the loop"
);
assert.sameValue(
- Reflect.set(sample, 0, convertToBigInt(7)),
+ Reflect.set(sample, 0, 7n),
true,
"re-set a value for sample[0]"
);
@@ -50,7 +50,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
newVal++;
});
- assert.sameValue(sample[0], convertToBigInt(7), "changed values after iteration [0] == 7");
- assert.sameValue(sample[1], convertToBigInt(1), "changed values after iteration [1] == 1");
- assert.sameValue(sample[2], convertToBigInt(2), "changed values after iteration [2] == 2");
+ assert.sameValue(sample[0], 7n, "changed values after iteration [0] == 7");
+ assert.sameValue(sample[1], 1n, "changed values after iteration [1] == 1");
+ assert.sameValue(sample[2], 2n, "changed values after iteration [2] == 2");
});
diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/some/BigInt/get-length-uses-internal-arraylength.js
index 2135d10ca..bca0d658f 100644
--- a/test/built-ins/TypedArray/prototype/some/BigInt/get-length-uses-internal-arraylength.js
+++ b/test/built-ins/TypedArray/prototype/some/BigInt/get-length-uses-internal-arraylength.js
@@ -31,7 +31,7 @@ var desc = {
Object.defineProperty(TypedArray.prototype, "length", desc);
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
var calls = 0;
Object.defineProperty(TA.prototype, "length", desc);
diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/some/BigInt/values-are-not-cached.js
index bd1d209f8..c4918d6bb 100644
--- a/test/built-ins/TypedArray/prototype/some/BigInt/values-are-not-cached.js
+++ b/test/built-ins/TypedArray/prototype/some/BigInt/values-are-not-cached.js
@@ -26,15 +26,15 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44]));
+ var sample = new TA([42n, 43n, 44n]);
sample.some(function(v, i) {
if (i < sample.length - 1) {
- sample[i+1] = convertToBigInt(42);
+ sample[i+1] = 42n;
}
assert.sameValue(
- v, convertToBigInt(42), "method does not cache values before callbackfn calls"
+ v, 42n, "method does not cache values before callbackfn calls"
);
});
});
diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/arraylength-internal.js b/test/built-ins/TypedArray/prototype/sort/BigInt/arraylength-internal.js
index b8436a5f3..8a3d5a7f8 100644
--- a/test/built-ins/TypedArray/prototype/sort/BigInt/arraylength-internal.js
+++ b/test/built-ins/TypedArray/prototype/sort/BigInt/arraylength-internal.js
@@ -23,7 +23,7 @@ var desc = {
Object.defineProperty(TypedArray.prototype, "length", desc);
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 42, 42]));
+ var sample = new TA([42n, 42n, 42n]);
getCalls = 0;
Object.defineProperty(TA.prototype, "length", desc);
diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-call-throws.js b/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-call-throws.js
index d319341a7..668f33e06 100644
--- a/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-call-throws.js
+++ b/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-call-throws.js
@@ -26,7 +26,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44, 45, 46]));
+ var sample = new TA([42n, 43n, 44n, 45n, 46n]);
var calls = 0;
var comparefn = function() {
diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-calls.js b/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-calls.js
index c058cddac..0e8846c13 100644
--- a/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-calls.js
+++ b/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-calls.js
@@ -23,7 +23,7 @@ var expectedThis = (function() {
})();
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 42, 42, 42, 42]));
+ var sample = new TA([42n, 42n, 42n, 42n, 42n]);
var calls = [];
var comparefn = function() {
@@ -36,7 +36,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
calls.forEach(function(args) {
assert.sameValue(args[0], expectedThis, "comparefn is called no specific this");
assert.sameValue(args[1].length, 2, "comparefn is always called with 2 args");
- assert.sameValue(args[1][0], convertToBigInt(42), "x is a listed value");
- assert.sameValue(args[1][0], convertToBigInt(42), "y is a listed value");
+ assert.sameValue(args[1][0], 42n, "x is a listed value");
+ assert.sameValue(args[1][0], 42n, "y is a listed value");
});
});
diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-nonfunction-call-throws.js b/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-nonfunction-call-throws.js
index 80f23f618..4770b66da 100644
--- a/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-nonfunction-call-throws.js
+++ b/test/built-ins/TypedArray/prototype/sort/BigInt/comparefn-nonfunction-call-throws.js
@@ -19,7 +19,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43, 44, 45, 46]));
+ var sample = new TA([42n, 43n, 44n, 45n, 46n]);
assert.throws(TypeError, function() {
sample.sort(null);
diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/return-same-instance.js b/test/built-ins/TypedArray/prototype/sort/BigInt/return-same-instance.js
index d3ad6056f..702f45015 100644
--- a/test/built-ins/TypedArray/prototype/sort/BigInt/return-same-instance.js
+++ b/test/built-ins/TypedArray/prototype/sort/BigInt/return-same-instance.js
@@ -15,7 +15,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([2, 1]));
+ var sample = new TA([2n, 1n]);
var result = sample.sort();
assert.sameValue(sample, result, "without comparefn");
diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/sortcompare-with-no-tostring.js b/test/built-ins/TypedArray/prototype/sort/BigInt/sortcompare-with-no-tostring.js
index b7f73c650..3f6402c66 100644
--- a/test/built-ins/TypedArray/prototype/sort/BigInt/sortcompare-with-no-tostring.js
+++ b/test/built-ins/TypedArray/prototype/sort/BigInt/sortcompare-with-no-tostring.js
@@ -21,7 +21,7 @@ features: [BigInt, TypedArray]
var origToString = Number.prototype.toString;
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([20, 100, 3]));
+ var sample = new TA([20n, 100n, 3n]);
var result = sample.sort();
- assert(compareArray(result, convertToBigInt([3, 20, 100])));
+ assert(compareArray(result, [3n, 20n, 100n]));
});
diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js b/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js
index 588f1b49f..50d6e22fe 100644
--- a/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js
+++ b/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js
@@ -17,17 +17,17 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample;
- sample = new TA(convertToBigInt([4, 3, 2, 1])).sort();
- assert(compareArray(sample, convertToBigInt([1, 2, 3, 4])), "descending values");
+ sample = new TA([4n, 3n, 2n, 1n]).sort();
+ assert(compareArray(sample, [1n, 2n, 3n, 4n]), "descending values");
- sample = new TA(convertToBigInt([3, 4, 1, 2])).sort();
- assert(compareArray(sample, convertToBigInt([1, 2, 3, 4])), "mixed numbers");
+ sample = new TA([3n, 4n, 1n, 2n]).sort();
+ assert(compareArray(sample, [1n, 2n, 3n, 4n]), "mixed numbers");
- sample = new TA(convertToBigInt([3, 4, 3, 1, 0, 1, 2])).sort();
- assert(compareArray(sample, convertToBigInt([0, 1, 1, 2, 3, 3, 4])), "repeating numbers");
+ sample = new TA([3n, 4n, 3n, 1n, 0n, 1n, 2n]).sort();
+ assert(compareArray(sample, [0n, 1n, 1n, 2n, 3n, 3n, 4n]), "repeating numbers");
sample = new TA(convertToBigInt([1, 0, -0, 2])).sort();
- assert(compareArray(sample, convertToBigInt([0, 0, 1, 2])), "0s");
+ assert(compareArray(sample, [0n, 0n, 1n, 2n]), "0s");
});
testWithBigIntTypedArrayConstructors(function(TA) {
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/infinity.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/infinity.js
index 0ac7cb592..fc6786978 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/infinity.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/infinity.js
@@ -10,10 +10,10 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
assert(
- compareArray(sample.subarray(-Infinity), convertToBigInt([40, 41, 42, 43])),
+ compareArray(sample.subarray(-Infinity), [40n, 41n, 42n, 43n]),
"begin == -Infinity"
);
assert(
@@ -25,7 +25,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
"end == -Infinity"
);
assert(
- compareArray(sample.subarray(0, Infinity), convertToBigInt([40, 41, 42, 43])),
+ compareArray(sample.subarray(0, Infinity), [40n, 41n, 42n, 43n]),
"end == Infinity"
);
});
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/minus-zero.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/minus-zero.js
index a0349c375..b71e445c7 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/minus-zero.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/minus-zero.js
@@ -10,14 +10,14 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
assert(
- compareArray(sample.subarray(-0), convertToBigInt([40, 41, 42, 43])),
+ compareArray(sample.subarray(-0), [40n, 41n, 42n, 43n]),
"begin == -0"
);
assert(
- compareArray(sample.subarray(-0, 4), convertToBigInt([40, 41, 42, 43])),
+ compareArray(sample.subarray(-0, 4), [40n, 41n, 42n, 43n]),
"being == -0, end == length"
);
assert(
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/result-does-not-copy-ordinary-properties.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/result-does-not-copy-ordinary-properties.js
index 17f2b3a4c..af87b3756 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/result-does-not-copy-ordinary-properties.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/result-does-not-copy-ordinary-properties.js
@@ -13,7 +13,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([41, 42, 43, 44]));
+ var sample = new TA([41n, 42n, 43n, 44n]);
var result;
sample.foo = 42;
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-from-same-ctor.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-from-same-ctor.js
index d4b9a09a7..0d0362394 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-from-same-ctor.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-from-same-ctor.js
@@ -13,7 +13,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
var result = sample.subarray(1);
assert.sameValue(
@@ -25,7 +25,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert(result instanceof TA, "instanceof");
assert(
- compareArray(sample, convertToBigInt([40, 41, 42, 43])),
+ compareArray(sample, [40n, 41n, 42n, 43n]),
"original sample remains the same"
);
});
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-with-shared-buffer.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-with-shared-buffer.js
index 87801c85e..ee1198833 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-with-shared-buffer.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/result-is-new-instance-with-shared-buffer.js
@@ -13,7 +13,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
var buffer = sample.buffer;
var result = sample.subarray(1);
@@ -21,15 +21,15 @@ testWithBigIntTypedArrayConstructors(function(TA) {
assert.sameValue(result.buffer, sample.buffer, "shared buffer");
assert.sameValue(sample.buffer, buffer, "original buffer is preserved");
- sample[1] = convertToBigInt(100);
+ sample[1] = 100n;
assert(
- compareArray(result, convertToBigInt([100, 42, 43])),
+ compareArray(result, [100n, 42n, 43n]),
"changes on the original sample values affect the new instance"
);
- result[1] = convertToBigInt(111);
+ result[1] = 111n;
assert(
- compareArray(sample, convertToBigInt([40, 100, 111, 43])),
+ compareArray(sample, [40n, 100n, 111n, 43n]),
"changes on the new instance values affect the original sample"
);
});
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-different-length.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-different-length.js
index 3be58ad56..ff0787469 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-different-length.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-different-length.js
@@ -13,46 +13,46 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
function testRes(result, expected, msg) {
assert(compareArray(result, expected), msg + ", result: [" + result + "]");
}
- testRes(sample.subarray(1), convertToBigInt([41, 42, 43]), "begin == 1");
- testRes(sample.subarray(2), convertToBigInt([42, 43]), "begin == 2");
- testRes(sample.subarray(3), convertToBigInt([43]), "begin == 3");
+ testRes(sample.subarray(1), [41n, 42n, 43n], "begin == 1");
+ testRes(sample.subarray(2), [42n, 43n], "begin == 2");
+ testRes(sample.subarray(3), [43n], "begin == 3");
- testRes(sample.subarray(1, 4), convertToBigInt([41, 42, 43]), "begin == 1, end == length");
- testRes(sample.subarray(2, 4), convertToBigInt([42, 43]), "begin == 2, end == length");
- testRes(sample.subarray(3, 4), convertToBigInt([43]), "begin == 3, end == length");
+ testRes(sample.subarray(1, 4), [41n, 42n, 43n], "begin == 1, end == length");
+ testRes(sample.subarray(2, 4), [42n, 43n], "begin == 2, end == length");
+ testRes(sample.subarray(3, 4), [43n], "begin == 3, end == length");
- testRes(sample.subarray(0, 1), convertToBigInt([40]), "begin == 0, end == 1");
- testRes(sample.subarray(0, 2), convertToBigInt([40, 41]), "begin == 0, end == 2");
- testRes(sample.subarray(0, 3), convertToBigInt([40, 41, 42]), "begin == 0, end == 3");
+ testRes(sample.subarray(0, 1), [40n], "begin == 0, end == 1");
+ testRes(sample.subarray(0, 2), [40n, 41n], "begin == 0, end == 2");
+ testRes(sample.subarray(0, 3), [40n, 41n, 42n], "begin == 0, end == 3");
- testRes(sample.subarray(-1), convertToBigInt([43]), "begin == -1");
- testRes(sample.subarray(-2), convertToBigInt([42, 43]), "begin == -2");
- testRes(sample.subarray(-3), convertToBigInt([41, 42, 43]), "begin == -3");
+ testRes(sample.subarray(-1), [43n], "begin == -1");
+ testRes(sample.subarray(-2), [42n, 43n], "begin == -2");
+ testRes(sample.subarray(-3), [41n, 42n, 43n], "begin == -3");
- testRes(sample.subarray(-1, 4), convertToBigInt([43]), "begin == -1, end == length");
- testRes(sample.subarray(-2, 4), convertToBigInt([42, 43]), "begin == -2, end == length");
- testRes(sample.subarray(-3, 4), convertToBigInt([41, 42, 43]), "begin == -3, end == length");
+ testRes(sample.subarray(-1, 4), [43n], "begin == -1, end == length");
+ testRes(sample.subarray(-2, 4), [42n, 43n], "begin == -2, end == length");
+ testRes(sample.subarray(-3, 4), [41n, 42n, 43n], "begin == -3, end == length");
- testRes(sample.subarray(0, -1), convertToBigInt([40, 41, 42]), "begin == 0, end == -1");
- testRes(sample.subarray(0, -2), convertToBigInt([40, 41]), "begin == 0, end == -2");
- testRes(sample.subarray(0, -3), convertToBigInt([40]), "begin == 0, end == -3");
+ testRes(sample.subarray(0, -1), [40n, 41n, 42n], "begin == 0, end == -1");
+ testRes(sample.subarray(0, -2), [40n, 41n], "begin == 0, end == -2");
+ testRes(sample.subarray(0, -3), [40n], "begin == 0, end == -3");
- testRes(sample.subarray(-0, -1), convertToBigInt([40, 41, 42]), "begin == -0, end == -1");
- testRes(sample.subarray(-0, -2), convertToBigInt([40, 41]), "begin == -0, end == -2");
- testRes(sample.subarray(-0, -3), convertToBigInt([40]), "begin == -0, end == -3");
+ testRes(sample.subarray(-0, -1), [40n, 41n, 42n], "begin == -0, end == -1");
+ testRes(sample.subarray(-0, -2), [40n, 41n], "begin == -0, end == -2");
+ testRes(sample.subarray(-0, -3), [40n], "begin == -0, end == -3");
- testRes(sample.subarray(-2, -1), convertToBigInt([42]), "length == 4, begin == -2, end == -1");
- testRes(sample.subarray(1, -1), convertToBigInt([41, 42]), "length == 4, begin == 1, end == -1");
- testRes(sample.subarray(1, -2), convertToBigInt([41]), "length == 4, begin == 1, end == -2");
- testRes(sample.subarray(2, -1), convertToBigInt([42]), "length == 4, begin == 2, end == -1");
+ testRes(sample.subarray(-2, -1), [42n], "length == 4, begin == -2, end == -1");
+ testRes(sample.subarray(1, -1), [41n, 42n], "length == 4, begin == 1, end == -1");
+ testRes(sample.subarray(1, -2), [41n], "length == 4, begin == 1, end == -2");
+ testRes(sample.subarray(2, -1), [42n], "length == 4, begin == 2, end == -1");
- testRes(sample.subarray(-1, 5), convertToBigInt([43]), "begin == -1, end > length");
- testRes(sample.subarray(-2, 4), convertToBigInt([42, 43]), "begin == -2, end > length");
- testRes(sample.subarray(-3, 4), convertToBigInt([41, 42, 43]), "begin == -3, end > length");
+ testRes(sample.subarray(-1, 5), [43n], "begin == -1, end > length");
+ testRes(sample.subarray(-2, 4), [42n, 43n], "begin == -2, end > length");
+ testRes(sample.subarray(-3, 4), [41n, 42n, 43n], "begin == -3, end > length");
});
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-empty-length.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-empty-length.js
index f31ec8448..310d1bc6d 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-empty-length.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-empty-length.js
@@ -13,7 +13,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
function testRes(result, msg) {
assert.sameValue(result.length, 0, msg);
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-same-length.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-same-length.js
index 8e51f899f..79e579374 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-same-length.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/results-with-same-length.js
@@ -13,14 +13,14 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
function testRes(result, msg) {
assert.sameValue(result.length, 4, msg);
- assert.sameValue(result[0], convertToBigInt(40), msg + " & result[0] === 40");
- assert.sameValue(result[1], convertToBigInt(41), msg + " & result[1] === 41");
- assert.sameValue(result[2], convertToBigInt(42), msg + " & result[2] === 42");
- assert.sameValue(result[3], convertToBigInt(43), msg + " & result[3] === 43");
+ assert.sameValue(result[0], 40n, msg + " & result[0] === 40");
+ assert.sameValue(result[1], 41n, msg + " & result[1] === 41");
+ assert.sameValue(result[2], 42n, msg + " & result[2] === 42");
+ assert.sameValue(result[3], 43n, msg + " & result[3] === 43");
}
testRes(sample.subarray(0), "begin == 0");
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-abrupt.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-abrupt.js
index 5f66e654f..9ed4e0900 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-abrupt.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-abrupt.js
@@ -26,7 +26,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
Object.defineProperty(sample, "constructor", {
get: function() {
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-inherited.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-inherited.js
index 0e70b7051..67841f442 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-inherited.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-inherited.js
@@ -26,7 +26,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
var calls = 0;
var result;
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-returns-throws.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-returns-throws.js
index fc8c9cad0..696732371 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-returns-throws.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor-returns-throws.js
@@ -28,7 +28,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
sample.constructor = 42;
assert.throws(TypeError, function() {
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor.js
index e552af771..a05460004 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-ctor.js
@@ -26,7 +26,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
var calls = 0;
var result;
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-invocation.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-invocation.js
index 1747a44ea..ebde38088 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-invocation.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-invocation.js
@@ -36,7 +36,7 @@ features: [BigInt, Symbol.species, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42]));
+ var sample = new TA([40n, 41n, 42n]);
var expectedOffset = TA.BYTES_PER_ELEMENT;
var result, ctorThis;
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js
index 1993db3f6..ee537263a 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js
@@ -36,7 +36,7 @@ features: [BigInt, Symbol.species, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40]));
+ var sample = new TA([40n]);
var other = new Int8Array([1, 0, 1]);
var result;
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor.js
index 7b11bb596..01b0dbd9b 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor.js
@@ -36,7 +36,7 @@ features: [BigInt, Symbol.species, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42]));
+ var sample = new TA([40n, 41n, 42n]);
var calls = 0;
var result;
@@ -49,5 +49,5 @@ testWithBigIntTypedArrayConstructors(function(TA) {
result = sample.subarray(1);
assert.sameValue(calls, 1, "ctor called once");
- assert(compareArray(result, convertToBigInt([41, 42])), "expected subarray");
+ assert(compareArray(result, [41n, 42n]), "expected subarray");
});
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-begin.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-begin.js
index 6a7885155..3d9ff3c0f 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-begin.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-begin.js
@@ -20,28 +20,28 @@ var obj = {
};
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
- assert(compareArray(sample.subarray(false), convertToBigInt([40, 41, 42, 43])), "false");
- assert(compareArray(sample.subarray(true), convertToBigInt([41, 42, 43])), "true");
+ assert(compareArray(sample.subarray(false), [40n, 41n, 42n, 43n]), "false");
+ assert(compareArray(sample.subarray(true), [41n, 42n, 43n]), "true");
- assert(compareArray(sample.subarray(NaN), convertToBigInt([40, 41, 42, 43])), "NaN");
- assert(compareArray(sample.subarray(null), convertToBigInt([40, 41, 42, 43])), "null");
- assert(compareArray(sample.subarray(undefined), convertToBigInt([40, 41, 42, 43])), "undefined");
+ assert(compareArray(sample.subarray(NaN), [40n, 41n, 42n, 43n]), "NaN");
+ assert(compareArray(sample.subarray(null), [40n, 41n, 42n, 43n]), "null");
+ assert(compareArray(sample.subarray(undefined), [40n, 41n, 42n, 43n]), "undefined");
- assert(compareArray(sample.subarray(1.1), convertToBigInt([41, 42, 43])), "1.1");
- assert(compareArray(sample.subarray(1.5), convertToBigInt([41, 42, 43])), "1.5");
- assert(compareArray(sample.subarray(0.6), convertToBigInt([40, 41, 42, 43])), "0.6");
+ assert(compareArray(sample.subarray(1.1), [41n, 42n, 43n]), "1.1");
+ assert(compareArray(sample.subarray(1.5), [41n, 42n, 43n]), "1.5");
+ assert(compareArray(sample.subarray(0.6), [40n, 41n, 42n, 43n]), "0.6");
- assert(compareArray(sample.subarray(-1.5), convertToBigInt([43])), "-1.5");
- assert(compareArray(sample.subarray(-1.1), convertToBigInt([43])), "-1.1");
- assert(compareArray(sample.subarray(-0.6), convertToBigInt([40, 41, 42, 43])), "-0.6");
+ assert(compareArray(sample.subarray(-1.5), [43n]), "-1.5");
+ assert(compareArray(sample.subarray(-1.1), [43n]), "-1.1");
+ assert(compareArray(sample.subarray(-0.6), [40n, 41n, 42n, 43n]), "-0.6");
- assert(compareArray(sample.subarray("3"), convertToBigInt([43])), "string");
+ assert(compareArray(sample.subarray("3"), [43n]), "string");
assert(
compareArray(
sample.subarray(obj),
- convertToBigInt([42, 43])
+ [42n, 43n]
),
"object"
);
diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-end.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-end.js
index f847b6d27..8885220a3 100644
--- a/test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-end.js
+++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/tointeger-end.js
@@ -21,27 +21,27 @@ var obj = {
};
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([40, 41, 42, 43]));
+ var sample = new TA([40n, 41n, 42n, 43n]);
assert(compareArray(sample.subarray(0, false), []), "false");
- assert(compareArray(sample.subarray(0, true), convertToBigInt([40])), "true");
+ assert(compareArray(sample.subarray(0, true), [40n]), "true");
assert(compareArray(sample.subarray(0, NaN), []), "NaN");
assert(compareArray(sample.subarray(0, null), []), "null");
- assert(compareArray(sample.subarray(0, undefined), convertToBigInt([40, 41, 42, 43])), "undefined");
+ assert(compareArray(sample.subarray(0, undefined), [40n, 41n, 42n, 43n]), "undefined");
assert(compareArray(sample.subarray(0, 0.6), []), "0.6");
- assert(compareArray(sample.subarray(0, 1.1), convertToBigInt([40])), "1.1");
- assert(compareArray(sample.subarray(0, 1.5), convertToBigInt([40])), "1.5");
+ assert(compareArray(sample.subarray(0, 1.1), [40n]), "1.1");
+ assert(compareArray(sample.subarray(0, 1.5), [40n]), "1.5");
assert(compareArray(sample.subarray(0, -0.6), []), "-0.6");
- assert(compareArray(sample.subarray(0, -1.1), convertToBigInt([40, 41, 42])), "-1.1");
- assert(compareArray(sample.subarray(0, -1.5), convertToBigInt([40, 41, 42])), "-1.5");
+ assert(compareArray(sample.subarray(0, -1.1), [40n, 41n, 42n]), "-1.1");
+ assert(compareArray(sample.subarray(0, -1.5), [40n, 41n, 42n]), "-1.5");
- assert(compareArray(sample.subarray(0, "3"), convertToBigInt([40, 41, 42])), "string");
+ assert(compareArray(sample.subarray(0, "3"), [40n, 41n, 42n]), "string");
assert(
compareArray(
sample.subarray(0, obj),
- convertToBigInt([40, 41])
+ [40n, 41n]
),
"object"
);
diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/get-length-uses-internal-arraylength.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/get-length-uses-internal-arraylength.js
index f1662225c..688cfb239 100644
--- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/get-length-uses-internal-arraylength.js
+++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/get-length-uses-internal-arraylength.js
@@ -31,7 +31,7 @@ var desc = {
Object.defineProperty(TypedArray.prototype, "length", desc);
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
Object.defineProperty(TA.prototype, "length", desc);
Object.defineProperty(sample, "length", desc);
diff --git a/test/built-ins/TypedArray/prototype/values/BigInt/iter-prototype.js b/test/built-ins/TypedArray/prototype/values/BigInt/iter-prototype.js
index 72b1bd610..607aa0256 100644
--- a/test/built-ins/TypedArray/prototype/values/BigInt/iter-prototype.js
+++ b/test/built-ins/TypedArray/prototype/values/BigInt/iter-prototype.js
@@ -18,7 +18,7 @@ features: [BigInt, Symbol.iterator, TypedArray]
var ArrayIteratorProto = Object.getPrototypeOf([][Symbol.iterator]());
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([0, 42, 64]));
+ var sample = new TA([0n, 42n, 64n]);
var iter = sample.values();
assert.sameValue(Object.getPrototypeOf(iter), ArrayIteratorProto);
diff --git a/test/built-ins/TypedArray/prototype/values/BigInt/return-itor.js b/test/built-ins/TypedArray/prototype/values/BigInt/return-itor.js
index 576a97a0e..dc2904754 100644
--- a/test/built-ins/TypedArray/prototype/values/BigInt/return-itor.js
+++ b/test/built-ins/TypedArray/prototype/values/BigInt/return-itor.js
@@ -20,15 +20,15 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var itor = typedArray.values();
var next = itor.next();
- assert.sameValue(next.value, convertToBigInt(0));
+ assert.sameValue(next.value, 0n);
assert.sameValue(next.done, false);
next = itor.next();
- assert.sameValue(next.value, convertToBigInt(42));
+ assert.sameValue(next.value, 42n);
assert.sameValue(next.done, false);
next = itor.next();
- assert.sameValue(next.value, convertToBigInt(64));
+ assert.sameValue(next.value, 64n);
assert.sameValue(next.done, false);
next = itor.next();
diff --git a/test/built-ins/TypedArrays/ctors-bigint/length-arg/init-zeros.js b/test/built-ins/TypedArrays/ctors-bigint/length-arg/init-zeros.js
index 41bb0a8e2..78d52f9ae 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/length-arg/init-zeros.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/length-arg/init-zeros.js
@@ -43,13 +43,13 @@ features: [BigInt, TypedArray]
testWithTypedArrayConstructors(function(TA) {
var subject = new TA(9);
- assert.sameValue(subject[0], convertToBigInt(0), 'index 0');
- assert.sameValue(subject[1], convertToBigInt(0), 'index 1');
- assert.sameValue(subject[2], convertToBigInt(0), 'index 2');
- assert.sameValue(subject[3], convertToBigInt(0), 'index 3');
- assert.sameValue(subject[4], convertToBigInt(0), 'index 4');
- assert.sameValue(subject[5], convertToBigInt(0), 'index 5');
- assert.sameValue(subject[6], convertToBigInt(0), 'index 6');
- assert.sameValue(subject[7], convertToBigInt(0), 'index 7');
- assert.sameValue(subject[8], convertToBigInt(0), 'index 8');
+ assert.sameValue(subject[0], 0n, 'index 0');
+ assert.sameValue(subject[1], 0n, 'index 1');
+ assert.sameValue(subject[2], 0n, 'index 2');
+ assert.sameValue(subject[3], 0n, 'index 3');
+ assert.sameValue(subject[4], 0n, 'index 4');
+ assert.sameValue(subject[5], 0n, 'index 5');
+ assert.sameValue(subject[6], 0n, 'index 6');
+ assert.sameValue(subject[7], 0n, 'index 7');
+ assert.sameValue(subject[8], 0n, 'index 8');
});
diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-array-returns.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-array-returns.js
index 84ada078a..ee21ba4cf 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-array-returns.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-array-returns.js
@@ -21,8 +21,8 @@ var obj = [7, 42];
testWithTypedArrayConstructors(function(TA) {
var typedArray = new TA(convertToBigInt(obj));
assert.sameValue(typedArray.length, 2);
- assert.sameValue(typedArray[0], convertToBigInt(7));
- assert.sameValue(typedArray[1], convertToBigInt(42));
+ assert.sameValue(typedArray[0], 7n);
+ assert.sameValue(typedArray[1], 42n);
assert.sameValue(typedArray.constructor, TA);
assert.sameValue(Object.getPrototypeOf(typedArray), TA.prototype);
});
diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-generator-iterable-returns.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-generator-iterable-returns.js
index db9597546..c7236d4ad 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-generator-iterable-returns.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-generator-iterable-returns.js
@@ -18,13 +18,13 @@ features: [BigInt, TypedArray]
testWithTypedArrayConstructors(function(TA) {
var obj = (function *() {
- yield convertToBigInt(7); yield convertToBigInt(42);
+ yield 7n; yield 42n;
})();
var typedArray = new TA(obj);
assert.sameValue(typedArray.length, 2);
- assert.sameValue(typedArray[0], convertToBigInt(7));
- assert.sameValue(typedArray[1], convertToBigInt(42));
+ assert.sameValue(typedArray[0], 7n);
+ assert.sameValue(typedArray[1], 42n);
assert.sameValue(typedArray.constructor, TA);
assert.sameValue(Object.getPrototypeOf(typedArray), TA.prototype);
});
diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-new-instance-extensibility.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-new-instance-extensibility.js
index 9536f2456..553714277 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-new-instance-extensibility.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-new-instance-extensibility.js
@@ -31,9 +31,9 @@ features: [BigInt, TypedArray]
testWithTypedArrayConstructors(function(TA) {
var obj = {
- "0": convertToBigInt(0),
- "1": convertToBigInt(1),
- "2": convertToBigInt(2),
+ "0": 0n,
+ "1": 1n,
+ "2": 2n,
length: 3
};
diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-from-property.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-from-property.js
index 41e153911..340d5da44 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-from-property.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-from-property.js
@@ -32,8 +32,8 @@ Object.defineProperty(obj, "2", {
});
testWithTypedArrayConstructors(function(TA) {
- obj[0] = convertToBigInt(0);
- obj[1] = convertToBigInt(0);
+ obj[0] = 0n;
+ obj[1] = 0n;
assert.throws(Test262Error, function() {
new TA(obj);
});
diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive-typeerror.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive-typeerror.js
index 50dd3b1a3..68d8c0f63 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive-typeerror.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive-typeerror.js
@@ -69,7 +69,7 @@ testWithTypedArrayConstructors(function(TA) {
};
assert.throws(TypeError, function() {
- new TA([convertToBigInt(8), sample]);
+ new TA([8n, sample]);
}, "abrupt completion from sample @@toPrimitive");
assert.sameValue(toPrimitive, 1, "toPrimitive was called once");
diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive.js
index f468bdea7..f8fc44562 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive.js
@@ -67,7 +67,7 @@ testWithTypedArrayConstructors(function(TA) {
};
assert.throws(Test262Error, function() {
- new TA([convertToBigInt(8), sample]);
+ new TA([8n, sample]);
}, "abrupt completion from sample @@toPrimitive");
assert.sameValue(toPrimitive, 1, "toPrimitive was called once");
diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-tostring.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-tostring.js
index 1b507ccbf..6ce9f8ca5 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-tostring.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-tostring.js
@@ -80,7 +80,7 @@ testWithTypedArrayConstructors(function(TA) {
};
assert.throws(Test262Error, function() {
- new TA([convertToBigInt(8), sample]);
+ new TA([8n, sample]);
}, "abrupt completion from ToNumber(sample)");
assert.sameValue(valueOf, 1, "valueOf called once");
diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof-typeerror.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof-typeerror.js
index aeb3eb632..c0f9e7269 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof-typeerror.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof-typeerror.js
@@ -81,7 +81,7 @@ testWithTypedArrayConstructors(function(TA) {
};
assert.throws(TypeError, function() {
- new TA([convertToBigInt(8), sample]);
+ new TA([8n, sample]);
}, "abrupt completion from ToNumber(sample)");
assert.sameValue(valueOf, 1, "valueOf called once");
diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof.js
index 361426d2c..6919d931a 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof.js
@@ -75,7 +75,7 @@ testWithTypedArrayConstructors(function(TA) {
};
assert.throws(Test262Error, function() {
- new TA([convertToBigInt(8), sample]);
+ new TA([8n, sample]);
}, "abrupt completion from ToNumber(sample)");
assert.sameValue(valueOf, 1, "valueOf called once");
diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-property.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-property.js
index df7564b9d..b752780da 100644
--- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-property.js
+++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-property.js
@@ -32,8 +32,8 @@ var obj = {
};
testWithTypedArrayConstructors(function(TA) {
- obj[0] = convertToBigInt(0);
- obj[1] = convertToBigInt(0);
+ obj[0] = 0n;
+ obj[1] = 0n;
assert.throws(Test262Error, function() {
new TA(obj);
});
diff --git a/test/built-ins/TypedArrays/from/BigInt/custom-ctor-returns-other-instance.js b/test/built-ins/TypedArrays/from/BigInt/custom-ctor-returns-other-instance.js
index 14f59cfd4..b2102fe1b 100644
--- a/test/built-ins/TypedArrays/from/BigInt/custom-ctor-returns-other-instance.js
+++ b/test/built-ins/TypedArrays/from/BigInt/custom-ctor-returns-other-instance.js
@@ -24,10 +24,10 @@ features: [BigInt, Symbol.iterator, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sourceItor = convertToBigInt([1, 2]);
+ var sourceItor = [1n, 2n];
var sourceObj = {
- 0: convertToBigInt(0),
- 1: convertToBigInt(0),
+ 0: 0n,
+ 1: 0n,
length: 2
};
diff --git a/test/built-ins/TypedArrays/from/BigInt/mapfn-arguments.js b/test/built-ins/TypedArrays/from/BigInt/mapfn-arguments.js
index a84021d47..d39985829 100644
--- a/test/built-ins/TypedArrays/from/BigInt/mapfn-arguments.js
+++ b/test/built-ins/TypedArrays/from/BigInt/mapfn-arguments.js
@@ -27,7 +27,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
k: k,
argsLength: arguments.length
});
- return convertToBigInt(0);
+ return 0n;
};
TA.from(source, mapfn);
diff --git a/test/built-ins/TypedArrays/from/BigInt/mapfn-this-with-thisarg.js b/test/built-ins/TypedArrays/from/BigInt/mapfn-this-with-thisarg.js
index b748126af..24eebdf81 100644
--- a/test/built-ins/TypedArrays/from/BigInt/mapfn-this-with-thisarg.js
+++ b/test/built-ins/TypedArrays/from/BigInt/mapfn-this-with-thisarg.js
@@ -26,7 +26,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var results = [];
var mapfn = function() {
results.push(this);
- return convertToBigInt(0);
+ return 0n;
};
TA.from(source, mapfn, thisArg);
diff --git a/test/built-ins/TypedArrays/from/BigInt/mapfn-this-without-thisarg-strict.js b/test/built-ins/TypedArrays/from/BigInt/mapfn-this-without-thisarg-strict.js
index 9b575c2a9..f8f0b282f 100644
--- a/test/built-ins/TypedArrays/from/BigInt/mapfn-this-without-thisarg-strict.js
+++ b/test/built-ins/TypedArrays/from/BigInt/mapfn-this-without-thisarg-strict.js
@@ -26,7 +26,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var results = [];
var mapfn = function() {
results.push(this);
- return convertToBigInt(0);
+ return 0n;
};
TA.from(source, mapfn);
diff --git a/test/built-ins/TypedArrays/from/BigInt/new-instance-using-custom-ctor.js b/test/built-ins/TypedArrays/from/BigInt/new-instance-using-custom-ctor.js
index 7e6bc6169..82a37b242 100644
--- a/test/built-ins/TypedArrays/from/BigInt/new-instance-using-custom-ctor.js
+++ b/test/built-ins/TypedArrays/from/BigInt/new-instance-using-custom-ctor.js
@@ -21,9 +21,9 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var result = TA.from.call(ctor, convertToBigInt(source));
assert.sameValue(result.length, 3);
- assert.sameValue(result[0], convertToBigInt(42));
- assert.sameValue(result[1], convertToBigInt(43));
- assert.sameValue(result[2], convertToBigInt(42));
+ assert.sameValue(result[0], 42n);
+ assert.sameValue(result[1], 43n);
+ assert.sameValue(result[2], 42n);
assert.sameValue(result.constructor, TA);
assert.sameValue(Object.getPrototypeOf(result), TA.prototype);
assert.sameValue(called, 1);
diff --git a/test/built-ins/TypedArrays/from/BigInt/new-instance-with-mapfn.js b/test/built-ins/TypedArrays/from/BigInt/new-instance-with-mapfn.js
index 48ee4d285..7de5fda26 100644
--- a/test/built-ins/TypedArrays/from/BigInt/new-instance-with-mapfn.js
+++ b/test/built-ins/TypedArrays/from/BigInt/new-instance-with-mapfn.js
@@ -17,9 +17,9 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var result = TA.from(source, mapfn);
assert.sameValue(result.length, 3);
- assert.sameValue(result[0], convertToBigInt(84));
- assert.sameValue(result[1], convertToBigInt(86));
- assert.sameValue(result[2], convertToBigInt(84));
+ assert.sameValue(result[0], 84n);
+ assert.sameValue(result[1], 86n);
+ assert.sameValue(result[2], 84n);
assert.sameValue(result.constructor, TA);
assert.sameValue(Object.getPrototypeOf(result), TA.prototype);
});
diff --git a/test/built-ins/TypedArrays/from/BigInt/new-instance-without-mapfn.js b/test/built-ins/TypedArrays/from/BigInt/new-instance-without-mapfn.js
index af95e8015..61f45e35e 100644
--- a/test/built-ins/TypedArrays/from/BigInt/new-instance-without-mapfn.js
+++ b/test/built-ins/TypedArrays/from/BigInt/new-instance-without-mapfn.js
@@ -13,9 +13,9 @@ var source = [42, 43, 42];
testWithBigIntTypedArrayConstructors(function(TA) {
var result = TA.from(convertToBigInt(source));
assert.sameValue(result.length, 3);
- assert.sameValue(result[0], convertToBigInt(42));
- assert.sameValue(result[1], convertToBigInt(43));
- assert.sameValue(result[2], convertToBigInt(42));
+ assert.sameValue(result[0], 42n);
+ assert.sameValue(result[1], 43n);
+ assert.sameValue(result[2], 42n);
assert.sameValue(result.constructor, TA);
assert.sameValue(Object.getPrototypeOf(result), TA.prototype);
});
diff --git a/test/built-ins/TypedArrays/from/BigInt/set-value-abrupt-completion.js b/test/built-ins/TypedArrays/from/BigInt/set-value-abrupt-completion.js
index 34ee679a5..7259e8a03 100644
--- a/test/built-ins/TypedArrays/from/BigInt/set-value-abrupt-completion.js
+++ b/test/built-ins/TypedArrays/from/BigInt/set-value-abrupt-completion.js
@@ -26,7 +26,7 @@ var obj = {
};
testWithBigIntTypedArrayConstructors(function(TA) {
- var source = [convertToBigInt(42), obj, convertToBigInt(1)];
+ var source = [42n, obj, 1n];
var lastValue;
var mapfn = function(kValue) {
lastValue = kValue;
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/desc-value-throws.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/desc-value-throws.js
index 016d41b63..d4dbc7267 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/desc-value-throws.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/desc-value-throws.js
@@ -32,7 +32,7 @@ var obj = {
};
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42]));
+ var sample = new TA([42n]);
assert.throws(Test262Error, function() {
Object.defineProperty(sample, "0", {value: obj});
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-greater-than-last-index.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-greater-than-last-index.js
index d48eb4afb..c558041e1 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-greater-than-last-index.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-greater-than-last-index.js
@@ -21,7 +21,7 @@ features: [BigInt, Reflect, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
assert.sameValue(
Reflect.defineProperty(sample, "2", {
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-lower-than-zero.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-lower-than-zero.js
index faaf037c3..c9ff53898 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-lower-than-zero.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-lower-than-zero.js
@@ -19,7 +19,7 @@ features: [BigInt, Reflect, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
assert.sameValue(
Reflect.defineProperty(sample, "-1", {
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-minus-zero.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-minus-zero.js
index 2c838c345..73dcde780 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-minus-zero.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-minus-zero.js
@@ -31,6 +31,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
false,
"defineProperty returns false"
);
- assert.sameValue(sample[0], convertToBigInt(0), "does not change the value for [0]");
+ assert.sameValue(sample[0], 0n, "does not change the value for [0]");
assert.sameValue(sample["-0"], undefined, "does define a value for ['-0']");
});
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-not-canonical-index.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-not-canonical-index.js
index c87d89cf9..616875f7e 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-not-canonical-index.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-not-canonical-index.js
@@ -37,7 +37,7 @@ var acDesc = {
testWithBigIntTypedArrayConstructors(function(TA) {
keys.forEach(function(key) {
var dataDesc = {
- value: convertToBigInt(42),
+ value: 42n,
writable: true,
configurable: true
};
@@ -50,7 +50,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
"return true after defining data property [" + key + "]"
);
- assert.sameValue(sample1[key], convertToBigInt(42), "value is set to [" + key + "]");
+ assert.sameValue(sample1[key], 42n, "value is set to [" + key + "]");
verifyNotEnumerable(sample1, key);
verifyWritable(sample1, key);
verifyConfigurable(sample1, key);
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-not-integer.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-not-integer.js
index 0d3d3cc79..15bc69fb4 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-not-integer.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-not-integer.js
@@ -29,7 +29,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
false,
"0.1"
);
- assert.sameValue(sample[0], convertToBigInt(0), "'0.1' - does not change the value for [0]");
+ assert.sameValue(sample[0], 0n, "'0.1' - does not change the value for [0]");
assert.sameValue(
sample["0.1"],
undefined,
@@ -47,7 +47,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
"0.000001"
);
assert.sameValue(
- sample[0], convertToBigInt(0),
+ sample[0], 0n,
"'0.000001' - does not change the value for [0]"
);
assert.sameValue(
@@ -66,7 +66,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
false,
"1.1"
);
- assert.sameValue(sample[1], convertToBigInt(0), "'1.1' - does not change the value for [1]");
+ assert.sameValue(sample[1], 0n, "'1.1' - does not change the value for [1]");
assert.sameValue(
sample["1.1"],
undefined,
@@ -84,11 +84,11 @@ testWithBigIntTypedArrayConstructors(function(TA) {
"Infinity"
);
assert.sameValue(
- sample[0], convertToBigInt(0),
+ sample[0], 0n,
"'Infinity' - does not change the value for [0]"
);
assert.sameValue(
- sample[1], convertToBigInt(0),
+ sample[1], 0n,
"'Infinity' - does not change the value for [1]"
);
assert.sameValue(
@@ -108,11 +108,11 @@ testWithBigIntTypedArrayConstructors(function(TA) {
"-Infinity"
);
assert.sameValue(
- sample[0], convertToBigInt(0),
+ sample[0], 0n,
"'-Infinity' - does not change the value for [0]"
);
assert.sameValue(
- sample[1], convertToBigInt(0),
+ sample[1], 0n,
"'-Infinity' - does not change the value for [1]"
);
assert.sameValue(
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-not-numeric-index.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-not-numeric-index.js
index 8f262daeb..b68c6553c 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-not-numeric-index.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-not-numeric-index.js
@@ -18,7 +18,7 @@ features: [BigInt, Reflect, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
assert.sameValue(
Reflect.defineProperty(sample, "foo", {value:42}),
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-accessor-desc.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-accessor-desc.js
index 21ab9cfc3..4b4b60ffd 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-accessor-desc.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-accessor-desc.js
@@ -31,7 +31,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
false,
"get accessor"
);
- assert.sameValue(sample[0], convertToBigInt(0), "get accessor - side effect check");
+ assert.sameValue(sample[0], 0n, "get accessor - side effect check");
assert.sameValue(
Reflect.defineProperty(sample, "0", {
@@ -41,7 +41,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
false,
"set accessor"
);
- assert.sameValue(sample[0], convertToBigInt(0), "set accessor - side effect check");
+ assert.sameValue(sample[0], 0n, "set accessor - side effect check");
assert.sameValue(
Reflect.defineProperty(sample, "0", {
@@ -54,5 +54,5 @@ testWithBigIntTypedArrayConstructors(function(TA) {
false,
"get and set accessors"
);
- assert.sameValue(sample[0], convertToBigInt(0), "get and set accessors - side effect check");
+ assert.sameValue(sample[0], 0n, "get and set accessors - side effect check");
});
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-configurable.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-configurable.js
index f928a3f93..51fd77203 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-configurable.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-configurable.js
@@ -31,5 +31,5 @@ testWithBigIntTypedArrayConstructors(function(TA) {
false,
"defineProperty's result"
);
- assert.sameValue(sample[0], convertToBigInt(0), "side effect check");
+ assert.sameValue(sample[0], 0n, "side effect check");
});
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-enumerable.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-enumerable.js
index 79a56222a..37315f7c9 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-enumerable.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-enumerable.js
@@ -31,5 +31,5 @@ testWithBigIntTypedArrayConstructors(function(TA) {
false,
"defineProperty's result"
);
- assert.sameValue(sample[0], convertToBigInt(0), "side effect check");
+ assert.sameValue(sample[0], 0n, "side effect check");
});
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-writable.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-writable.js
index 6f6483b90..26f4363fe 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-writable.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex-desc-not-writable.js
@@ -31,5 +31,5 @@ testWithBigIntTypedArrayConstructors(function(TA) {
false,
"defineProperty's result"
);
- assert.sameValue(sample[0], convertToBigInt(0), "side effect check");
+ assert.sameValue(sample[0], 0n, "side effect check");
});
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex.js
index 5f994cd86..3e8241ca0 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-numericindex.js
@@ -19,11 +19,11 @@ features: [BigInt, Reflect, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 42]));
+ var sample = new TA([42n, 42n]);
assert.sameValue(
Reflect.defineProperty(sample, "0", {
- value: convertToBigInt(8),
+ value: 8n,
configurable: false,
enumerable: true,
writable: true
@@ -31,10 +31,10 @@ testWithBigIntTypedArrayConstructors(function(TA) {
true
);
- assert.sameValue(sample[0], convertToBigInt(8), "property value was set");
+ assert.sameValue(sample[0], 8n, "property value was set");
var desc = Object.getOwnPropertyDescriptor(sample, "0");
- assert.sameValue(desc.value, convertToBigInt(8), "desc.value");
+ assert.sameValue(desc.value, 8n, "desc.value");
assert.sameValue(desc.writable, true, "property is writable");
verifyEnumerable(sample, "0");
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-symbol.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-symbol.js
index 467e89a93..08c9d1064 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-symbol.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/key-is-symbol.js
@@ -16,7 +16,7 @@ features: [BigInt, Reflect, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
var s1 = Symbol("foo");
assert.sameValue(
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/non-extensible-new-key.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/non-extensible-new-key.js
index 5357f3bc0..d3b2694fb 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/non-extensible-new-key.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/non-extensible-new-key.js
@@ -18,7 +18,7 @@ features: [BigInt, Reflect, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
Object.preventExtensions(sample);
assert.sameValue(
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/non-extensible-redefine-key.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/non-extensible-redefine-key.js
index eb6e41027..81c7894db 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/non-extensible-redefine-key.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/non-extensible-redefine-key.js
@@ -18,7 +18,7 @@ features: [BigInt, Reflect, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
sample.foo = true;
sample.bar = true;
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/set-value.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/set-value.js
index f17b06837..1bcba5b21 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/set-value.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/set-value.js
@@ -26,20 +26,20 @@ features: [BigInt, Reflect, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([0, 0]));
+ var sample = new TA([0n, 0n]);
assert.sameValue(
- Reflect.defineProperty(sample, "0", {value: convertToBigInt(1)}),
+ Reflect.defineProperty(sample, "0", {value: 1n}),
true,
"set value for sample[0] returns true"
);
assert.sameValue(
- Reflect.defineProperty(sample, "1", {value: convertToBigInt(2)}),
+ Reflect.defineProperty(sample, "1", {value: 2n}),
true,
"set value for sample[1] returns true"
);
- assert.sameValue(sample[0], convertToBigInt(1), "sample[0]");
- assert.sameValue(sample[1], convertToBigInt(2), "sample[1]");
+ assert.sameValue(sample[0], 1n, "sample[0]");
+ assert.sameValue(sample[1], 2n, "sample[1]");
});
diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/this-is-not-extensible.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/this-is-not-extensible.js
index 04664a126..df15ab556 100644
--- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/this-is-not-extensible.js
+++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/this-is-not-extensible.js
@@ -18,7 +18,7 @@ features: [BigInt, Reflect, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
Object.preventExtensions(sample);
diff --git a/test/built-ins/TypedArrays/internals/Get/BigInt/detached-buffer-key-is-not-numeric-index.js b/test/built-ins/TypedArrays/internals/Get/BigInt/detached-buffer-key-is-not-numeric-index.js
index b9caa2ddf..21b3b11b1 100644
--- a/test/built-ins/TypedArrays/internals/Get/BigInt/detached-buffer-key-is-not-numeric-index.js
+++ b/test/built-ins/TypedArrays/internals/Get/BigInt/detached-buffer-key-is-not-numeric-index.js
@@ -18,7 +18,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
sample.foo = "test262";
$DETACHBUFFER(sample.buffer);
diff --git a/test/built-ins/TypedArrays/internals/Get/BigInt/detached-buffer-key-is-symbol.js b/test/built-ins/TypedArrays/internals/Get/BigInt/detached-buffer-key-is-symbol.js
index 9af111a76..fe0e8c412 100644
--- a/test/built-ins/TypedArrays/internals/Get/BigInt/detached-buffer-key-is-symbol.js
+++ b/test/built-ins/TypedArrays/internals/Get/BigInt/detached-buffer-key-is-symbol.js
@@ -16,7 +16,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
$DETACHBUFFER(sample.buffer);
var s = Symbol("1");
diff --git a/test/built-ins/TypedArrays/internals/Get/BigInt/detached-buffer.js b/test/built-ins/TypedArrays/internals/Get/BigInt/detached-buffer.js
index 74b9a69d8..0ac96a863 100644
--- a/test/built-ins/TypedArrays/internals/Get/BigInt/detached-buffer.js
+++ b/test/built-ins/TypedArrays/internals/Get/BigInt/detached-buffer.js
@@ -18,7 +18,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42]));
+ var sample = new TA([42n]);
$DETACHBUFFER(sample.buffer);
assert.throws(TypeError, function() {
diff --git a/test/built-ins/TypedArrays/internals/Get/BigInt/indexed-value-sab.js b/test/built-ins/TypedArrays/internals/Get/BigInt/indexed-value-sab.js
index b599b430c..e8e27c666 100644
--- a/test/built-ins/TypedArrays/internals/Get/BigInt/indexed-value-sab.js
+++ b/test/built-ins/TypedArrays/internals/Get/BigInt/indexed-value-sab.js
@@ -21,8 +21,8 @@ Object.defineProperty(proto, "1", throwDesc);
testWithBigIntTypedArrayConstructors(function(TA) {
var sab = new SharedArrayBuffer(TA.BYTES_PER_ELEMENT * 2);
var sample = new TA(sab);
- sample.set([convertToBigInt(42), convertToBigInt(1)]);
+ sample.set([42n, 1n]);
- assert.sameValue(sample["0"], convertToBigInt(42));
- assert.sameValue(sample["1"], convertToBigInt(1));
+ assert.sameValue(sample["0"], 42n);
+ assert.sameValue(sample["1"], 1n);
});
diff --git a/test/built-ins/TypedArrays/internals/Get/BigInt/indexed-value.js b/test/built-ins/TypedArrays/internals/Get/BigInt/indexed-value.js
index d97004b83..6cc015407 100644
--- a/test/built-ins/TypedArrays/internals/Get/BigInt/indexed-value.js
+++ b/test/built-ins/TypedArrays/internals/Get/BigInt/indexed-value.js
@@ -27,8 +27,8 @@ Object.defineProperty(proto, "0", throwDesc);
Object.defineProperty(proto, "1", throwDesc);
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 1]));
+ var sample = new TA([42n, 1n]);
- assert.sameValue(sample["0"], convertToBigInt(42));
- assert.sameValue(sample["1"], convertToBigInt(1));
+ assert.sameValue(sample["0"], 42n);
+ assert.sameValue(sample["1"], 1n);
});
diff --git a/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-not-integer.js b/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-not-integer.js
index 8f844f550..862178d03 100644
--- a/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-not-integer.js
+++ b/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-not-integer.js
@@ -31,7 +31,7 @@ Object.defineProperty(proto, "1.1", {
});
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
assert.sameValue(sample["1.1"], undefined);
});
diff --git a/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-not-minus-zero.js b/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-not-minus-zero.js
index 30917db64..792e32064 100644
--- a/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-not-minus-zero.js
+++ b/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-not-minus-zero.js
@@ -31,7 +31,7 @@ Object.defineProperty(proto, "-0", {
});
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
assert.sameValue(sample["-0"], undefined);
});
diff --git a/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-not-numeric-index.js b/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-not-numeric-index.js
index 8eb2c0714..3167ddf0c 100644
--- a/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-not-numeric-index.js
+++ b/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-not-numeric-index.js
@@ -20,7 +20,7 @@ features: [BigInt, TypedArray]
TypedArray.prototype.baz = "test262";
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
assert.sameValue(
sample.foo, undefined,
diff --git a/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-out-of-bounds.js b/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-out-of-bounds.js
index b8f0b02a6..583b7c549 100644
--- a/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-out-of-bounds.js
+++ b/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-out-of-bounds.js
@@ -35,7 +35,7 @@ Object.defineProperty(proto, "2", throwDesc);
Object.defineProperty(proto, "3", throwDesc);
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
assert.sameValue(sample["-1"], undefined);
assert.sameValue(sample["2"], undefined);
diff --git a/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-symbol.js b/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-symbol.js
index 52113ec86..11e80f8d8 100644
--- a/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-symbol.js
+++ b/test/built-ins/TypedArrays/internals/Get/BigInt/key-is-symbol.js
@@ -19,7 +19,7 @@ var parentKey = Symbol("2");
TypedArray.prototype[parentKey] = "test262";
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42]));
+ var sample = new TA([42n]);
var s1 = Symbol("1");
diff --git a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/detached-buffer-key-is-not-number.js b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/detached-buffer-key-is-not-number.js
index 6148dbea1..6f7ad44ab 100644
--- a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/detached-buffer-key-is-not-number.js
+++ b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/detached-buffer-key-is-not-number.js
@@ -18,7 +18,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
$DETACHBUFFER(sample.buffer);
assert.sameValue(
diff --git a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/detached-buffer-key-is-symbol.js b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/detached-buffer-key-is-symbol.js
index ecd044e13..e316218f5 100644
--- a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/detached-buffer-key-is-symbol.js
+++ b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/detached-buffer-key-is-symbol.js
@@ -18,7 +18,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
$DETACHBUFFER(sample.buffer);
var s = Symbol("foo");
diff --git a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/index-prop-desc.js b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/index-prop-desc.js
index 34c96bd49..ad44eb8d3 100644
--- a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/index-prop-desc.js
+++ b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/index-prop-desc.js
@@ -20,16 +20,16 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
var desc0 = Object.getOwnPropertyDescriptor(sample, 0);
- assert.sameValue(desc0.value, convertToBigInt(42), "value", "desc0.value === 42");
+ assert.sameValue(desc0.value, 42n, "value", "desc0.value === 42");
assert.sameValue(desc0.writable, true, "index descriptor is writable [0]");
verifyEnumerable(sample, "0", "index descriptor is enumerable [0]");
verifyNotConfigurable(sample, "0", "index descriptor is not configurable [0]");
var desc1 = Object.getOwnPropertyDescriptor(sample, 1);
- assert.sameValue(desc1.value, convertToBigInt(43), "value", "desc1.value === 43");
+ assert.sameValue(desc1.value, 43n, "value", "desc1.value === 43");
assert.sameValue(desc1.writable, true, "index descriptor is writable [1]");
verifyEnumerable(sample, "1", "index descriptor is enumerable [1]");
verifyNotConfigurable(sample, "1", "index descriptor is not configurable [1]");
diff --git a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-minus-zero.js b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-minus-zero.js
index 1b4f76c0f..598deda2c 100644
--- a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-minus-zero.js
+++ b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-minus-zero.js
@@ -30,7 +30,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42]));
+ var sample = new TA([42n]);
// -0 as a number value is converted to "0" before calling [[GetOwnProperty]]
assert.sameValue(Object.getOwnPropertyDescriptor(sample, "-0"), undefined);
diff --git a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-not-canonical-index.js b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-not-canonical-index.js
index b9a163b79..02f46bd6d 100644
--- a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-not-canonical-index.js
+++ b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-not-canonical-index.js
@@ -28,7 +28,7 @@ var keys = [
testWithBigIntTypedArrayConstructors(function(TA) {
keys.forEach(function(key) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
assert.sameValue(
Object.getOwnPropertyDescriptor(sample, key),
diff --git a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-not-integer.js b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-not-integer.js
index bc8674429..e52e033aa 100644
--- a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-not-integer.js
+++ b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-not-integer.js
@@ -24,7 +24,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
assert.sameValue(Object.getOwnPropertyDescriptor(sample, "1.1"), undefined);
assert.sameValue(Object.getOwnPropertyDescriptor(sample, "0.1"), undefined);
diff --git a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-not-numeric-index.js b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-not-numeric-index.js
index d00d1a626..e65c23ad9 100644
--- a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-not-numeric-index.js
+++ b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-not-numeric-index.js
@@ -19,7 +19,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
assert.sameValue(
Object.getOwnPropertyDescriptor(sample, "undef"),
diff --git a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-out-of-bounds.js b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-out-of-bounds.js
index 8bb915de6..71e5d5ef7 100644
--- a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-out-of-bounds.js
+++ b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-out-of-bounds.js
@@ -25,7 +25,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42]));
+ var sample = new TA([42n]);
assert.sameValue(Object.getOwnPropertyDescriptor(sample, "-1"), undefined);
assert.sameValue(Object.getOwnPropertyDescriptor(sample, "-42"), undefined);
diff --git a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-symbol.js b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-symbol.js
index dd1cbdfb5..c5509a0d9 100644
--- a/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-symbol.js
+++ b/test/built-ins/TypedArrays/internals/GetOwnProperty/BigInt/key-is-symbol.js
@@ -19,7 +19,7 @@ features: [BigInt, Symbol, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
var s = Symbol("foo");
Object.defineProperty(sample, s, { value: "baz" });
diff --git a/test/built-ins/TypedArrays/internals/HasProperty/BigInt/detached-buffer-key-is-not-number.js b/test/built-ins/TypedArrays/internals/HasProperty/BigInt/detached-buffer-key-is-not-number.js
index d4495d2e1..aeda046b0 100644
--- a/test/built-ins/TypedArrays/internals/HasProperty/BigInt/detached-buffer-key-is-not-number.js
+++ b/test/built-ins/TypedArrays/internals/HasProperty/BigInt/detached-buffer-key-is-not-number.js
@@ -19,7 +19,7 @@ features: [BigInt, Reflect, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
Object.defineProperty(sample, "bar", { value: 42 });
$DETACHBUFFER(sample.buffer);
diff --git a/test/built-ins/TypedArrays/internals/HasProperty/BigInt/detached-buffer-key-is-symbol.js b/test/built-ins/TypedArrays/internals/HasProperty/BigInt/detached-buffer-key-is-symbol.js
index 50df7a49c..44475d9aa 100644
--- a/test/built-ins/TypedArrays/internals/HasProperty/BigInt/detached-buffer-key-is-symbol.js
+++ b/test/built-ins/TypedArrays/internals/HasProperty/BigInt/detached-buffer-key-is-symbol.js
@@ -21,7 +21,7 @@ var s1 = Symbol("foo");
var s2 = Symbol("bar");
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
Object.defineProperty(sample, s1, { value: "baz" });
$DETACHBUFFER(sample.buffer);
diff --git a/test/built-ins/TypedArrays/internals/HasProperty/BigInt/indexed-value.js b/test/built-ins/TypedArrays/internals/HasProperty/BigInt/indexed-value.js
index f01eb8689..9133ae261 100644
--- a/test/built-ins/TypedArrays/internals/HasProperty/BigInt/indexed-value.js
+++ b/test/built-ins/TypedArrays/internals/HasProperty/BigInt/indexed-value.js
@@ -25,7 +25,7 @@ features: [BigInt, Reflect, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
assert.sameValue(Reflect.has(sample, 0), true);
assert.sameValue(Reflect.has(sample, 1), true);
diff --git a/test/built-ins/TypedArrays/internals/HasProperty/BigInt/key-is-not-canonical-index.js b/test/built-ins/TypedArrays/internals/HasProperty/BigInt/key-is-not-canonical-index.js
index ecd5dd725..a92f3346e 100644
--- a/test/built-ins/TypedArrays/internals/HasProperty/BigInt/key-is-not-canonical-index.js
+++ b/test/built-ins/TypedArrays/internals/HasProperty/BigInt/key-is-not-canonical-index.js
@@ -43,7 +43,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
delete TypedArray.prototype[key];
- Object.defineProperty(sample, key, {value: convertToBigInt(42)});
+ Object.defineProperty(sample, key, {value: 42n});
assert.sameValue(
Reflect.has(sample, key), true,
diff --git a/test/built-ins/TypedArrays/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-and-symbol-keys-.js b/test/built-ins/TypedArrays/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-and-symbol-keys-.js
index 42adcfeba..6f64fa646 100644
--- a/test/built-ins/TypedArrays/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-and-symbol-keys-.js
+++ b/test/built-ins/TypedArrays/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-and-symbol-keys-.js
@@ -24,7 +24,7 @@ TypedArray.prototype[3] = 42;
TypedArray.prototype.bar = 42;
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample1 = new TA(convertToBigInt([42, 42, 42]));
+ var sample1 = new TA([42n, 42n, 42n]);
sample1[s1] = 42;
sample1[s2] = 42;
sample1.test262 = 42;
diff --git a/test/built-ins/TypedArrays/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-keys.js b/test/built-ins/TypedArrays/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-keys.js
index e3d78dac4..8de17148b 100644
--- a/test/built-ins/TypedArrays/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-keys.js
+++ b/test/built-ins/TypedArrays/internals/OwnPropertyKeys/BigInt/integer-indexes-and-string-keys.js
@@ -21,7 +21,7 @@ TypedArray.prototype[3] = 42;
TypedArray.prototype.bar = 42;
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample1 = new TA(convertToBigInt([42, 42, 42]));
+ var sample1 = new TA([42n, 42n, 42n]);
sample1.test262 = 42;
sample1.ecma262 = 42;
var result1 = Reflect.ownKeys(sample1);
diff --git a/test/built-ins/TypedArrays/internals/OwnPropertyKeys/BigInt/integer-indexes.js b/test/built-ins/TypedArrays/internals/OwnPropertyKeys/BigInt/integer-indexes.js
index 9217b4627..88f6f3b8f 100644
--- a/test/built-ins/TypedArrays/internals/OwnPropertyKeys/BigInt/integer-indexes.js
+++ b/test/built-ins/TypedArrays/internals/OwnPropertyKeys/BigInt/integer-indexes.js
@@ -18,7 +18,7 @@ features: [BigInt, Reflect, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample1 = new TA(convertToBigInt([42, 42, 42]));
+ var sample1 = new TA([42n, 42n, 42n]);
var result1 = Reflect.ownKeys(sample1);
assert(compareArray(result1, ["0", "1", "2"]), "result1");
diff --git a/test/built-ins/TypedArrays/internals/Set/BigInt/detached-buffer-key-is-not-numeric-index.js b/test/built-ins/TypedArrays/internals/Set/BigInt/detached-buffer-key-is-not-numeric-index.js
index e7980f308..87f24f8f6 100644
--- a/test/built-ins/TypedArrays/internals/Set/BigInt/detached-buffer-key-is-not-numeric-index.js
+++ b/test/built-ins/TypedArrays/internals/Set/BigInt/detached-buffer-key-is-not-numeric-index.js
@@ -18,7 +18,7 @@ features: [BigInt, Reflect, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
$DETACHBUFFER(sample.buffer);
assert.sameValue(Reflect.set(sample, "foo", "test262"), true);
diff --git a/test/built-ins/TypedArrays/internals/Set/BigInt/detached-buffer-key-is-symbol.js b/test/built-ins/TypedArrays/internals/Set/BigInt/detached-buffer-key-is-symbol.js
index c7311063b..f22e808ba 100644
--- a/test/built-ins/TypedArrays/internals/Set/BigInt/detached-buffer-key-is-symbol.js
+++ b/test/built-ins/TypedArrays/internals/Set/BigInt/detached-buffer-key-is-symbol.js
@@ -18,7 +18,7 @@ features: [BigInt, Symbol, Reflect, TypedArray]
var s = Symbol("1");
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
$DETACHBUFFER(sample.buffer);
assert.sameValue(Reflect.set(sample, s, "test262"), true);
diff --git a/test/built-ins/TypedArrays/internals/Set/BigInt/detached-buffer.js b/test/built-ins/TypedArrays/internals/Set/BigInt/detached-buffer.js
index 2a27fff80..614f7779c 100644
--- a/test/built-ins/TypedArrays/internals/Set/BigInt/detached-buffer.js
+++ b/test/built-ins/TypedArrays/internals/Set/BigInt/detached-buffer.js
@@ -26,31 +26,31 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42]));
+ var sample = new TA([42n]);
$DETACHBUFFER(sample.buffer);
assert.throws(TypeError, function() {
- sample[0] = convertToBigInt(1);
+ sample[0] = 1n;
}, "valid numeric index");
assert.throws(TypeError, function() {
- sample["1.1"] = convertToBigInt(1);
+ sample["1.1"] = 1n;
}, "detach buffer runs before checking for 1.1");
assert.throws(TypeError, function() {
- sample["-0"] = convertToBigInt(1);
+ sample["-0"] = 1n;
}, "detach buffer runs before checking for -0");
assert.throws(TypeError, function() {
- sample["-1"] = convertToBigInt(1);
+ sample["-1"] = 1n;
}, "detach buffer runs before checking for -1");
assert.throws(TypeError, function() {
- sample["1"] = convertToBigInt(1);
+ sample["1"] = 1n;
}, "detach buffer runs before checking for key == length");
assert.throws(TypeError, function() {
- sample["2"] = convertToBigInt(1);
+ sample["2"] = 1n;
}, "detach buffer runs before checking for key > length");
var obj = {
diff --git a/test/built-ins/TypedArrays/internals/Set/BigInt/indexed-value.js b/test/built-ins/TypedArrays/internals/Set/BigInt/indexed-value.js
index 5203e21c9..71c914f87 100644
--- a/test/built-ins/TypedArrays/internals/Set/BigInt/indexed-value.js
+++ b/test/built-ins/TypedArrays/internals/Set/BigInt/indexed-value.js
@@ -33,11 +33,11 @@ Object.defineProperty(proto, "0", throwDesc);
Object.defineProperty(proto, "1", throwDesc);
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42, 43]));
+ var sample = new TA([42n, 43n]);
- assert.sameValue(Reflect.set(sample, "0", convertToBigInt(1)), true, "sample[0]");
- assert.sameValue(sample[0], convertToBigInt(1), "sample[0] value is set");
+ assert.sameValue(Reflect.set(sample, "0", 1n), true, "sample[0]");
+ assert.sameValue(sample[0], 1n, "sample[0] value is set");
- assert.sameValue(Reflect.set(sample, "1", convertToBigInt(42)), true, "sample[1]");
- assert.sameValue(sample[1], convertToBigInt(42), "sample[1] value is set");
+ assert.sameValue(Reflect.set(sample, "1", 42n), true, "sample[1]");
+ assert.sameValue(sample[1], 42n, "sample[1] value is set");
});
diff --git a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-minus-zero.js b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-minus-zero.js
index 6fcd8dead..e937c4d28 100644
--- a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-minus-zero.js
+++ b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-minus-zero.js
@@ -24,7 +24,7 @@ features: [BigInt, Reflect, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42]));
+ var sample = new TA([42n]);
assert.sameValue(Reflect.set(sample, "-0", 1), false, "-0");
assert.sameValue(sample.hasOwnProperty("-0"), false, "has no property [-0]");
diff --git a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-canonical-index.js b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-canonical-index.js
index f2760e7e1..9a1296fa5 100644
--- a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-canonical-index.js
+++ b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-canonical-index.js
@@ -26,7 +26,7 @@ var keys = [
testWithBigIntTypedArrayConstructors(function(TA) {
keys.forEach(function(key) {
- var sample = new TA(convertToBigInt([42]));
+ var sample = new TA([42n]);
assert.sameValue(
Reflect.set(sample, key, "ecma262"),
diff --git a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-integer.js b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-integer.js
index 758cc1072..1d8e72b14 100644
--- a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-integer.js
+++ b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-integer.js
@@ -24,7 +24,7 @@ features: [BigInt, Reflect, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42]));
+ var sample = new TA([42n]);
assert.sameValue(Reflect.set(sample, "1.1", 1), false, "1.1");
assert.sameValue(Reflect.set(sample, "0.0001", 1), false, "0.0001");
diff --git a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-numeric-index.js b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-numeric-index.js
index 842de9dd0..602820de9 100644
--- a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-numeric-index.js
+++ b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-numeric-index.js
@@ -18,7 +18,7 @@ features: [BigInt, Reflect, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42]));
+ var sample = new TA([42n]);
assert.sameValue(
Reflect.set(sample, "test262", "ecma262"),
diff --git a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-out-of-bounds.js b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-out-of-bounds.js
index 3031a6ed9..a9a4d8b0a 100644
--- a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-out-of-bounds.js
+++ b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-out-of-bounds.js
@@ -25,7 +25,7 @@ features: [BigInt, Reflect, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42]));
+ var sample = new TA([42n]);
assert.sameValue(Reflect.set(sample, "-1", 1), false, "-1");
assert.sameValue(Reflect.set(sample, "1", 1), false, "1");
diff --git a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-symbol.js b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-symbol.js
index 184ae7abc..e63baedb0 100644
--- a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-symbol.js
+++ b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-symbol.js
@@ -19,7 +19,7 @@ var s1 = Symbol("1");
var s2 = Symbol("2");
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42]));
+ var sample = new TA([42n]);
assert.sameValue(
Reflect.set(sample, s1, "ecma262"),
diff --git a/test/built-ins/TypedArrays/internals/Set/BigInt/tonumber-value-throws.js b/test/built-ins/TypedArrays/internals/Set/BigInt/tonumber-value-throws.js
index a967ec01c..a91f3fbe6 100644
--- a/test/built-ins/TypedArrays/internals/Set/BigInt/tonumber-value-throws.js
+++ b/test/built-ins/TypedArrays/internals/Set/BigInt/tonumber-value-throws.js
@@ -24,7 +24,7 @@ features: [BigInt, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt([42]));
+ var sample = new TA([42n]);
var obj = {
valueOf: function() {
diff --git a/test/built-ins/TypedArrays/of/BigInt/argument-number-value-throws.js b/test/built-ins/TypedArrays/of/BigInt/argument-number-value-throws.js
index fd22b08b1..16c8a9104 100644
--- a/test/built-ins/TypedArrays/of/BigInt/argument-number-value-throws.js
+++ b/test/built-ins/TypedArrays/of/BigInt/argument-number-value-throws.js
@@ -22,7 +22,7 @@ testWithTypedArrayConstructors(function(TA) {
var obj1 = {
valueOf() {
lastValue = "obj1";
- return convertToBigInt(42);
+ return 42n;
}
};
var obj2 = {
diff --git a/test/built-ins/TypedArrays/of/BigInt/custom-ctor-returns-other-instance.js b/test/built-ins/TypedArrays/of/BigInt/custom-ctor-returns-other-instance.js
index 3c289e0a8..1454ab1c8 100644
--- a/test/built-ins/TypedArrays/of/BigInt/custom-ctor-returns-other-instance.js
+++ b/test/built-ins/TypedArrays/of/BigInt/custom-ctor-returns-other-instance.js
@@ -25,9 +25,9 @@ testWithTypedArrayConstructors(function(TA) {
return custom;
};
- result = TypedArray.of.call(ctor, convertToBigInt(1), convertToBigInt(2), convertToBigInt(3));
+ result = TypedArray.of.call(ctor, 1n, 2n, 3n);
assert.sameValue(result, custom, "using iterator, same length");
- result = TypedArray.of.call(ctor, convertToBigInt(1), convertToBigInt(2));
+ result = TypedArray.of.call(ctor, 1n, 2n);
assert.sameValue(result, custom, "using iterator, higher length");
});
diff --git a/test/built-ins/TypedArrays/of/BigInt/new-instance-using-custom-ctor.js b/test/built-ins/TypedArrays/of/BigInt/new-instance-using-custom-ctor.js
index 58641f945..ec64f6fc6 100644
--- a/test/built-ins/TypedArrays/of/BigInt/new-instance-using-custom-ctor.js
+++ b/test/built-ins/TypedArrays/of/BigInt/new-instance-using-custom-ctor.js
@@ -18,11 +18,11 @@ testWithTypedArrayConstructors(function(TA) {
};
- var result = TA.of.call(ctor, convertToBigInt(42), convertToBigInt(43), convertToBigInt(42));
+ var result = TA.of.call(ctor, 42n, 43n, 42n);
assert.sameValue(result.length, 3);
- assert.sameValue(result[0], convertToBigInt(42));
- assert.sameValue(result[1], convertToBigInt(43));
- assert.sameValue(result[2], convertToBigInt(42));
+ assert.sameValue(result[0], 42n);
+ assert.sameValue(result[1], 43n);
+ assert.sameValue(result[2], 42n);
assert.sameValue(result.constructor, TA);
assert.sameValue(called, 1);
});
diff --git a/test/built-ins/TypedArrays/of/BigInt/new-instance.js b/test/built-ins/TypedArrays/of/BigInt/new-instance.js
index 7e9cc745c..94329f185 100644
--- a/test/built-ins/TypedArrays/of/BigInt/new-instance.js
+++ b/test/built-ins/TypedArrays/of/BigInt/new-instance.js
@@ -24,11 +24,11 @@ features: [BigInt, TypedArray]
---*/
testWithTypedArrayConstructors(function(TA) {
- var result = TA.of(convertToBigInt(42), convertToBigInt(43), convertToBigInt(false));
+ var result = TA.of(42n, 43n, convertToBigInt(false));
assert.sameValue(result.length, 3);
- assert.sameValue(result[0], convertToBigInt(42));
- assert.sameValue(result[1], convertToBigInt(43));
- assert.sameValue(result[2], convertToBigInt(0));
+ assert.sameValue(result[0], 42n);
+ assert.sameValue(result[1], 43n);
+ assert.sameValue(result[2], 0n);
assert.sameValue(result.constructor, TA);
assert.sameValue(Object.getPrototypeOf(result), TA.prototype);
});