WebKit Bugzilla
Attachment 341173 Details for
Bug 185937
: Upgrade test262 to May 24 version
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185937-20180524141919.patch (text/plain), 1.17 MB, created by
Yusuke Suzuki
on 2018-05-23 22:19:22 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2018-05-23 22:19:22 PDT
Size:
1.17 MB
patch
obsolete
>Subversion Revision: 232142 >diff --git a/JSTests/ChangeLog b/JSTests/ChangeLog >index 645793478a2711adddb7914f5a4a37b634c4ec0f..2505ce8820db44ac3752bf3b55de42eb206887b9 100644 >--- a/JSTests/ChangeLog >+++ b/JSTests/ChangeLog >@@ -1,3 +1,511 @@ >+2018-05-23 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ Upgrade test262 to May 24 version >+ https://bugs.webkit.org/show_bug.cgi?id=185937 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * test262/expectations.yaml: >+ * test262/harness/doneprintHandle.js: >+ (DONE): >+ * test262/latest-changes-summary.txt: >+ * test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-existing-global-init.js: >+ * test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-existing-non-enumerable-global-init.js: Added. >+ * test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-global-init.js: >+ * test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-non-enumerable-global-init.js: Copied from JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-global-init.js. >+ * test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-global-init.js: >+ * test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-non-enumerable-global-init.js: Copied from JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-global-init.js. >+ * test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-global-init.js: >+ * test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-non-enumerable-global-init.js: Copied from JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-global-init.js. >+ * test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-global-init.js: >+ * test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-non-enumerable-global-init.js: Copied from JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-global-init.js. >+ * test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-global-init.js: >+ * test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-non-enumerable-global-init.js: Copied from JSTests/test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-global-init.js. >+ * test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-existing-global-init.js: >+ * test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-existing-non-enumerable-global-init.js: Added. >+ * test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-existing-global-init.js: >+ * test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-existing-non-enumerable-global-init.js: Added. >+ * test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-existing-global-init.js: >+ * test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-existing-non-enumerable-global-init.js: Added. >+ * test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-global-init.js: >+ * test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-non-enumerable-global-init.js: Copied from JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-global-init.js. >+ * test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-global-init.js: >+ * test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-non-enumerable-global-init.js: Copied from JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-global-init.js. >+ * test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-global-init.js: >+ * test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-non-enumerable-global-init.js: Copied from JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-global-init.js. >+ * test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-global-init.js: >+ * test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-non-enumerable-global-init.js: Copied from JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-global-init.js. >+ * test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-global-init.js: >+ * test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-non-enumerable-global-init.js: Copied from JSTests/test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-global-init.js. >+ * test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-existing-global-init.js: >+ * test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-existing-non-enumerable-global-init.js: Added. >+ * test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-global-init.js: >+ * test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-non-enumerable-global-init.js: Added. >+ * test262/test/annexB/language/global-code/block-decl-global-existing-global-init.js: Added. >+ (262.evalScript.f): >+ * test262/test/annexB/language/global-code/block-decl-global-existing-non-enumerable-global-init.js: Added. >+ (262.evalScript.f): >+ * test262/test/annexB/language/global-code/if-decl-else-decl-a-global-existing-global-init.js: Added. >+ (262.evalScript.true.f): >+ (else._f): >+ * test262/test/annexB/language/global-code/if-decl-else-decl-a-global-existing-non-enumerable-global-init.js: Added. >+ (262.evalScript.true.f): >+ (else._f): >+ * test262/test/annexB/language/global-code/if-decl-else-decl-b-global-existing-global-init.js: Added. >+ (262.evalScript.false._f): >+ (else.f): >+ * test262/test/annexB/language/global-code/if-decl-else-decl-b-global-existing-non-enumerable-global-init.js: Added. >+ (262.evalScript.false._f): >+ (else.f): >+ * test262/test/annexB/language/global-code/if-decl-else-stmt-global-existing-global-init.js: Added. >+ (262.evalScript.true.f): >+ * test262/test/annexB/language/global-code/if-decl-else-stmt-global-existing-non-enumerable-global-init.js: Added. >+ (262.evalScript.true.f): >+ * test262/test/annexB/language/global-code/if-decl-no-else-global-existing-global-init.js: Added. >+ (262.evalScript.true.f): >+ * test262/test/annexB/language/global-code/if-decl-no-else-global-existing-non-enumerable-global-init.js: Added. >+ (262.evalScript.true.f): >+ * test262/test/annexB/language/global-code/if-stmt-else-decl-global-existing-global-init.js: Added. >+ (else.f): >+ * test262/test/annexB/language/global-code/if-stmt-else-decl-global-existing-non-enumerable-global-init.js: Added. >+ (else.f): >+ * test262/test/annexB/language/global-code/switch-case-global-existing-global-init.js: Added. >+ (262.evalScript.switch.case.1): >+ (262.evalScript.switch): >+ * test262/test/annexB/language/global-code/switch-case-global-existing-non-enumerable-global-init.js: Added. >+ (262.evalScript.switch.case.1): >+ (262.evalScript.switch): >+ * test262/test/annexB/language/global-code/switch-dflt-global-existing-global-init.js: Added. >+ (262.evalScript.switch.default): >+ (262.evalScript.switch): >+ * test262/test/annexB/language/global-code/switch-dflt-global-existing-non-enumerable-global-init.js: Added. >+ (262.evalScript.switch.default): >+ (262.evalScript.switch): >+ * test262/test/built-ins/Array/prototype/flat/array-like-objects.js: Renamed from JSTests/test262/test/built-ins/Array/prototype/flatten/array-like-objects.js. >+ * test262/test/built-ins/Array/prototype/flat/bound-function-call.js: Renamed from JSTests/test262/test/built-ins/Array/prototype/flatten/bound-function-call.js. >+ * test262/test/built-ins/Array/prototype/flat/empty-array-elements.js: Renamed from JSTests/test262/test/built-ins/Array/prototype/flatten/empty-array-elements.js. >+ * test262/test/built-ins/Array/prototype/flat/empty-object-elements.js: Renamed from JSTests/test262/test/built-ins/Array/prototype/flatten/empty-object-elements.js. >+ * test262/test/built-ins/Array/prototype/flat/length.js: Added. >+ * test262/test/built-ins/Array/prototype/flat/name.js: Added. >+ * test262/test/built-ins/Array/prototype/flat/non-numeric-depth-should-not-throw.js: Renamed from JSTests/test262/test/built-ins/Array/prototype/flatten/non-numeric-depth-should-not-throw.js. >+ * test262/test/built-ins/Array/prototype/flat/non-object-ctor-throws.js: Renamed from JSTests/test262/test/built-ins/Array/prototype/flatten/non-object-ctor-throws.js. >+ * test262/test/built-ins/Array/prototype/flat/null-undefined-elements.js: Added. >+ * test262/test/built-ins/Array/prototype/flat/null-undefined-input-throws.js: Renamed from JSTests/test262/test/built-ins/Array/prototype/flatten/null-undefined-input-throws.js. >+ * test262/test/built-ins/Array/prototype/flat/positive-infinity.js: Renamed from JSTests/test262/test/built-ins/Array/prototype/flatten/positive-infinity.js. >+ * test262/test/built-ins/Array/prototype/flat/prop-desc.js: Renamed from JSTests/test262/test/built-ins/Array/prototype/flatten/prop-desc.js. >+ * test262/test/built-ins/Array/prototype/flat/symbol-object-create-null-depth-throws.js: Renamed from JSTests/test262/test/built-ins/Array/prototype/flatten/symbol-object-create-null-depth-throws.js. >+ * test262/test/built-ins/Array/prototype/flatten/length.js: Removed. >+ * test262/test/built-ins/Array/prototype/flatten/name.js: Removed. >+ * test262/test/built-ins/Array/prototype/flatten/null-undefined-elements.js: Removed. >+ * test262/test/built-ins/AsyncGeneratorPrototype/next/name.js: >+ * test262/test/built-ins/AsyncGeneratorPrototype/return/name.js: >+ * test262/test/built-ins/AsyncGeneratorPrototype/throw/name.js: >+ * test262/test/built-ins/Math/acosh/nan-returns.js: >+ * test262/test/built-ins/Math/asinh/asinh-specialVals.js: >+ * test262/test/built-ins/Math/atanh/atanh-specialVals.js: >+ * test262/test/built-ins/Math/cbrt/cbrt-specialValues.js: >+ * test262/test/built-ins/Math/cbrt/prop-desc.js: >+ * test262/test/built-ins/Math/cosh/cosh-specialVals.js: >+ * test262/test/built-ins/Math/expm1/expm1-specialVals.js: >+ * test262/test/built-ins/Math/log10/Log10-specialVals.js: >+ * test262/test/built-ins/Math/log2/log2-basicTests.js: >+ * test262/test/built-ins/Math/sign/sign-specialVals.js: >+ * test262/test/built-ins/Math/sinh/sinh-specialVals.js: >+ * test262/test/built-ins/Math/tanh/tanh-specialVals.js: >+ * test262/test/built-ins/Math/trunc/trunc-sampleTests.js: >+ * test262/test/built-ins/Math/trunc/trunc-specialVals.js: >+ * test262/test/built-ins/Object/internals/DefineOwnProperty/consistent-value-regexp-dollar1.js: Added. >+ * test262/test/built-ins/Object/internals/DefineOwnProperty/consistent-writable-regexp-dollar1.js: Added. >+ * test262/test/intl402/Intl/getCanonicalLocales/descriptor.js: >+ * test262/test/intl402/Intl/getCanonicalLocales/duplicates.js: >+ * test262/test/intl402/Locale/constructor-getter-order.js: Added. >+ (new.Intl.Locale.toString): >+ (get language): >+ (get script): >+ (get region): >+ (get calendar): >+ (get collation): >+ (get hourCycle): >+ (get caseFirst): >+ (get numeric): >+ (get numberingSystem): >+ * test262/test/intl402/Locale/constructor-locale-object.js: Added. >+ * test262/test/intl402/Locale/constructor-non-iana-canon.js: Added. >+ * test262/test/intl402/Locale/constructor-options-casefirst-invalid.js: Added. >+ (valueOf): >+ (const.invalidCaseFirstOption.of.invalidCaseFirstOptions.new.Intl.Locale): >+ * test262/test/intl402/Locale/constructor-options-casefirst-valid.js: Added. >+ (toString): >+ * test262/test/intl402/Locale/constructor-options-collation-invalid.js: Added. >+ (const.invalidCollationOption.of.invalidCollationOptions.new.Intl.Locale): >+ * test262/test/intl402/Locale/constructor-options-collation-valid.js: Added. >+ * test262/test/intl402/Locale/constructor-options-hourcycle-invalid.js: Added. >+ (const.invalidHourCycleOption.of.invalidHourCycleOptions.new.Intl.Locale): >+ * test262/test/intl402/Locale/constructor-options-hourcycle-valid.js: Added. >+ (toString): >+ * test262/test/intl402/Locale/constructor-options-language-grandfathered.js: Added. >+ * test262/test/intl402/Locale/constructor-options-language-valid.js: >+ (toString): >+ * test262/test/intl402/Locale/constructor-options-numberingsystem-invalid.js: Added. >+ (const.invalidNumberingSystemOption.of.invalidNumberingSystemOptions.new.Intl.Locale): >+ * test262/test/intl402/Locale/constructor-options-numberingsystem-valid.js: Added. >+ * test262/test/intl402/Locale/constructor-options-numeric-valid.js: Added. >+ (valueOf): >+ * test262/test/intl402/Locale/constructor-options-region-valid.js: >+ * test262/test/intl402/Locale/constructor-options-script-valid.js: >+ (toString): >+ * test262/test/intl402/Locale/constructor-parse-twice.js: Added. >+ * test262/test/intl402/Locale/constructor-tag-tostring.js: Added. >+ (CustomError): >+ (WrongCustomError): >+ (const.errors.get Symbol): >+ (throw.new.CustomError): >+ (throw.new.CustomError.get toString): >+ (throw.new.CustomError.get valueOf): >+ (throw.new.WrongCustomError.get valueOf): >+ (throw.new.WrongCustomError): >+ * test262/test/intl402/Locale/constructor-unicode-ext-invalid.js: Added. >+ * test262/test/intl402/Locale/constructor-unicode-ext-valid.js: Added. >+ (canonical.of.Object.entries): >+ * test262/test/intl402/Locale/extensions-grandfathered.js: Added. >+ (of.testData.value.of.Object.entries): >+ * test262/test/intl402/Locale/extensions-private.js: Added. >+ * test262/test/intl402/Locale/getters-grandfathered.js: Added. >+ * test262/test/intl402/Locale/getters-missing.js: Added. >+ * test262/test/intl402/Locale/getters-privateuse.js: Added. >+ * test262/test/intl402/Locale/getters.js: Added. >+ * test262/test/intl402/Locale/invalid-tag-throws-symbol.js: >+ * test262/test/intl402/Locale/likely-subtags-grandfathered.js: Added. >+ * test262/test/intl402/Locale/prop-desc.js: >+ * test262/test/intl402/Locale/prototype/baseName/prop-desc.js: Added. >+ * test262/test/intl402/Locale/prototype/calendar/prop-desc.js: Added. >+ * test262/test/intl402/Locale/prototype/caseFirst/prop-desc.js: Added. >+ * test262/test/intl402/Locale/prototype/collation/prop-desc.js: Added. >+ * test262/test/intl402/Locale/prototype/constructor/prop-desc.js: Copied from JSTests/test262/test/intl402/Locale/prototype/constructor.js. >+ * test262/test/intl402/Locale/prototype/hourCycle/prop-desc.js: Added. >+ * test262/test/intl402/Locale/prototype/language/prop-desc.js: Added. >+ * test262/test/intl402/Locale/prototype/maximize/length.js: >+ * test262/test/intl402/Locale/prototype/maximize/prop-desc.js: >+ * test262/test/intl402/Locale/prototype/minimize/length.js: Copied from JSTests/test262/test/intl402/Locale/prototype/maximize/length.js. >+ * test262/test/intl402/Locale/prototype/minimize/name.js: Added. >+ * test262/test/intl402/Locale/prototype/minimize/prop-desc.js: Copied from JSTests/test262/test/intl402/Locale/prototype/constructor.js. >+ * test262/test/intl402/Locale/prototype/numberingSystem/prop-desc.js: Added. >+ * test262/test/intl402/Locale/prototype/numeric/prop-desc.js: Added. >+ * test262/test/intl402/Locale/prototype/region/prop-desc.js: Added. >+ * test262/test/intl402/Locale/prototype/script/prop-desc.js: Added. >+ * test262/test/intl402/Locale/prototype/toString/prop-desc.js: Renamed from JSTests/test262/test/intl402/Locale/prototype/constructor.js. >+ * test262/test/intl402/Locale/prototype/toStringTag/toStringTag.js: Renamed from JSTests/test262/test/intl402/Locale/prototype/toStringTag.js. >+ * test262/test/intl402/Number/prototype/toLocaleString/length.js: >+ * test262/test/intl402/NumberFormat/length.js: >+ * test262/test/intl402/NumberFormat/name.js: >+ * test262/test/intl402/NumberFormat/prop-desc.js: >+ * test262/test/intl402/PluralRules/length.js: >+ * test262/test/intl402/PluralRules/name.js: >+ * test262/test/intl402/PluralRules/prop-desc.js: Copied from JSTests/test262/test/intl402/NumberFormat/prop-desc.js. >+ * test262/test/language/expressions/addition/bigint-and-number.js: >+ * test262/test/language/expressions/addition/bigint-arithmetic.js: >+ (testAdd): Deleted. >+ * test262/test/language/expressions/addition/bigint-errors.js: >+ (Symbol.toPrimitive): >+ (0n.Symbol.toPrimitive): >+ (valueOf): >+ (0n.valueOf): >+ (toString): >+ (0n.toString): >+ * test262/test/language/expressions/addition/bigint-toprimitive.js: >+ * test262/test/language/expressions/addition/bigint-wrapped-values.js: >+ * test262/test/language/expressions/bitwise-and/bigint-and-number.js: >+ * test262/test/language/expressions/bitwise-and/bigint-errors.js: >+ (Symbol.toPrimitive): >+ (0n.Symbol.toPrimitive): >+ (valueOf): >+ (0n.valueOf): >+ (toString): >+ (0n.toString): >+ * test262/test/language/expressions/bitwise-and/bigint-non-primitive.js: >+ (assert.sameValue.Symbol.toPrimitive): >+ (assert.sameValue.0b011n.Symbol.toPrimitive): >+ (assert.sameValue.valueOf): >+ (assert.sameValue.0b011n.valueOf): >+ (assert.sameValue.toString): >+ (assert.sameValue.0b011n.toString): >+ * test262/test/language/expressions/bitwise-and/bigint-toprimitive.js: >+ * test262/test/language/expressions/bitwise-and/bigint-wrapped-values.js: >+ * test262/test/language/expressions/bitwise-not/bigint-non-primitive.js: >+ (assert.sameValue.Symbol.toPrimitive): >+ (assert.sameValue.valueOf): >+ (assert.sameValue.toString): >+ * test262/test/language/expressions/bitwise-or/bigint-and-number.js: >+ * test262/test/language/expressions/bitwise-or/bigint-errors.js: >+ (Symbol.toPrimitive): >+ (0n.Symbol.toPrimitive): >+ (valueOf): >+ (0n.valueOf): >+ (toString): >+ (0n.toString): >+ * test262/test/language/expressions/bitwise-or/bigint-non-primitive.js: >+ (assert.sameValue.Symbol.toPrimitive): >+ (assert.sameValue.0b011n.Symbol.toPrimitive): >+ (assert.sameValue.valueOf): >+ (assert.sameValue.0b011n.valueOf): >+ (assert.sameValue.toString): >+ (assert.sameValue.0b011n.toString): >+ * test262/test/language/expressions/bitwise-or/bigint-toprimitive.js: >+ * test262/test/language/expressions/bitwise-or/bigint-wrapped-values.js: >+ * test262/test/language/expressions/bitwise-xor/bigint-and-number.js: >+ * test262/test/language/expressions/bitwise-xor/bigint-errors.js: >+ (Symbol.toPrimitive): >+ (0n.Symbol.toPrimitive): >+ (valueOf): >+ (0n.valueOf): >+ (toString): >+ (0n.toString): >+ * test262/test/language/expressions/bitwise-xor/bigint-non-primitive.js: >+ (assert.sameValue.Symbol.toPrimitive): >+ (assert.sameValue.0b011n.Symbol.toPrimitive): >+ (assert.sameValue.valueOf): >+ (assert.sameValue.0b011n.valueOf): >+ (assert.sameValue.toString): >+ (assert.sameValue.0b011n.toString): >+ * test262/test/language/expressions/bitwise-xor/bigint-toprimitive.js: >+ * test262/test/language/expressions/bitwise-xor/bigint-wrapped-values.js: >+ * test262/test/language/expressions/division/bigint-and-number.js: >+ * test262/test/language/expressions/division/bigint-arithmetic.js: >+ (testDiv): Deleted. >+ * test262/test/language/expressions/division/bigint-complex-infinity.js: >+ * test262/test/language/expressions/division/bigint-errors.js: >+ (Symbol.toPrimitive): >+ (0n.Symbol.toPrimitive): >+ (valueOf): >+ (0n.valueOf): >+ (toString): >+ (0n.toString): >+ * test262/test/language/expressions/division/bigint-toprimitive.js: >+ * test262/test/language/expressions/division/bigint-wrapped-values.js: >+ * test262/test/language/expressions/does-not-equals/bigint-and-bigint.js: >+ * test262/test/language/expressions/does-not-equals/bigint-and-boolean.js: >+ * test262/test/language/expressions/does-not-equals/bigint-and-incomparable-primitive.js: >+ * test262/test/language/expressions/does-not-equals/bigint-and-non-finite.js: >+ * test262/test/language/expressions/does-not-equals/bigint-and-number-extremes.js: >+ * test262/test/language/expressions/does-not-equals/bigint-and-number.js: >+ * test262/test/language/expressions/does-not-equals/bigint-and-object.js: >+ (assert.sameValue.0n.valueOf): >+ (assert.sameValue.valueOf): >+ (assert.sameValue.0n.toString): >+ (assert.sameValue.toString): >+ (assert.sameValue.900719925474099101n.valueOf): >+ (assert.sameValue.900719925474099101n.toString): >+ * test262/test/language/expressions/does-not-equals/bigint-and-string.js: >+ * test262/test/language/expressions/equals/bigint-and-bigint.js: >+ * test262/test/language/expressions/equals/bigint-and-boolean.js: >+ * test262/test/language/expressions/equals/bigint-and-incomparable-primitive.js: >+ * test262/test/language/expressions/equals/bigint-and-non-finite.js: >+ * test262/test/language/expressions/equals/bigint-and-number-extremes.js: >+ * test262/test/language/expressions/equals/bigint-and-number.js: >+ * test262/test/language/expressions/equals/bigint-and-object.js: >+ (assert.sameValue.0n.valueOf): >+ (assert.sameValue.valueOf): >+ (assert.sameValue.0n.toString): >+ (assert.sameValue.toString): >+ (assert.sameValue.900719925474099101n.valueOf): >+ (assert.sameValue.900719925474099101n.toString): >+ * test262/test/language/expressions/equals/bigint-and-string.js: >+ * test262/test/language/expressions/exponentiation/bigint-and-number.js: >+ * test262/test/language/expressions/exponentiation/bigint-arithmetic.js: >+ (testExpt): Deleted. >+ * test262/test/language/expressions/exponentiation/bigint-errors.js: >+ (Symbol.toPrimitive): >+ (0n.Symbol.toPrimitive): >+ (valueOf): >+ (0n.valueOf): >+ (toString): >+ (0n.toString): >+ * test262/test/language/expressions/exponentiation/bigint-negative-exponent-throws.js: Renamed from JSTests/test262/test/language/expressions/exponentiation/bigint-exp-operator-negative-throws.js. >+ * test262/test/language/expressions/exponentiation/bigint-toprimitive.js: >+ * test262/test/language/expressions/exponentiation/bigint-wrapped-values.js: >+ * test262/test/language/expressions/exponentiation/bigint-zero-base-zero-exponent.js: >+ * test262/test/language/expressions/greater-than-or-equal/bigint-and-bigint.js: >+ * test262/test/language/expressions/greater-than-or-equal/bigint-and-incomparable-string.js: >+ * test262/test/language/expressions/greater-than-or-equal/bigint-and-non-finite.js: >+ * test262/test/language/expressions/greater-than-or-equal/bigint-and-number-extremes.js: >+ * test262/test/language/expressions/greater-than-or-equal/bigint-and-number.js: >+ * test262/test/language/expressions/greater-than-or-equal/bigint-and-string.js: >+ * test262/test/language/expressions/greater-than/11.8.2-1.js: >+ (obj1.valueOf): >+ (obj2.valueOf): >+ * test262/test/language/expressions/greater-than/11.8.2-2.js: >+ (obj1.valueOf): >+ (obj2.toString): >+ * test262/test/language/expressions/greater-than/11.8.2-3.js: >+ (obj1.toString): >+ (obj2.valueOf): >+ * test262/test/language/expressions/greater-than/11.8.2-4.js: >+ (obj1.toString): >+ (obj2.toString): >+ * test262/test/language/expressions/greater-than/bigint-and-bigint.js: >+ * test262/test/language/expressions/greater-than/bigint-and-boolean.js: >+ * test262/test/language/expressions/greater-than/bigint-and-incomparable-string.js: >+ * test262/test/language/expressions/greater-than/bigint-and-non-finite.js: >+ * test262/test/language/expressions/greater-than/bigint-and-number-extremes.js: >+ * test262/test/language/expressions/greater-than/bigint-and-number.js: >+ * test262/test/language/expressions/greater-than/bigint-and-string.js: >+ * test262/test/language/expressions/greater-than/bigint-and-symbol.js: Added. >+ * test262/test/language/expressions/left-shift/bigint-and-number.js: >+ * test262/test/language/expressions/left-shift/bigint-errors.js: >+ (Symbol.toPrimitive): >+ (0n.Symbol.toPrimitive): >+ (valueOf): >+ (0n.valueOf): >+ (toString): >+ (0n.toString): >+ * test262/test/language/expressions/left-shift/bigint-non-primitive.js: >+ (assert.sameValue.Symbol.toPrimitive): >+ (assert.sameValue.valueOf): >+ (assert.sameValue.toString): >+ (assert.sameValue.0b101n.Symbol.toPrimitive): >+ (assert.sameValue.0b101n.valueOf): >+ (assert.sameValue.0b101n.toString): >+ (valueOf): >+ * test262/test/language/expressions/left-shift/bigint-toprimitive.js: >+ * test262/test/language/expressions/left-shift/bigint-wrapped-values.js: >+ * test262/test/language/expressions/less-than-or-equal/11.8.3-1.js: >+ (obj1.valueOf): >+ (obj2.valueOf): >+ * test262/test/language/expressions/less-than-or-equal/11.8.3-2.js: >+ (obj1.valueOf): >+ (obj2.toString): >+ * test262/test/language/expressions/less-than-or-equal/11.8.3-3.js: >+ (obj1.toString): >+ (obj2.valueOf): >+ * test262/test/language/expressions/less-than-or-equal/11.8.3-4.js: >+ (obj1.toString): >+ (obj2.toString): >+ * test262/test/language/expressions/less-than-or-equal/11.8.3-5.js: Removed. >+ * test262/test/language/expressions/less-than-or-equal/bigint-and-bigint.js: >+ * test262/test/language/expressions/less-than-or-equal/bigint-and-incomparable-string.js: >+ * test262/test/language/expressions/less-than-or-equal/bigint-and-non-finite.js: >+ * test262/test/language/expressions/less-than-or-equal/bigint-and-number-extremes.js: >+ * test262/test/language/expressions/less-than-or-equal/bigint-and-number.js: >+ * test262/test/language/expressions/less-than-or-equal/bigint-and-string.js: >+ * test262/test/language/expressions/less-than/bigint-and-bigint.js: >+ * test262/test/language/expressions/less-than/bigint-and-boolean.js: >+ * test262/test/language/expressions/less-than/bigint-and-incomparable-string.js: >+ * test262/test/language/expressions/less-than/bigint-and-non-finite.js: >+ * test262/test/language/expressions/less-than/bigint-and-number-extremes.js: >+ * test262/test/language/expressions/less-than/bigint-and-number.js: >+ * test262/test/language/expressions/less-than/bigint-and-string.js: >+ * test262/test/language/expressions/less-than/bigint-and-symbol.js: Added. >+ * test262/test/language/expressions/modulus/bigint-and-number.js: >+ * test262/test/language/expressions/modulus/bigint-arithmetic.js: >+ (testMod): Deleted. >+ * test262/test/language/expressions/modulus/bigint-errors.js: >+ (Symbol.toPrimitive): >+ (0n.Symbol.toPrimitive): >+ (valueOf): >+ (0n.valueOf): >+ (toString): >+ (0n.toString): >+ * test262/test/language/expressions/modulus/bigint-modulo-zero.js: >+ * test262/test/language/expressions/modulus/bigint-toprimitive.js: >+ * test262/test/language/expressions/modulus/bigint-wrapped-values.js: >+ * test262/test/language/expressions/multiplication/bigint-and-number.js: >+ * test262/test/language/expressions/multiplication/bigint-arithmetic.js: >+ (testMul): Deleted. >+ * test262/test/language/expressions/multiplication/bigint-errors.js: >+ (Symbol.toPrimitive): >+ (0n.Symbol.toPrimitive): >+ (valueOf): >+ (0n.valueOf): >+ (toString): >+ (0n.toString): >+ * test262/test/language/expressions/multiplication/bigint-toprimitive.js: >+ * test262/test/language/expressions/multiplication/bigint-wrapped-values.js: >+ * test262/test/language/expressions/right-shift/bigint-and-number.js: >+ * test262/test/language/expressions/right-shift/bigint-errors.js: >+ (Symbol.toPrimitive): >+ (0n.Symbol.toPrimitive): >+ (valueOf): >+ (0n.valueOf): >+ (toString): >+ (0n.toString): >+ * test262/test/language/expressions/right-shift/bigint-non-primitive.js: >+ (assert.sameValue.Symbol.toPrimitive): >+ (assert.sameValue.valueOf): >+ (assert.sameValue.toString): >+ (assert.sameValue.0b101n.Symbol.toPrimitive): >+ (assert.sameValue.0b101n.valueOf): >+ (assert.sameValue.0b101n.toString): >+ (valueOf): >+ * test262/test/language/expressions/right-shift/bigint-toprimitive.js: >+ * test262/test/language/expressions/right-shift/bigint-wrapped-values.js: >+ * test262/test/language/expressions/strict-does-not-equals/bigint-and-bigint.js: >+ * test262/test/language/expressions/strict-does-not-equals/bigint-and-boolean.js: >+ * test262/test/language/expressions/strict-does-not-equals/bigint-and-incomparable-primitive.js: >+ * test262/test/language/expressions/strict-does-not-equals/bigint-and-non-finite.js: >+ * test262/test/language/expressions/strict-does-not-equals/bigint-and-number-extremes.js: >+ * test262/test/language/expressions/strict-does-not-equals/bigint-and-number.js: >+ * test262/test/language/expressions/strict-does-not-equals/bigint-and-object.js: >+ (assert.sameValue.0n.valueOf): >+ (assert.sameValue.valueOf): >+ (assert.sameValue.0n.toString): >+ (assert.sameValue.toString): >+ (assert.sameValue.900719925474099101n.valueOf): >+ (assert.sameValue.900719925474099101n.toString): >+ * test262/test/language/expressions/strict-does-not-equals/bigint-and-string.js: >+ * test262/test/language/expressions/strict-equals/bigint-and-bigint.js: >+ * test262/test/language/expressions/strict-equals/bigint-and-boolean.js: >+ * test262/test/language/expressions/strict-equals/bigint-and-incomparable-primitive.js: >+ * test262/test/language/expressions/strict-equals/bigint-and-non-finite.js: >+ * test262/test/language/expressions/strict-equals/bigint-and-number-extremes.js: >+ * test262/test/language/expressions/strict-equals/bigint-and-number.js: >+ * test262/test/language/expressions/strict-equals/bigint-and-object.js: >+ (assert.sameValue.0n.valueOf): >+ (assert.sameValue.valueOf): >+ (assert.sameValue.0n.toString): >+ (assert.sameValue.toString): >+ (assert.sameValue.900719925474099101n.valueOf): >+ (assert.sameValue.900719925474099101n.toString): >+ * test262/test/language/expressions/strict-equals/bigint-and-string.js: >+ * test262/test/language/expressions/subtraction/bigint-and-number.js: >+ * test262/test/language/expressions/subtraction/bigint-arithmetic.js: >+ (testSub): Deleted. >+ * test262/test/language/expressions/subtraction/bigint-errors.js: >+ (Symbol.toPrimitive): >+ (0n.Symbol.toPrimitive): >+ (valueOf): >+ (0n.valueOf): >+ (toString): >+ (0n.toString): >+ * test262/test/language/expressions/subtraction/bigint-toprimitive.js: >+ * test262/test/language/expressions/subtraction/bigint-wrapped-values.js: >+ * test262/test/language/expressions/unary-minus/bigint-non-primitive.js: >+ (assert.sameValue.Symbol.toPrimitive): >+ (assert.sameValue.valueOf): >+ (assert.sameValue.toString): >+ * test262/test/language/expressions/unary-plus/bigint-throws.js: >+ * test262/test/language/expressions/unsigned-right-shift/bigint-and-number.js: >+ * test262/test/language/expressions/unsigned-right-shift/bigint-errors.js: >+ (Symbol.toPrimitive): >+ (0n.Symbol.toPrimitive): >+ (valueOf): >+ (0n.valueOf): >+ (toString): >+ (0n.toString): >+ * test262/test/language/expressions/unsigned-right-shift/bigint-non-primitive.js: >+ (Symbol.toPrimitive): >+ (valueOf): >+ (toString): >+ (0b101n.Symbol.toPrimitive): >+ (0b101n.valueOf): >+ (0b101n.toString): >+ (valueOf.valueOf): >+ * test262/test/language/expressions/unsigned-right-shift/bigint-toprimitive.js: >+ * test262/test/language/expressions/unsigned-right-shift/bigint-wrapped-values.js: >+ * test262/test/language/literals/numeric/numeric-followed-by-ident.js: Added. >+ * test262/test/language/literals/string/line-continuation-double.js: Added. >+ * test262/test/language/literals/string/line-continuation-single.js: Added. >+ * test262/test262-Revision.txt: >+ > 2018-05-23 Keith Miller <keith_miller@apple.com> > > Define length on CoW array should properly convert to writable >diff --git a/JSTests/test262/expectations.yaml b/JSTests/test262/expectations.yaml >index 2ae0564b57ef259dd5e77cd9f8b51f01ffee3757..495ccc449ebe05a02f15de886335bb8a12b81ca5 100644 >--- a/JSTests/test262/expectations.yaml >+++ b/JSTests/test262/expectations.yaml >@@ -110,8 +110,6 @@ test/annexB/language/eval-code/direct/func-switch-dflt-eval-func-skip-early-err- > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/func-switch-dflt-eval-func-skip-early-err-try.js: > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' >-test/annexB/language/eval-code/direct/global-block-decl-eval-global-existing-global-init.js: >- default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëxû, ëundefinedû) to be true' > test/annexB/language/eval-code/direct/global-block-decl-eval-global-skip-early-err-block.js: > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/global-block-decl-eval-global-skip-early-err-for-in.js: >@@ -124,8 +122,6 @@ test/annexB/language/eval-code/direct/global-block-decl-eval-global-skip-early-e > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/global-block-decl-eval-global-skip-early-err-try.js: > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' >-test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-global-init.js: >- default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëxû, ëundefinedû) to be true' > test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-skip-early-err-block.js: > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-skip-early-err-for-in.js: >@@ -138,8 +134,6 @@ test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-ski > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-skip-early-err-try.js: > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' >-test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-global-init.js: >- default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëxû, ëundefinedû) to be true' > test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-skip-early-err-block.js: > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-skip-early-err-for-in.js: >@@ -152,8 +146,6 @@ test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-ski > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-skip-early-err-try.js: > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' >-test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-global-init.js: >- default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëxû, ëundefinedû) to be true' > test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-skip-early-err-block.js: > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-skip-early-err-for-in.js: >@@ -166,8 +158,6 @@ test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-skip- > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-skip-early-err-try.js: > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' >-test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-global-init.js: >- default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëxû, ëundefinedû) to be true' > test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-skip-early-err-block.js: > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-skip-early-err-for-in.js: >@@ -180,8 +170,6 @@ test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-skip-ea > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-skip-early-err-try.js: > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' >-test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-global-init.js: >- default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëxû, ëundefinedû) to be true' > test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-skip-early-err-block.js: > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-skip-early-err-for-in.js: >@@ -194,8 +182,6 @@ test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-skip- > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-skip-early-err-try.js: > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' >-test/annexB/language/eval-code/direct/global-switch-case-eval-global-existing-global-init.js: >- default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëxû, ëundefinedû) to be true' > test/annexB/language/eval-code/direct/global-switch-case-eval-global-skip-early-err-block.js: > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/global-switch-case-eval-global-skip-early-err-for-in.js: >@@ -208,8 +194,6 @@ test/annexB/language/eval-code/direct/global-switch-case-eval-global-skip-early- > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/global-switch-case-eval-global-skip-early-err-try.js: > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' >-test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-existing-global-init.js: >- default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëxû, ëundefinedû) to be true' > test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-skip-early-err-block.js: > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-skip-early-err-for-in.js: >@@ -224,8 +208,6 @@ test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-skip-early- > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/direct/var-env-lower-lex-catch-non-strict.js: > default: "SyntaxError: Can't create duplicate variable in eval: 'err'" >-test/annexB/language/eval-code/indirect/global-block-decl-eval-global-existing-global-init.js: >- default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëxû, ëundefinedû) to be true' > test/annexB/language/eval-code/indirect/global-block-decl-eval-global-skip-early-err-block.js: > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/indirect/global-block-decl-eval-global-skip-early-err-for-in.js: >@@ -238,8 +220,6 @@ test/annexB/language/eval-code/indirect/global-block-decl-eval-global-skip-early > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/indirect/global-block-decl-eval-global-skip-early-err-try.js: > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' >-test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-global-init.js: >- default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëxû, ëundefinedû) to be true' > test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-skip-early-err-block.js: > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-skip-early-err-for-in.js: >@@ -252,8 +232,6 @@ test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-s > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-skip-early-err-try.js: > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' >-test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-global-init.js: >- default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëxû, ëundefinedû) to be true' > test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-skip-early-err-block.js: > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-skip-early-err-for-in.js: >@@ -266,8 +244,6 @@ test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-s > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-skip-early-err-try.js: > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' >-test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-global-init.js: >- default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëxû, ëundefinedû) to be true' > test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-skip-early-err-block.js: > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-skip-early-err-for-in.js: >@@ -280,8 +256,6 @@ test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-ski > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-skip-early-err-try.js: > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' >-test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-global-init.js: >- default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëxû, ëundefinedû) to be true' > test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-skip-early-err-block.js: > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-skip-early-err-for-in.js: >@@ -294,8 +268,6 @@ test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-skip- > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-skip-early-err-try.js: > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' >-test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-global-init.js: >- default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëxû, ëundefinedû) to be true' > test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-skip-early-err-block.js: > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-skip-early-err-for-in.js: >@@ -308,8 +280,6 @@ test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-ski > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-skip-early-err-try.js: > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' >-test/annexB/language/eval-code/indirect/global-switch-case-eval-global-existing-global-init.js: >- default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëxû, ëundefinedû) to be true' > test/annexB/language/eval-code/indirect/global-switch-case-eval-global-skip-early-err-block.js: > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/indirect/global-switch-case-eval-global-skip-early-err-for-in.js: >@@ -322,8 +292,6 @@ test/annexB/language/eval-code/indirect/global-switch-case-eval-global-skip-earl > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/indirect/global-switch-case-eval-global-skip-early-err-try.js: > default: 'Test262Error: An initialized binding is not created prior to evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' >-test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-global-init.js: >- default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëxû, ëundefinedû) to be true' > test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-skip-early-err-block.js: > default: 'Test262Error: An initialized binding is not created following evaluation Expected a ReferenceError to be thrown but no exception was thrown at all' > test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-skip-early-err-for-in.js: >@@ -445,6 +413,8 @@ test/annexB/language/global-code/block-decl-global-existing-block-fn-no-init.js: > default: 'Test262Error: Expected SameValue(ëfunction f() { }û, ëundefinedû) to be true' > test/annexB/language/global-code/block-decl-global-existing-fn-update.js: > default: 'Test262Error: Expected SameValue(ëouter declarationû, ëinner declarationû) to be true' >+test/annexB/language/global-code/block-decl-global-existing-non-enumerable-global-init.js: >+ default: 'Test262Error: descriptor should not be enumerable; descriptor should be configurable' > test/annexB/language/global-code/block-decl-global-init.js: > default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëfunction f() { }û, ëundefinedû) to be true' > test/annexB/language/global-code/block-decl-global-no-skip-try.js: >@@ -469,6 +439,8 @@ test/annexB/language/global-code/if-decl-else-decl-a-global-existing-block-fn-no > default: 'Test262Error: Expected SameValue(ëfunction f() { }û, ëundefinedû) to be true' > test/annexB/language/global-code/if-decl-else-decl-a-global-existing-fn-update.js: > default: 'Test262Error: Expected SameValue(ëouter declarationû, ëinner declarationû) to be true' >+test/annexB/language/global-code/if-decl-else-decl-a-global-existing-non-enumerable-global-init.js: >+ default: 'Test262Error: descriptor should not be enumerable; descriptor should be configurable' > test/annexB/language/global-code/if-decl-else-decl-a-global-init.js: > default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëfunction f() { }û, ëundefinedû) to be true' > test/annexB/language/global-code/if-decl-else-decl-a-global-no-skip-try.js: >@@ -493,6 +465,8 @@ test/annexB/language/global-code/if-decl-else-decl-b-global-existing-block-fn-no > default: 'Test262Error: Expected SameValue(ëfunction f() { }û, ëundefinedû) to be true' > test/annexB/language/global-code/if-decl-else-decl-b-global-existing-fn-update.js: > default: 'Test262Error: Expected SameValue(ëouter declarationû, ëinner declarationû) to be true' >+test/annexB/language/global-code/if-decl-else-decl-b-global-existing-non-enumerable-global-init.js: >+ default: 'Test262Error: descriptor should not be enumerable; descriptor should be configurable' > test/annexB/language/global-code/if-decl-else-decl-b-global-init.js: > default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëfunction f() { }û, ëundefinedû) to be true' > test/annexB/language/global-code/if-decl-else-decl-b-global-no-skip-try.js: >@@ -517,6 +491,8 @@ test/annexB/language/global-code/if-decl-else-stmt-global-existing-block-fn-no-i > default: 'Test262Error: Expected SameValue(ëfunction f() { }û, ëundefinedû) to be true' > test/annexB/language/global-code/if-decl-else-stmt-global-existing-fn-update.js: > default: 'Test262Error: Expected SameValue(ëouter declarationû, ëinner declarationû) to be true' >+test/annexB/language/global-code/if-decl-else-stmt-global-existing-non-enumerable-global-init.js: >+ default: 'Test262Error: descriptor should not be enumerable; descriptor should be configurable' > test/annexB/language/global-code/if-decl-else-stmt-global-init.js: > default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëfunction f() { }û, ëundefinedû) to be true' > test/annexB/language/global-code/if-decl-else-stmt-global-no-skip-try.js: >@@ -541,6 +517,8 @@ test/annexB/language/global-code/if-decl-no-else-global-existing-block-fn-no-ini > default: 'Test262Error: Expected SameValue(ëfunction f() { }û, ëundefinedû) to be true' > test/annexB/language/global-code/if-decl-no-else-global-existing-fn-update.js: > default: 'Test262Error: Expected SameValue(ëouter declarationû, ëinner declarationû) to be true' >+test/annexB/language/global-code/if-decl-no-else-global-existing-non-enumerable-global-init.js: >+ default: 'Test262Error: descriptor should not be enumerable; descriptor should be configurable' > test/annexB/language/global-code/if-decl-no-else-global-init.js: > default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëfunction f() { }û, ëundefinedû) to be true' > test/annexB/language/global-code/if-decl-no-else-global-no-skip-try.js: >@@ -565,6 +543,8 @@ test/annexB/language/global-code/if-stmt-else-decl-global-existing-block-fn-no-i > default: 'Test262Error: Expected SameValue(ëfunction f() { }û, ëundefinedû) to be true' > test/annexB/language/global-code/if-stmt-else-decl-global-existing-fn-update.js: > default: 'Test262Error: Expected SameValue(ëouter declarationû, ëinner declarationû) to be true' >+test/annexB/language/global-code/if-stmt-else-decl-global-existing-non-enumerable-global-init.js: >+ default: 'Test262Error: descriptor should not be enumerable; descriptor should be configurable' > test/annexB/language/global-code/if-stmt-else-decl-global-init.js: > default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëfunction f() { }û, ëundefinedû) to be true' > test/annexB/language/global-code/if-stmt-else-decl-global-no-skip-try.js: >@@ -589,6 +569,8 @@ test/annexB/language/global-code/switch-case-global-existing-block-fn-no-init.js > default: 'Test262Error: Expected SameValue(ëfunction f() { }û, ëundefinedû) to be true' > test/annexB/language/global-code/switch-case-global-existing-fn-update.js: > default: 'Test262Error: Expected SameValue(ëouter declarationû, ëinner declarationû) to be true' >+test/annexB/language/global-code/switch-case-global-existing-non-enumerable-global-init.js: >+ default: 'Test262Error: descriptor should not be enumerable; descriptor should be configurable' > test/annexB/language/global-code/switch-case-global-init.js: > default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëfunction f() { }û, ëundefinedû) to be true' > test/annexB/language/global-code/switch-case-global-no-skip-try.js: >@@ -613,6 +595,8 @@ test/annexB/language/global-code/switch-dflt-global-existing-block-fn-no-init.js > default: 'Test262Error: Expected SameValue(ëfunction f() { }û, ëundefinedû) to be true' > test/annexB/language/global-code/switch-dflt-global-existing-fn-update.js: > default: 'Test262Error: Expected SameValue(ëouter declarationû, ëinner declarationû) to be true' >+test/annexB/language/global-code/switch-dflt-global-existing-non-enumerable-global-init.js: >+ default: 'Test262Error: descriptor should not be enumerable; descriptor should be configurable' > test/annexB/language/global-code/switch-dflt-global-init.js: > default: 'Test262Error: binding is initialized to `undefined` Expected SameValue(ëfunction f() { }û, ëundefinedû) to be true' > test/annexB/language/global-code/switch-dflt-global-no-skip-try.js: >@@ -649,6 +633,36 @@ test/built-ins/Array/prototype/concat/is-concat-spreadable-proxy.js: > test/built-ins/Array/prototype/filter/target-array-with-non-writable-property.js: > default: 'TypeError: Attempted to assign to readonly property.' > strict mode: 'TypeError: Attempted to assign to readonly property.' >+test/built-ins/Array/prototype/flat/array-like-objects.js: >+ default: "TypeError: undefined is not an object (evaluating '[].flat.call')" >+ strict mode: "TypeError: undefined is not an object (evaluating '[].flat.call')" >+test/built-ins/Array/prototype/flat/bound-function-call.js: >+ default: "TypeError: undefined is not an object (evaluating '[].flat.bind')" >+ strict mode: "TypeError: undefined is not an object (evaluating '[].flat.bind')" >+test/built-ins/Array/prototype/flat/empty-array-elements.js: >+ default: "TypeError: [].flat is not a function. (In '[].flat()', '[].flat' is undefined)" >+ strict mode: "TypeError: [].flat is not a function. (In '[].flat()', '[].flat' is undefined)" >+test/built-ins/Array/prototype/flat/empty-object-elements.js: >+ default: "TypeError: [a].flat is not a function. (In '[a].flat()', '[a].flat' is undefined)" >+ strict mode: "TypeError: [a].flat is not a function. (In '[a].flat()', '[a].flat' is undefined)" >+test/built-ins/Array/prototype/flat/length.js: >+ default: "TypeError: undefined is not an object (evaluating 'Array.prototype.flat.length')" >+ strict mode: "TypeError: undefined is not an object (evaluating 'Array.prototype.flat.length')" >+test/built-ins/Array/prototype/flat/name.js: >+ default: "TypeError: undefined is not an object (evaluating 'Array.prototype.flat.name')" >+ strict mode: "TypeError: undefined is not an object (evaluating 'Array.prototype.flat.name')" >+test/built-ins/Array/prototype/flat/non-numeric-depth-should-not-throw.js: >+ default: "TypeError: a.flat is not a function. (In 'a.flat(depthNum)', 'a.flat' is undefined)" >+ strict mode: "TypeError: a.flat is not a function. (In 'a.flat(depthNum)', 'a.flat' is undefined)" >+test/built-ins/Array/prototype/flat/null-undefined-elements.js: >+ default: "TypeError: [1, null, void 0].flat is not a function. (In '[1, null, void 0].flat()', '[1, null, void 0].flat' is undefined)" >+ strict mode: "TypeError: [1, null, void 0].flat is not a function. (In '[1, null, void 0].flat()', '[1, null, void 0].flat' is undefined)" >+test/built-ins/Array/prototype/flat/positive-infinity.js: >+ default: "TypeError: a.flat is not a function. (In 'a.flat(Number.POSITIVE_INFINITY)', 'a.flat' is undefined)" >+ strict mode: "TypeError: a.flat is not a function. (In 'a.flat(Number.POSITIVE_INFINITY)', 'a.flat' is undefined)" >+test/built-ins/Array/prototype/flat/prop-desc.js: >+ default: 'Test262Error: `typeof Array.prototype.flat` is `function` Expected SameValue(ëundefinedû, ëfunctionû) to be true' >+ strict mode: 'Test262Error: `typeof Array.prototype.flat` is `function` Expected SameValue(ëundefinedû, ëfunctionû) to be true' > test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js: > default: 'Test262Error: Array.prototype.indexOf.call(obj, targetObj) Expected SameValue(ë-1û, ë0û) to be true' > strict mode: 'Test262Error: Array.prototype.indexOf.call(obj, targetObj) Expected SameValue(ë-1û, ë0û) to be true' >@@ -1201,7 +1215,7 @@ test/built-ins/Object/internals/DefineOwnProperty/consistent-value-function-argu > default: 'Test262Error: Expected SameValue(ënullû, ë[object Arguments]û) to be true' > test/built-ins/Object/internals/DefineOwnProperty/consistent-value-function-caller.js: > default: 'Test262Error: Expected SameValue(ënullû, ëfunction g() {' >-test/built-ins/Object/internals/DefineOwnProperty/consistent-value-regexp-$1.js: >+test/built-ins/Object/internals/DefineOwnProperty/consistent-value-regexp-dollar1.js: > default: 'Test262Error: Expected SameValue(ëû, ëxû) to be true' > strict mode: 'Test262Error: Expected SameValue(ëû, ëxû) to be true' > test/built-ins/Object/keys/property-traps-order-with-proxied-array.js: >@@ -1886,18 +1900,57 @@ test/intl402/Intl/getCanonicalLocales/preferred-grandfathered.js: > test/intl402/Intl/getCanonicalLocales/preferred-variant.js: > default: 'Test262Error: Expected SameValue(ëja-Latn-hepburn-heplocû, ëja-Latn-alalc97û) to be true' > strict mode: 'Test262Error: Expected SameValue(ëja-Latn-hepburn-heplocû, ëja-Latn-alalc97û) to be true' >+test/intl402/Locale/constructor-getter-order.js: >+ default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale')" >+ strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale')" >+test/intl402/Locale/constructor-locale-object.js: >+ default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(\"en-US\")')" >+ strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(\"en-US\")')" >+test/intl402/Locale/constructor-non-iana-canon.js: >+ default: 'Test262Error: Expected SameValue(ëmoû, ëroû) to be true' >+ strict mode: 'Test262Error: Expected SameValue(ëmoû, ëroû) to be true' > test/intl402/Locale/constructor-options-calendar-invalid.js: > default: 'Test262Error: is an invalid calendar option value Expected a RangeError but got a TypeError' > strict mode: 'Test262Error: is an invalid calendar option value Expected a RangeError but got a TypeError' > test/intl402/Locale/constructor-options-calendar-valid.js: > default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en', options)')" > strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en', options)')" >+test/intl402/Locale/constructor-options-casefirst-invalid.js: >+ default: 'Test262Error: is an invalid caseFirst option value Expected a RangeError but got a TypeError' >+ strict mode: 'Test262Error: is an invalid caseFirst option value Expected a RangeError but got a TypeError' >+test/intl402/Locale/constructor-options-casefirst-valid.js: >+ default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en', options)')" >+ strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en', options)')" >+test/intl402/Locale/constructor-options-collation-invalid.js: >+ default: 'Test262Error: a is an invalid collation option value Expected a RangeError but got a TypeError' >+ strict mode: 'Test262Error: a is an invalid collation option value Expected a RangeError but got a TypeError' >+test/intl402/Locale/constructor-options-collation-valid.js: >+ default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en', options)')" >+ strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en', options)')" >+test/intl402/Locale/constructor-options-hourcycle-invalid.js: >+ default: 'Test262Error: is an invalid hourCycle option value Expected a RangeError but got a TypeError' >+ strict mode: 'Test262Error: is an invalid hourCycle option value Expected a RangeError but got a TypeError' >+test/intl402/Locale/constructor-options-hourcycle-valid.js: >+ default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en', options)')" >+ strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en', options)')" >+test/intl402/Locale/constructor-options-language-grandfathered.js: >+ default: 'Test262Error: Expected a RangeError but got a TypeError' >+ strict mode: 'Test262Error: Expected a RangeError but got a TypeError' > test/intl402/Locale/constructor-options-language-invalid.js: > default: 'Test262Error: is an invalid language option value Expected a RangeError but got a TypeError' > strict mode: 'Test262Error: is an invalid language option value Expected a RangeError but got a TypeError' > test/intl402/Locale/constructor-options-language-valid.js: > default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en', options)')" > strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en', options)')" >+test/intl402/Locale/constructor-options-numberingsystem-invalid.js: >+ default: 'Test262Error: a is an invalid numberingSystem option value Expected a RangeError but got a TypeError' >+ strict mode: 'Test262Error: a is an invalid numberingSystem option value Expected a RangeError but got a TypeError' >+test/intl402/Locale/constructor-options-numberingsystem-valid.js: >+ default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en', options)')" >+ strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en', options)')" >+test/intl402/Locale/constructor-options-numeric-valid.js: >+ default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en', options)')" >+ strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en', options)')" > test/intl402/Locale/constructor-options-region-invalid.js: > default: 'Test262Error: is an invalid region option value Expected a RangeError but got a TypeError' > strict mode: 'Test262Error: is an invalid region option value Expected a RangeError but got a TypeError' >@@ -1908,11 +1961,41 @@ test/intl402/Locale/constructor-options-script-invalid.js: > default: 'Test262Error: is an invalid script option value Expected a RangeError but got a TypeError' > strict mode: 'Test262Error: is an invalid script option value Expected a RangeError but got a TypeError' > test/intl402/Locale/constructor-options-script-valid.js: >- default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(\"en\", options)')" >- strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(\"en\", options)')" >+ default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en', options)')" >+ strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en', options)')" >+test/intl402/Locale/constructor-parse-twice.js: >+ default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(tag, options)')" >+ strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(tag, options)')" >+test/intl402/Locale/constructor-tag-tostring.js: >+ default: 'Test262Error: Expected a CustomError but got a TypeError' >+ strict mode: 'Test262Error: Expected a CustomError but got a TypeError' >+test/intl402/Locale/constructor-unicode-ext-invalid.js: >+ default: 'Test262Error: Expected a RangeError but got a TypeError' >+ strict mode: 'Test262Error: Expected a RangeError but got a TypeError' >+test/intl402/Locale/constructor-unicode-ext-valid.js: >+ default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(langtag)')" >+ strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(langtag)')" >+test/intl402/Locale/extensions-grandfathered.js: >+ default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(tag, options)')" >+ strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(tag, options)')" >+test/intl402/Locale/extensions-private.js: >+ default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(\"x-default\", {" >+ strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(\"x-default\", {" > test/intl402/Locale/function-prototype.js: > default: "TypeError: undefined is not an object (evaluating 'Object.getPrototypeOf(Intl.Locale)')" > strict mode: "TypeError: undefined is not an object (evaluating 'Object.getPrototypeOf(Intl.Locale)')" >+test/intl402/Locale/getters-grandfathered.js: >+ default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(\"i-default\")')" >+ strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(\"i-default\")')" >+test/intl402/Locale/getters-missing.js: >+ default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(\"sv\")')" >+ strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(\"sv\")')" >+test/intl402/Locale/getters-privateuse.js: >+ default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(\"x-private\")')" >+ strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(\"x-private\")')" >+test/intl402/Locale/getters.js: >+ default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(langtag)')" >+ strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale(langtag)')" > test/intl402/Locale/instance-extensibility.js: > default: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en')')" > strict mode: "TypeError: undefined is not a constructor (evaluating 'new Intl.Locale('en')')" >@@ -1925,13 +2008,34 @@ test/intl402/Locale/invalid-tag-throws.js: > test/intl402/Locale/length.js: > default: "TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, name)')" > strict mode: "TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, name)')" >+test/intl402/Locale/likely-subtags-grandfathered.js: >+ default: 'Test262Error: Expected SameValue(ëen-GB-oedû, ëen-GB-oxendictû) to be true' >+ strict mode: 'Test262Error: Expected SameValue(ëen-GB-oedû, ëen-GB-oxendictû) to be true' > test/intl402/Locale/name.js: > default: "TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, name)')" > strict mode: "TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, name)')" > test/intl402/Locale/prop-desc.js: >- default: 'Test262Error: typeof Intl.Locale is function Expected SameValue(ëundefinedû, ëfunctionû) to be true' >- strict mode: 'Test262Error: typeof Intl.Locale is function Expected SameValue(ëundefinedû, ëfunctionû) to be true' >-test/intl402/Locale/prototype/constructor.js: >+ default: 'Test262Error: obj should have an own property Locale' >+ strict mode: 'Test262Error: obj should have an own property Locale' >+test/intl402/Locale/prototype/baseName/prop-desc.js: >+ default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+ strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+test/intl402/Locale/prototype/calendar/prop-desc.js: >+ default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+ strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+test/intl402/Locale/prototype/caseFirst/prop-desc.js: >+ default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+ strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+test/intl402/Locale/prototype/collation/prop-desc.js: >+ default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+ strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+test/intl402/Locale/prototype/constructor/prop-desc.js: >+ default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+ strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+test/intl402/Locale/prototype/hourCycle/prop-desc.js: >+ default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+ strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+test/intl402/Locale/prototype/language/prop-desc.js: > default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" > strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" > test/intl402/Locale/prototype/maximize/length.js: >@@ -1943,10 +2047,34 @@ test/intl402/Locale/prototype/maximize/name.js: > test/intl402/Locale/prototype/maximize/prop-desc.js: > default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" > strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+test/intl402/Locale/prototype/minimize/length.js: >+ default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+ strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+test/intl402/Locale/prototype/minimize/name.js: >+ default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+ strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+test/intl402/Locale/prototype/minimize/prop-desc.js: >+ default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+ strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+test/intl402/Locale/prototype/numberingSystem/prop-desc.js: >+ default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+ strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+test/intl402/Locale/prototype/numeric/prop-desc.js: >+ default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+ strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" > test/intl402/Locale/prototype/prop-desc.js: > default: "TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, name)')" > strict mode: "TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, name)')" >-test/intl402/Locale/prototype/toStringTag.js: >+test/intl402/Locale/prototype/region/prop-desc.js: >+ default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+ strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+test/intl402/Locale/prototype/script/prop-desc.js: >+ default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+ strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+test/intl402/Locale/prototype/toString/prop-desc.js: >+ default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+ strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >+test/intl402/Locale/prototype/toStringTag/toStringTag.js: > default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" > strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" > test/intl402/Number/prototype/toLocaleString/returns-same-results-as-NumberFormat.js: >@@ -1992,8 +2120,8 @@ test/intl402/PluralRules/default-options-object-prototype.js: > default: 'Test262Error: Expected SameValue(ëordinalû, ëcardinalû) to be true' > strict mode: 'Test262Error: Expected SameValue(ëordinalû, ëcardinalû) to be true' > test/intl402/PluralRules/length.js: >- default: 'Test262Error: Expected obj[length] to have configurable:true.' >- strict mode: 'Test262Error: Expected obj[length] to have configurable:true.' >+ default: 'Test262Error: descriptor should be configurable' >+ strict mode: 'Test262Error: descriptor should be configurable' > test/intl402/TypedArray/prototype/toLocaleString/calls-toLocaleString-number-elements.js: > default: 'Test262Error: Expected SameValue(ë0û, Ã«à ¹Â.à ¹Âà ¹Âà ¹Âû) to be true (Testing with Float64Array.)' > strict mode: 'Test262Error: Expected SameValue(ë0û, Ã«à ¹Â.à ¹Âà ¹Âà ¹Âû) to be true (Testing with Float64Array.)' >diff --git a/JSTests/test262/harness/doneprintHandle.js b/JSTests/test262/harness/doneprintHandle.js >index 625feef572044bf547ffab1ad07cf4ae35bbbbfb..2b4ab88a031a49dc3cf1bc968780d5f1c69d1ef9 100644 >--- a/JSTests/test262/harness/doneprintHandle.js >+++ b/JSTests/test262/harness/doneprintHandle.js >@@ -13,5 +13,5 @@ function __consolePrintHandle__(msg){ > if(!arguments[0]) > __consolePrintHandle__('Test262:AsyncTestComplete'); > else >- __consolePrintHandle__('Error: ' + arguments[0]); >+ __consolePrintHandle__('Test262:AsyncTestFailure:' + arguments[0]); > } >diff --git a/JSTests/test262/latest-changes-summary.txt b/JSTests/test262/latest-changes-summary.txt >index 349b604210d2baf8c3c7a96cc298ce1ca9239693..6e922f27e50573fac77f341fbe34432bc971c6ce 100644 >--- a/JSTests/test262/latest-changes-summary.txt >+++ b/JSTests/test262/latest-changes-summary.txt >@@ -1,191 +1,71 @@ >-A harness/compareIterator.js >-M harness/nativeFunctionMatcher.js >-M harness/regExpUtils.js >-M harness/testIntl.js >-M harness/testTypedArray.js >-A harness/wellKnownIntrinsicObjects.js >-A test/annexB/language/eval-code/direct/block-decl-nostrict.js >-A test/annexB/language/eval-code/direct/switch-case-decl-nostrict.js >-A test/annexB/language/eval-code/direct/switch-dflt-decl-nostrict.js >-A test/annexB/language/function-code/block-decl-nested-blocks-with-fun-decl.js >-A test/annexB/language/function-code/block-decl-nostrict.js >-A test/annexB/language/function-code/switch-case-decl-nostrict.js >-A test/annexB/language/function-code/switch-dflt-decl-nostrict.js >-A test/built-ins/Array/prototype/filter/target-array-with-non-writable-property.js >-A test/built-ins/Array/prototype/indexOf/calls-only-has-on-prototype-after-length-zeroed.js >-A test/built-ins/Array/prototype/lastIndexOf/calls-only-has-on-prototype-after-length-zeroed.js >-A test/built-ins/Array/prototype/map/target-array-with-non-writable-property.js >-A test/built-ins/Array/prototype/slice/target-array-with-non-writable-property.js >-A test/built-ins/Array/prototype/splice/property-traps-order-with-species.js >-A test/built-ins/Array/prototype/splice/target-array-with-non-writable-property.js >-M test/built-ins/Atomics/Symbol.toStringTag.js >-M test/built-ins/Atomics/add/bad-range.js >-M test/built-ins/Atomics/add/good-views.js >-M test/built-ins/Atomics/add/non-views.js >-M test/built-ins/Atomics/add/nonshared-int-views.js >-M test/built-ins/Atomics/add/shared-nonint-views.js >-M test/built-ins/Atomics/and/bad-range.js >-M test/built-ins/Atomics/and/good-views.js >-M test/built-ins/Atomics/and/non-views.js >-M test/built-ins/Atomics/and/nonshared-int-views.js >-M test/built-ins/Atomics/and/shared-nonint-views.js >-M test/built-ins/Atomics/compareExchange/bad-range.js >-M test/built-ins/Atomics/compareExchange/good-views.js >-M test/built-ins/Atomics/compareExchange/non-views.js >-M test/built-ins/Atomics/compareExchange/nonshared-int-views.js >-M test/built-ins/Atomics/compareExchange/shared-nonint-views.js >-M test/built-ins/Atomics/exchange/bad-range.js >-M test/built-ins/Atomics/exchange/good-views.js >-M test/built-ins/Atomics/exchange/non-views.js >-M test/built-ins/Atomics/exchange/nonshared-int-views.js >-M test/built-ins/Atomics/exchange/shared-nonint-views.js >-M test/built-ins/Atomics/isLockFree/corner-cases.js >-M test/built-ins/Atomics/isLockFree/value.js >-M test/built-ins/Atomics/load/bad-range.js >-M test/built-ins/Atomics/load/good-views.js >-M test/built-ins/Atomics/load/non-views.js >-M test/built-ins/Atomics/load/nonshared-int-views.js >-M test/built-ins/Atomics/load/shared-nonint-views.js >-M test/built-ins/Atomics/or/bad-range.js >-M test/built-ins/Atomics/or/good-views.js >-M test/built-ins/Atomics/or/non-views.js >-M test/built-ins/Atomics/or/nonshared-int-views.js >-M test/built-ins/Atomics/or/shared-nonint-views.js >-M test/built-ins/Atomics/prop-desc.js >-M test/built-ins/Atomics/proto.js >-M test/built-ins/Atomics/store/bad-range.js >-M test/built-ins/Atomics/store/good-views.js >-M test/built-ins/Atomics/store/non-views.js >-M test/built-ins/Atomics/store/nonshared-int-views.js >-M test/built-ins/Atomics/store/shared-nonint-views.js >-M test/built-ins/Atomics/sub/bad-range.js >-M test/built-ins/Atomics/sub/good-views.js >-M test/built-ins/Atomics/sub/non-views.js >-M test/built-ins/Atomics/sub/nonshared-int-views.js >-M test/built-ins/Atomics/sub/shared-nonint-views.js >-A test/built-ins/Atomics/wait/bad-range.js >-M test/built-ins/Atomics/wait/cannot-suspend-throws.js >-M test/built-ins/Atomics/wait/did-timeout.js >-A test/built-ins/Atomics/wait/false-for-timeout-agent.js >-M test/built-ins/Atomics/wait/false-for-timeout.js >-M test/built-ins/Atomics/wait/good-views.js >-M test/built-ins/Atomics/wait/nan-for-timeout.js >-M test/built-ins/Atomics/wait/negative-index-throws.js >-A test/built-ins/Atomics/wait/negative-timeout-agent.js >-M test/built-ins/Atomics/wait/negative-timeout.js >-M test/built-ins/Atomics/wait/no-spurious-wakeup.js >-M test/built-ins/Atomics/wait/non-int32-typedarray-throws.js >-R069 test/built-ins/Atomics/wait/nonshared-bufferdata-throws.js test/built-ins/Atomics/wait/non-shared-bufferdata-throws.js >-M test/built-ins/Atomics/wait/not-a-typedarray-throws.js >-M test/built-ins/Atomics/wait/not-an-object-throws.js >-M test/built-ins/Atomics/wait/null-bufferdata-throws.js >-A test/built-ins/Atomics/wait/null-for-timeout-agent.js >-M test/built-ins/Atomics/wait/null-for-timeout.js >-A test/built-ins/Atomics/wait/object-for-timeout-agent.js >-M test/built-ins/Atomics/wait/object-for-timeout.js >-M test/built-ins/Atomics/wait/out-of-range-index-throws.js >-A test/built-ins/Atomics/wait/poisoned-object-for-timeout-throws-agent.js >-M test/built-ins/Atomics/wait/poisoned-object-for-timeout-throws.js >-A test/built-ins/Atomics/wait/symbol-for-index-throws-agent.js >-M test/built-ins/Atomics/wait/symbol-for-index-throws.js >-A test/built-ins/Atomics/wait/symbol-for-timeout-throws-agent.js >-M test/built-ins/Atomics/wait/symbol-for-timeout-throws.js >-A test/built-ins/Atomics/wait/symbol-for-value-throws-agent.js >-A test/built-ins/Atomics/wait/symbol-for-value-throws.js >-A test/built-ins/Atomics/wait/true-for-timeout-agent.js >-M test/built-ins/Atomics/wait/true-for-timeout.js >-M test/built-ins/Atomics/wait/undefined-for-timeout.js >-M test/built-ins/Atomics/wait/undefined-index-defaults-to-zero.js >-A test/built-ins/Atomics/wait/value-not-equal.js >-M test/built-ins/Atomics/wait/wait-index-value-not-equal.js >-A test/built-ins/Atomics/wait/waiterlist-block-indexedposition-wake.js >-A test/built-ins/Atomics/wait/waiterlist-order-of-operations-is-fifo.js >-M test/built-ins/Atomics/wait/was-woken-before-timeout.js >-M test/built-ins/Atomics/wait/was-woken.js >-M test/built-ins/Atomics/wake/bad-range.js >-R051 test/built-ins/Atomics/wake/counts.js test/built-ins/Atomics/wake/count-boundary-cases.js >-A test/built-ins/Atomics/wake/count-defaults-to-infinity-missing.js >-A test/built-ins/Atomics/wake/count-defaults-to-infinity-undefined.js >-A test/built-ins/Atomics/wake/count-from-nans.js >-A test/built-ins/Atomics/wake/count-symbol-throws.js >-A test/built-ins/Atomics/wake/count-tointeger-throws-then-wake-throws.js >-M test/built-ins/Atomics/wake/good-views.js >-R094 test/built-ins/Atomics/wake/wake-negative.js test/built-ins/Atomics/wake/negative-count.js >-A test/built-ins/Atomics/wake/negative-index-throws.js >-A test/built-ins/Atomics/wake/non-int32-typedarray-throws.js >-A test/built-ins/Atomics/wake/non-shared-bufferdata-throws.js >-M test/built-ins/Atomics/wake/non-views.js >-M test/built-ins/Atomics/wake/nonshared-int-views.js >-A test/built-ins/Atomics/wake/not-a-typedarray-throws.js >-A test/built-ins/Atomics/wake/not-an-object-throws.js >-A test/built-ins/Atomics/wake/null-bufferdata-throws.js >-A test/built-ins/Atomics/wake/out-of-range-index-throws.js >-M test/built-ins/Atomics/wake/shared-nonint-views.js >-A test/built-ins/Atomics/wake/symbol-for-index-throws.js >-A test/built-ins/Atomics/wake/undefined-index-defaults-to-zero.js >-M test/built-ins/Atomics/wake/wake-all-on-loc.js >-M test/built-ins/Atomics/wake/wake-all.js >-M test/built-ins/Atomics/wake/wake-in-order.js >-M test/built-ins/Atomics/wake/wake-nan.js >-M test/built-ins/Atomics/wake/wake-one.js >-A test/built-ins/Atomics/wake/wake-rewake-noop.js >-M test/built-ins/Atomics/wake/wake-two.js >-A test/built-ins/Atomics/wake/wake-with-no-agents-waiting.js >-A test/built-ins/Atomics/wake/wake-with-no-matching-agents-waiting.js >-M test/built-ins/Atomics/wake/wake-zero.js >-M test/built-ins/Atomics/xor/bad-range.js >-M test/built-ins/Atomics/xor/good-views.js >-M test/built-ins/Atomics/xor/non-views.js >-M test/built-ins/Atomics/xor/nonshared-int-views.js >-M test/built-ins/Atomics/xor/shared-nonint-views.js >-M test/built-ins/BigInt/asIntN/bigint-tobigint-errors.js >-M test/built-ins/BigInt/asIntN/bigint-tobigint-toprimitive.js >-M test/built-ins/BigInt/asIntN/bigint-tobigint-wrapped-values.js >-M test/built-ins/BigInt/asIntN/bits-toindex-errors.js >-M test/built-ins/BigInt/asIntN/bits-toindex-toprimitive.js >-M test/built-ins/BigInt/asIntN/bits-toindex-wrapped-values.js >-M test/built-ins/BigInt/asUintN/bigint-tobigint-errors.js >-M test/built-ins/BigInt/asUintN/bigint-tobigint-toprimitive.js >-M test/built-ins/BigInt/asUintN/bigint-tobigint-wrapped-values.js >-M test/built-ins/BigInt/asUintN/bits-toindex-errors.js >-M test/built-ins/BigInt/asUintN/bits-toindex-toprimitive.js >-M test/built-ins/BigInt/asUintN/bits-toindex-wrapped-values.js >-M test/built-ins/BigInt/constructor-empty-string.js >-M test/built-ins/BigInt/constructor-from-binary-string.js >-M test/built-ins/BigInt/constructor-from-decimal-string.js >-M test/built-ins/BigInt/constructor-from-hex-string.js >-M test/built-ins/BigInt/constructor-from-octal-string.js >-M test/built-ins/BigInt/constructor-from-string-syntax-errors.js >-A test/built-ins/BigInt/constructor-integer.js >-M test/built-ins/BigInt/constructor-trailing-leading-spaces.js >-D test/built-ins/BigInt/issafeinteger-true.js >-D test/built-ins/BigInt/out-of-bounds-integer-rangeerror.js >-M test/built-ins/BigInt/prototype/Symbol.toStringTag.js >-A test/built-ins/BigInt/prototype/toString/default-radix.js >-M test/built-ins/BigInt/prototype/toString/thisbigintvalue-not-valid-throws.js >-A test/built-ins/BigInt/prototype/valueOf/cross-realm.js >-R072 test/built-ins/BigInt/value-of-throws.js test/built-ins/BigInt/tostring-throws.js >-A test/built-ins/BigInt/valueof-throws.js >-M test/built-ins/DataView/prototype/setBigInt64/set-values-return-undefined.js >-A test/built-ins/Function/prototype/bind/length-exceeds-int32.js >-D test/built-ins/Function/prototype/toString/anonymous-intrinsics.js >-M test/built-ins/Function/prototype/toString/bound-function.js >-A test/built-ins/Function/prototype/toString/built-in-function-object.js >-D test/built-ins/Function/prototype/toString/intrinsics.js >-A test/built-ins/Function/prototype/toString/proxy-arrow-function.js >-A test/built-ins/Function/prototype/toString/proxy-async-function.js >-A test/built-ins/Function/prototype/toString/proxy-async-generator-function.js >-A test/built-ins/Function/prototype/toString/proxy-async-generator-method-definition.js >-A test/built-ins/Function/prototype/toString/proxy-async-method-definition.js >-A test/built-ins/Function/prototype/toString/proxy-bound-function.js >-A test/built-ins/Function/prototype/toString/proxy-class.js >-A test/built-ins/Function/prototype/toString/proxy-function-expression.js >-A test/built-ins/Function/prototype/toString/proxy-generator-function.js >-A test/built-ins/Function/prototype/toString/proxy-method-definition.js >-A test/built-ins/Function/prototype/toString/proxy-non-callable-throws.js >-D test/built-ins/Function/prototype/toString/proxy.js >-A test/built-ins/Function/prototype/toString/well-known-intrinsic-object-functions.js >-A test/built-ins/JSON/prop-desc.js >+M harness/doneprintHandle.js >+M test/annexB/language/eval-code/direct/global-block-decl-eval-global-existing-global-init.js >+A test/annexB/language/eval-code/direct/global-block-decl-eval-global-existing-non-enumerable-global-init.js >+M test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-global-init.js >+A test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-non-enumerable-global-init.js >+M test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-global-init.js >+A test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-non-enumerable-global-init.js >+M test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-global-init.js >+A test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-non-enumerable-global-init.js >+M test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-global-init.js >+A test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-non-enumerable-global-init.js >+M test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-global-init.js >+A test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-non-enumerable-global-init.js >+M test/annexB/language/eval-code/direct/global-switch-case-eval-global-existing-global-init.js >+A test/annexB/language/eval-code/direct/global-switch-case-eval-global-existing-non-enumerable-global-init.js >+M test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-existing-global-init.js >+A test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-existing-non-enumerable-global-init.js >+M test/annexB/language/eval-code/indirect/global-block-decl-eval-global-existing-global-init.js >+A test/annexB/language/eval-code/indirect/global-block-decl-eval-global-existing-non-enumerable-global-init.js >+M test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-global-init.js >+A test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-non-enumerable-global-init.js >+M test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-global-init.js >+A test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-non-enumerable-global-init.js >+M test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-global-init.js >+A test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-non-enumerable-global-init.js >+M test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-global-init.js >+A test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-non-enumerable-global-init.js >+M test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-global-init.js >+A test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-non-enumerable-global-init.js >+M test/annexB/language/eval-code/indirect/global-switch-case-eval-global-existing-global-init.js >+A test/annexB/language/eval-code/indirect/global-switch-case-eval-global-existing-non-enumerable-global-init.js >+M test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-global-init.js >+A test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-non-enumerable-global-init.js >+A test/annexB/language/global-code/block-decl-global-existing-global-init.js >+A test/annexB/language/global-code/block-decl-global-existing-non-enumerable-global-init.js >+A test/annexB/language/global-code/if-decl-else-decl-a-global-existing-global-init.js >+A test/annexB/language/global-code/if-decl-else-decl-a-global-existing-non-enumerable-global-init.js >+A test/annexB/language/global-code/if-decl-else-decl-b-global-existing-global-init.js >+A test/annexB/language/global-code/if-decl-else-decl-b-global-existing-non-enumerable-global-init.js >+A test/annexB/language/global-code/if-decl-else-stmt-global-existing-global-init.js >+A test/annexB/language/global-code/if-decl-else-stmt-global-existing-non-enumerable-global-init.js >+A test/annexB/language/global-code/if-decl-no-else-global-existing-global-init.js >+A test/annexB/language/global-code/if-decl-no-else-global-existing-non-enumerable-global-init.js >+A test/annexB/language/global-code/if-stmt-else-decl-global-existing-global-init.js >+A test/annexB/language/global-code/if-stmt-else-decl-global-existing-non-enumerable-global-init.js >+A test/annexB/language/global-code/switch-case-global-existing-global-init.js >+A test/annexB/language/global-code/switch-case-global-existing-non-enumerable-global-init.js >+A test/annexB/language/global-code/switch-dflt-global-existing-global-init.js >+A test/annexB/language/global-code/switch-dflt-global-existing-non-enumerable-global-init.js >+R078 test/built-ins/Array/prototype/flatten/array-like-objects.js test/built-ins/Array/prototype/flat/array-like-objects.js >+R061 test/built-ins/Array/prototype/flatten/bound-function-call.js test/built-ins/Array/prototype/flat/bound-function-call.js >+R068 test/built-ins/Array/prototype/flatten/empty-array-elements.js test/built-ins/Array/prototype/flat/empty-array-elements.js >+R061 test/built-ins/Array/prototype/flatten/empty-object-elements.js test/built-ins/Array/prototype/flat/empty-object-elements.js >+A test/built-ins/Array/prototype/flat/length.js >+A test/built-ins/Array/prototype/flat/name.js >+R080 test/built-ins/Array/prototype/flatten/non-numeric-depth-should-not-throw.js test/built-ins/Array/prototype/flat/non-numeric-depth-should-not-throw.js >+R084 test/built-ins/Array/prototype/flatten/non-object-ctor-throws.js test/built-ins/Array/prototype/flat/non-object-ctor-throws.js >+A test/built-ins/Array/prototype/flat/null-undefined-elements.js >+R073 test/built-ins/Array/prototype/flatten/null-undefined-input-throws.js test/built-ins/Array/prototype/flat/null-undefined-input-throws.js >+R064 test/built-ins/Array/prototype/flatten/positive-infinity.js test/built-ins/Array/prototype/flat/positive-infinity.js >+R052 test/built-ins/Array/prototype/flatten/prop-desc.js test/built-ins/Array/prototype/flat/prop-desc.js >+R073 test/built-ins/Array/prototype/flatten/symbol-object-create-null-depth-throws.js test/built-ins/Array/prototype/flat/symbol-object-create-null-depth-throws.js >+D test/built-ins/Array/prototype/flatten/length.js >+D test/built-ins/Array/prototype/flatten/name.js >+D test/built-ins/Array/prototype/flatten/null-undefined-elements.js >+M test/built-ins/AsyncGeneratorPrototype/next/name.js >+M test/built-ins/AsyncGeneratorPrototype/return/name.js >+M test/built-ins/AsyncGeneratorPrototype/throw/name.js > M test/built-ins/Math/acosh/nan-returns.js > M test/built-ins/Math/asinh/asinh-specialVals.js > M test/built-ins/Math/atanh/atanh-specialVals.js >@@ -195,207 +75,205 @@ M test/built-ins/Math/cosh/cosh-specialVals.js > M test/built-ins/Math/expm1/expm1-specialVals.js > M test/built-ins/Math/log10/Log10-specialVals.js > M test/built-ins/Math/log2/log2-basicTests.js >-M test/built-ins/Math/prop-desc.js > M test/built-ins/Math/sign/sign-specialVals.js > M test/built-ins/Math/sinh/sinh-specialVals.js > M test/built-ins/Math/tanh/tanh-specialVals.js > M test/built-ins/Math/trunc/trunc-sampleTests.js > M test/built-ins/Math/trunc/trunc-specialVals.js >-A test/built-ins/Object/assign/strings-and-symbol-order.js >-A test/built-ins/Object/keys/property-traps-order-with-proxied-array.js >-D test/built-ins/Reflect/Reflect.js >-A test/built-ins/Reflect/prop-desc.js >-D test/built-ins/Reflect/properties.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/internal-regexp-lastindex-not-zero.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/isregexp-internal-regexp-is-false.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/isregexp-internal-regexp-throws.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/isregexp-this-throws.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/length.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/name.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/prop-desc.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/regexpcreate-this-throws.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-get-constructor-throws.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-get-species-throws.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-is-not-object-throws.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-is-undefined.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-species-is-not-constructor.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-species-is-null-or-undefined.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-species-throws.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/species-constructor.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/species-regexp-get-global-throws.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/species-regexp-get-unicode-throws.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/string-tostring-throws.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/string-tostring.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/this-get-flags-throws.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/this-get-flags.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/this-lastindex-cached.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/this-not-object-throws.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/this-tolength-lastindex-throws.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/this-tostring-flags-throws.js >-A test/built-ins/RegExp/prototype/Symbol.matchAll/this-tostring-flags.js >-A test/built-ins/RegExpStringIteratorPrototype/Symbol.toStringTag.js >-A test/built-ins/RegExpStringIteratorPrototype/ancestry.js >-A test/built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-call-throws.js >-A test/built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-get-throws.js >-A test/built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-match-get-0-throws.js >-A test/built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-match-get-0-tostring-throws.js >-A test/built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-match-get-0-tostring.js >-A test/built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec-not-callable.js >-A test/built-ins/RegExpStringIteratorPrototype/next/custom-regexpexec.js >-A test/built-ins/RegExpStringIteratorPrototype/next/length.js >-A test/built-ins/RegExpStringIteratorPrototype/next/name.js >-A test/built-ins/RegExpStringIteratorPrototype/next/next-iteration-global.js >-A test/built-ins/RegExpStringIteratorPrototype/next/next-iteration.js >-A test/built-ins/RegExpStringIteratorPrototype/next/next-missing-internal-slots.js >-A test/built-ins/RegExpStringIteratorPrototype/next/prop-desc.js >-A test/built-ins/RegExpStringIteratorPrototype/next/regexp-tolength-lastindex-throws.js >-A test/built-ins/RegExpStringIteratorPrototype/next/this-is-not-object-throws.js >-A test/built-ins/String/prototype/matchAll/length.js >-A test/built-ins/String/prototype/matchAll/name.js >-A test/built-ins/String/prototype/matchAll/prop-desc.js >-A test/built-ins/String/prototype/matchAll/regexp-get-matchAll-throws.js >-A test/built-ins/String/prototype/matchAll/regexp-is-null.js >-A test/built-ins/String/prototype/matchAll/regexp-is-undefined.js >-A test/built-ins/String/prototype/matchAll/regexp-matchAll-invocation.js >-A test/built-ins/String/prototype/matchAll/regexp-matchAll-throws.js >-A test/built-ins/String/prototype/matchAll/regexp-prototype-get-matchAll-throws.js >-A test/built-ins/String/prototype/matchAll/regexp-prototype-has-no-matchAll.js >-A test/built-ins/String/prototype/matchAll/regexp-prototype-matchAll-invocation.js >-A test/built-ins/String/prototype/matchAll/regexp-prototype-matchAll-throws.js >-A test/built-ins/String/prototype/matchAll/this-val-non-obj-coercible.js >-A test/built-ins/Symbol/matchAll/cross-realm.js >-A test/built-ins/Symbol/matchAll/prop-desc.js >-M test/harness/testTypedArray.js >-A test/intl402/Array/prototype/toLocaleString/calls-toLocaleString-number-elements.js >-M test/intl402/Intl/getCanonicalLocales/invalid-tags.js >-A test/intl402/Locale/constructor-newtarget-undefined.js >-A test/intl402/Locale/constructor-options-calendar-invalid.js >-A test/intl402/Locale/constructor-options-calendar-valid.js >-A test/intl402/Locale/constructor-options-language-invalid.js >-A test/intl402/Locale/constructor-options-language-valid.js >-A test/intl402/Locale/constructor-options-region-invalid.js >-A test/intl402/Locale/constructor-options-region-valid.js >-A test/intl402/Locale/constructor-options-script-invalid.js >-A test/intl402/Locale/constructor-options-script-valid.js >-A test/intl402/Locale/function-prototype.js >-A test/intl402/Locale/instance-extensibility.js >-A test/intl402/Locale/instance.js >-A test/intl402/Locale/invalid-tag-throws-boolean.js >-A test/intl402/Locale/invalid-tag-throws-null.js >-A test/intl402/Locale/invalid-tag-throws-number.js >-A test/intl402/Locale/invalid-tag-throws-symbol.js >-A test/intl402/Locale/invalid-tag-throws-undefined.js >-A test/intl402/Locale/invalid-tag-throws.js >-A test/intl402/Locale/length.js >-A test/intl402/Locale/name.js >-A test/intl402/Locale/prop-desc.js >-A test/intl402/Locale/prototype/constructor.js >-A test/intl402/Locale/prototype/maximize/length.js >-A test/intl402/Locale/prototype/maximize/name.js >-A test/intl402/Locale/prototype/maximize/prop-desc.js >-A test/intl402/Locale/prototype/prop-desc.js >-A test/intl402/Locale/prototype/toStringTag.js >-A test/intl402/TypedArray/prototype/toLocaleString/calls-toLocaleString-number-elements.js >-M test/language/asi/S7.9_A11_T8.js >-M test/language/asi/S7.9_A4.js >-M test/language/asi/S7.9_A5.1_T1.js >-M test/language/asi/S7.9_A5.3_T1.js >-A test/language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration-nested-in-function.js >-M test/language/destructuring/binding/initialization-requires-object-coercible-null.js >-M test/language/destructuring/binding/initialization-requires-object-coercible-undefined.js >-M test/language/destructuring/binding/initialization-returns-normal-completion-for-empty-objects.js >-M test/language/destructuring/binding/syntax/array-elements-with-initializer.js >-M test/language/destructuring/binding/syntax/array-elements-with-object-patterns.js >-M test/language/destructuring/binding/syntax/array-elements-without-initializer.js >-M test/language/destructuring/binding/syntax/array-pattern-with-elisions.js >-M test/language/destructuring/binding/syntax/array-pattern-with-no-elements.js >-M test/language/destructuring/binding/syntax/array-rest-elements.js >-M test/language/destructuring/binding/syntax/object-pattern-with-no-property-list.js >-M test/language/destructuring/binding/syntax/property-list-bindings-elements.js >-M test/language/destructuring/binding/syntax/property-list-followed-by-a-single-comma.js >-M test/language/destructuring/binding/syntax/property-list-single-name-bindings.js >-M test/language/destructuring/binding/syntax/property-list-with-property-list.js >-M test/language/destructuring/binding/syntax/recursive-array-and-object-patterns.js >-R065 test/language/eval-code/direct/block-decl-strict-source.js test/language/eval-code/direct/block-decl-eval-source-is-strict-nostrict.js >-A test/language/eval-code/direct/block-decl-eval-source-is-strict-onlystrict.js >-R068 test/language/eval-code/direct/block-decl-strict-caller.js test/language/eval-code/direct/block-decl-onlystrict.js >-R066 test/language/eval-code/direct/switch-case-decl-strict-source.js test/language/eval-code/direct/switch-case-decl-eval-source-is-strict-nostrict.js >-A test/language/eval-code/direct/switch-case-decl-eval-source-is-strict-onlystrict.js >-R068 test/language/eval-code/direct/switch-case-decl-strict-caller.js test/language/eval-code/direct/switch-case-decl-onlystrict.js >-R066 test/language/eval-code/direct/switch-dflt-decl-strict-source.js test/language/eval-code/direct/switch-dflt-decl-eval-source-is-strict-nostrict.js >-A test/language/eval-code/direct/switch-dflt-decl-eval-source-is-strict-onlystrict.js >-R068 test/language/eval-code/direct/switch-dflt-decl-strict-caller.js test/language/eval-code/direct/switch-dflt-decl-onlystrict.js >-A test/language/expressions/async-arrow-function/await-as-param-ident-nested-arrow-parameter-position.js >-A test/language/expressions/async-arrow-function/await-as-param-nested-arrow-body-position.js >-A test/language/expressions/async-arrow-function/await-as-param-nested-arrow-parameter-position.js >-A test/language/expressions/async-arrow-function/await-as-param-rest-nested-arrow-parameter-position.js >-A test/language/expressions/async-arrow-function/escaped-async-line-terminator.js >-A test/language/expressions/async-generator/generator-created-after-decl-inst.js >-A test/language/expressions/class/class-name-ident-await-escaped-module.js >-A test/language/expressions/class/class-name-ident-await-escaped.js >-A test/language/expressions/class/class-name-ident-await-module.js >-A test/language/expressions/class/class-name-ident-await.js >-A test/language/expressions/class/class-name-ident-let-escaped.js >-A test/language/expressions/class/class-name-ident-let.js >-A test/language/expressions/class/class-name-ident-static-escaped.js >-A test/language/expressions/class/class-name-ident-static.js >-A test/language/expressions/class/class-name-ident-yield-escaped.js >-A test/language/expressions/class/class-name-ident-yield.js >-A test/language/expressions/class/constructor-this-tdz-during-initializers.js >-A test/language/expressions/class/fields-run-once-on-double-super.js >-A test/language/expressions/generators/generator-created-after-decl-inst.js >-A test/language/expressions/greater-than/bigint-and-boolean.js >-A test/language/expressions/greater-than/bigint-and-incomparable-string.js >-A test/language/expressions/greater-than/bigint-and-string.js >+R100 test/built-ins/Object/internals/DefineOwnProperty/consistent-value-regexp-$1.js test/built-ins/Object/internals/DefineOwnProperty/consistent-value-regexp-dollar1.js >+R100 test/built-ins/Object/internals/DefineOwnProperty/consistent-writable-regexp-$1.js test/built-ins/Object/internals/DefineOwnProperty/consistent-writable-regexp-dollar1.js >+M test/intl402/Intl/getCanonicalLocales/descriptor.js >+M test/intl402/Intl/getCanonicalLocales/duplicates.js >+A test/intl402/Locale/constructor-getter-order.js >+A test/intl402/Locale/constructor-locale-object.js >+A test/intl402/Locale/constructor-non-iana-canon.js >+A test/intl402/Locale/constructor-options-casefirst-invalid.js >+A test/intl402/Locale/constructor-options-casefirst-valid.js >+A test/intl402/Locale/constructor-options-collation-invalid.js >+A test/intl402/Locale/constructor-options-collation-valid.js >+A test/intl402/Locale/constructor-options-hourcycle-invalid.js >+A test/intl402/Locale/constructor-options-hourcycle-valid.js >+A test/intl402/Locale/constructor-options-language-grandfathered.js >+M test/intl402/Locale/constructor-options-language-valid.js >+A test/intl402/Locale/constructor-options-numberingsystem-invalid.js >+A test/intl402/Locale/constructor-options-numberingsystem-valid.js >+A test/intl402/Locale/constructor-options-numeric-valid.js >+M test/intl402/Locale/constructor-options-region-valid.js >+M test/intl402/Locale/constructor-options-script-valid.js >+A test/intl402/Locale/constructor-parse-twice.js >+A test/intl402/Locale/constructor-tag-tostring.js >+A test/intl402/Locale/constructor-unicode-ext-invalid.js >+A test/intl402/Locale/constructor-unicode-ext-valid.js >+A test/intl402/Locale/extensions-grandfathered.js >+A test/intl402/Locale/extensions-private.js >+A test/intl402/Locale/getters-grandfathered.js >+A test/intl402/Locale/getters-missing.js >+A test/intl402/Locale/getters-privateuse.js >+A test/intl402/Locale/getters.js >+M test/intl402/Locale/invalid-tag-throws-symbol.js >+A test/intl402/Locale/likely-subtags-grandfathered.js >+M test/intl402/Locale/prop-desc.js >+A test/intl402/Locale/prototype/baseName/prop-desc.js >+A test/intl402/Locale/prototype/calendar/prop-desc.js >+A test/intl402/Locale/prototype/caseFirst/prop-desc.js >+A test/intl402/Locale/prototype/collation/prop-desc.js >+R100 test/intl402/Locale/prototype/constructor.js test/intl402/Locale/prototype/constructor/prop-desc.js >+A test/intl402/Locale/prototype/hourCycle/prop-desc.js >+A test/intl402/Locale/prototype/language/prop-desc.js >+M test/intl402/Locale/prototype/maximize/length.js >+M test/intl402/Locale/prototype/maximize/prop-desc.js >+A test/intl402/Locale/prototype/minimize/length.js >+A test/intl402/Locale/prototype/minimize/name.js >+A test/intl402/Locale/prototype/minimize/prop-desc.js >+A test/intl402/Locale/prototype/numberingSystem/prop-desc.js >+A test/intl402/Locale/prototype/numeric/prop-desc.js >+A test/intl402/Locale/prototype/region/prop-desc.js >+A test/intl402/Locale/prototype/script/prop-desc.js >+A test/intl402/Locale/prototype/toString/prop-desc.js >+R100 test/intl402/Locale/prototype/toStringTag.js test/intl402/Locale/prototype/toStringTag/toStringTag.js >+M test/intl402/Number/prototype/toLocaleString/length.js >+M test/intl402/NumberFormat/length.js >+M test/intl402/NumberFormat/name.js >+M test/intl402/NumberFormat/prop-desc.js >+M test/intl402/PluralRules/length.js >+M test/intl402/PluralRules/name.js >+A test/intl402/PluralRules/prop-desc.js >+M test/language/expressions/addition/bigint-and-number.js >+M test/language/expressions/addition/bigint-arithmetic.js >+M test/language/expressions/addition/bigint-errors.js >+M test/language/expressions/addition/bigint-toprimitive.js >+M test/language/expressions/addition/bigint-wrapped-values.js >+M test/language/expressions/bitwise-and/bigint-and-number.js >+M test/language/expressions/bitwise-and/bigint-errors.js >+M test/language/expressions/bitwise-and/bigint-non-primitive.js >+M test/language/expressions/bitwise-and/bigint-toprimitive.js >+M test/language/expressions/bitwise-and/bigint-wrapped-values.js >+M test/language/expressions/bitwise-not/bigint-non-primitive.js >+M test/language/expressions/bitwise-or/bigint-and-number.js >+M test/language/expressions/bitwise-or/bigint-errors.js >+M test/language/expressions/bitwise-or/bigint-non-primitive.js >+M test/language/expressions/bitwise-or/bigint-toprimitive.js >+M test/language/expressions/bitwise-or/bigint-wrapped-values.js >+M test/language/expressions/bitwise-xor/bigint-and-number.js >+M test/language/expressions/bitwise-xor/bigint-errors.js >+M test/language/expressions/bitwise-xor/bigint-non-primitive.js >+M test/language/expressions/bitwise-xor/bigint-toprimitive.js >+M test/language/expressions/bitwise-xor/bigint-wrapped-values.js >+M test/language/expressions/division/bigint-and-number.js >+M test/language/expressions/division/bigint-arithmetic.js >+M test/language/expressions/division/bigint-complex-infinity.js >+M test/language/expressions/division/bigint-errors.js >+M test/language/expressions/division/bigint-toprimitive.js >+M test/language/expressions/division/bigint-wrapped-values.js >+M test/language/expressions/does-not-equals/bigint-and-bigint.js >+M test/language/expressions/does-not-equals/bigint-and-boolean.js >+M test/language/expressions/does-not-equals/bigint-and-incomparable-primitive.js >+M test/language/expressions/does-not-equals/bigint-and-non-finite.js >+M test/language/expressions/does-not-equals/bigint-and-number-extremes.js >+M test/language/expressions/does-not-equals/bigint-and-number.js >+M test/language/expressions/does-not-equals/bigint-and-object.js >+M test/language/expressions/does-not-equals/bigint-and-string.js >+M test/language/expressions/equals/bigint-and-bigint.js >+M test/language/expressions/equals/bigint-and-boolean.js >+M test/language/expressions/equals/bigint-and-incomparable-primitive.js >+M test/language/expressions/equals/bigint-and-non-finite.js >+M test/language/expressions/equals/bigint-and-number-extremes.js >+M test/language/expressions/equals/bigint-and-number.js >+M test/language/expressions/equals/bigint-and-object.js >+M test/language/expressions/equals/bigint-and-string.js >+M test/language/expressions/exponentiation/bigint-and-number.js >+M test/language/expressions/exponentiation/bigint-arithmetic.js >+M test/language/expressions/exponentiation/bigint-errors.js >+R074 test/language/expressions/exponentiation/bigint-exp-operator-negative-throws.js test/language/expressions/exponentiation/bigint-negative-exponent-throws.js >+M test/language/expressions/exponentiation/bigint-toprimitive.js >+M test/language/expressions/exponentiation/bigint-wrapped-values.js >+M test/language/expressions/exponentiation/bigint-zero-base-zero-exponent.js >+M test/language/expressions/greater-than/11.8.2-1.js >+M test/language/expressions/greater-than/11.8.2-2.js >+M test/language/expressions/greater-than/11.8.2-3.js >+M test/language/expressions/greater-than/11.8.2-4.js >+M test/language/expressions/greater-than/bigint-and-bigint.js >+M test/language/expressions/greater-than/bigint-and-boolean.js >+M test/language/expressions/greater-than/bigint-and-incomparable-string.js >+M test/language/expressions/greater-than/bigint-and-non-finite.js >+M test/language/expressions/greater-than/bigint-and-number-extremes.js >+M test/language/expressions/greater-than/bigint-and-number.js >+M test/language/expressions/greater-than/bigint-and-string.js > A test/language/expressions/greater-than/bigint-and-symbol.js >-A test/language/expressions/greater-than-or-equal/bigint-and-incomparable-string.js >-A test/language/expressions/greater-than-or-equal/bigint-and-string.js >-A test/language/expressions/less-than/bigint-and-boolean.js >-A test/language/expressions/less-than/bigint-and-incomparable-string.js >-A test/language/expressions/less-than/bigint-and-string.js >+M test/language/expressions/greater-than-or-equal/bigint-and-bigint.js >+M test/language/expressions/greater-than-or-equal/bigint-and-incomparable-string.js >+M test/language/expressions/greater-than-or-equal/bigint-and-non-finite.js >+M test/language/expressions/greater-than-or-equal/bigint-and-number-extremes.js >+M test/language/expressions/greater-than-or-equal/bigint-and-number.js >+M test/language/expressions/greater-than-or-equal/bigint-and-string.js >+M test/language/expressions/left-shift/bigint-and-number.js >+M test/language/expressions/left-shift/bigint-errors.js >+M test/language/expressions/left-shift/bigint-non-primitive.js >+M test/language/expressions/left-shift/bigint-toprimitive.js >+M test/language/expressions/left-shift/bigint-wrapped-values.js >+M test/language/expressions/less-than/bigint-and-bigint.js >+M test/language/expressions/less-than/bigint-and-boolean.js >+M test/language/expressions/less-than/bigint-and-incomparable-string.js >+M test/language/expressions/less-than/bigint-and-non-finite.js >+M test/language/expressions/less-than/bigint-and-number-extremes.js >+M test/language/expressions/less-than/bigint-and-number.js >+M test/language/expressions/less-than/bigint-and-string.js > A test/language/expressions/less-than/bigint-and-symbol.js >-A test/language/expressions/less-than-or-equal/bigint-and-incomparable-string.js >-A test/language/expressions/less-than-or-equal/bigint-and-string.js >-M test/language/expressions/object/method-definition/generator-super-prop-param.js >-R074 test/language/function-code/block-decl-strict.js test/language/function-code/block-decl-onlystrict.js >-R073 test/language/function-code/switch-case-decl-strict.js test/language/function-code/switch-case-decl-onlystrict.js >-R073 test/language/function-code/switch-dflt-decl-strict.js test/language/function-code/switch-dflt-decl-onlystrict.js >-D test/language/line-terminators/S7.3_A2.3.js >-D test/language/line-terminators/S7.3_A2.4.js >-A test/language/literals/regexp/invalid-optional-lookbehind.js >-A test/language/literals/regexp/invalid-optional-negative-lookbehind.js >-A test/language/literals/regexp/invalid-range-lookbehind.js >-A test/language/literals/regexp/invalid-range-negative-lookbehind.js >-R100 test/language/literals/regexp/u-invalid-quantifiable-assertion.js test/language/literals/regexp/u-invalid-optional-lookahead.js >-A test/language/literals/regexp/u-invalid-optional-lookbehind.js >-A test/language/literals/regexp/u-invalid-optional-negative-lookahead.js >-A test/language/literals/regexp/u-invalid-optional-negative-lookbehind.js >-A test/language/literals/regexp/u-invalid-range-lookahead.js >-A test/language/literals/regexp/u-invalid-range-lookbehind.js >-A test/language/literals/regexp/u-invalid-range-negative-lookahead.js >-A test/language/literals/regexp/u-invalid-range-negative-lookbehind.js >-A test/language/literals/string/line-separator-eval.js >-A test/language/literals/string/line-separator.js >-A test/language/literals/string/paragraph-separator-eval.js >-A test/language/literals/string/paragraph-separator.js >-M test/language/module-code/early-strict-mode.js >-A test/language/statements/async-generator/generator-created-after-decl-inst.js >-M test/language/statements/break/S12.8_A8_T1.js >-M test/language/statements/break/S12.8_A8_T2.js >-A test/language/statements/class/class-name-ident-await-escaped-module.js >-A test/language/statements/class/class-name-ident-await-escaped.js >-A test/language/statements/class/class-name-ident-await-module.js >-A test/language/statements/class/class-name-ident-await.js >-A test/language/statements/class/class-name-ident-let-escaped.js >-A test/language/statements/class/class-name-ident-let.js >-A test/language/statements/class/class-name-ident-static-escaped.js >-A test/language/statements/class/class-name-ident-static.js >-A test/language/statements/class/class-name-ident-yield-escaped.js >-A test/language/statements/class/class-name-ident-yield.js >-M test/language/statements/continue/S12.7_A8_T1.js >-M test/language/statements/continue/S12.7_A8_T2.js >-A test/language/statements/generators/generator-created-after-decl-inst.js >-M test/language/statements/try/early-catch-duplicates.js >-A test/language/statements/try/early-catch-function.js >-M test/language/statements/try/early-catch-lex.js >-M test/language/statements/try/early-catch-var.js >\ No newline at end of file >+M test/language/expressions/less-than-or-equal/11.8.3-1.js >+M test/language/expressions/less-than-or-equal/11.8.3-2.js >+M test/language/expressions/less-than-or-equal/11.8.3-3.js >+M test/language/expressions/less-than-or-equal/11.8.3-4.js >+D test/language/expressions/less-than-or-equal/11.8.3-5.js >+M test/language/expressions/less-than-or-equal/bigint-and-bigint.js >+M test/language/expressions/less-than-or-equal/bigint-and-incomparable-string.js >+M test/language/expressions/less-than-or-equal/bigint-and-non-finite.js >+M test/language/expressions/less-than-or-equal/bigint-and-number-extremes.js >+M test/language/expressions/less-than-or-equal/bigint-and-number.js >+M test/language/expressions/less-than-or-equal/bigint-and-string.js >+M test/language/expressions/modulus/bigint-and-number.js >+M test/language/expressions/modulus/bigint-arithmetic.js >+M test/language/expressions/modulus/bigint-errors.js >+M test/language/expressions/modulus/bigint-modulo-zero.js >+M test/language/expressions/modulus/bigint-toprimitive.js >+M test/language/expressions/modulus/bigint-wrapped-values.js >+M test/language/expressions/multiplication/bigint-and-number.js >+M test/language/expressions/multiplication/bigint-arithmetic.js >+M test/language/expressions/multiplication/bigint-errors.js >+M test/language/expressions/multiplication/bigint-toprimitive.js >+M test/language/expressions/multiplication/bigint-wrapped-values.js >+M test/language/expressions/right-shift/bigint-and-number.js >+M test/language/expressions/right-shift/bigint-errors.js >+M test/language/expressions/right-shift/bigint-non-primitive.js >+M test/language/expressions/right-shift/bigint-toprimitive.js >+M test/language/expressions/right-shift/bigint-wrapped-values.js >+M test/language/expressions/strict-does-not-equals/bigint-and-bigint.js >+M test/language/expressions/strict-does-not-equals/bigint-and-boolean.js >+M test/language/expressions/strict-does-not-equals/bigint-and-incomparable-primitive.js >+M test/language/expressions/strict-does-not-equals/bigint-and-non-finite.js >+M test/language/expressions/strict-does-not-equals/bigint-and-number-extremes.js >+M test/language/expressions/strict-does-not-equals/bigint-and-number.js >+M test/language/expressions/strict-does-not-equals/bigint-and-object.js >+M test/language/expressions/strict-does-not-equals/bigint-and-string.js >+M test/language/expressions/strict-equals/bigint-and-bigint.js >+M test/language/expressions/strict-equals/bigint-and-boolean.js >+M test/language/expressions/strict-equals/bigint-and-incomparable-primitive.js >+M test/language/expressions/strict-equals/bigint-and-non-finite.js >+M test/language/expressions/strict-equals/bigint-and-number-extremes.js >+M test/language/expressions/strict-equals/bigint-and-number.js >+M test/language/expressions/strict-equals/bigint-and-object.js >+M test/language/expressions/strict-equals/bigint-and-string.js >+M test/language/expressions/subtraction/bigint-and-number.js >+M test/language/expressions/subtraction/bigint-arithmetic.js >+M test/language/expressions/subtraction/bigint-errors.js >+M test/language/expressions/subtraction/bigint-toprimitive.js >+M test/language/expressions/subtraction/bigint-wrapped-values.js >+M test/language/expressions/unary-minus/bigint-non-primitive.js >+M test/language/expressions/unary-plus/bigint-throws.js >+M test/language/expressions/unsigned-right-shift/bigint-and-number.js >+M test/language/expressions/unsigned-right-shift/bigint-errors.js >+M test/language/expressions/unsigned-right-shift/bigint-non-primitive.js >+M test/language/expressions/unsigned-right-shift/bigint-toprimitive.js >+M test/language/expressions/unsigned-right-shift/bigint-wrapped-values.js >+A test/language/literals/numeric/numeric-followed-by-ident.js >+A test/language/literals/string/line-continuation-double.js >+A test/language/literals/string/line-continuation-single.js >\ No newline at end of file >diff --git a/JSTests/test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-existing-global-init.js b/JSTests/test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-existing-global-init.js >index 2a13d176d62925a830dd42f7c44b589878dc9932..896d68fdfefcabb6cb0b0a560b2fde5469568cb6 100644 >--- a/JSTests/test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-existing-global-init.js >+++ b/JSTests/test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-existing-global-init.js >@@ -2,7 +2,7 @@ > // - src/annex-b-fns/eval-global-existing-global-init.case > // - src/annex-b-fns/eval-global/direct-block.template > /*--- >-description: Variable binding is set to `undefined` (Block statement in eval code containing a function declaration) >+description: Variable binding is left in place by legacy function hoisting (Block statement in eval code containing a function declaration) > esid: sec-web-compat-evaldeclarationinstantiation > es6id: B.3.3.3 > flags: [generated, noStrict] >@@ -12,17 +12,7 @@ > > [...] > i. If varEnvRec is a global Environment Record, then >- i. Perform ? varEnvRec.CreateGlobalFunctionBinding(F, undefined, true). >- [...] >- >- 8.1.1.4.18 CreateGlobalFunctionBinding >- >- [...] >- 5. If existingProp is undefined or existingProp.[[Configurable]] is true, >- then >- [...] >- 6. Else, >- a. Let desc be the PropertyDescriptor{[[Value]]: V }. >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). > [...] > > ---*/ >@@ -35,11 +25,18 @@ > > eval( > 'var global = fnGlobalObject();\ >- assert.sameValue(f, undefined, "binding is initialized to `undefined`");\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ > \ > verifyProperty(global, "f", {\ > enumerable: true,\ > writable: true,\ > configurable: false\ >- });{ function f() { } }' >+ }, { restore: true });{ function f() { } }' > ); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, "f", { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..b243c84a4ab67d93bec7b9c74b6e6338546d35bc >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/eval-code/direct/global-block-decl-eval-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,42 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/eval-global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/eval-global/direct-block.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (Block statement in eval code containing a function declaration) >+esid: sec-web-compat-evaldeclarationinstantiation >+es6id: B.3.3.3 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ B.3.3.3 Changes to EvalDeclarationInstantiation >+ >+ [...] >+ i. If varEnvRec is a global Environment Record, then >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+Object.defineProperty(fnGlobalObject(), 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+eval( >+ 'var global = fnGlobalObject();\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ >+ \ >+ verifyProperty(global, "f", {\ >+ enumerable: false,\ >+ writable: true,\ >+ configurable: true\ >+ }, { restore: true });{ function f() { } }' >+); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-global-init.js b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-global-init.js >index 00ea957a05c5f8dff08e46f607944a275d6b2fbe..3f7162529efc8da3031e80e7a47b2d71101c0ee2 100644 >--- a/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-global-init.js >+++ b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-global-init.js >@@ -2,7 +2,7 @@ > // - src/annex-b-fns/eval-global-existing-global-init.case > // - src/annex-b-fns/eval-global/direct-if-decl-else-decl-a.template > /*--- >-description: Variable binding is set to `undefined` (IfStatement with a declaration in both statement positions in eval code) >+description: Variable binding is left in place by legacy function hoisting (IfStatement with a declaration in both statement positions in eval code) > esid: sec-functiondeclarations-in-ifstatement-statement-clauses > es6id: B.3.3 > flags: [generated, noStrict] >@@ -21,17 +21,7 @@ > > [...] > i. If varEnvRec is a global Environment Record, then >- i. Perform ? varEnvRec.CreateGlobalFunctionBinding(F, undefined, true). >- [...] >- >- 8.1.1.4.18 CreateGlobalFunctionBinding >- >- [...] >- 5. If existingProp is undefined or existingProp.[[Configurable]] is true, >- then >- [...] >- 6. Else, >- a. Let desc be the PropertyDescriptor{[[Value]]: V }. >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). > [...] > > ---*/ >@@ -44,11 +34,18 @@ > > eval( > 'var global = fnGlobalObject();\ >- assert.sameValue(f, undefined, "binding is initialized to `undefined`");\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ > \ > verifyProperty(global, "f", {\ > enumerable: true,\ > writable: true,\ > configurable: false\ >- });if (true) function f() { } else function _f() {}' >+ }, { restore: true });if (true) function f() { } else function _f() {}' > ); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, "f", { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..af2ad025756832b62b758ab022d4becceb783534 >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,51 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/eval-global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/eval-global/direct-if-decl-else-decl-a.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement with a declaration in both statement positions in eval code) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.3 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to EvalDeclarationInstantiation >+ >+ [...] >+ i. If varEnvRec is a global Environment Record, then >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+Object.defineProperty(fnGlobalObject(), 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+eval( >+ 'var global = fnGlobalObject();\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ >+ \ >+ verifyProperty(global, "f", {\ >+ enumerable: false,\ >+ writable: true,\ >+ configurable: true\ >+ }, { restore: true });if (true) function f() { } else function _f() {}' >+); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-global-init.js b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-global-init.js >index 5f7133f00a7228856242f1f0b709f363852fe8b4..4b7657874bf3161bd672e3934bd2fa25f6f816f0 100644 >--- a/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-global-init.js >+++ b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-global-init.js >@@ -2,7 +2,7 @@ > // - src/annex-b-fns/eval-global-existing-global-init.case > // - src/annex-b-fns/eval-global/direct-if-decl-else-decl-b.template > /*--- >-description: Variable binding is set to `undefined` (IfStatement with a declaration in both statement positions in eval code) >+description: Variable binding is left in place by legacy function hoisting (IfStatement with a declaration in both statement positions in eval code) > esid: sec-functiondeclarations-in-ifstatement-statement-clauses > es6id: B.3.4 > flags: [generated, noStrict] >@@ -21,17 +21,7 @@ > > [...] > i. If varEnvRec is a global Environment Record, then >- i. Perform ? varEnvRec.CreateGlobalFunctionBinding(F, undefined, true). >- [...] >- >- 8.1.1.4.18 CreateGlobalFunctionBinding >- >- [...] >- 5. If existingProp is undefined or existingProp.[[Configurable]] is true, >- then >- [...] >- 6. Else, >- a. Let desc be the PropertyDescriptor{[[Value]]: V }. >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). > [...] > > ---*/ >@@ -44,11 +34,18 @@ > > eval( > 'var global = fnGlobalObject();\ >- assert.sameValue(f, undefined, "binding is initialized to `undefined`");\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ > \ > verifyProperty(global, "f", {\ > enumerable: true,\ > writable: true,\ > configurable: false\ >- });if (false) function _f() {} else function f() { }' >+ }, { restore: true });if (false) function _f() {} else function f() { }' > ); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, "f", { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..86b22c632178c8e9053537f5ee4f6466d3c41230 >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,51 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/eval-global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/eval-global/direct-if-decl-else-decl-b.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement with a declaration in both statement positions in eval code) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to EvalDeclarationInstantiation >+ >+ [...] >+ i. If varEnvRec is a global Environment Record, then >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+Object.defineProperty(fnGlobalObject(), 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+eval( >+ 'var global = fnGlobalObject();\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ >+ \ >+ verifyProperty(global, "f", {\ >+ enumerable: false,\ >+ writable: true,\ >+ configurable: true\ >+ }, { restore: true });if (false) function _f() {} else function f() { }' >+); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-global-init.js b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-global-init.js >index 43d20ce0f30120b71fbdde759a12ae8194d449b0..04cc9494e8155fb362b2662d1a04aa9add784888 100644 >--- a/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-global-init.js >+++ b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-global-init.js >@@ -2,7 +2,7 @@ > // - src/annex-b-fns/eval-global-existing-global-init.case > // - src/annex-b-fns/eval-global/direct-if-decl-else-stmt.template > /*--- >-description: Variable binding is set to `undefined` (IfStatement with a declaration in the first statement position in eval code) >+description: Variable binding is left in place by legacy function hoisting (IfStatement with a declaration in the first statement position in eval code) > esid: sec-functiondeclarations-in-ifstatement-statement-clauses > es6id: B.3.4 > flags: [generated, noStrict] >@@ -21,17 +21,7 @@ > > [...] > i. If varEnvRec is a global Environment Record, then >- i. Perform ? varEnvRec.CreateGlobalFunctionBinding(F, undefined, true). >- [...] >- >- 8.1.1.4.18 CreateGlobalFunctionBinding >- >- [...] >- 5. If existingProp is undefined or existingProp.[[Configurable]] is true, >- then >- [...] >- 6. Else, >- a. Let desc be the PropertyDescriptor{[[Value]]: V }. >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). > [...] > > ---*/ >@@ -44,11 +34,18 @@ > > eval( > 'var global = fnGlobalObject();\ >- assert.sameValue(f, undefined, "binding is initialized to `undefined`");\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ > \ > verifyProperty(global, "f", {\ > enumerable: true,\ > writable: true,\ > configurable: false\ >- });if (true) function f() { } else ;' >+ }, { restore: true });if (true) function f() { } else ;' > ); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, "f", { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..93a54c854c6ade90bd97e20e1a607f3fcc9e357e >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,51 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/eval-global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/eval-global/direct-if-decl-else-stmt.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement with a declaration in the first statement position in eval code) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to EvalDeclarationInstantiation >+ >+ [...] >+ i. If varEnvRec is a global Environment Record, then >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+Object.defineProperty(fnGlobalObject(), 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+eval( >+ 'var global = fnGlobalObject();\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ >+ \ >+ verifyProperty(global, "f", {\ >+ enumerable: false,\ >+ writable: true,\ >+ configurable: true\ >+ }, { restore: true });if (true) function f() { } else ;' >+); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-global-init.js b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-global-init.js >index 00018f0333ce5698dafb214ecce43b6ac0a01a98..84f8eaa7f85bf492f65cea1bb677f6919211d6b2 100644 >--- a/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-global-init.js >+++ b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-global-init.js >@@ -2,7 +2,7 @@ > // - src/annex-b-fns/eval-global-existing-global-init.case > // - src/annex-b-fns/eval-global/direct-if-decl-no-else.template > /*--- >-description: Variable binding is set to `undefined` (IfStatement without an else clause in eval code) >+description: Variable binding is left in place by legacy function hoisting (IfStatement without an else clause in eval code) > esid: sec-functiondeclarations-in-ifstatement-statement-clauses > es6id: B.3.4 > flags: [generated, noStrict] >@@ -21,17 +21,7 @@ > > [...] > i. If varEnvRec is a global Environment Record, then >- i. Perform ? varEnvRec.CreateGlobalFunctionBinding(F, undefined, true). >- [...] >- >- 8.1.1.4.18 CreateGlobalFunctionBinding >- >- [...] >- 5. If existingProp is undefined or existingProp.[[Configurable]] is true, >- then >- [...] >- 6. Else, >- a. Let desc be the PropertyDescriptor{[[Value]]: V }. >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). > [...] > > ---*/ >@@ -44,11 +34,18 @@ > > eval( > 'var global = fnGlobalObject();\ >- assert.sameValue(f, undefined, "binding is initialized to `undefined`");\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ > \ > verifyProperty(global, "f", {\ > enumerable: true,\ > writable: true,\ > configurable: false\ >- });if (true) function f() { }' >+ }, { restore: true });if (true) function f() { }' > ); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, "f", { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..3a8fb4c2eaef1d14deaa941efc44f1eebe35a79f >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,51 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/eval-global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/eval-global/direct-if-decl-no-else.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement without an else clause in eval code) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to EvalDeclarationInstantiation >+ >+ [...] >+ i. If varEnvRec is a global Environment Record, then >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+Object.defineProperty(fnGlobalObject(), 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+eval( >+ 'var global = fnGlobalObject();\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ >+ \ >+ verifyProperty(global, "f", {\ >+ enumerable: false,\ >+ writable: true,\ >+ configurable: true\ >+ }, { restore: true });if (true) function f() { }' >+); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-global-init.js b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-global-init.js >index 6162b8fa9dc2390436d8093049a72117ab5e642f..c921002a53dea8119e570c1a5e849f2e2a4f0703 100644 >--- a/JSTests/test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-global-init.js >+++ b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-global-init.js >@@ -2,7 +2,7 @@ > // - src/annex-b-fns/eval-global-existing-global-init.case > // - src/annex-b-fns/eval-global/direct-if-stmt-else-decl.template > /*--- >-description: Variable binding is set to `undefined` (IfStatement with a declaration in the second statement position in eval code) >+description: Variable binding is left in place by legacy function hoisting (IfStatement with a declaration in the second statement position in eval code) > esid: sec-functiondeclarations-in-ifstatement-statement-clauses > es6id: B.3.4 > flags: [generated, noStrict] >@@ -21,17 +21,7 @@ > > [...] > i. If varEnvRec is a global Environment Record, then >- i. Perform ? varEnvRec.CreateGlobalFunctionBinding(F, undefined, true). >- [...] >- >- 8.1.1.4.18 CreateGlobalFunctionBinding >- >- [...] >- 5. If existingProp is undefined or existingProp.[[Configurable]] is true, >- then >- [...] >- 6. Else, >- a. Let desc be the PropertyDescriptor{[[Value]]: V }. >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). > [...] > > ---*/ >@@ -44,11 +34,18 @@ > > eval( > 'var global = fnGlobalObject();\ >- assert.sameValue(f, undefined, "binding is initialized to `undefined`");\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ > \ > verifyProperty(global, "f", {\ > enumerable: true,\ > writable: true,\ > configurable: false\ >- });if (false) ; else function f() { }' >+ }, { restore: true });if (false) ; else function f() { }' > ); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, "f", { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..a94cd19098dc5de4120bc9327979ff17c43a3ef5 >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,51 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/eval-global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/eval-global/direct-if-stmt-else-decl.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement with a declaration in the second statement position in eval code) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to EvalDeclarationInstantiation >+ >+ [...] >+ i. If varEnvRec is a global Environment Record, then >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+Object.defineProperty(fnGlobalObject(), 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+eval( >+ 'var global = fnGlobalObject();\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ >+ \ >+ verifyProperty(global, "f", {\ >+ enumerable: false,\ >+ writable: true,\ >+ configurable: true\ >+ }, { restore: true });if (false) ; else function f() { }' >+); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-existing-global-init.js b/JSTests/test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-existing-global-init.js >index 2fcad46604df8c23af43df3201ab4e6a9a5d99e1..64f56aa291a769a409c000f8ba25ee6a4c8fd077 100644 >--- a/JSTests/test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-existing-global-init.js >+++ b/JSTests/test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-existing-global-init.js >@@ -2,7 +2,7 @@ > // - src/annex-b-fns/eval-global-existing-global-init.case > // - src/annex-b-fns/eval-global/direct-switch-case.template > /*--- >-description: Variable binding is set to `undefined` (Function declaration in the `case` clause of a `switch` statement in eval code) >+description: Variable binding is left in place by legacy function hoisting (Function declaration in the `case` clause of a `switch` statement in eval code) > esid: sec-web-compat-evaldeclarationinstantiation > es6id: B.3.3.3 > flags: [generated, noStrict] >@@ -12,17 +12,7 @@ > > [...] > i. If varEnvRec is a global Environment Record, then >- i. Perform ? varEnvRec.CreateGlobalFunctionBinding(F, undefined, true). >- [...] >- >- 8.1.1.4.18 CreateGlobalFunctionBinding >- >- [...] >- 5. If existingProp is undefined or existingProp.[[Configurable]] is true, >- then >- [...] >- 6. Else, >- a. Let desc be the PropertyDescriptor{[[Value]]: V }. >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). > [...] > > ---*/ >@@ -35,15 +25,22 @@ > > eval( > 'var global = fnGlobalObject();\ >- assert.sameValue(f, undefined, "binding is initialized to `undefined`");\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ > \ > verifyProperty(global, "f", {\ > enumerable: true,\ > writable: true,\ > configurable: false\ >- });switch (1) {' + >+ }, { restore: true });switch (1) {' + > ' case 1:' + > ' function f() { }' + > '}\ > ' > ); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, "f", { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..eef493c4ecbc85eee67e0027b19208bf658786ad >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/eval-code/direct/global-switch-case-eval-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,46 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/eval-global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/eval-global/direct-switch-case.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (Function declaration in the `case` clause of a `switch` statement in eval code) >+esid: sec-web-compat-evaldeclarationinstantiation >+es6id: B.3.3.3 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ B.3.3.3 Changes to EvalDeclarationInstantiation >+ >+ [...] >+ i. If varEnvRec is a global Environment Record, then >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+Object.defineProperty(fnGlobalObject(), 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+eval( >+ 'var global = fnGlobalObject();\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ >+ \ >+ verifyProperty(global, "f", {\ >+ enumerable: false,\ >+ writable: true,\ >+ configurable: true\ >+ }, { restore: true });switch (1) {' + >+ ' case 1:' + >+ ' function f() { }' + >+ '}\ >+ ' >+); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-existing-global-init.js b/JSTests/test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-existing-global-init.js >index 2648596bd889f9d3b68851059875775d89208b19..663804a3eacbb77a56d9ba8d1ffa2fcc783b32e0 100644 >--- a/JSTests/test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-existing-global-init.js >+++ b/JSTests/test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-existing-global-init.js >@@ -2,7 +2,7 @@ > // - src/annex-b-fns/eval-global-existing-global-init.case > // - src/annex-b-fns/eval-global/direct-switch-dflt.template > /*--- >-description: Variable binding is set to `undefined` (Funtion declaration in the `default` clause of a `switch` statement in eval code in the global scope) >+description: Variable binding is left in place by legacy function hoisting (Funtion declaration in the `default` clause of a `switch` statement in eval code in the global scope) > esid: sec-web-compat-evaldeclarationinstantiation > es6id: B.3.3.3 > flags: [generated, noStrict] >@@ -12,17 +12,7 @@ > > [...] > i. If varEnvRec is a global Environment Record, then >- i. Perform ? varEnvRec.CreateGlobalFunctionBinding(F, undefined, true). >- [...] >- >- 8.1.1.4.18 CreateGlobalFunctionBinding >- >- [...] >- 5. If existingProp is undefined or existingProp.[[Configurable]] is true, >- then >- [...] >- 6. Else, >- a. Let desc be the PropertyDescriptor{[[Value]]: V }. >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). > [...] > > ---*/ >@@ -35,15 +25,22 @@ > > eval( > 'var global = fnGlobalObject();\ >- assert.sameValue(f, undefined, "binding is initialized to `undefined`");\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ > \ > verifyProperty(global, "f", {\ > enumerable: true,\ > writable: true,\ > configurable: false\ >- });switch (1) {' + >+ }, { restore: true });switch (1) {' + > ' default:' + > ' function f() { }' + > '}\ > ' > ); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, "f", { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..e00f662b695f53a712e72d22e6fabcb436bea2d6 >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/eval-code/direct/global-switch-dflt-eval-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,46 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/eval-global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/eval-global/direct-switch-dflt.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (Funtion declaration in the `default` clause of a `switch` statement in eval code in the global scope) >+esid: sec-web-compat-evaldeclarationinstantiation >+es6id: B.3.3.3 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ B.3.3.3 Changes to EvalDeclarationInstantiation >+ >+ [...] >+ i. If varEnvRec is a global Environment Record, then >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+Object.defineProperty(fnGlobalObject(), 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+eval( >+ 'var global = fnGlobalObject();\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ >+ \ >+ verifyProperty(global, "f", {\ >+ enumerable: false,\ >+ writable: true,\ >+ configurable: true\ >+ }, { restore: true });switch (1) {' + >+ ' default:' + >+ ' function f() { }' + >+ '}\ >+ ' >+); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-existing-global-init.js b/JSTests/test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-existing-global-init.js >index e4b70a43b295bce9c2fe19aa4b29037e8db5ffb7..cbed95ce735db952770184026a0f50901d40f9b9 100644 >--- a/JSTests/test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-existing-global-init.js >+++ b/JSTests/test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-existing-global-init.js >@@ -2,7 +2,7 @@ > // - src/annex-b-fns/eval-global-existing-global-init.case > // - src/annex-b-fns/eval-global/indirect-block.template > /*--- >-description: Variable binding is set to `undefined` (Block statement in eval code containing a function declaration) >+description: Variable binding is left in place by legacy function hoisting (Block statement in eval code containing a function declaration) > esid: sec-web-compat-evaldeclarationinstantiation > es6id: B.3.3.3 > flags: [generated, noStrict] >@@ -12,17 +12,7 @@ > > [...] > i. If varEnvRec is a global Environment Record, then >- i. Perform ? varEnvRec.CreateGlobalFunctionBinding(F, undefined, true). >- [...] >- >- 8.1.1.4.18 CreateGlobalFunctionBinding >- >- [...] >- 5. If existingProp is undefined or existingProp.[[Configurable]] is true, >- then >- [...] >- 6. Else, >- a. Let desc be the PropertyDescriptor{[[Value]]: V }. >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). > [...] > > ---*/ >@@ -35,11 +25,18 @@ > > (0,eval)( > 'var global = fnGlobalObject();\ >- assert.sameValue(f, undefined, "binding is initialized to `undefined`");\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ > \ > verifyProperty(global, "f", {\ > enumerable: true,\ > writable: true,\ > configurable: false\ >- });{ function f() { } }' >+ }, { restore: true });{ function f() { } }' > ); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, "f", { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..30384c147cad772568a3bad02a7b8dfa9b8f957c >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/eval-code/indirect/global-block-decl-eval-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,42 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/eval-global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/eval-global/indirect-block.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (Block statement in eval code containing a function declaration) >+esid: sec-web-compat-evaldeclarationinstantiation >+es6id: B.3.3.3 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ B.3.3.3 Changes to EvalDeclarationInstantiation >+ >+ [...] >+ i. If varEnvRec is a global Environment Record, then >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+Object.defineProperty(fnGlobalObject(), 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+(0,eval)( >+ 'var global = fnGlobalObject();\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ >+ \ >+ verifyProperty(global, "f", {\ >+ enumerable: false,\ >+ writable: true,\ >+ configurable: true\ >+ }, { restore: true });{ function f() { } }' >+); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-global-init.js b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-global-init.js >index c4bfe800e7d94d34df46e85a6b3e06ab36ff2593..6be3b2cad135864d76f7dd04e41e3378ef677dc1 100644 >--- a/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-global-init.js >+++ b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-global-init.js >@@ -2,7 +2,7 @@ > // - src/annex-b-fns/eval-global-existing-global-init.case > // - src/annex-b-fns/eval-global/indirect-if-decl-else-decl-a.template > /*--- >-description: Variable binding is set to `undefined` (IfStatement with a declaration in both statement positions in eval code) >+description: Variable binding is left in place by legacy function hoisting (IfStatement with a declaration in both statement positions in eval code) > esid: sec-functiondeclarations-in-ifstatement-statement-clauses > es6id: B.3.3 > flags: [generated, noStrict] >@@ -21,17 +21,7 @@ > > [...] > i. If varEnvRec is a global Environment Record, then >- i. Perform ? varEnvRec.CreateGlobalFunctionBinding(F, undefined, true). >- [...] >- >- 8.1.1.4.18 CreateGlobalFunctionBinding >- >- [...] >- 5. If existingProp is undefined or existingProp.[[Configurable]] is true, >- then >- [...] >- 6. Else, >- a. Let desc be the PropertyDescriptor{[[Value]]: V }. >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). > [...] > > ---*/ >@@ -44,11 +34,18 @@ > > (0,eval)( > 'var global = fnGlobalObject();\ >- assert.sameValue(f, undefined, "binding is initialized to `undefined`");\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ > \ > verifyProperty(global, "f", {\ > enumerable: true,\ > writable: true,\ > configurable: false\ >- });if (true) function f() { } else function _f() {}' >+ }, { restore: true });if (true) function f() { } else function _f() {}' > ); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, "f", { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..2b74b797771a956e080b76d2649bb87ed6d2b7eb >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,51 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/eval-global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/eval-global/indirect-if-decl-else-decl-a.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement with a declaration in both statement positions in eval code) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.3 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to EvalDeclarationInstantiation >+ >+ [...] >+ i. If varEnvRec is a global Environment Record, then >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+Object.defineProperty(fnGlobalObject(), 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+(0,eval)( >+ 'var global = fnGlobalObject();\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ >+ \ >+ verifyProperty(global, "f", {\ >+ enumerable: false,\ >+ writable: true,\ >+ configurable: true\ >+ }, { restore: true });if (true) function f() { } else function _f() {}' >+); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-global-init.js b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-global-init.js >index c5944b8a60b6ae2285c62cb54265ee5a1e7453c1..9e5a5e5cb1e057095118c6de00d72e7e43114028 100644 >--- a/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-global-init.js >+++ b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-global-init.js >@@ -2,7 +2,7 @@ > // - src/annex-b-fns/eval-global-existing-global-init.case > // - src/annex-b-fns/eval-global/indirect-if-decl-else-decl-b.template > /*--- >-description: Variable binding is set to `undefined` (IfStatement with a declaration in both statement positions in eval code) >+description: Variable binding is left in place by legacy function hoisting (IfStatement with a declaration in both statement positions in eval code) > esid: sec-functiondeclarations-in-ifstatement-statement-clauses > es6id: B.3.4 > flags: [generated, noStrict] >@@ -21,17 +21,7 @@ > > [...] > i. If varEnvRec is a global Environment Record, then >- i. Perform ? varEnvRec.CreateGlobalFunctionBinding(F, undefined, true). >- [...] >- >- 8.1.1.4.18 CreateGlobalFunctionBinding >- >- [...] >- 5. If existingProp is undefined or existingProp.[[Configurable]] is true, >- then >- [...] >- 6. Else, >- a. Let desc be the PropertyDescriptor{[[Value]]: V }. >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). > [...] > > ---*/ >@@ -44,11 +34,18 @@ > > (0,eval)( > 'var global = fnGlobalObject();\ >- assert.sameValue(f, undefined, "binding is initialized to `undefined`");\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ > \ > verifyProperty(global, "f", {\ > enumerable: true,\ > writable: true,\ > configurable: false\ >- });if (false) function _f() {} else function f() { }' >+ }, { restore: true });if (false) function _f() {} else function f() { }' > ); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, "f", { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..8836f45c6f647f1a252a90be4e2352457e056bde >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,51 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/eval-global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/eval-global/indirect-if-decl-else-decl-b.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement with a declaration in both statement positions in eval code) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to EvalDeclarationInstantiation >+ >+ [...] >+ i. If varEnvRec is a global Environment Record, then >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+Object.defineProperty(fnGlobalObject(), 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+(0,eval)( >+ 'var global = fnGlobalObject();\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ >+ \ >+ verifyProperty(global, "f", {\ >+ enumerable: false,\ >+ writable: true,\ >+ configurable: true\ >+ }, { restore: true });if (false) function _f() {} else function f() { }' >+); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-global-init.js b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-global-init.js >index 380d46bac2f0493aa0841256c02cd2eb647c7106..fd2cc3d449baf267da9bf504d800326c0107fbe0 100644 >--- a/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-global-init.js >+++ b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-global-init.js >@@ -2,7 +2,7 @@ > // - src/annex-b-fns/eval-global-existing-global-init.case > // - src/annex-b-fns/eval-global/indirect-if-decl-else-stmt.template > /*--- >-description: Variable binding is set to `undefined` (IfStatement with a declaration in the first statement position in eval code) >+description: Variable binding is left in place by legacy function hoisting (IfStatement with a declaration in the first statement position in eval code) > esid: sec-functiondeclarations-in-ifstatement-statement-clauses > es6id: B.3.4 > flags: [generated, noStrict] >@@ -21,17 +21,7 @@ > > [...] > i. If varEnvRec is a global Environment Record, then >- i. Perform ? varEnvRec.CreateGlobalFunctionBinding(F, undefined, true). >- [...] >- >- 8.1.1.4.18 CreateGlobalFunctionBinding >- >- [...] >- 5. If existingProp is undefined or existingProp.[[Configurable]] is true, >- then >- [...] >- 6. Else, >- a. Let desc be the PropertyDescriptor{[[Value]]: V }. >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). > [...] > > ---*/ >@@ -44,11 +34,18 @@ > > (0,eval)( > 'var global = fnGlobalObject();\ >- assert.sameValue(f, undefined, "binding is initialized to `undefined`");\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ > \ > verifyProperty(global, "f", {\ > enumerable: true,\ > writable: true,\ > configurable: false\ >- });if (true) function f() { } else ;' >+ }, { restore: true });if (true) function f() { } else ;' > ); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, "f", { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..4e4e14ba9c6181a0308215ab4826e8c4ffd434ea >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,51 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/eval-global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/eval-global/indirect-if-decl-else-stmt.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement with a declaration in the first statement position in eval code) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to EvalDeclarationInstantiation >+ >+ [...] >+ i. If varEnvRec is a global Environment Record, then >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+Object.defineProperty(fnGlobalObject(), 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+(0,eval)( >+ 'var global = fnGlobalObject();\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ >+ \ >+ verifyProperty(global, "f", {\ >+ enumerable: false,\ >+ writable: true,\ >+ configurable: true\ >+ }, { restore: true });if (true) function f() { } else ;' >+); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-global-init.js b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-global-init.js >index 7663f96807ba5d76b2b0231667109066833219f8..624f42329093187a3fecd88389f72672a4bd9809 100644 >--- a/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-global-init.js >+++ b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-global-init.js >@@ -2,7 +2,7 @@ > // - src/annex-b-fns/eval-global-existing-global-init.case > // - src/annex-b-fns/eval-global/indirect-if-decl-no-else.template > /*--- >-description: Variable binding is set to `undefined` (IfStatement without an else clause in eval code) >+description: Variable binding is left in place by legacy function hoisting (IfStatement without an else clause in eval code) > esid: sec-functiondeclarations-in-ifstatement-statement-clauses > es6id: B.3.4 > flags: [generated, noStrict] >@@ -21,17 +21,7 @@ > > [...] > i. If varEnvRec is a global Environment Record, then >- i. Perform ? varEnvRec.CreateGlobalFunctionBinding(F, undefined, true). >- [...] >- >- 8.1.1.4.18 CreateGlobalFunctionBinding >- >- [...] >- 5. If existingProp is undefined or existingProp.[[Configurable]] is true, >- then >- [...] >- 6. Else, >- a. Let desc be the PropertyDescriptor{[[Value]]: V }. >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). > [...] > > ---*/ >@@ -44,11 +34,18 @@ > > (0,eval)( > 'var global = fnGlobalObject();\ >- assert.sameValue(f, undefined, "binding is initialized to `undefined`");\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ > \ > verifyProperty(global, "f", {\ > enumerable: true,\ > writable: true,\ > configurable: false\ >- });if (true) function f() { }' >+ }, { restore: true });if (true) function f() { }' > ); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, "f", { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..d381e308cab65788c1ff33ef6c04190694b38e5e >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,51 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/eval-global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/eval-global/indirect-if-decl-no-else.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement without an else clause in eval code) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to EvalDeclarationInstantiation >+ >+ [...] >+ i. If varEnvRec is a global Environment Record, then >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+Object.defineProperty(fnGlobalObject(), 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+(0,eval)( >+ 'var global = fnGlobalObject();\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ >+ \ >+ verifyProperty(global, "f", {\ >+ enumerable: false,\ >+ writable: true,\ >+ configurable: true\ >+ }, { restore: true });if (true) function f() { }' >+); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-global-init.js b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-global-init.js >index d78d1c1aa99c1ac92d753aa1b24d4d2b51c45dd3..e8e7b1519b51df1d59924c8b281c6c000ef303a7 100644 >--- a/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-global-init.js >+++ b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-global-init.js >@@ -2,7 +2,7 @@ > // - src/annex-b-fns/eval-global-existing-global-init.case > // - src/annex-b-fns/eval-global/indirect-if-stmt-else-decl.template > /*--- >-description: Variable binding is set to `undefined` (IfStatement with a declaration in the second statement position in eval code) >+description: Variable binding is left in place by legacy function hoisting (IfStatement with a declaration in the second statement position in eval code) > esid: sec-functiondeclarations-in-ifstatement-statement-clauses > es6id: B.3.4 > flags: [generated, noStrict] >@@ -21,17 +21,7 @@ > > [...] > i. If varEnvRec is a global Environment Record, then >- i. Perform ? varEnvRec.CreateGlobalFunctionBinding(F, undefined, true). >- [...] >- >- 8.1.1.4.18 CreateGlobalFunctionBinding >- >- [...] >- 5. If existingProp is undefined or existingProp.[[Configurable]] is true, >- then >- [...] >- 6. Else, >- a. Let desc be the PropertyDescriptor{[[Value]]: V }. >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). > [...] > > ---*/ >@@ -44,11 +34,18 @@ > > (0,eval)( > 'var global = fnGlobalObject();\ >- assert.sameValue(f, undefined, "binding is initialized to `undefined`");\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ > \ > verifyProperty(global, "f", {\ > enumerable: true,\ > writable: true,\ > configurable: false\ >- });if (false) ; else function f() { }' >+ }, { restore: true });if (false) ; else function f() { }' > ); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, "f", { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..5729a4694b00a8e43ab1c62e1d46970b53be66a2 >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,51 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/eval-global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/eval-global/indirect-if-stmt-else-decl.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement with a declaration in the second statement position in eval code) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to EvalDeclarationInstantiation >+ >+ [...] >+ i. If varEnvRec is a global Environment Record, then >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+Object.defineProperty(fnGlobalObject(), 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+(0,eval)( >+ 'var global = fnGlobalObject();\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ >+ \ >+ verifyProperty(global, "f", {\ >+ enumerable: false,\ >+ writable: true,\ >+ configurable: true\ >+ }, { restore: true });if (false) ; else function f() { }' >+); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-existing-global-init.js b/JSTests/test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-existing-global-init.js >index 8efb7cfe1c282c67ab9731a4d0d79e21416039c8..ec8d2097f0964c83967643cecc029bbe9468cf14 100644 >--- a/JSTests/test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-existing-global-init.js >+++ b/JSTests/test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-existing-global-init.js >@@ -2,7 +2,7 @@ > // - src/annex-b-fns/eval-global-existing-global-init.case > // - src/annex-b-fns/eval-global/indirect-switch-case.template > /*--- >-description: Variable binding is set to `undefined` (Function declaration in the `case` clause of a `switch` statement in eval code) >+description: Variable binding is left in place by legacy function hoisting (Function declaration in the `case` clause of a `switch` statement in eval code) > esid: sec-web-compat-evaldeclarationinstantiation > es6id: B.3.3.3 > flags: [generated, noStrict] >@@ -12,17 +12,7 @@ > > [...] > i. If varEnvRec is a global Environment Record, then >- i. Perform ? varEnvRec.CreateGlobalFunctionBinding(F, undefined, true). >- [...] >- >- 8.1.1.4.18 CreateGlobalFunctionBinding >- >- [...] >- 5. If existingProp is undefined or existingProp.[[Configurable]] is true, >- then >- [...] >- 6. Else, >- a. Let desc be the PropertyDescriptor{[[Value]]: V }. >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). > [...] > > ---*/ >@@ -35,15 +25,22 @@ > > (0,eval)( > 'var global = fnGlobalObject();\ >- assert.sameValue(f, undefined, "binding is initialized to `undefined`");\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ > \ > verifyProperty(global, "f", {\ > enumerable: true,\ > writable: true,\ > configurable: false\ >- });switch (1) {' + >+ }, { restore: true });switch (1) {' + > ' case 1:' + > ' function f() { }' + > '}\ > ' > ); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, "f", { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..61c6015687cedf720ff0097e9110d729aa05a912 >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/eval-code/indirect/global-switch-case-eval-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,46 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/eval-global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/eval-global/indirect-switch-case.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (Function declaration in the `case` clause of a `switch` statement in eval code) >+esid: sec-web-compat-evaldeclarationinstantiation >+es6id: B.3.3.3 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ B.3.3.3 Changes to EvalDeclarationInstantiation >+ >+ [...] >+ i. If varEnvRec is a global Environment Record, then >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+Object.defineProperty(fnGlobalObject(), 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+(0,eval)( >+ 'var global = fnGlobalObject();\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ >+ \ >+ verifyProperty(global, "f", {\ >+ enumerable: false,\ >+ writable: true,\ >+ configurable: true\ >+ }, { restore: true });switch (1) {' + >+ ' case 1:' + >+ ' function f() { }' + >+ '}\ >+ ' >+); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-global-init.js b/JSTests/test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-global-init.js >index 5f48593b444f160ce3dabf91627b1196b62ca42d..a145b0198c21a4e8d43e0321bb7dd446d1236ec8 100644 >--- a/JSTests/test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-global-init.js >+++ b/JSTests/test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-global-init.js >@@ -2,7 +2,7 @@ > // - src/annex-b-fns/eval-global-existing-global-init.case > // - src/annex-b-fns/eval-global/indirect-switch-dflt.template > /*--- >-description: Variable binding is set to `undefined` (Funtion declaration in the `default` clause of a `switch` statement in eval code in the global scope) >+description: Variable binding is left in place by legacy function hoisting (Funtion declaration in the `default` clause of a `switch` statement in eval code in the global scope) > esid: sec-web-compat-evaldeclarationinstantiation > es6id: B.3.3.3 > flags: [generated, noStrict] >@@ -12,17 +12,7 @@ > > [...] > i. If varEnvRec is a global Environment Record, then >- i. Perform ? varEnvRec.CreateGlobalFunctionBinding(F, undefined, true). >- [...] >- >- 8.1.1.4.18 CreateGlobalFunctionBinding >- >- [...] >- 5. If existingProp is undefined or existingProp.[[Configurable]] is true, >- then >- [...] >- 6. Else, >- a. Let desc be the PropertyDescriptor{[[Value]]: V }. >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). > [...] > > ---*/ >@@ -35,15 +25,22 @@ > > (0,eval)( > 'var global = fnGlobalObject();\ >- assert.sameValue(f, undefined, "binding is initialized to `undefined`");\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ > \ > verifyProperty(global, "f", {\ > enumerable: true,\ > writable: true,\ > configurable: false\ >- });switch (1) {' + >+ }, { restore: true });switch (1) {' + > ' default:' + > ' function f() { }' + > '}\ > ' > ); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, "f", { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >diff --git a/JSTests/test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..3ccfd9ddaf881dccaeedd69d36e7b37d563d50f5 >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,46 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/eval-global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/eval-global/indirect-switch-dflt.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (Funtion declaration in the `default` clause of a `switch` statement in eval code in the global scope) >+esid: sec-web-compat-evaldeclarationinstantiation >+es6id: B.3.3.3 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ B.3.3.3 Changes to EvalDeclarationInstantiation >+ >+ [...] >+ i. If varEnvRec is a global Environment Record, then >+ i. Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+Object.defineProperty(fnGlobalObject(), 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+(0,eval)( >+ 'var global = fnGlobalObject();\ >+ assert.sameValue(f, "x", "binding is not reinitialized");\ >+ \ >+ verifyProperty(global, "f", {\ >+ enumerable: false,\ >+ writable: true,\ >+ configurable: true\ >+ }, { restore: true });switch (1) {' + >+ ' default:' + >+ ' function f() { }' + >+ '}\ >+ ' >+); >+ >+assert.sameValue(typeof f, "function"); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/annexB/language/global-code/block-decl-global-existing-global-init.js b/JSTests/test262/test/annexB/language/global-code/block-decl-global-existing-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..9b0bdad6c7eede1ce0a0f6810fb5a5b330f7e7c2 >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/global-code/block-decl-global-existing-global-init.js >@@ -0,0 +1,49 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/global-existing-global-init.case >+// - src/annex-b-fns/global/block.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (Block statement in the global scope containing a function declaration) >+esid: sec-web-compat-globaldeclarationinstantiation >+es6id: B.3.3.2 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ B.3.3.3 Changes to GlobalDeclarationInstantiation >+ >+ [...] >+ Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+var global = fnGlobalObject(); >+Object.defineProperty(global, 'f', { >+ value: 'x', >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >+ >+$262.evalScript(` >+assert.sameValue(f, 'x'); >+verifyProperty(global, 'f', { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}, { restore: true }); >+`); >+ >+$262.evalScript(` >+ >+{ >+ function f() { return 'inner declaration'; } >+} >+ >+`); >+ >+$262.evalScript(` >+verifyProperty(global, 'f', { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >+`); >diff --git a/JSTests/test262/test/annexB/language/global-code/block-decl-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/global-code/block-decl-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..3c58d281a686752bfb29ad9b6118160cac974a13 >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/global-code/block-decl-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,50 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/global/block.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (Block statement in the global scope containing a function declaration) >+esid: sec-web-compat-globaldeclarationinstantiation >+es6id: B.3.3.2 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ B.3.3.3 Changes to GlobalDeclarationInstantiation >+ >+ [...] >+ Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+var global = fnGlobalObject(); >+Object.defineProperty(global, 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+$262.evalScript(` >+assert.sameValue(f, 'x'); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}, { restore: true }); >+`); >+ >+$262.evalScript(` >+ >+{ >+ function f() { return 'inner declaration'; } >+} >+ >+`); >+ >+$262.evalScript(` >+assert.sameValue(f(), 'inner declaration'); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+`); >diff --git a/JSTests/test262/test/annexB/language/global-code/if-decl-else-decl-a-global-existing-global-init.js b/JSTests/test262/test/annexB/language/global-code/if-decl-else-decl-a-global-existing-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..4c929b5521c81fa91ffcd78526863f1b045cc2dd >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/global-code/if-decl-else-decl-a-global-existing-global-init.js >@@ -0,0 +1,56 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/global-existing-global-init.case >+// - src/annex-b-fns/global/if-decl-else-decl-a.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement with a declaration in both statement positions in the global scope) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to GlobalDeclarationInstantiation >+ >+ [...] >+ Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+var global = fnGlobalObject(); >+Object.defineProperty(global, 'f', { >+ value: 'x', >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >+ >+$262.evalScript(` >+assert.sameValue(f, 'x'); >+verifyProperty(global, 'f', { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}, { restore: true }); >+`); >+ >+$262.evalScript(` >+ >+if (true) function f() { return 'inner declaration'; } else function _f() {} >+ >+`); >+ >+$262.evalScript(` >+verifyProperty(global, 'f', { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >+`); >diff --git a/JSTests/test262/test/annexB/language/global-code/if-decl-else-decl-a-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/global-code/if-decl-else-decl-a-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..b4fc5f1962410d9a2f342043f11bddc7f6f7bd59 >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/global-code/if-decl-else-decl-a-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,57 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/global/if-decl-else-decl-a.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement with a declaration in both statement positions in the global scope) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to GlobalDeclarationInstantiation >+ >+ [...] >+ Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+var global = fnGlobalObject(); >+Object.defineProperty(global, 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+$262.evalScript(` >+assert.sameValue(f, 'x'); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}, { restore: true }); >+`); >+ >+$262.evalScript(` >+ >+if (true) function f() { return 'inner declaration'; } else function _f() {} >+ >+`); >+ >+$262.evalScript(` >+assert.sameValue(f(), 'inner declaration'); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+`); >diff --git a/JSTests/test262/test/annexB/language/global-code/if-decl-else-decl-b-global-existing-global-init.js b/JSTests/test262/test/annexB/language/global-code/if-decl-else-decl-b-global-existing-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..f8381f99057cdfca52ccda35aa74096a763ddc8a >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/global-code/if-decl-else-decl-b-global-existing-global-init.js >@@ -0,0 +1,56 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/global-existing-global-init.case >+// - src/annex-b-fns/global/if-decl-else-decl-b.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement with a declaration in both statement positions in the global scope) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to GlobalDeclarationInstantiation >+ >+ [...] >+ Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+var global = fnGlobalObject(); >+Object.defineProperty(global, 'f', { >+ value: 'x', >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >+ >+$262.evalScript(` >+assert.sameValue(f, 'x'); >+verifyProperty(global, 'f', { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}, { restore: true }); >+`); >+ >+$262.evalScript(` >+ >+if (false) function _f() {} else function f() { return 'inner declaration'; } >+ >+`); >+ >+$262.evalScript(` >+verifyProperty(global, 'f', { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >+`); >diff --git a/JSTests/test262/test/annexB/language/global-code/if-decl-else-decl-b-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/global-code/if-decl-else-decl-b-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..17f825747baaa146a6f29afaf424797b4aaa24c6 >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/global-code/if-decl-else-decl-b-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,57 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/global/if-decl-else-decl-b.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement with a declaration in both statement positions in the global scope) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to GlobalDeclarationInstantiation >+ >+ [...] >+ Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+var global = fnGlobalObject(); >+Object.defineProperty(global, 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+$262.evalScript(` >+assert.sameValue(f, 'x'); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}, { restore: true }); >+`); >+ >+$262.evalScript(` >+ >+if (false) function _f() {} else function f() { return 'inner declaration'; } >+ >+`); >+ >+$262.evalScript(` >+assert.sameValue(f(), 'inner declaration'); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+`); >diff --git a/JSTests/test262/test/annexB/language/global-code/if-decl-else-stmt-global-existing-global-init.js b/JSTests/test262/test/annexB/language/global-code/if-decl-else-stmt-global-existing-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..1d6b9f35a397d836f110e0dca7cb435a1f8c0800 >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/global-code/if-decl-else-stmt-global-existing-global-init.js >@@ -0,0 +1,56 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/global-existing-global-init.case >+// - src/annex-b-fns/global/if-decl-else-stmt.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement with a declaration in the first statement position in the global scope) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to GlobalDeclarationInstantiation >+ >+ [...] >+ Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+var global = fnGlobalObject(); >+Object.defineProperty(global, 'f', { >+ value: 'x', >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >+ >+$262.evalScript(` >+assert.sameValue(f, 'x'); >+verifyProperty(global, 'f', { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}, { restore: true }); >+`); >+ >+$262.evalScript(` >+ >+if (true) function f() { return 'inner declaration'; } else ; >+ >+`); >+ >+$262.evalScript(` >+verifyProperty(global, 'f', { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >+`); >diff --git a/JSTests/test262/test/annexB/language/global-code/if-decl-else-stmt-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/global-code/if-decl-else-stmt-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..cbaccf7c42dd7d0deb9549bbd1dfca146c31a18a >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/global-code/if-decl-else-stmt-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,57 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/global/if-decl-else-stmt.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement with a declaration in the first statement position in the global scope) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to GlobalDeclarationInstantiation >+ >+ [...] >+ Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+var global = fnGlobalObject(); >+Object.defineProperty(global, 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+$262.evalScript(` >+assert.sameValue(f, 'x'); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}, { restore: true }); >+`); >+ >+$262.evalScript(` >+ >+if (true) function f() { return 'inner declaration'; } else ; >+ >+`); >+ >+$262.evalScript(` >+assert.sameValue(f(), 'inner declaration'); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+`); >diff --git a/JSTests/test262/test/annexB/language/global-code/if-decl-no-else-global-existing-global-init.js b/JSTests/test262/test/annexB/language/global-code/if-decl-no-else-global-existing-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..f3b94130fdf7fff25bc3b78b51b3c8900641ef45 >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/global-code/if-decl-no-else-global-existing-global-init.js >@@ -0,0 +1,56 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/global-existing-global-init.case >+// - src/annex-b-fns/global/if-decl-no-else.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement without an else clause in the global scope) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to GlobalDeclarationInstantiation >+ >+ [...] >+ Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+var global = fnGlobalObject(); >+Object.defineProperty(global, 'f', { >+ value: 'x', >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >+ >+$262.evalScript(` >+assert.sameValue(f, 'x'); >+verifyProperty(global, 'f', { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}, { restore: true }); >+`); >+ >+$262.evalScript(` >+ >+if (true) function f() { return 'inner declaration'; } >+ >+`); >+ >+$262.evalScript(` >+verifyProperty(global, 'f', { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >+`); >diff --git a/JSTests/test262/test/annexB/language/global-code/if-decl-no-else-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/global-code/if-decl-no-else-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..f3767e6014c2b81ee96af2a7cf049b9e2a1c27c5 >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/global-code/if-decl-no-else-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,57 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/global/if-decl-no-else.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement without an else clause in the global scope) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to GlobalDeclarationInstantiation >+ >+ [...] >+ Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+var global = fnGlobalObject(); >+Object.defineProperty(global, 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+$262.evalScript(` >+assert.sameValue(f, 'x'); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}, { restore: true }); >+`); >+ >+$262.evalScript(` >+ >+if (true) function f() { return 'inner declaration'; } >+ >+`); >+ >+$262.evalScript(` >+assert.sameValue(f(), 'inner declaration'); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+`); >diff --git a/JSTests/test262/test/annexB/language/global-code/if-stmt-else-decl-global-existing-global-init.js b/JSTests/test262/test/annexB/language/global-code/if-stmt-else-decl-global-existing-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..7c3cfcd2593d014c741384a6e543d79b9f748c28 >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/global-code/if-stmt-else-decl-global-existing-global-init.js >@@ -0,0 +1,56 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/global-existing-global-init.case >+// - src/annex-b-fns/global/if-stmt-else-decl.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement with a declaration in the second statement position in the global scope) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to GlobalDeclarationInstantiation >+ >+ [...] >+ Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+var global = fnGlobalObject(); >+Object.defineProperty(global, 'f', { >+ value: 'x', >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >+ >+$262.evalScript(` >+assert.sameValue(f, 'x'); >+verifyProperty(global, 'f', { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}, { restore: true }); >+`); >+ >+$262.evalScript(` >+ >+if (false) ; else function f() { return 'inner declaration'; } >+ >+`); >+ >+$262.evalScript(` >+verifyProperty(global, 'f', { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >+`); >diff --git a/JSTests/test262/test/annexB/language/global-code/if-stmt-else-decl-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/global-code/if-stmt-else-decl-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..6a1a8b4cb51fc741e7efa1ea4c36cfec8a4dd32c >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/global-code/if-stmt-else-decl-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,57 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/global/if-stmt-else-decl.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (IfStatement with a declaration in the second statement position in the global scope) >+esid: sec-functiondeclarations-in-ifstatement-statement-clauses >+es6id: B.3.4 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ The following rules for IfStatement augment those in 13.6: >+ >+ IfStatement[Yield, Return]: >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else Statement[?Yield, ?Return] >+ if ( Expression[In, ?Yield] ) Statement[?Yield, ?Return] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] else FunctionDeclaration[?Yield] >+ if ( Expression[In, ?Yield] ) FunctionDeclaration[?Yield] >+ >+ >+ B.3.3.3 Changes to GlobalDeclarationInstantiation >+ >+ [...] >+ Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+var global = fnGlobalObject(); >+Object.defineProperty(global, 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+$262.evalScript(` >+assert.sameValue(f, 'x'); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}, { restore: true }); >+`); >+ >+$262.evalScript(` >+ >+if (false) ; else function f() { return 'inner declaration'; } >+ >+`); >+ >+$262.evalScript(` >+assert.sameValue(f(), 'inner declaration'); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+`); >diff --git a/JSTests/test262/test/annexB/language/global-code/switch-case-global-existing-global-init.js b/JSTests/test262/test/annexB/language/global-code/switch-case-global-existing-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..5feed4c3d1f008efde992f18460a81843082f32a >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/global-code/switch-case-global-existing-global-init.js >@@ -0,0 +1,50 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/global-existing-global-init.case >+// - src/annex-b-fns/global/switch-case.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (Function declaration in the `case` clause of a `switch` statement in the global scope) >+esid: sec-web-compat-globaldeclarationinstantiation >+es6id: B.3.3.2 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ B.3.3.3 Changes to GlobalDeclarationInstantiation >+ >+ [...] >+ Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+var global = fnGlobalObject(); >+Object.defineProperty(global, 'f', { >+ value: 'x', >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >+ >+$262.evalScript(` >+assert.sameValue(f, 'x'); >+verifyProperty(global, 'f', { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}, { restore: true }); >+`); >+ >+$262.evalScript(` >+ >+switch (1) { >+ case 1: >+ function f() { return 'inner declaration'; } >+} >+ >+`); >+ >+$262.evalScript(` >+verifyProperty(global, 'f', { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >+`); >diff --git a/JSTests/test262/test/annexB/language/global-code/switch-case-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/global-code/switch-case-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..f448c0c18a2114cc112e70c8d0547284cd0afe9b >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/global-code/switch-case-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,51 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/global/switch-case.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (Function declaration in the `case` clause of a `switch` statement in the global scope) >+esid: sec-web-compat-globaldeclarationinstantiation >+es6id: B.3.3.2 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ B.3.3.3 Changes to GlobalDeclarationInstantiation >+ >+ [...] >+ Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+var global = fnGlobalObject(); >+Object.defineProperty(global, 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+$262.evalScript(` >+assert.sameValue(f, 'x'); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}, { restore: true }); >+`); >+ >+$262.evalScript(` >+ >+switch (1) { >+ case 1: >+ function f() { return 'inner declaration'; } >+} >+ >+`); >+ >+$262.evalScript(` >+assert.sameValue(f(), 'inner declaration'); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+`); >diff --git a/JSTests/test262/test/annexB/language/global-code/switch-dflt-global-existing-global-init.js b/JSTests/test262/test/annexB/language/global-code/switch-dflt-global-existing-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..bfccf69376259ce0b3bfca3633b781898b3938e2 >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/global-code/switch-dflt-global-existing-global-init.js >@@ -0,0 +1,50 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/global-existing-global-init.case >+// - src/annex-b-fns/global/switch-dflt.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (Funtion declaration in the `default` clause of a `switch` statement in the global scope) >+esid: sec-web-compat-globaldeclarationinstantiation >+es6id: B.3.3.2 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ B.3.3.3 Changes to GlobalDeclarationInstantiation >+ >+ [...] >+ Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+var global = fnGlobalObject(); >+Object.defineProperty(global, 'f', { >+ value: 'x', >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >+ >+$262.evalScript(` >+assert.sameValue(f, 'x'); >+verifyProperty(global, 'f', { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}, { restore: true }); >+`); >+ >+$262.evalScript(` >+ >+switch (1) { >+ default: >+ function f() { return 'inner declaration'; } >+} >+ >+`); >+ >+$262.evalScript(` >+verifyProperty(global, 'f', { >+ enumerable: true, >+ writable: true, >+ configurable: false >+}); >+`); >diff --git a/JSTests/test262/test/annexB/language/global-code/switch-dflt-global-existing-non-enumerable-global-init.js b/JSTests/test262/test/annexB/language/global-code/switch-dflt-global-existing-non-enumerable-global-init.js >new file mode 100644 >index 0000000000000000000000000000000000000000..c6bd5d862b45a3c64042abb2851aae1a34391cda >--- /dev/null >+++ b/JSTests/test262/test/annexB/language/global-code/switch-dflt-global-existing-non-enumerable-global-init.js >@@ -0,0 +1,51 @@ >+// This file was procedurally generated from the following sources: >+// - src/annex-b-fns/global-existing-non-enumerable-global-init.case >+// - src/annex-b-fns/global/switch-dflt.template >+/*--- >+description: Variable binding is left in place by legacy function hoisting. CreateGlobalVariableBinding leaves the binding as non-enumerable even if it has the chance to change it to be enumerable. (Funtion declaration in the `default` clause of a `switch` statement in the global scope) >+esid: sec-web-compat-globaldeclarationinstantiation >+es6id: B.3.3.2 >+flags: [generated, noStrict] >+includes: [fnGlobalObject.js, propertyHelper.js] >+info: | >+ B.3.3.3 Changes to GlobalDeclarationInstantiation >+ >+ [...] >+ Perform ? varEnvRec.CreateGlobalVarBinding(F, true). >+ [...] >+ >+---*/ >+var global = fnGlobalObject(); >+Object.defineProperty(global, 'f', { >+ value: 'x', >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+ >+$262.evalScript(` >+assert.sameValue(f, 'x'); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}, { restore: true }); >+`); >+ >+$262.evalScript(` >+ >+switch (1) { >+ default: >+ function f() { return 'inner declaration'; } >+} >+ >+`); >+ >+$262.evalScript(` >+assert.sameValue(f(), 'inner declaration'); >+verifyProperty(global, 'f', { >+ enumerable: false, >+ writable: true, >+ configurable: true >+}); >+`); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flat/array-like-objects.js b/JSTests/test262/test/built-ins/Array/prototype/flat/array-like-objects.js >new file mode 100644 >index 0000000000000000000000000000000000000000..4cd131b85bbe0b3291a38afe7e02cea59f114368 >--- /dev/null >+++ b/JSTests/test262/test/built-ins/Array/prototype/flat/array-like-objects.js >@@ -0,0 +1,31 @@ >+// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+esid: sec-array.prototype.flat >+description: > >+ array-like objects can be flattened >+includes: [compareArray.js] >+features: [Array.prototype.flat] >+---*/ >+ >+function getArgumentsObject() { >+ return arguments; >+} >+ >+var a = getArgumentsObject([1], [2]); >+var actual = [].flat.call(a); >+assert.compareArray(actual, [1, 2], 'arguments objects'); >+ >+var a = { >+ length: 1, >+ 0: [1], >+}; >+var actual = [].flat.call(a); >+assert.compareArray(actual, [1], 'array-like objects'); >+ >+var a = { >+ length: undefined, >+ 0: [1], >+}; >+var actual = [].flat.call(a); >+assert.compareArray(actual, [], 'array-like objects; undefined length'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flat/bound-function-call.js b/JSTests/test262/test/built-ins/Array/prototype/flat/bound-function-call.js >new file mode 100644 >index 0000000000000000000000000000000000000000..efff7d963c60379e2147696839ef3fec883a1cf8 >--- /dev/null >+++ b/JSTests/test262/test/built-ins/Array/prototype/flat/bound-function-call.js >@@ -0,0 +1,17 @@ >+// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+esid: sec-array.prototype.flat >+description: > >+ using bound functions >+includes: [compareArray.js] >+features: [Array.prototype.flat] >+---*/ >+ >+var a = [ >+ [0], >+ [1] >+]; >+var actual = [].flat.bind(a)(); >+ >+assert.compareArray(actual, [0, 1], 'bound flat'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flat/empty-array-elements.js b/JSTests/test262/test/built-ins/Array/prototype/flat/empty-array-elements.js >new file mode 100644 >index 0000000000000000000000000000000000000000..c78eb3c660d5aea2295596324ead52d722f8ad68 >--- /dev/null >+++ b/JSTests/test262/test/built-ins/Array/prototype/flat/empty-array-elements.js >@@ -0,0 +1,24 @@ >+// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+esid: sec-array.prototype.flat >+description: > >+ arrays with empty arrays elements >+includes: [compareArray.js] >+features: [Array.prototype.flat] >+---*/ >+ >+var a = {}; >+assert.compareArray([].flat(), []); >+assert.compareArray([ >+ [], >+ [] >+].flat(), []); >+assert.compareArray([ >+ [], >+ [1] >+].flat(), [1]); >+assert.compareArray([ >+ [], >+ [1, a] >+].flat(), [1, a]); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flat/empty-object-elements.js b/JSTests/test262/test/built-ins/Array/prototype/flat/empty-object-elements.js >new file mode 100644 >index 0000000000000000000000000000000000000000..dc3e92eb4f31371f847241b45937f8e7b32c905b >--- /dev/null >+++ b/JSTests/test262/test/built-ins/Array/prototype/flat/empty-object-elements.js >@@ -0,0 +1,22 @@ >+// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+esid: sec-array.prototype.flat >+description: > >+ arrays with empty object elements >+includes: [compareArray.js] >+features: [Array.prototype.flat] >+---*/ >+ >+var a = {}, >+ b = {}; >+ >+assert.compareArray([a].flat(), [a]); >+assert.compareArray([a, [b]].flat(), [a, b]); >+assert.compareArray([ >+ [a], b >+].flat(), [a, b]); >+assert.compareArray([ >+ [a], >+ [b] >+].flat(), [a, b]); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flat/length.js b/JSTests/test262/test/built-ins/Array/prototype/flat/length.js >new file mode 100644 >index 0000000000000000000000000000000000000000..4c0896f34947c0c563d3f02af5eaa917af2d4752 >--- /dev/null >+++ b/JSTests/test262/test/built-ins/Array/prototype/flat/length.js >@@ -0,0 +1,19 @@ >+// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+esid: sec-array.prototype.flat >+description: Array.prototype.flat.length value and descriptor. >+info: > >+ 17 ECMAScript Standard Built-in Objects >+includes: [propertyHelper.js] >+features: [Array.prototype.flat] >+---*/ >+ >+assert.sameValue( >+ Array.prototype.flat.length, 0, >+ 'The value of `Array.prototype.flat.length` is `0`' >+); >+ >+verifyNotEnumerable(Array.prototype.flat, 'length'); >+verifyNotWritable(Array.prototype.flat, 'length'); >+verifyConfigurable(Array.prototype.flat, 'length'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flat/name.js b/JSTests/test262/test/built-ins/Array/prototype/flat/name.js >new file mode 100644 >index 0000000000000000000000000000000000000000..312827bc1a3920604d7bbf4282d1844fb40f4efa >--- /dev/null >+++ b/JSTests/test262/test/built-ins/Array/prototype/flat/name.js >@@ -0,0 +1,20 @@ >+// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+esid: sec-array.prototype.flat >+description: > >+ Array.prototype.flat.name value and descriptor. >+info: > >+ 17 ECMAScript Standard Built-in Objects >+includes: [propertyHelper.js] >+features: [Array.prototype.flat] >+---*/ >+ >+assert.sameValue( >+ Array.prototype.flat.name, 'flat', >+ 'The value of `Array.prototype.flat.name` is `"flat"`' >+); >+ >+verifyNotEnumerable(Array.prototype.flat, 'name'); >+verifyNotWritable(Array.prototype.flat, 'name'); >+verifyConfigurable(Array.prototype.flat, 'name'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flat/non-numeric-depth-should-not-throw.js b/JSTests/test262/test/built-ins/Array/prototype/flat/non-numeric-depth-should-not-throw.js >new file mode 100644 >index 0000000000000000000000000000000000000000..68f229a243e5fc881a29f31f7a3b0d462453d705 >--- /dev/null >+++ b/JSTests/test262/test/built-ins/Array/prototype/flat/non-numeric-depth-should-not-throw.js >@@ -0,0 +1,43 @@ >+// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+esid: sec-array.prototype.flat >+description: > >+ if the argument is a string or object, the depthNum is 0 >+includes: [compareArray.js] >+features: [Array.prototype.flat] >+---*/ >+ >+var a = [1, [2]]; >+var expected = a; >+ >+// non integral string depthNum is converted to 0 >+var depthNum = 'TestString'; >+var actual = a.flat(depthNum); >+assert(compareArray(actual, expected), 'non integral string depthNum'); >+ >+// object type depthNum is converted to 0 >+var depthNum = {}; >+var actual = a.flat(depthNum); >+assert(compareArray(actual, expected), 'object type depthNum'); >+ >+// negative infinity depthNum is converted to 0 >+var depthNum = Number.NEGATIVE_INFINITY; >+var actual = a.flat(depthNum); >+assert(compareArray(actual, expected), 'negative infinity depthNum'); >+ >+// positive zero depthNum is converted to 0 >+var depthNum = +0; >+var actual = a.flat(depthNum); >+assert(compareArray(actual, expected), 'positive zero depthNum'); >+ >+// negative zero depthNum is converted to 0 >+var depthNum = -0; >+var actual = a.flat(depthNum); >+assert(compareArray(actual, expected), 'negative zero depthNum'); >+ >+// integral string depthNum is converted to an integer >+var depthNum = '1'; >+var actual = a.flat(depthNum); >+var expected = [1, 2] >+assert(compareArray(actual, expected), 'integral string depthNum'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flat/non-object-ctor-throws.js b/JSTests/test262/test/built-ins/Array/prototype/flat/non-object-ctor-throws.js >new file mode 100644 >index 0000000000000000000000000000000000000000..eb4f5ca0925c3cefeebcf5c4e556763d86af9785 >--- /dev/null >+++ b/JSTests/test262/test/built-ins/Array/prototype/flat/non-object-ctor-throws.js >@@ -0,0 +1,33 @@ >+// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+esid: sec-array.prototype.flat >+description: > >+ Behavior when `constructor` property is neither an Object nor undefined >+ - if IsConstructor(C) is false, throw a TypeError exception. >+features: [Array.prototype.flat] >+---*/ >+ >+var a = []; >+a.constructor = null; >+assert.throws(TypeError, function() { >+ a.flat(); >+}, 'null value'); >+ >+var a = []; >+a.constructor = 1; >+assert.throws(TypeError, function() { >+ a.flat(); >+}, 'number value'); >+ >+var a = []; >+a.constructor = 'string'; >+assert.throws(TypeError, function() { >+ a.flat(); >+}, 'string value'); >+ >+var a = []; >+a.constructor = true; >+assert.throws(TypeError, function() { >+ a.flat(); >+}, 'boolean value'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flat/null-undefined-elements.js b/JSTests/test262/test/built-ins/Array/prototype/flat/null-undefined-elements.js >new file mode 100644 >index 0000000000000000000000000000000000000000..a252f10bc80978624b34011a69d6c61682f6bc52 >--- /dev/null >+++ b/JSTests/test262/test/built-ins/Array/prototype/flat/null-undefined-elements.js >@@ -0,0 +1,20 @@ >+// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+esid: sec-array.prototype.flat >+description: > >+ arrays with null, and undefined >+includes: [compareArray.js] >+features: [Array.prototype.flat] >+---*/ >+ >+var a = [void 0]; >+ >+assert(compareArray([1, null, void 0].flat(), [1, null, undefined])); >+assert(compareArray([1, [null, void 0]].flat(), [1, null, undefined])); >+assert(compareArray([ >+ [null, void 0], >+ [null, void 0] >+].flat(), [null, undefined, null, undefined])); >+assert(compareArray([1, [null, a]].flat(1), [1, null, a])); >+assert(compareArray([1, [null, a]].flat(2), [1, null, undefined])); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flat/null-undefined-input-throws.js b/JSTests/test262/test/built-ins/Array/prototype/flat/null-undefined-input-throws.js >new file mode 100644 >index 0000000000000000000000000000000000000000..ee590d27a1e9f932d2b237f1e2b94e0f035775bc >--- /dev/null >+++ b/JSTests/test262/test/built-ins/Array/prototype/flat/null-undefined-input-throws.js >@@ -0,0 +1,20 @@ >+// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+esid: sec-array.prototype.flat >+description: > >+ null or undefined should throw TypeError Exception >+features: [Array.prototype.flat] >+---*/ >+ >+assert.throws(TypeError, function() { >+ [].flat.call(null); >+}, 'null value'); >+ >+assert.throws(TypeError, function() { >+ [].flat.call(); >+}, 'missing'); >+ >+assert.throws(TypeError, function() { >+ [].flat.call(void 0); >+}, 'undefined'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flat/positive-infinity.js b/JSTests/test262/test/built-ins/Array/prototype/flat/positive-infinity.js >new file mode 100644 >index 0000000000000000000000000000000000000000..381200976ab0eadc7e14e69e690d13b4a43ff50d >--- /dev/null >+++ b/JSTests/test262/test/built-ins/Array/prototype/flat/positive-infinity.js >@@ -0,0 +1,12 @@ >+// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+esid: sec-array.prototype.flat >+description: > >+ if the argument is a positive infinity, the depthNum is max depth of the array >+includes: [compareArray.js] >+features: [Array.prototype.flat] >+---*/ >+ >+var a = [1, [2, [3, [4]]]] >+assert(compareArray(a.flat(Number.POSITIVE_INFINITY), [1, 2, 3, 4]), 'positive infinity depthNum'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flat/prop-desc.js b/JSTests/test262/test/built-ins/Array/prototype/flat/prop-desc.js >new file mode 100644 >index 0000000000000000000000000000000000000000..c538b2b7b74950d13166f52d11b3e18bc2783fe3 >--- /dev/null >+++ b/JSTests/test262/test/built-ins/Array/prototype/flat/prop-desc.js >@@ -0,0 +1,21 @@ >+// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+esid: sec-array.prototype.flat >+es6id: 22.1.3 >+description: Property type and descriptor. >+info: > >+ 17 ECMAScript Standard Built-in Objects >+includes: [propertyHelper.js] >+features: [Array.prototype.flat] >+---*/ >+ >+assert.sameValue( >+ typeof Array.prototype.flat, >+ 'function', >+ '`typeof Array.prototype.flat` is `function`' >+); >+ >+verifyNotEnumerable(Array.prototype, 'flat'); >+verifyWritable(Array.prototype, 'flat'); >+verifyConfigurable(Array.prototype, 'flat'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flat/symbol-object-create-null-depth-throws.js b/JSTests/test262/test/built-ins/Array/prototype/flat/symbol-object-create-null-depth-throws.js >new file mode 100644 >index 0000000000000000000000000000000000000000..a631efb34dbd9eb7137c2e0518949a75796bb77a >--- /dev/null >+++ b/JSTests/test262/test/built-ins/Array/prototype/flat/symbol-object-create-null-depth-throws.js >@@ -0,0 +1,16 @@ >+// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+esid: sec-array.prototype.flat >+description: > >+ if the argument is a Symbol or Object null, it throws exception >+features: [Array.prototype.flat] >+---*/ >+ >+assert.throws(TypeError, function() { >+ [].flat(Symbol()); >+}, 'symbol value'); >+ >+assert.throws(TypeError, function() { >+ [].flat(Object.create(null)); >+}, 'object create null'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flatten/array-like-objects.js b/JSTests/test262/test/built-ins/Array/prototype/flatten/array-like-objects.js >deleted file mode 100644 >index f9ed97b058cea7fcd7c0402b7eb4efdaec8f60f1..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/built-ins/Array/prototype/flatten/array-like-objects.js >+++ /dev/null >@@ -1,31 +0,0 @@ >-// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >-/*--- >-esid: sec-array.prototype.flatten >-description: > >- array-like objects can be flattened >-includes: [compareArray.js] >-features: [Array.prototype.flatten] >----*/ >- >-function getArgumentsObject() { >- return arguments; >-} >- >-var a = getArgumentsObject([1], [2]); >-var actual = [].flatten.call(a); >-assert.compareArray(actual, [1, 2], 'arguments objects'); >- >-var a = { >- length: 1, >- 0: [1], >-}; >-var actual = [].flatten.call(a); >-assert.compareArray(actual, [1], 'array-like objects'); >- >-var a = { >- length: undefined, >- 0: [1], >-}; >-var actual = [].flatten.call(a); >-assert.compareArray(actual, [], 'array-like objects; undefined length'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flatten/bound-function-call.js b/JSTests/test262/test/built-ins/Array/prototype/flatten/bound-function-call.js >deleted file mode 100644 >index fd35f0975f3a766daf04f67f3b75f8b19019d493..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/built-ins/Array/prototype/flatten/bound-function-call.js >+++ /dev/null >@@ -1,17 +0,0 @@ >-// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >-/*--- >-esid: sec-array.prototype.flatten >-description: > >- using bound functions >-includes: [compareArray.js] >-features: [Array.prototype.flatten] >----*/ >- >-var a = [ >- [0], >- [1] >-]; >-var actual = [].flatten.bind(a)(); >- >-assert.compareArray(actual, [0, 1], 'bound flatten'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flatten/empty-array-elements.js b/JSTests/test262/test/built-ins/Array/prototype/flatten/empty-array-elements.js >deleted file mode 100644 >index 379b1e48cd87ef869ced614559cc815235347717..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/built-ins/Array/prototype/flatten/empty-array-elements.js >+++ /dev/null >@@ -1,24 +0,0 @@ >-// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >-/*--- >-esid: sec-array.prototype.flatten >-description: > >- arrays with empty arrays elements >-includes: [compareArray.js] >-features: [Array.prototype.flatten] >----*/ >- >-var a = {}; >-assert.compareArray([].flatten(), []); >-assert.compareArray([ >- [], >- [] >-].flatten(), []); >-assert.compareArray([ >- [], >- [1] >-].flatten(), [1]); >-assert.compareArray([ >- [], >- [1, a] >-].flatten(), [1, a]); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flatten/empty-object-elements.js b/JSTests/test262/test/built-ins/Array/prototype/flatten/empty-object-elements.js >deleted file mode 100644 >index e1fcb18d31a4faa1c7b870fae04b64b1e0789f74..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/built-ins/Array/prototype/flatten/empty-object-elements.js >+++ /dev/null >@@ -1,22 +0,0 @@ >-// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >-/*--- >-esid: sec-array.prototype.flatten >-description: > >- arrays with empty object elements >-includes: [compareArray.js] >-features: [Array.prototype.flatten] >----*/ >- >-var a = {}, >- b = {}; >- >-assert.compareArray([a].flatten(), [a]); >-assert.compareArray([a, [b]].flatten(), [a, b]); >-assert.compareArray([ >- [a], b >-].flatten(), [a, b]); >-assert.compareArray([ >- [a], >- [b] >-].flatten(), [a, b]); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flatten/length.js b/JSTests/test262/test/built-ins/Array/prototype/flatten/length.js >deleted file mode 100644 >index 0e13e5ec528addf13472b7a8c19f120474571e61..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/built-ins/Array/prototype/flatten/length.js >+++ /dev/null >@@ -1,19 +0,0 @@ >-// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >-/*--- >-esid: sec-array.prototype.flatten >-description: Array.prototype.flatten.length value and descriptor. >-info: > >- 17 ECMAScript Standard Built-in Objects >-includes: [propertyHelper.js] >-features: [Array.prototype.flatten] >----*/ >- >-assert.sameValue( >- Array.prototype.flatten.length, 0, >- 'The value of `Array.prototype.flatten.length` is `0`' >-); >- >-verifyNotEnumerable(Array.prototype.flatten, 'length'); >-verifyNotWritable(Array.prototype.flatten, 'length'); >-verifyConfigurable(Array.prototype.flatten, 'length'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flatten/name.js b/JSTests/test262/test/built-ins/Array/prototype/flatten/name.js >deleted file mode 100644 >index 6d89ae6b7d016a47854ce9a15f98bd4c9c2aa091..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/built-ins/Array/prototype/flatten/name.js >+++ /dev/null >@@ -1,20 +0,0 @@ >-// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >-/*--- >-esid: sec-array.prototype.flatten >-description: > >- Array.prototype.flatten.name value and descriptor. >-info: > >- 17 ECMAScript Standard Built-in Objects >-includes: [propertyHelper.js] >-features: [Array.prototype.flatten] >----*/ >- >-assert.sameValue( >- Array.prototype.flatten.name, 'flatten', >- 'The value of `Array.prototype.flatten.name` is `"flatten"`' >-); >- >-verifyNotEnumerable(Array.prototype.flatten, 'name'); >-verifyNotWritable(Array.prototype.flatten, 'name'); >-verifyConfigurable(Array.prototype.flatten, 'name'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flatten/non-numeric-depth-should-not-throw.js b/JSTests/test262/test/built-ins/Array/prototype/flatten/non-numeric-depth-should-not-throw.js >deleted file mode 100644 >index 5f6f59d2f0fe92ea4571486bf842ef9c0fc3a8de..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/built-ins/Array/prototype/flatten/non-numeric-depth-should-not-throw.js >+++ /dev/null >@@ -1,43 +0,0 @@ >-// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >-/*--- >-esid: sec-array.prototype.flatten >-description: > >- if the argument is a string or object, the depthNum is 0 >-includes: [compareArray.js] >-features: [Array.prototype.flatten] >----*/ >- >-var a = [1, [2]]; >-var expected = a; >- >-// non integral string depthNum is converted to 0 >-var depthNum = 'TestString'; >-var actual = a.flatten(depthNum); >-assert(compareArray(actual, expected), 'non integral string depthNum'); >- >-// object type depthNum is converted to 0 >-var depthNum = {}; >-var actual = a.flatten(depthNum); >-assert(compareArray(actual, expected), 'object type depthNum'); >- >-// negative infinity depthNum is converted to 0 >-var depthNum = Number.NEGATIVE_INFINITY; >-var actual = a.flatten(depthNum); >-assert(compareArray(actual, expected), 'negative infinity depthNum'); >- >-// positive zero depthNum is converted to 0 >-var depthNum = +0; >-var actual = a.flatten(depthNum); >-assert(compareArray(actual, expected), 'positive zero depthNum'); >- >-// negative zero depthNum is converted to 0 >-var depthNum = -0; >-var actual = a.flatten(depthNum); >-assert(compareArray(actual, expected), 'negative zero depthNum'); >- >-// integral string depthNum is converted to an integer >-var depthNum = '1'; >-var actual = a.flatten(depthNum); >-var expected = [1, 2] >-assert(compareArray(actual, expected), 'integral string depthNum'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flatten/non-object-ctor-throws.js b/JSTests/test262/test/built-ins/Array/prototype/flatten/non-object-ctor-throws.js >deleted file mode 100644 >index fc8e8768591b3c5879137c810b432d8c969a92c5..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/built-ins/Array/prototype/flatten/non-object-ctor-throws.js >+++ /dev/null >@@ -1,33 +0,0 @@ >-// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >-/*--- >-esid: sec-array.prototype.flatten >-description: > >- Behavior when `constructor` property is neither an Object nor undefined >- - if IsConstructor(C) is false, throw a TypeError exception. >-features: [Array.prototype.flatten] >----*/ >- >-var a = []; >-a.constructor = null; >-assert.throws(TypeError, function() { >- a.flatten(); >-}, 'null value'); >- >-var a = []; >-a.constructor = 1; >-assert.throws(TypeError, function() { >- a.flatten(); >-}, 'number value'); >- >-var a = []; >-a.constructor = 'string'; >-assert.throws(TypeError, function() { >- a.flatten(); >-}, 'string value'); >- >-var a = []; >-a.constructor = true; >-assert.throws(TypeError, function() { >- a.flatten(); >-}, 'boolean value'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flatten/null-undefined-elements.js b/JSTests/test262/test/built-ins/Array/prototype/flatten/null-undefined-elements.js >deleted file mode 100644 >index 8211fdcc28b5b6db36623f999b87b4368dfa71d3..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/built-ins/Array/prototype/flatten/null-undefined-elements.js >+++ /dev/null >@@ -1,20 +0,0 @@ >-// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >-/*--- >-esid: sec-array.prototype.flatten >-description: > >- arrays with null, and undefined >-includes: [compareArray.js] >-features: [Array.prototype.flatten] >----*/ >- >-var a = [void 0]; >- >-assert(compareArray([1, null, void 0].flatten(), [1, null, undefined])); >-assert(compareArray([1, [null, void 0]].flatten(), [1, null, undefined])); >-assert(compareArray([ >- [null, void 0], >- [null, void 0] >-].flatten(), [null, undefined, null, undefined])); >-assert(compareArray([1, [null, a]].flatten(1), [1, null, a])); >-assert(compareArray([1, [null, a]].flatten(2), [1, null, undefined])); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flatten/null-undefined-input-throws.js b/JSTests/test262/test/built-ins/Array/prototype/flatten/null-undefined-input-throws.js >deleted file mode 100644 >index d3a5a59adc77b1c4c2bf30a14dbebf87a08a9585..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/built-ins/Array/prototype/flatten/null-undefined-input-throws.js >+++ /dev/null >@@ -1,20 +0,0 @@ >-// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >-/*--- >-esid: sec-array.prototype.flatten >-description: > >- null or undefined should throw TypeError Exception >-features: [Array.prototype.flatten] >----*/ >- >-assert.throws(TypeError, function() { >- [].flatten.call(null); >-}, 'null value'); >- >-assert.throws(TypeError, function() { >- [].flatten.call(); >-}, 'missing'); >- >-assert.throws(TypeError, function() { >- [].flatten.call(void 0); >-}, 'undefined'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flatten/positive-infinity.js b/JSTests/test262/test/built-ins/Array/prototype/flatten/positive-infinity.js >deleted file mode 100644 >index 0c4dfcd593290c0e19f81daa0a85bd32e96ff80a..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/built-ins/Array/prototype/flatten/positive-infinity.js >+++ /dev/null >@@ -1,12 +0,0 @@ >-// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >-/*--- >-esid: sec-array.prototype.flatten >-description: > >- if the argument is a positive infinity, the depthNum is max depth of the array >-includes: [compareArray.js] >-features: [Array.prototype.flatten] >----*/ >- >-var a = [1, [2, [3, [4]]]] >-assert(compareArray(a.flatten(Number.POSITIVE_INFINITY), [1, 2, 3, 4]), 'positive infinity depthNum'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flatten/prop-desc.js b/JSTests/test262/test/built-ins/Array/prototype/flatten/prop-desc.js >deleted file mode 100644 >index f7f386148bbb3fd32d014c951439f630c2187184..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/built-ins/Array/prototype/flatten/prop-desc.js >+++ /dev/null >@@ -1,21 +0,0 @@ >-// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >-/*--- >-esid: sec-array.prototype.flatten >-es6id: 22.1.3 >-description: Property type and descriptor. >-info: > >- 17 ECMAScript Standard Built-in Objects >-includes: [propertyHelper.js] >-features: [Array.prototype.flatten] >----*/ >- >-assert.sameValue( >- typeof Array.prototype.flatten, >- 'function', >- '`typeof Array.prototype.flatten` is `function`' >-); >- >-verifyNotEnumerable(Array.prototype, 'flatten'); >-verifyWritable(Array.prototype, 'flatten'); >-verifyConfigurable(Array.prototype, 'flatten'); >diff --git a/JSTests/test262/test/built-ins/Array/prototype/flatten/symbol-object-create-null-depth-throws.js b/JSTests/test262/test/built-ins/Array/prototype/flatten/symbol-object-create-null-depth-throws.js >deleted file mode 100644 >index af58ce6b7d20662e512db629a36a98d1eda100b0..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/built-ins/Array/prototype/flatten/symbol-object-create-null-depth-throws.js >+++ /dev/null >@@ -1,16 +0,0 @@ >-// Copyright (C) 2018 Shilpi Jain and Michael Ficarra. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >-/*--- >-esid: sec-array.prototype.flatten >-description: > >- if the argument is a Symbol or Object null, it throws exception >-features: [Array.prototype.flatten] >----*/ >- >-assert.throws(TypeError, function() { >- [].flatten(Symbol()); >-}, 'symbol value'); >- >-assert.throws(TypeError, function() { >- [].flatten(Object.create(null)); >-}, 'object create null'); >diff --git a/JSTests/test262/test/built-ins/AsyncGeneratorPrototype/next/name.js b/JSTests/test262/test/built-ins/AsyncGeneratorPrototype/next/name.js >index f292515c4b0cd17e1a04b2a31d43beb9b3e6acde..4ce8bb977e42dffeff867a2c31747d01de71155e 100644 >--- a/JSTests/test262/test/built-ins/AsyncGeneratorPrototype/next/name.js >+++ b/JSTests/test262/test/built-ins/AsyncGeneratorPrototype/next/name.js >@@ -17,7 +17,7 @@ > object, if it exists, has the attributes { [[Writable]]: false, > [[Enumerable]]: false, [[Configurable]]: true }. > includes: [propertyHelper.js] >-features: [generators] >+features: [async-iteration] > ---*/ > > async function* g() {} >diff --git a/JSTests/test262/test/built-ins/AsyncGeneratorPrototype/return/name.js b/JSTests/test262/test/built-ins/AsyncGeneratorPrototype/return/name.js >index c14f4ee23562d8264ad40235a4a2fd11b8601892..381702056d7a606f63d222db30d1005e84826907 100644 >--- a/JSTests/test262/test/built-ins/AsyncGeneratorPrototype/return/name.js >+++ b/JSTests/test262/test/built-ins/AsyncGeneratorPrototype/return/name.js >@@ -17,7 +17,7 @@ > object, if it exists, has the attributes { [[Writable]]: false, > [[Enumerable]]: false, [[Configurable]]: true }. > includes: [propertyHelper.js] >-features: [generators] >+features: [async-iteration] > ---*/ > > async function* g() {} >diff --git a/JSTests/test262/test/built-ins/AsyncGeneratorPrototype/throw/name.js b/JSTests/test262/test/built-ins/AsyncGeneratorPrototype/throw/name.js >index d15df4e8062067bc8f756c9ebbecd6a23b4b481d..9e7ec9351633fcd9a680e6d1539ac9d5e32ae186 100644 >--- a/JSTests/test262/test/built-ins/AsyncGeneratorPrototype/throw/name.js >+++ b/JSTests/test262/test/built-ins/AsyncGeneratorPrototype/throw/name.js >@@ -17,7 +17,7 @@ > object, if it exists, has the attributes { [[Writable]]: false, > [[Enumerable]]: false, [[Configurable]]: true }. > includes: [propertyHelper.js] >-features: [generators] >+features: [async-iteration] > ---*/ > > async function* g() {} >diff --git a/JSTests/test262/test/built-ins/Math/acosh/nan-returns.js b/JSTests/test262/test/built-ins/Math/acosh/nan-returns.js >index 4917b4905ce4e7ae684a80eab2235698b074f87d..b58e45dd5661cff81b61ac2e4a8918e721859fe2 100644 >--- a/JSTests/test262/test/built-ins/Math/acosh/nan-returns.js >+++ b/JSTests/test262/test/built-ins/Math/acosh/nan-returns.js >@@ -1,18 +1,18 @@ >-// Copyright 2015 Microsoft Corporation. All rights reserved. >-// This code is governed by the license found in the LICENSE file. >- >-/*--- >-description: Math.acosh with special values >-es6id: 20.2.2.3 >-info: | >- Math.acosh ( x ) >- >- - If x is NaN, the result is NaN. >- - If x is less than 1, the result is NaN. >----*/ >- >-assert.sameValue(Math.acosh(NaN), NaN, "NaN"); >-assert.sameValue(Math.acosh(0.999999), NaN, "0.999999"); >-assert.sameValue(Math.acosh(0), NaN, "0"); >-assert.sameValue(Math.acosh(-1), NaN, "-1"); >-assert.sameValue(Math.acosh(-Infinity), NaN, "-Infinity"); >+// Copyright 2015 Microsoft Corporation. All rights reserved. >+// This code is governed by the license found in the LICENSE file. >+ >+/*--- >+description: Math.acosh with special values >+es6id: 20.2.2.3 >+info: | >+ Math.acosh ( x ) >+ >+ - If x is NaN, the result is NaN. >+ - If x is less than 1, the result is NaN. >+---*/ >+ >+assert.sameValue(Math.acosh(NaN), NaN, "NaN"); >+assert.sameValue(Math.acosh(0.999999), NaN, "0.999999"); >+assert.sameValue(Math.acosh(0), NaN, "0"); >+assert.sameValue(Math.acosh(-1), NaN, "-1"); >+assert.sameValue(Math.acosh(-Infinity), NaN, "-Infinity"); >diff --git a/JSTests/test262/test/built-ins/Math/asinh/asinh-specialVals.js b/JSTests/test262/test/built-ins/Math/asinh/asinh-specialVals.js >index 38d8c35aea735ce20d940241c2cb7a251e6dede0..33d88207c0a77fc2a41c7fb18ee6c35228bbbf21 100644 >--- a/JSTests/test262/test/built-ins/Math/asinh/asinh-specialVals.js >+++ b/JSTests/test262/test/built-ins/Math/asinh/asinh-specialVals.js >@@ -1,18 +1,18 @@ >-// Copyright 2015 Microsoft Corporation. All rights reserved. >-// This code is governed by the license found in the LICENSE file. >- >-/*--- >-description: Math.asinh with special values >-es6id: 20.2.2.5 >----*/ >- >-assert.sameValue(Math.asinh(NaN), Number.NaN, >- "Math.asinh produces incorrect output for NaN"); >-assert.sameValue(Math.asinh(Number.NEGATIVE_INFINITY), Number.NEGATIVE_INFINITY, >- "Math.asinh should produce negative infinity for Number.NEGATIVE_INFINITY"); >-assert.sameValue(Math.asinh(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, >- "Math.asinh should produce positive infinity for Number.POSITIVE_INFINITY"); >-assert.sameValue(1 / Math.asinh(-0), Number.NEGATIVE_INFINITY, >- "Math.asinh should produce -0 for -0"); >-assert.sameValue(1 / Math.asinh(0), Number.POSITIVE_INFINITY, >- "Math.asinh should produce +0 for +0"); >+// Copyright 2015 Microsoft Corporation. All rights reserved. >+// This code is governed by the license found in the LICENSE file. >+ >+/*--- >+description: Math.asinh with special values >+es6id: 20.2.2.5 >+---*/ >+ >+assert.sameValue(Math.asinh(NaN), Number.NaN, >+ "Math.asinh produces incorrect output for NaN"); >+assert.sameValue(Math.asinh(Number.NEGATIVE_INFINITY), Number.NEGATIVE_INFINITY, >+ "Math.asinh should produce negative infinity for Number.NEGATIVE_INFINITY"); >+assert.sameValue(Math.asinh(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, >+ "Math.asinh should produce positive infinity for Number.POSITIVE_INFINITY"); >+assert.sameValue(1 / Math.asinh(-0), Number.NEGATIVE_INFINITY, >+ "Math.asinh should produce -0 for -0"); >+assert.sameValue(1 / Math.asinh(0), Number.POSITIVE_INFINITY, >+ "Math.asinh should produce +0 for +0"); >diff --git a/JSTests/test262/test/built-ins/Math/atanh/atanh-specialVals.js b/JSTests/test262/test/built-ins/Math/atanh/atanh-specialVals.js >index 0a961af76d85d726dee3962cd8fca4619c182481..9148c1bb43151391d74abb5d6e6c3ec497825e48 100644 >--- a/JSTests/test262/test/built-ins/Math/atanh/atanh-specialVals.js >+++ b/JSTests/test262/test/built-ins/Math/atanh/atanh-specialVals.js >@@ -1,31 +1,31 @@ >-// Copyright 2015 Microsoft Corporation. All rights reserved. >-// This code is governed by the license found in the LICENSE file. >- >-/*--- >-description: Math.atanh with special values >-es6id: 20.2.2.7 >----*/ >- >-assert.sameValue(Math.atanh(-1.9), Number.NaN, >- "Math.atanh produces incorrect output for -1.9"); >-assert.sameValue(Math.atanh(NaN), Number.NaN, >- "Math.atanh produces incorrect output for NaN"); >-assert.sameValue(Math.atanh(-10), Number.NaN, >- "Math.atanh produces incorrect output for -10"); >-assert.sameValue(Math.atanh(-Infinity), Number.NaN, >- "Math.atanh produces incorrect output for -Infinity"); >-assert.sameValue(Math.atanh(1.9), Number.NaN, >- "Math.atanh produces incorrect output for 1.9"); >-assert.sameValue(Math.atanh(10), Number.NaN, >- "Math.atanh produces incorrect output for 10"); >-assert.sameValue(Math.atanh(Number.POSITIVE_INFINITY), Number.NaN, >- "Math.atanh produces incorrect output for Number.POSITIVE_INFINITY"); >- >-assert.sameValue(Math.atanh(-1), Number.NEGATIVE_INFINITY, >- "Math.atanh should produce negative infinity for -1"); >-assert.sameValue(Math.atanh(+1), Number.POSITIVE_INFINITY, >- "Math.atanh should produce positive infinity for +1"); >-assert.sameValue(1 / Math.atanh(-0), Number.NEGATIVE_INFINITY, >- "Math.atanh should produce -0 for -0"); >-assert.sameValue(1 / Math.atanh(0), Number.POSITIVE_INFINITY, >- "Math.atanh should produce +0 for +0"); >+// Copyright 2015 Microsoft Corporation. All rights reserved. >+// This code is governed by the license found in the LICENSE file. >+ >+/*--- >+description: Math.atanh with special values >+es6id: 20.2.2.7 >+---*/ >+ >+assert.sameValue(Math.atanh(-1.9), Number.NaN, >+ "Math.atanh produces incorrect output for -1.9"); >+assert.sameValue(Math.atanh(NaN), Number.NaN, >+ "Math.atanh produces incorrect output for NaN"); >+assert.sameValue(Math.atanh(-10), Number.NaN, >+ "Math.atanh produces incorrect output for -10"); >+assert.sameValue(Math.atanh(-Infinity), Number.NaN, >+ "Math.atanh produces incorrect output for -Infinity"); >+assert.sameValue(Math.atanh(1.9), Number.NaN, >+ "Math.atanh produces incorrect output for 1.9"); >+assert.sameValue(Math.atanh(10), Number.NaN, >+ "Math.atanh produces incorrect output for 10"); >+assert.sameValue(Math.atanh(Number.POSITIVE_INFINITY), Number.NaN, >+ "Math.atanh produces incorrect output for Number.POSITIVE_INFINITY"); >+ >+assert.sameValue(Math.atanh(-1), Number.NEGATIVE_INFINITY, >+ "Math.atanh should produce negative infinity for -1"); >+assert.sameValue(Math.atanh(+1), Number.POSITIVE_INFINITY, >+ "Math.atanh should produce positive infinity for +1"); >+assert.sameValue(1 / Math.atanh(-0), Number.NEGATIVE_INFINITY, >+ "Math.atanh should produce -0 for -0"); >+assert.sameValue(1 / Math.atanh(0), Number.POSITIVE_INFINITY, >+ "Math.atanh should produce +0 for +0"); >diff --git a/JSTests/test262/test/built-ins/Math/cbrt/cbrt-specialValues.js b/JSTests/test262/test/built-ins/Math/cbrt/cbrt-specialValues.js >index 271c60cbdb3326a0b4560f9a21f729c54aabb7e5..9ac640cabec9872b4f110acc9cecb3ad1924e200 100644 >--- a/JSTests/test262/test/built-ins/Math/cbrt/cbrt-specialValues.js >+++ b/JSTests/test262/test/built-ins/Math/cbrt/cbrt-specialValues.js >@@ -1,18 +1,18 @@ >-// Copyright 2015 Microsoft Corporation. All rights reserved. >-// This code is governed by the license found in the LICENSE file. >- >-/*--- >-description: Math.cbrt with special values >-es6id: 20.2.2.9 >----*/ >- >-assert.sameValue(Math.cbrt(NaN), Number.NaN, >- "Math.cbrt produces incorrect output for NaN"); >-assert.sameValue(Math.cbrt(Number.NEGATIVE_INFINITY), Number.NEGATIVE_INFINITY, >- "Math.cbrt should produce negative infinity for Number.NEGATIVE_INFINITY"); >-assert.sameValue(Math.cbrt(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, >- "Math.cbrt should produce positive infinity for Number.POSITIVE_INFINITY"); >-assert.sameValue(1 / Math.cbrt(-0), Number.NEGATIVE_INFINITY, >- "Math.cbrt should produce -0 for -0"); >-assert.sameValue(1 / Math.cbrt(0), Number.POSITIVE_INFINITY, >- "Math.cbrt should produce +0 for +0"); >+// Copyright 2015 Microsoft Corporation. All rights reserved. >+// This code is governed by the license found in the LICENSE file. >+ >+/*--- >+description: Math.cbrt with special values >+es6id: 20.2.2.9 >+---*/ >+ >+assert.sameValue(Math.cbrt(NaN), Number.NaN, >+ "Math.cbrt produces incorrect output for NaN"); >+assert.sameValue(Math.cbrt(Number.NEGATIVE_INFINITY), Number.NEGATIVE_INFINITY, >+ "Math.cbrt should produce negative infinity for Number.NEGATIVE_INFINITY"); >+assert.sameValue(Math.cbrt(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, >+ "Math.cbrt should produce positive infinity for Number.POSITIVE_INFINITY"); >+assert.sameValue(1 / Math.cbrt(-0), Number.NEGATIVE_INFINITY, >+ "Math.cbrt should produce -0 for -0"); >+assert.sameValue(1 / Math.cbrt(0), Number.POSITIVE_INFINITY, >+ "Math.cbrt should produce +0 for +0"); >diff --git a/JSTests/test262/test/built-ins/Math/cbrt/prop-desc.js b/JSTests/test262/test/built-ins/Math/cbrt/prop-desc.js >index 0a5a2657cc17c7011b0ac74b48b5f63fcad410b7..e7d83a78fd1cbcd2ded06c9d62bb1de9f07f1dd3 100644 >--- a/JSTests/test262/test/built-ins/Math/cbrt/prop-desc.js >+++ b/JSTests/test262/test/built-ins/Math/cbrt/prop-desc.js >@@ -1,12 +1,12 @@ >-// Copyright 2015 Microsoft Corporation. All rights reserved. >-// This code is governed by the license found in the LICENSE file. >- >-/*--- >-description: Testing descriptor property of Math.cbrt >-includes: [propertyHelper.js] >-es6id: 20.2.2.9 >----*/ >- >-verifyNotEnumerable(Math, "cbrt"); >-verifyWritable(Math, "cbrt"); >-verifyConfigurable(Math, "cbrt"); >+// Copyright 2015 Microsoft Corporation. All rights reserved. >+// This code is governed by the license found in the LICENSE file. >+ >+/*--- >+description: Testing descriptor property of Math.cbrt >+includes: [propertyHelper.js] >+es6id: 20.2.2.9 >+---*/ >+ >+verifyNotEnumerable(Math, "cbrt"); >+verifyWritable(Math, "cbrt"); >+verifyConfigurable(Math, "cbrt"); >diff --git a/JSTests/test262/test/built-ins/Math/cosh/cosh-specialVals.js b/JSTests/test262/test/built-ins/Math/cosh/cosh-specialVals.js >index 09bde42964007d0b810130af21aebd196963d6c7..ddb54453916d56d26df6580fe2b6dd18cb6e1f7d 100644 >--- a/JSTests/test262/test/built-ins/Math/cosh/cosh-specialVals.js >+++ b/JSTests/test262/test/built-ins/Math/cosh/cosh-specialVals.js >@@ -1,16 +1,16 @@ >-// Copyright 2015 Microsoft Corporation. All rights reserved. >-// This code is governed by the license found in the LICENSE file. >- >-/*--- >-description: Math.cosh with special values >-es6id: 20.2.2.13 >----*/ >- >-assert.sameValue(Math.cosh(NaN), Number.NaN, >- "Math.cosh produces incorrect output for NaN"); >-assert.sameValue(Math.cosh(0), 1, "Math.cosh should produce 1 for input = 0"); >-assert.sameValue(Math.cosh(-0), 1, "Math.cosh should produce 1 for input = -0"); >-assert.sameValue(Math.cosh(Number.NEGATIVE_INFINITY), Number.POSITIVE_INFINITY, >- "Math.cosh should produce Number.POSITIVE_INFINITY for Number.NEGATIVE_INFINITY"); >-assert.sameValue(Math.cosh(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, >- "Math.cosh should produce Number.POSITIVE_INFINITY for Number.POSITIVE_INFINITY"); >+// Copyright 2015 Microsoft Corporation. All rights reserved. >+// This code is governed by the license found in the LICENSE file. >+ >+/*--- >+description: Math.cosh with special values >+es6id: 20.2.2.13 >+---*/ >+ >+assert.sameValue(Math.cosh(NaN), Number.NaN, >+ "Math.cosh produces incorrect output for NaN"); >+assert.sameValue(Math.cosh(0), 1, "Math.cosh should produce 1 for input = 0"); >+assert.sameValue(Math.cosh(-0), 1, "Math.cosh should produce 1 for input = -0"); >+assert.sameValue(Math.cosh(Number.NEGATIVE_INFINITY), Number.POSITIVE_INFINITY, >+ "Math.cosh should produce Number.POSITIVE_INFINITY for Number.NEGATIVE_INFINITY"); >+assert.sameValue(Math.cosh(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, >+ "Math.cosh should produce Number.POSITIVE_INFINITY for Number.POSITIVE_INFINITY"); >diff --git a/JSTests/test262/test/built-ins/Math/expm1/expm1-specialVals.js b/JSTests/test262/test/built-ins/Math/expm1/expm1-specialVals.js >index 1ca16baa9dd50fd54d9cbcb93fc001a79e762336..65aa97904d0eeb3fe121fc9865ca6b02a3b17005 100644 >--- a/JSTests/test262/test/built-ins/Math/expm1/expm1-specialVals.js >+++ b/JSTests/test262/test/built-ins/Math/expm1/expm1-specialVals.js >@@ -1,18 +1,18 @@ >-// Copyright 2015 Microsoft Corporation. All rights reserved. >-// This code is governed by the license found in the LICENSE file. >- >-/*--- >-description: Math.expm1 with sample values. >-es6id: 20.2.2.15 >----*/ >- >-assert.sameValue(Math.expm1(NaN), Number.NaN, >- "Math.expm1 produces incorrect output for NaN"); >-assert.sameValue(Math.expm1(Number.NEGATIVE_INFINITY), -1, >- "Math.expm1 should produce -1 for Number.NEGATIVE_INFINITY"); >-assert.sameValue(Math.expm1(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, >- "Math.expm1 should produce POSITIVE infinity for Number.POSITIVE_INFINITY"); >-assert.sameValue(1 / Math.expm1(-0), Number.NEGATIVE_INFINITY, >- "Math.expm1 should produce -0 for -0"); >-assert.sameValue(1 / Math.expm1(0), Number.POSITIVE_INFINITY, >- "Math.expm1 should produce +0 for +0"); >+// Copyright 2015 Microsoft Corporation. All rights reserved. >+// This code is governed by the license found in the LICENSE file. >+ >+/*--- >+description: Math.expm1 with sample values. >+es6id: 20.2.2.15 >+---*/ >+ >+assert.sameValue(Math.expm1(NaN), Number.NaN, >+ "Math.expm1 produces incorrect output for NaN"); >+assert.sameValue(Math.expm1(Number.NEGATIVE_INFINITY), -1, >+ "Math.expm1 should produce -1 for Number.NEGATIVE_INFINITY"); >+assert.sameValue(Math.expm1(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, >+ "Math.expm1 should produce POSITIVE infinity for Number.POSITIVE_INFINITY"); >+assert.sameValue(1 / Math.expm1(-0), Number.NEGATIVE_INFINITY, >+ "Math.expm1 should produce -0 for -0"); >+assert.sameValue(1 / Math.expm1(0), Number.POSITIVE_INFINITY, >+ "Math.expm1 should produce +0 for +0"); >diff --git a/JSTests/test262/test/built-ins/Math/log10/Log10-specialVals.js b/JSTests/test262/test/built-ins/Math/log10/Log10-specialVals.js >index e208dd0ebd68024d748b14b6f2297a1a51c094a6..341ea36e0913914e96bd29bfaa3cd6e3e3f6df42 100644 >--- a/JSTests/test262/test/built-ins/Math/log10/Log10-specialVals.js >+++ b/JSTests/test262/test/built-ins/Math/log10/Log10-specialVals.js >@@ -1,32 +1,32 @@ >-// Copyright 2015 Microsoft Corporation. All rights reserved. >-// This code is governed by the license found in the LICENSE file. >- >-/*--- >-description: Math.Log10 with sample values. >-es6id: 20.2.2.20 >----*/ >- >-assert.sameValue(Math.log10(-0), Number.NEGATIVE_INFINITY, >- "Math.log10 produces incorrect output for -0"); >-assert.sameValue(Math.log10(+0), Number.NEGATIVE_INFINITY, >- "Math.log10 produces incorrect output for +0"); >-assert.sameValue(Math.log10(-0.9), Number.NaN, >- "Math.log10 produces incorrect output for -0.9"); >-assert.sameValue(Math.log10(NaN), Number.NaN, >- "Math.log10 produces incorrect output for NaN"); >-assert.sameValue(Math.log10(-10), Number.NaN, >- "Math.log10 produces incorrect output for -10"); >-assert.sameValue(Math.log10(null), Number.NEGATIVE_INFINITY, >- "Math.log10 produces incorrect output for null"); >-assert.sameValue(Math.log10(undefined), Number.NaN, >- "Math.log10 produces incorrect output for undefined"); >-assert.sameValue(Math.log10(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, >- "Math.log10 produces incorrect output for Number.POSITIVE_INFINITY"); >-assert.sameValue(Math.log10(1), 0, >- "Math.log10 produces incorrect output for 1"); >-assert.sameValue(Math.log10(10.00), 1, >- "Math.log10 produces incorrect output for 10.00"); >-assert.sameValue(Math.log10(100.00), 2, >- "Math.log10 produces incorrect output for 100.00"); >-assert.sameValue(Math.log10(1000.00), 3, >- "Math.log10 produces incorrect output for 1000.00"); >+// Copyright 2015 Microsoft Corporation. All rights reserved. >+// This code is governed by the license found in the LICENSE file. >+ >+/*--- >+description: Math.Log10 with sample values. >+es6id: 20.2.2.20 >+---*/ >+ >+assert.sameValue(Math.log10(-0), Number.NEGATIVE_INFINITY, >+ "Math.log10 produces incorrect output for -0"); >+assert.sameValue(Math.log10(+0), Number.NEGATIVE_INFINITY, >+ "Math.log10 produces incorrect output for +0"); >+assert.sameValue(Math.log10(-0.9), Number.NaN, >+ "Math.log10 produces incorrect output for -0.9"); >+assert.sameValue(Math.log10(NaN), Number.NaN, >+ "Math.log10 produces incorrect output for NaN"); >+assert.sameValue(Math.log10(-10), Number.NaN, >+ "Math.log10 produces incorrect output for -10"); >+assert.sameValue(Math.log10(null), Number.NEGATIVE_INFINITY, >+ "Math.log10 produces incorrect output for null"); >+assert.sameValue(Math.log10(undefined), Number.NaN, >+ "Math.log10 produces incorrect output for undefined"); >+assert.sameValue(Math.log10(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, >+ "Math.log10 produces incorrect output for Number.POSITIVE_INFINITY"); >+assert.sameValue(Math.log10(1), 0, >+ "Math.log10 produces incorrect output for 1"); >+assert.sameValue(Math.log10(10.00), 1, >+ "Math.log10 produces incorrect output for 10.00"); >+assert.sameValue(Math.log10(100.00), 2, >+ "Math.log10 produces incorrect output for 100.00"); >+assert.sameValue(Math.log10(1000.00), 3, >+ "Math.log10 produces incorrect output for 1000.00"); >diff --git a/JSTests/test262/test/built-ins/Math/log2/log2-basicTests.js b/JSTests/test262/test/built-ins/Math/log2/log2-basicTests.js >index 59b5c9dd189a9354bb2100bd6351c672b6ebcdc7..bd3bb510a3a9f6786ce575c1d2dfe501f318c935 100644 >--- a/JSTests/test262/test/built-ins/Math/log2/log2-basicTests.js >+++ b/JSTests/test262/test/built-ins/Math/log2/log2-basicTests.js >@@ -1,34 +1,34 @@ >-// Copyright 2015 Microsoft Corporation. All rights reserved. >-// This code is governed by the license found in the LICENSE file. >- >-/*--- >-description: Math.Log2 with sample values. >-es6id: 20.2.2.23 >----*/ >- >-assert.sameValue(Math.log2(-0), Number.NEGATIVE_INFINITY, >- "Math.log2 produces incorrect output for -0"); >-assert.sameValue(Math.log2(+0), Number.NEGATIVE_INFINITY, >- "Math.log2 produces incorrect output for +0"); >-assert.sameValue(Math.log2(-0.9), NaN, >- "Math.log2 produces incorrect output for -0.9"); >-assert.sameValue(Math.log2(NaN), NaN, >- "Math.log2 produces incorrect output for NaN"); >-assert.sameValue(Math.log2(-10), NaN, >- "Math.log2 produces incorrect output for -10"); >-assert.sameValue(Math.log2(-Infinity), NaN, >- "Math.log2 produces incorrect output for -Infinity"); >-assert.sameValue(Math.log2(null), Number.NEGATIVE_INFINITY, >- "Math.log2 produces incorrect output for null"); >-assert.sameValue(Math.log2(undefined), NaN, >- "Math.log2 produces incorrect output for undefined"); >-assert.sameValue(Math.log2(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, >- "Math.log2 produces incorrect output for Number.POSITIVE_INFINITY"); >-assert.sameValue(Math.log2(1), 0, >- "Math.log2 produces incorrect output for 1"); >-assert.sameValue(Math.log2(2.00), 1, >- "Math.log2 produces incorrect output for 2.00"); >-assert.sameValue(Math.log2(4.00), 2, >- "Math.log2 produces incorrect output for 4.00"); >-assert.sameValue(Math.log2(8.00), 3, >- "Math.log2 produces incorrect output for 8.00"); >+// Copyright 2015 Microsoft Corporation. All rights reserved. >+// This code is governed by the license found in the LICENSE file. >+ >+/*--- >+description: Math.Log2 with sample values. >+es6id: 20.2.2.23 >+---*/ >+ >+assert.sameValue(Math.log2(-0), Number.NEGATIVE_INFINITY, >+ "Math.log2 produces incorrect output for -0"); >+assert.sameValue(Math.log2(+0), Number.NEGATIVE_INFINITY, >+ "Math.log2 produces incorrect output for +0"); >+assert.sameValue(Math.log2(-0.9), NaN, >+ "Math.log2 produces incorrect output for -0.9"); >+assert.sameValue(Math.log2(NaN), NaN, >+ "Math.log2 produces incorrect output for NaN"); >+assert.sameValue(Math.log2(-10), NaN, >+ "Math.log2 produces incorrect output for -10"); >+assert.sameValue(Math.log2(-Infinity), NaN, >+ "Math.log2 produces incorrect output for -Infinity"); >+assert.sameValue(Math.log2(null), Number.NEGATIVE_INFINITY, >+ "Math.log2 produces incorrect output for null"); >+assert.sameValue(Math.log2(undefined), NaN, >+ "Math.log2 produces incorrect output for undefined"); >+assert.sameValue(Math.log2(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, >+ "Math.log2 produces incorrect output for Number.POSITIVE_INFINITY"); >+assert.sameValue(Math.log2(1), 0, >+ "Math.log2 produces incorrect output for 1"); >+assert.sameValue(Math.log2(2.00), 1, >+ "Math.log2 produces incorrect output for 2.00"); >+assert.sameValue(Math.log2(4.00), 2, >+ "Math.log2 produces incorrect output for 4.00"); >+assert.sameValue(Math.log2(8.00), 3, >+ "Math.log2 produces incorrect output for 8.00"); >diff --git a/JSTests/test262/test/built-ins/Math/sign/sign-specialVals.js b/JSTests/test262/test/built-ins/Math/sign/sign-specialVals.js >index 0e63fe895f2b2410cf9c8393fb7627e10fe4f402..9026c223ce3124d860310b5fbbffe9b88e1f6733 100644 >--- a/JSTests/test262/test/built-ins/Math/sign/sign-specialVals.js >+++ b/JSTests/test262/test/built-ins/Math/sign/sign-specialVals.js >@@ -1,20 +1,20 @@ >-// Copyright 2015 Microsoft Corporation. All rights reserved. >-// This code is governed by the license found in the LICENSE file. >- >-/*--- >-description: > >- Returns the sign of the x, indicating whether x is positive, negative or zero. >-es6id: 20.2.2.29 >----*/ >- >-assert.sameValue(Math.sign(NaN), NaN, "NaN"); >-assert.sameValue(Math.sign(-0), -0, "-0"); >-assert.sameValue(Math.sign(0), 0, "0"); >- >-assert.sameValue(Math.sign(-0.000001), -1, "-0.000001"); >-assert.sameValue(Math.sign(-1), -1, "-1"); >-assert.sameValue(Math.sign(-Infinity), -1, "-Infinity"); >- >-assert.sameValue(Math.sign(0.000001), 1, "0.000001"); >-assert.sameValue(Math.sign(1), 1, "1"); >-assert.sameValue(Math.sign(Infinity), 1, "Infinity"); >+// Copyright 2015 Microsoft Corporation. All rights reserved. >+// This code is governed by the license found in the LICENSE file. >+ >+/*--- >+description: > >+ Returns the sign of the x, indicating whether x is positive, negative or zero. >+es6id: 20.2.2.29 >+---*/ >+ >+assert.sameValue(Math.sign(NaN), NaN, "NaN"); >+assert.sameValue(Math.sign(-0), -0, "-0"); >+assert.sameValue(Math.sign(0), 0, "0"); >+ >+assert.sameValue(Math.sign(-0.000001), -1, "-0.000001"); >+assert.sameValue(Math.sign(-1), -1, "-1"); >+assert.sameValue(Math.sign(-Infinity), -1, "-Infinity"); >+ >+assert.sameValue(Math.sign(0.000001), 1, "0.000001"); >+assert.sameValue(Math.sign(1), 1, "1"); >+assert.sameValue(Math.sign(Infinity), 1, "Infinity"); >diff --git a/JSTests/test262/test/built-ins/Math/sinh/sinh-specialVals.js b/JSTests/test262/test/built-ins/Math/sinh/sinh-specialVals.js >index 9f0b5e23b2b8dec72be1cfd1e790b5cce3d14526..beda3cd0f8a05c167959f0370ba510eaeaf031e4 100644 >--- a/JSTests/test262/test/built-ins/Math/sinh/sinh-specialVals.js >+++ b/JSTests/test262/test/built-ins/Math/sinh/sinh-specialVals.js >@@ -1,18 +1,18 @@ >-// Copyright 2015 Microsoft Corporation. All rights reserved. >-// This code is governed by the license found in the LICENSE file. >- >-/*--- >-description: Math.sinh with special values >-es6id: 20.2.2.31 >----*/ >- >-assert.sameValue(Math.sinh(NaN), Number.NaN, >- "Math.sinh produces incorrect output for NaN"); >-assert.sameValue(Math.sinh(Number.NEGATIVE_INFINITY), Number.NEGATIVE_INFINITY, >- "Math.sinh should produce negative infinity for Number.NEGATIVE_INFINITY"); >-assert.sameValue(Math.sinh(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, >- "Math.sinh should produce positive infinity for Number.POSITIVE_INFINITY"); >-assert.sameValue(1 / Math.sinh(-0), Number.NEGATIVE_INFINITY, >- "Math.sinh should produce -0 for -0"); >-assert.sameValue(1 / Math.sinh(0), Number.POSITIVE_INFINITY, >- "Math.sinh should produce +0 for +0"); >+// Copyright 2015 Microsoft Corporation. All rights reserved. >+// This code is governed by the license found in the LICENSE file. >+ >+/*--- >+description: Math.sinh with special values >+es6id: 20.2.2.31 >+---*/ >+ >+assert.sameValue(Math.sinh(NaN), Number.NaN, >+ "Math.sinh produces incorrect output for NaN"); >+assert.sameValue(Math.sinh(Number.NEGATIVE_INFINITY), Number.NEGATIVE_INFINITY, >+ "Math.sinh should produce negative infinity for Number.NEGATIVE_INFINITY"); >+assert.sameValue(Math.sinh(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, >+ "Math.sinh should produce positive infinity for Number.POSITIVE_INFINITY"); >+assert.sameValue(1 / Math.sinh(-0), Number.NEGATIVE_INFINITY, >+ "Math.sinh should produce -0 for -0"); >+assert.sameValue(1 / Math.sinh(0), Number.POSITIVE_INFINITY, >+ "Math.sinh should produce +0 for +0"); >diff --git a/JSTests/test262/test/built-ins/Math/tanh/tanh-specialVals.js b/JSTests/test262/test/built-ins/Math/tanh/tanh-specialVals.js >index 4b1a729b753c28b175fdd634f79a95c4e908945e..a26b2af2aa7e4eff5e4e681dc6e130a7fce89d57 100644 >--- a/JSTests/test262/test/built-ins/Math/tanh/tanh-specialVals.js >+++ b/JSTests/test262/test/built-ins/Math/tanh/tanh-specialVals.js >@@ -1,18 +1,18 @@ >-// Copyright 2015 Microsoft Corporation. All rights reserved. >-// This code is governed by the license found in the LICENSE file. >- >-/*--- >-description: Math.tanh with special values >-es6id: 20.2.2.34 >----*/ >- >-assert.sameValue(Math.tanh(NaN), Number.NaN, >- "Math.tanh produces incorrect output for NaN"); >-assert.sameValue(Math.tanh(Number.NEGATIVE_INFINITY), -1, >- "Math.tanh should produce -1 for Number.NEGATIVE_INFINITY"); >-assert.sameValue(Math.tanh(Number.POSITIVE_INFINITY), 1, >- "Math.tanh should produce 1 for Number.POSITIVE_INFINITY"); >-assert.sameValue(1 / Math.tanh(-0), Number.NEGATIVE_INFINITY, >- "Math.tanh should produce -0 for -0"); >-assert.sameValue(1 / Math.tanh(0), Number.POSITIVE_INFINITY, >- "Math.tanh should produce +0 for +0"); >+// Copyright 2015 Microsoft Corporation. All rights reserved. >+// This code is governed by the license found in the LICENSE file. >+ >+/*--- >+description: Math.tanh with special values >+es6id: 20.2.2.34 >+---*/ >+ >+assert.sameValue(Math.tanh(NaN), Number.NaN, >+ "Math.tanh produces incorrect output for NaN"); >+assert.sameValue(Math.tanh(Number.NEGATIVE_INFINITY), -1, >+ "Math.tanh should produce -1 for Number.NEGATIVE_INFINITY"); >+assert.sameValue(Math.tanh(Number.POSITIVE_INFINITY), 1, >+ "Math.tanh should produce 1 for Number.POSITIVE_INFINITY"); >+assert.sameValue(1 / Math.tanh(-0), Number.NEGATIVE_INFINITY, >+ "Math.tanh should produce -0 for -0"); >+assert.sameValue(1 / Math.tanh(0), Number.POSITIVE_INFINITY, >+ "Math.tanh should produce +0 for +0"); >diff --git a/JSTests/test262/test/built-ins/Math/trunc/trunc-sampleTests.js b/JSTests/test262/test/built-ins/Math/trunc/trunc-sampleTests.js >index 59d3d8dbdc1a4a3f85396c3f67f8890071e88aa5..a99c6cb50c6e50e1b40b0143e8857033b558b3a1 100644 >--- a/JSTests/test262/test/built-ins/Math/trunc/trunc-sampleTests.js >+++ b/JSTests/test262/test/built-ins/Math/trunc/trunc-sampleTests.js >@@ -1,47 +1,47 @@ >-// Copyright 2015 Microsoft Corporation. All rights reserved. >-// This code is governed by the license found in the LICENSE file. >- >-/*--- >-description: sample tests for trunc >-es6id: 20.2.2.35 >----*/ >- >-assert.sameValue(1 / Math.trunc(0.02047410048544407), Number.POSITIVE_INFINITY, >- "Math.trunc should produce +0 for values between 0 and 1"); >-assert.sameValue(1 / Math.trunc(0.00000000000000001), Number.POSITIVE_INFINITY, >- "Math.trunc should produce +0 for values between 0 and 1"); >-assert.sameValue(1 / Math.trunc(0.9999999999999999), Number.POSITIVE_INFINITY, >- "Math.trunc should produce +0 for values between 0 and 1"); >-assert.sameValue(1 / Math.trunc(Number.EPSILON), Number.POSITIVE_INFINITY, >- "Math.trunc should produce +0 for values between 0 and 1"); >-assert.sameValue(1 / Math.trunc(Number.MIN_VALUE), Number.POSITIVE_INFINITY, >- "Math.trunc should produce +0 for values between 0 and 1"); >- >-assert.sameValue(1 / Math.trunc(-0.02047410048544407), Number.NEGATIVE_INFINITY, >- "Math.trunc should produce -0 for values between -1 and 0"); >-assert.sameValue(1 / Math.trunc(-0.00000000000000001), Number.NEGATIVE_INFINITY, >- "Math.trunc should produce -0 for values between -1 and 0"); >-assert.sameValue(1 / Math.trunc(-0.9999999999999999), Number.NEGATIVE_INFINITY, >- "Math.trunc should produce -0 for values between -1 and 0"); >-assert.sameValue(1 / Math.trunc(-Number.EPSILON), Number.NEGATIVE_INFINITY, >- "Math.trunc should produce -0 for values between -1 and 0"); >-assert.sameValue(1 / Math.trunc(-Number.MIN_VALUE), Number.NEGATIVE_INFINITY, >- "Math.trunc should produce -0 for values between -1 and 0"); >- >-assert.sameValue(Math.trunc(Number.MAX_VALUE), Math.floor(Number.MAX_VALUE), >- "Math.trunc produces incorrect result for Number.MAX_VALUE"); >-assert.sameValue(Math.trunc(10), Math.floor(10), >- "Math.trunc produces incorrect result for 10"); >-assert.sameValue(Math.trunc(3.9), Math.floor(3.9), >- "Math.trunc produces incorrect result for 3.9"); >-assert.sameValue(Math.trunc(4.9), Math.floor(4.9), >- "Math.trunc produces incorrect result for 4.9"); >- >-assert.sameValue(Math.trunc(-Number.MAX_VALUE), Math.ceil(-Number.MAX_VALUE), >- "Math.trunc produces incorrect result for -Number.MAX_VALUE"); >-assert.sameValue(Math.trunc(-10), Math.ceil(-10), >- "Math.trunc produces incorrect result for -10"); >-assert.sameValue(Math.trunc(-3.9), Math.ceil(-3.9), >- "Math.trunc produces incorrect result for -3.9"); >-assert.sameValue(Math.trunc(-4.9), Math.ceil(-4.9), >- "Math.trunc produces incorrect result for -4.9"); >+// Copyright 2015 Microsoft Corporation. All rights reserved. >+// This code is governed by the license found in the LICENSE file. >+ >+/*--- >+description: sample tests for trunc >+es6id: 20.2.2.35 >+---*/ >+ >+assert.sameValue(1 / Math.trunc(0.02047410048544407), Number.POSITIVE_INFINITY, >+ "Math.trunc should produce +0 for values between 0 and 1"); >+assert.sameValue(1 / Math.trunc(0.00000000000000001), Number.POSITIVE_INFINITY, >+ "Math.trunc should produce +0 for values between 0 and 1"); >+assert.sameValue(1 / Math.trunc(0.9999999999999999), Number.POSITIVE_INFINITY, >+ "Math.trunc should produce +0 for values between 0 and 1"); >+assert.sameValue(1 / Math.trunc(Number.EPSILON), Number.POSITIVE_INFINITY, >+ "Math.trunc should produce +0 for values between 0 and 1"); >+assert.sameValue(1 / Math.trunc(Number.MIN_VALUE), Number.POSITIVE_INFINITY, >+ "Math.trunc should produce +0 for values between 0 and 1"); >+ >+assert.sameValue(1 / Math.trunc(-0.02047410048544407), Number.NEGATIVE_INFINITY, >+ "Math.trunc should produce -0 for values between -1 and 0"); >+assert.sameValue(1 / Math.trunc(-0.00000000000000001), Number.NEGATIVE_INFINITY, >+ "Math.trunc should produce -0 for values between -1 and 0"); >+assert.sameValue(1 / Math.trunc(-0.9999999999999999), Number.NEGATIVE_INFINITY, >+ "Math.trunc should produce -0 for values between -1 and 0"); >+assert.sameValue(1 / Math.trunc(-Number.EPSILON), Number.NEGATIVE_INFINITY, >+ "Math.trunc should produce -0 for values between -1 and 0"); >+assert.sameValue(1 / Math.trunc(-Number.MIN_VALUE), Number.NEGATIVE_INFINITY, >+ "Math.trunc should produce -0 for values between -1 and 0"); >+ >+assert.sameValue(Math.trunc(Number.MAX_VALUE), Math.floor(Number.MAX_VALUE), >+ "Math.trunc produces incorrect result for Number.MAX_VALUE"); >+assert.sameValue(Math.trunc(10), Math.floor(10), >+ "Math.trunc produces incorrect result for 10"); >+assert.sameValue(Math.trunc(3.9), Math.floor(3.9), >+ "Math.trunc produces incorrect result for 3.9"); >+assert.sameValue(Math.trunc(4.9), Math.floor(4.9), >+ "Math.trunc produces incorrect result for 4.9"); >+ >+assert.sameValue(Math.trunc(-Number.MAX_VALUE), Math.ceil(-Number.MAX_VALUE), >+ "Math.trunc produces incorrect result for -Number.MAX_VALUE"); >+assert.sameValue(Math.trunc(-10), Math.ceil(-10), >+ "Math.trunc produces incorrect result for -10"); >+assert.sameValue(Math.trunc(-3.9), Math.ceil(-3.9), >+ "Math.trunc produces incorrect result for -3.9"); >+assert.sameValue(Math.trunc(-4.9), Math.ceil(-4.9), >+ "Math.trunc produces incorrect result for -4.9"); >diff --git a/JSTests/test262/test/built-ins/Math/trunc/trunc-specialVals.js b/JSTests/test262/test/built-ins/Math/trunc/trunc-specialVals.js >index 4339aba11daf73244015c0ce3faa2c99f8bfae26..19efbf6b658e883756d0933d1bceb7c3b3a8ae23 100644 >--- a/JSTests/test262/test/built-ins/Math/trunc/trunc-specialVals.js >+++ b/JSTests/test262/test/built-ins/Math/trunc/trunc-specialVals.js >@@ -1,16 +1,16 @@ >-// Copyright 2015 Microsoft Corporation. All rights reserved. >-// This code is governed by the license found in the LICENSE file. >- >-/*--- >-description: Math.trunc with sample values. >-es6id: 20.2.2.35 >----*/ >- >-assert.sameValue(Math.trunc(Number.NEGATIVE_INFINITY), Number.NEGATIVE_INFINITY, >- "Math.trunc should produce negative infinity for Number.NEGATIVE_INFINITY"); >-assert.sameValue(Math.trunc(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, >- "Math.trunc should produce positive infinity for Number.POSITIVE_INFINITY"); >-assert.sameValue(1 / Math.trunc(-0), Number.NEGATIVE_INFINITY, >- "Math.trunc should produce -0 for -0"); >-assert.sameValue(1 / Math.trunc(0), Number.POSITIVE_INFINITY, >- "Math.trunc should produce +0 for +0"); >+// Copyright 2015 Microsoft Corporation. All rights reserved. >+// This code is governed by the license found in the LICENSE file. >+ >+/*--- >+description: Math.trunc with sample values. >+es6id: 20.2.2.35 >+---*/ >+ >+assert.sameValue(Math.trunc(Number.NEGATIVE_INFINITY), Number.NEGATIVE_INFINITY, >+ "Math.trunc should produce negative infinity for Number.NEGATIVE_INFINITY"); >+assert.sameValue(Math.trunc(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, >+ "Math.trunc should produce positive infinity for Number.POSITIVE_INFINITY"); >+assert.sameValue(1 / Math.trunc(-0), Number.NEGATIVE_INFINITY, >+ "Math.trunc should produce -0 for -0"); >+assert.sameValue(1 / Math.trunc(0), Number.POSITIVE_INFINITY, >+ "Math.trunc should produce +0 for +0"); >diff --git a/JSTests/test262/test/built-ins/Object/internals/DefineOwnProperty/consistent-value-regexp-$1.js b/JSTests/test262/test/built-ins/Object/internals/DefineOwnProperty/consistent-value-regexp-$1.js >deleted file mode 100644 >index 596c60c2cb5676d4abff0dffbd2ffc0a6b65c6f9..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/built-ins/Object/internals/DefineOwnProperty/consistent-value-regexp-$1.js >+++ /dev/null >@@ -1,31 +0,0 @@ >-// Copyright (C) 2017 Claude Pache. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >-/*--- >-esid: sec-invariants-of-the-essential-internal-methods >-es6id: 6.1.7.3 >-description: > >- Value of non-writable, non-configurable data property must not change >- ("$1" property of the RegExp built-in) >-info: | >- [[GetOwnProperty]] (P) >- [...] >- - If a property P is described as a data property with Desc.[[Value]] equal >- to v and Desc.[[Writable]] and Desc.[[Configurable]] are both false, then >- the SameValue must be returned for the Desc.[[Value]] attribute of the >- property on all future calls to [[GetOwnProperty]] ( P ). >- [...] >- (This invariant was violated for the specific property under test by at least >- one implementation as of January 2017.) >----*/ >- >-Reflect.defineProperty(RegExp, '$1', { >- writable: false, >- configurable: false >-}); >- >-var desc = Reflect.getOwnPropertyDescriptor(RegExp, '$1'); >-if (desc && desc.configurable === false && desc.writable === false) { >- /(x)/.exec('x'); >- var desc2 = Reflect.getOwnPropertyDescriptor(RegExp, '$1'); >- assert.sameValue(desc.value, desc2.value); >-} >diff --git a/JSTests/test262/test/built-ins/Object/internals/DefineOwnProperty/consistent-value-regexp-dollar1.js b/JSTests/test262/test/built-ins/Object/internals/DefineOwnProperty/consistent-value-regexp-dollar1.js >new file mode 100644 >index 0000000000000000000000000000000000000000..596c60c2cb5676d4abff0dffbd2ffc0a6b65c6f9 >--- /dev/null >+++ b/JSTests/test262/test/built-ins/Object/internals/DefineOwnProperty/consistent-value-regexp-dollar1.js >@@ -0,0 +1,31 @@ >+// Copyright (C) 2017 Claude Pache. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+esid: sec-invariants-of-the-essential-internal-methods >+es6id: 6.1.7.3 >+description: > >+ Value of non-writable, non-configurable data property must not change >+ ("$1" property of the RegExp built-in) >+info: | >+ [[GetOwnProperty]] (P) >+ [...] >+ - If a property P is described as a data property with Desc.[[Value]] equal >+ to v and Desc.[[Writable]] and Desc.[[Configurable]] are both false, then >+ the SameValue must be returned for the Desc.[[Value]] attribute of the >+ property on all future calls to [[GetOwnProperty]] ( P ). >+ [...] >+ (This invariant was violated for the specific property under test by at least >+ one implementation as of January 2017.) >+---*/ >+ >+Reflect.defineProperty(RegExp, '$1', { >+ writable: false, >+ configurable: false >+}); >+ >+var desc = Reflect.getOwnPropertyDescriptor(RegExp, '$1'); >+if (desc && desc.configurable === false && desc.writable === false) { >+ /(x)/.exec('x'); >+ var desc2 = Reflect.getOwnPropertyDescriptor(RegExp, '$1'); >+ assert.sameValue(desc.value, desc2.value); >+} >diff --git a/JSTests/test262/test/built-ins/Object/internals/DefineOwnProperty/consistent-writable-regexp-$1.js b/JSTests/test262/test/built-ins/Object/internals/DefineOwnProperty/consistent-writable-regexp-$1.js >deleted file mode 100644 >index 38ccdcc641adcc49e4c18b38c2046646a93e2933..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/built-ins/Object/internals/DefineOwnProperty/consistent-writable-regexp-$1.js >+++ /dev/null >@@ -1,25 +0,0 @@ >-// Copyright (C) 2017 Claude Pache. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >-/*--- >-esid: sec-invariants-of-the-essential-internal-methods >-es6id: 6.1.7.3 >-description: > >- A property made non-writable, non-configurable must not be reported as writable >- ("$1" property of the RegExp built-in) >-info: | >- [[GetOwnProperty]] (P) >- [...] >- - If the [[Writable]] attribute may change from false to true, >- then the [[Configurable]] attribute must be true.. >- [...] >- (This invariant was violated for the specific property under test by at least >- one implementation as of January 2017.) >----*/ >- >-if (Reflect.defineProperty(RegExp, '$1', { >- writable: false, >- configurable: false >- })) { >- var desc = Reflect.getOwnPropertyDescriptor(RegExp, '$1'); >- assert.sameValue(desc.writable, false); >-} >diff --git a/JSTests/test262/test/built-ins/Object/internals/DefineOwnProperty/consistent-writable-regexp-dollar1.js b/JSTests/test262/test/built-ins/Object/internals/DefineOwnProperty/consistent-writable-regexp-dollar1.js >new file mode 100644 >index 0000000000000000000000000000000000000000..38ccdcc641adcc49e4c18b38c2046646a93e2933 >--- /dev/null >+++ b/JSTests/test262/test/built-ins/Object/internals/DefineOwnProperty/consistent-writable-regexp-dollar1.js >@@ -0,0 +1,25 @@ >+// Copyright (C) 2017 Claude Pache. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+esid: sec-invariants-of-the-essential-internal-methods >+es6id: 6.1.7.3 >+description: > >+ A property made non-writable, non-configurable must not be reported as writable >+ ("$1" property of the RegExp built-in) >+info: | >+ [[GetOwnProperty]] (P) >+ [...] >+ - If the [[Writable]] attribute may change from false to true, >+ then the [[Configurable]] attribute must be true.. >+ [...] >+ (This invariant was violated for the specific property under test by at least >+ one implementation as of January 2017.) >+---*/ >+ >+if (Reflect.defineProperty(RegExp, '$1', { >+ writable: false, >+ configurable: false >+ })) { >+ var desc = Reflect.getOwnPropertyDescriptor(RegExp, '$1'); >+ assert.sameValue(desc.writable, false); >+} >diff --git a/JSTests/test262/test/intl402/Intl/getCanonicalLocales/descriptor.js b/JSTests/test262/test/intl402/Intl/getCanonicalLocales/descriptor.js >index 1cf400ce21dae34ab52c532057991fea479d1918..e1f32322584fdba1f0e7ac64a81a5c0e5e08fbd1 100644 >--- a/JSTests/test262/test/intl402/Intl/getCanonicalLocales/descriptor.js >+++ b/JSTests/test262/test/intl402/Intl/getCanonicalLocales/descriptor.js >@@ -15,6 +15,8 @@ > includes: [propertyHelper.js] > ---*/ > >-verifyNotEnumerable(Intl, "getCanonicalLocales"); >-verifyWritable(Intl, "getCanonicalLocales"); >-verifyConfigurable(Intl, "getCanonicalLocales"); >+verifyProperty(Intl, 'getCanonicalLocales', { >+ writable: true, >+ enumerable: false, >+ configurable: true, >+}); >diff --git a/JSTests/test262/test/intl402/Intl/getCanonicalLocales/duplicates.js b/JSTests/test262/test/intl402/Intl/getCanonicalLocales/duplicates.js >index 74fc6459c85d0f85d0c229507897862e57b4eedc..cff587ca3cdb0cbc19d6c0b6601ecbec0f37412b 100644 >--- a/JSTests/test262/test/intl402/Intl/getCanonicalLocales/duplicates.js >+++ b/JSTests/test262/test/intl402/Intl/getCanonicalLocales/duplicates.js >@@ -15,5 +15,5 @@ > Intl.getCanonicalLocales( > ['ab-cd', 'ff', 'de-rt', 'ab-Cd']), ['ab-CD', 'ff', 'de-RT'])); > >-var locales = Intl.getCanonicalLocales(["en-US", "en-US"]); >+var locales = Intl.getCanonicalLocales(['en-US', 'en-US']); > assert(compareArray(locales, ['en-US']), 'en-US'); >diff --git a/JSTests/test262/test/intl402/Locale/constructor-getter-order.js b/JSTests/test262/test/intl402/Locale/constructor-getter-order.js >new file mode 100644 >index 0000000000000000000000000000000000000000..b12ae8ba7f075524174782b618e746c013340b3f >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-getter-order.js >@@ -0,0 +1,125 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks the order of evaluations of arguments and options for the Locale >+ constructor. >+features: [Intl.Locale] >+includes: [compareArray.js] >+---*/ >+ >+const order = []; >+new Intl.Locale( >+ { toString() { order.push("tag toString"); return "en"; } }, >+ { >+ get language() { >+ order.push("get language"); >+ return { >+ toString() { >+ order.push("toString language"); >+ return "de"; >+ } >+ } >+ }, >+ >+ get script() { >+ order.push("get script"); >+ return { >+ toString() { >+ order.push("toString script"); >+ return "Latn"; >+ } >+ } >+ }, >+ >+ get region() { >+ order.push("get region"); >+ return { >+ toString() { >+ order.push("toString region"); >+ return "DE"; >+ } >+ } >+ }, >+ >+ get calendar() { >+ order.push("get calendar"); >+ return { >+ toString() { >+ order.push("toString calendar"); >+ return "gregory"; >+ } >+ } >+ }, >+ >+ get collation() { >+ order.push("get collation"); >+ return { >+ toString() { >+ order.push("toString collation"); >+ return "zhuyin"; >+ } >+ } >+ }, >+ >+ get hourCycle() { >+ order.push("get hourCycle"); >+ return { >+ toString() { >+ order.push("toString hourCycle"); >+ return "h24"; >+ } >+ } >+ }, >+ >+ get caseFirst() { >+ order.push("get caseFirst"); >+ return { >+ toString() { >+ order.push("toString caseFirst"); >+ return "upper"; >+ } >+ } >+ }, >+ >+ get numeric() { >+ order.push("get numeric"); >+ return false; >+ }, >+ >+ get numberingSystem() { >+ order.push("get numberingSystem"); >+ return { >+ toString() { >+ order.push("toString numberingSystem"); >+ return "latn"; >+ } >+ } >+ }, >+ } >+); >+ >+const expected_order = [ >+ "tag toString", >+ "get language", >+ "toString language", >+ "get script", >+ "toString script", >+ "get region", >+ "toString region", >+ "get calendar", >+ "toString calendar", >+ "get collation", >+ "toString collation", >+ "get hourCycle", >+ "toString hourCycle", >+ "get caseFirst", >+ "toString caseFirst", >+ "get numeric", >+ "get numberingSystem", >+ "toString numberingSystem" >+]; >+ >+assert.compareArray(order, expected_order); >diff --git a/JSTests/test262/test/intl402/Locale/constructor-locale-object.js b/JSTests/test262/test/intl402/Locale/constructor-locale-object.js >new file mode 100644 >index 0000000000000000000000000000000000000000..201b19dfad741a0f4e082962a8f62c1d6ec6a1d9 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-locale-object.js >@@ -0,0 +1,29 @@ >+// Copyright 2018 André Bargull; Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Verifies canonicalization of specific tags. >+info: | >+ ApplyOptionsToTag( tag, options ) >+ 10. Return CanonicalizeLanguageTag(tag). >+features: [Intl.Locale] >+---*/ >+ >+// Pass Intl.Locale object and replace subtag. >+const enUS = new Intl.Locale("en-US"); >+const enGB = new Intl.Locale(enUS, {region: "GB"}); >+ >+assert.sameValue(enUS.toString(), "en-US"); >+assert.sameValue(enGB.toString(), "en-GB"); >+ >+// Pass Intl.Locale object and replace Unicode extension keyword. >+const zhUnihan = new Intl.Locale("zh-u-co-unihan"); >+const zhZhuyin = new Intl.Locale(zhUnihan, {collation: "zhuyin"}); >+ >+assert.sameValue(zhUnihan.toString(), "zh-u-co-unihan"); >+assert.sameValue(zhZhuyin.toString(), "zh-u-co-zhuyin"); >+ >+assert.sameValue(zhUnihan.collation, "unihan"); >+assert.sameValue(zhZhuyin.collation, "zhuyin"); >diff --git a/JSTests/test262/test/intl402/Locale/constructor-non-iana-canon.js b/JSTests/test262/test/intl402/Locale/constructor-non-iana-canon.js >new file mode 100644 >index 0000000000000000000000000000000000000000..6344429e445c28a15ab1e0e63f04edce6495811a >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-non-iana-canon.js >@@ -0,0 +1,90 @@ >+// Copyright 2018 André Bargull; Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Verifies canonicalization, minimization and maximization of specific tags. >+info: | >+ ApplyOptionsToTag( tag, options ) >+ 10. Return CanonicalizeLanguageTag(tag). >+ >+ Intl.Locale.prototype.maximize () >+ 3. Let maximal be the result of the Add Likely Subtags algorithm applied to loc.[[Locale]]. >+ >+ Intl.Locale.prototype.minimize () >+ 3. Let minimal be the result of the Remove Likely Subtags algorithm applied to loc.[[Locale]]. >+features: [Intl.Locale] >+---*/ >+ >+// Test some language tags where we know that either CLDR or ICU produce >+// different results compared to the canonicalization specified in RFC 5646. >+var testData = [ >+ { >+ tag: "mo", >+ canonical: "ro", >+ maximized: "ro-Latn-RO", >+ }, >+ { >+ tag: "es-ES-preeuro", >+ maximized: "es-Latn-ES-preeuro", >+ minimized: "es-preeuro", >+ }, >+ { >+ tag: "uz-UZ-cyrillic", >+ maximized: "uz-Latn-UZ-cyrillic", >+ minimized: "uz-cyrillic", >+ }, >+ { >+ tag: "posix", >+ }, >+ { >+ tag: "hi-direct", >+ maximized: "hi-Deva-IN-direct", >+ }, >+ { >+ tag: "zh-pinyin", >+ maximized: "zh-Hans-CN-pinyin", >+ }, >+ { >+ tag: "zh-stroke", >+ maximized: "zh-Hans-CN-stroke", >+ }, >+ { >+ tag: "aar-x-private", >+ }, >+ { >+ tag: "heb-x-private", >+ }, >+ { >+ tag: "und-ita", >+ // canonical: "und" or "ita" ? >+ maximized: "en-Latn-US", >+ minimized: "und", >+ }, >+ { >+ tag: "de-u-kf", >+ maximized: "de-Latn-DE-u-kf", >+ }, >+ { >+ tag: "ces", >+ }, >+ { >+ tag: "hy-arevela", >+ canonical: "hy", >+ maximized: "hy-Armn-AM", >+ }, >+ { >+ tag: "hy-arevmda", >+ canonical: "hyw", >+ }, >+]; >+ >+for (const {tag, canonical = tag, maximized = canonical, minimized = canonical} of testData) { >+ assert.sameValue(Intl.getCanonicalLocales(tag)[0], canonical); >+ >+ const loc = new Intl.Locale(tag); >+ assert.sameValue(loc.toString(), canonical); >+ assert.sameValue(loc.maximize().toString(), maximized); >+ assert.sameValue(loc.minimize().toString(), minimized); >+} >diff --git a/JSTests/test262/test/intl402/Locale/constructor-options-casefirst-invalid.js b/JSTests/test262/test/intl402/Locale/constructor-options-casefirst-invalid.js >new file mode 100644 >index 0000000000000000000000000000000000000000..cf4b9c4524195789786e08d4afe4ac85effc3bf2 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-options-casefirst-invalid.js >@@ -0,0 +1,37 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks error cases for the options argument to the Locale constructor. >+info: | >+ Intl.Locale( tag [, options] ) >+ >+ ... >+ 22. Let kf be ? GetOption(options, "caseFirst", "string", « "upper", "lower", "false" », undefined). >+ ... >+ >+ GetOption ( options, property, type, values, fallback ) >+ ... >+ 2. d. If values is not undefined, then >+ i. If values does not contain an element equal to value, throw a RangeError exception. >+ ... >+features: [Intl.Locale] >+---*/ >+ >+ >+const invalidCaseFirstOptions = [ >+ "", >+ "u", >+ "Upper", >+ "upper\0", >+ "uppercase", >+ "true", >+ { valueOf() { return false; } }, >+]; >+for (const invalidCaseFirstOption of invalidCaseFirstOptions) { >+ assert.throws(RangeError, function() { >+ new Intl.Locale("en", {caseFirst: invalidCaseFirstOption}); >+ }, `${invalidCaseFirstOption} is an invalid caseFirst option value`); >+} >diff --git a/JSTests/test262/test/intl402/Locale/constructor-options-casefirst-valid.js b/JSTests/test262/test/intl402/Locale/constructor-options-casefirst-valid.js >new file mode 100644 >index 0000000000000000000000000000000000000000..dd74ffa9f2b2f5e403c60bec5815fcc778bdb2aa >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-options-casefirst-valid.js >@@ -0,0 +1,64 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks valid cases for the options argument to the Locale constructor. >+info: | >+ Intl.Locale( tag [, options] ) >+ >+ ... >+ 22. Let kf be ? GetOption(options, "caseFirst", "string", « "upper", "lower", "false" », undefined). >+ 23. Set opt.[[kf]] to kf. >+ ... >+ 30. Let r be ! ApplyUnicodeExtensionToTag(tag, opt, relevantExtensionKeys). >+ ... >+ >+ ApplyUnicodeExtensionToTag( tag, options, relevantExtensionKeys ) >+ >+ ... >+ 8. Let locale be the String value that is tag with all Unicode locale extension sequences removed. >+ 9. Let newExtension be ! CanonicalizeUnicodeExtension(attributes, keywords). >+ 10. If newExtension is not the empty String, then >+ a. Let locale be ! InsertUnicodeExtension(locale, newExtension). >+ ... >+ >+ CanonicalizeUnicodeExtension( attributes, keywords ) >+ ... >+ 4. Repeat for each element entry of keywords in List order, >+ a. Let keyword be entry.[[Key]]. >+ b. If entry.[[Value]] is not the empty String, then >+ i. Let keyword be the string-concatenation of keyword, "-", and entry.[[Value]]. >+ c. Append keyword to fullKeywords. >+ ... >+features: [Intl.Locale] >+---*/ >+ >+const validCaseFirstOptions = [ >+ "upper", >+ "lower", >+ "false", >+ false, >+ { toString() { return false; } }, >+]; >+for (const caseFirst of validCaseFirstOptions) { >+ const options = { caseFirst }; >+ const expected = String(caseFirst); >+ assert.sameValue( >+ new Intl.Locale('en', options).toString(), >+ "en-u-kf-" + expected, >+ ); >+ >+ assert.sameValue( >+ new Intl.Locale('en-u-kf-lower', options).toString(), >+ "en-u-kf-" + expected, >+ ); >+ >+ if ("caseFirst" in Intl.Locale.prototype) { >+ assert.sameValue( >+ new Intl.Locale('en-u-kf-lower', options).caseFirst, >+ expected, >+ ); >+ } >+} >diff --git a/JSTests/test262/test/intl402/Locale/constructor-options-collation-invalid.js b/JSTests/test262/test/intl402/Locale/constructor-options-collation-invalid.js >new file mode 100644 >index 0000000000000000000000000000000000000000..5e3f4dd0d3eb2b74f6764131288045787546a1c0 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-options-collation-invalid.js >@@ -0,0 +1,33 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks error cases for the options argument to the Locale constructor. >+info: | >+ Intl.Locale( tag [, options] ) >+ >+ ... >+ 18. If collation is not undefined, then >+ a. If collation does not match the [(3*8alphanum) *("-" (3*8alphanum))] sequence, throw a RangeError exception. >+ >+features: [Intl.Locale] >+---*/ >+ >+ >+/* >+ alphanum = (ALPHA / DIGIT) ; letters and numbers >+ collation = [(3*8alphanum) *("-" (3*8alphanum))] >+*/ >+const invalidCollationOptions = [ >+ "a", >+ "ab", >+ "abcdefghi", >+ "abc-abcdefghi", >+]; >+for (const invalidCollationOption of invalidCollationOptions) { >+ assert.throws(RangeError, function() { >+ new Intl.Locale("en", {collation: invalidCollationOption}); >+ }, `${invalidCollationOption} is an invalid collation option value`); >+} >diff --git a/JSTests/test262/test/intl402/Locale/constructor-options-collation-valid.js b/JSTests/test262/test/intl402/Locale/constructor-options-collation-valid.js >new file mode 100644 >index 0000000000000000000000000000000000000000..1e2bc2fddadd2bd26fa06a3d500caa076d5f19c9 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-options-collation-valid.js >@@ -0,0 +1,63 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks valid cases for the options argument to the Locale constructor. >+info: | >+ Intl.Locale( tag [, options] ) >+ >+ ... >+ 17. Let collation be ? GetOption(options, "collation", "string", undefined, undefined). >+ ... >+ 19. Set opt.[[co]] to collation. >+ ... >+ 30. Let r be ! ApplyUnicodeExtensionToTag(tag, opt, relevantExtensionKeys). >+ ... >+ >+ ApplyUnicodeExtensionToTag( tag, options, relevantExtensionKeys ) >+ >+ ... >+ 8. Let locale be the String value that is tag with all Unicode locale extension sequences removed. >+ 9. Let newExtension be ! CanonicalizeUnicodeExtension(attributes, keywords). >+ 10. If newExtension is not the empty String, then >+ a. Let locale be ! InsertUnicodeExtension(locale, newExtension). >+ ... >+ >+ CanonicalizeUnicodeExtension( attributes, keywords ) >+ ... >+ 4. Repeat for each element entry of keywords in List order, >+ a. Let keyword be entry.[[Key]]. >+ b. If entry.[[Value]] is not the empty String, then >+ i. Let keyword be the string-concatenation of keyword, "-", and entry.[[Value]]. >+ c. Append keyword to fullKeywords. >+ ... >+features: [Intl.Locale] >+---*/ >+ >+const validCollationOptions = [ >+ ["", "en-u-co"], >+ ["abc", "en-u-co-abc"], >+ ["abcd", "en-u-co-abcd"], >+ ["abcde", "en-u-co-abcde"], >+ ["abcdef", "en-u-co-abcdef"], >+ ["abcdefg", "en-u-co-abcdefg"], >+ ["abcdefgh", "en-u-co-abcdefgh"], >+ ["12345678", "en-u-co-12345678"], >+ ["1234abcd", "en-u-co-1234abcd"], >+ ["1234abcd-abc123", "en-u-co-1234abcd-abc123"], >+]; >+for (const [collation, expected] of validCollationOptions) { >+ let options = { collation }; >+ assert.sameValue( >+ new Intl.Locale('en', options).toString(), >+ expected, >+ `new Intl.Locale('en', options).toString() equals the value of ${expected}` >+ ); >+ assert.sameValue( >+ new Intl.Locale('en-u-co-gregory', options).toString(), >+ expected, >+ `new Intl.Locale('en-u-co-gregory', options).toString() equals the value of ${expected}` >+ ); >+} >diff --git a/JSTests/test262/test/intl402/Locale/constructor-options-hourcycle-invalid.js b/JSTests/test262/test/intl402/Locale/constructor-options-hourcycle-invalid.js >new file mode 100644 >index 0000000000000000000000000000000000000000..0749641d281fb6af39d89e4742b05385d44340eb >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-options-hourcycle-invalid.js >@@ -0,0 +1,43 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks error cases for the options argument to the Locale constructor. >+info: | >+ Intl.Locale( tag [, options] ) >+ >+ ... >+ 20. Let hc be ? GetOption(options, "hourCycle", "string", « "h11", "h12", "h23", "h24" », undefined). >+ ... >+ >+ GetOption ( options, property, type, values, fallback ) >+ ... >+ 2. d. If values is not undefined, then >+ i. If values does not contain an element equal to value, throw a RangeError exception. >+ ... >+features: [Intl.Locale] >+---*/ >+ >+ >+const invalidHourCycleOptions = [ >+ "", >+ "h", >+ "h00", >+ "h01", >+ "h10", >+ "h13", >+ "h22", >+ "h25", >+ "h48", >+ "h012", >+ "h120", >+ "h12\0", >+ "H12", >+]; >+for (const invalidHourCycleOption of invalidHourCycleOptions) { >+ assert.throws(RangeError, function() { >+ new Intl.Locale("en", {hourCycle: invalidHourCycleOption}); >+ }, `${invalidHourCycleOption} is an invalid hourCycle option value`); >+} >diff --git a/JSTests/test262/test/intl402/Locale/constructor-options-hourcycle-valid.js b/JSTests/test262/test/intl402/Locale/constructor-options-hourcycle-valid.js >new file mode 100644 >index 0000000000000000000000000000000000000000..dc371a92cb541a46adb369d3e02e630e167f2bed >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-options-hourcycle-valid.js >@@ -0,0 +1,73 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks valid cases for the options argument to the Locale constructor. >+info: | >+ Intl.Locale( tag [, options] ) >+ >+ ... >+ 20. Let hc be ? GetOption(options, "hourCycle", "string", « "h11", "h12", "h23", "h24" », undefined). >+ 21. Set opt.[[hc]] to hc. >+ ... >+ 30. Let r be ! ApplyUnicodeExtensionToTag(tag, opt, relevantExtensionKeys). >+ ... >+ >+ ApplyUnicodeExtensionToTag( tag, options, relevantExtensionKeys ) >+ >+ ... >+ 8. Let locale be the String value that is tag with all Unicode locale extension sequences removed. >+ 9. Let newExtension be ! CanonicalizeUnicodeExtension(attributes, keywords). >+ 10. If newExtension is not the empty String, then >+ a. Let locale be ! InsertUnicodeExtension(locale, newExtension). >+ ... >+ >+ CanonicalizeUnicodeExtension( attributes, keywords ) >+ ... >+ 4. Repeat for each element entry of keywords in List order, >+ a. Let keyword be entry.[[Key]]. >+ b. If entry.[[Value]] is not the empty String, then >+ i. Let keyword be the string-concatenation of keyword, "-", and entry.[[Value]]. >+ c. Append keyword to fullKeywords. >+ ... >+features: [Intl.Locale] >+---*/ >+ >+const validHourCycleOptions = [ >+ 'h11', >+ 'h12', >+ 'h23', >+ 'h24', >+ { toString() { return 'h24'; } }, >+]; >+for (const hourCycle of validHourCycleOptions) { >+ const options = { hourCycle }; >+ const expected = String(hourCycle); >+ let expect = 'en-u-hc-' + expected; >+ >+ assert.sameValue( >+ new Intl.Locale('en', options).toString(), >+ expect, >+ `new Intl.Locale('en', options).toString() equals the value of ${expect}` >+ ); >+ >+ assert.sameValue( >+ new Intl.Locale('en-u-hc-h00', options).toString(), >+ expect, >+ `new Intl.Locale('en-u-hc-h00', options).toString() equals the value of ${expect}` >+ ); >+ >+ assert.sameValue( >+ new Intl.Locale('en-u-hc-h12', options).toString(), >+ expect, >+ `new Intl.Locale('en-u-hc-h12', options).toString() equals the value of ${expect}` >+ ); >+ >+ assert.sameValue( >+ new Intl.Locale('en-u-hc-h00', options).hourCycle, >+ expected, >+ `new Intl.Locale('en-u-hc-h00', options).hourCycle equals the value of ${expect}` >+ ); >+} >diff --git a/JSTests/test262/test/intl402/Locale/constructor-options-language-grandfathered.js b/JSTests/test262/test/intl402/Locale/constructor-options-language-grandfathered.js >new file mode 100644 >index 0000000000000000000000000000000000000000..f3dfc8d11e6999f1fb536a1655c47d3ce4c22cf6 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-options-language-grandfathered.js >@@ -0,0 +1,42 @@ >+// Copyright 2018 André Bargull; Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks error cases for the options argument to the Locale >+ constructor. >+info: | >+ ApplyOptionsToTag( tag, options ) >+ ... >+ 3. Let language be ? GetOption(options, "language", "string", undefined, undefined). >+ 4. If language is not undefined, then >+ a. If language does not match the language production, throw a RangeError exception. >+ b. If language matches the grandfathered production, throw a RangeError exception. >+ ... >+ >+features: [Intl.Locale] >+---*/ >+ >+const testData = [ >+ { >+ tag: "nb", >+ options: { >+ language: "no-bok", >+ }, >+ }, >+ >+ { >+ tag: "nb", >+ options: { >+ language: "no-bok", >+ region: "NO", >+ }, >+ }, >+]; >+ >+for (const {tag, options} of testData) { >+ assert.throws(RangeError, function() { >+ new Intl.Locale(tag, options); >+ }); >+} >diff --git a/JSTests/test262/test/intl402/Locale/constructor-options-language-valid.js b/JSTests/test262/test/intl402/Locale/constructor-options-language-valid.js >index bf5c764dd5fd5e5201bb67b498cd5642e35e8af3..57c4fb9bf1c3b9fec822e1e7073f87da9bd58768 100644 >--- a/JSTests/test262/test/intl402/Locale/constructor-options-language-valid.js >+++ b/JSTests/test262/test/intl402/Locale/constructor-options-language-valid.js >@@ -15,30 +15,46 @@ > > ApplyOptionsToTag( tag, options ) > ... >- 9. If tag matches the langtag production, then >- a. If language is not undefined, then >+ 9. If tag matches neither the privateuse nor the grandfathered production, then >+ b. If language is not undefined, then > i. Set tag to tag with the substring corresponding to the language production replaced by the string language. > > features: [Intl.Locale] > ---*/ > > const validLanguageOptions = [ >- [undefined, "en"], >- [null, "null"], >- ["zh-cmn", "cmn"], >- ["ZH-CMN", "cmn"], >- ["abcd", "abcd"], >- ["abcde", "abcde"], >- ["abcdef", "abcdef"], >- ["abcdefg", "abcdefg"], >- ["abcdefgh", "abcdefgh"], >- [{ toString() { return "de" } }, "de"], >+ [undefined, undefined], >+ [null, 'null'], >+ ['zh-cmn', 'cmn'], >+ ['ZH-CMN', 'cmn'], >+ ['abcd', 'abcd'], >+ ['abcde', 'abcde'], >+ ['abcdef', 'abcdef'], >+ ['abcdefg', 'abcdefg'], >+ ['abcdefgh', 'abcdefgh'], >+ [{ toString() { return 'de' } }, 'de'], > ]; > for (const [language, expected] of validLanguageOptions) { > let options = { language }; >+ let expect = expected || 'en'; >+ > assert.sameValue( > new Intl.Locale('en', options).toString(), >+ expect, >+ `new Intl.Locale('en', options).toString() equals the value of ${expect}` >+ ); >+ >+ expect = (expected || 'en') + '-US'; >+ assert.sameValue( >+ new Intl.Locale('en-US', options).toString(), > expected, >- `new Intl.Locale('en', options).toString() equals the value of ${expected}` >+ `new Intl.Locale('en-US', options).toString() equals the value of ${expect}` >+ ); >+ >+ expect = expected || 'en-els'; >+ assert.sameValue( >+ new Intl.Locale('en-els', options).toString(), >+ expect, >+ `new Intl.Locale('en-els', options).toString() equals the value of ${expect}` > ); > } >diff --git a/JSTests/test262/test/intl402/Locale/constructor-options-numberingsystem-invalid.js b/JSTests/test262/test/intl402/Locale/constructor-options-numberingsystem-invalid.js >new file mode 100644 >index 0000000000000000000000000000000000000000..21dce50be1424bad8560263336db84ea504cb8d8 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-options-numberingsystem-invalid.js >@@ -0,0 +1,33 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks error cases for the options argument to the Locale constructor. >+info: | >+ Intl.Locale( tag [, options] ) >+ >+ ... >+ 28. If numberingSystem is not undefined, then >+ a. If numberingSystem does not match the [(3*8alphanum) *("-" (3*8alphanum))] sequence, throw a RangeError exception. >+ >+features: [Intl.Locale] >+---*/ >+ >+ >+/* >+ alphanum = (ALPHA / DIGIT) ; letters and numbers >+ numberingSystem = [(3*8alphanum) *("-" (3*8alphanum))] >+*/ >+const invalidNumberingSystemOptions = [ >+ "a", >+ "ab", >+ "abcdefghi", >+ "abc-abcdefghi", >+]; >+for (const invalidNumberingSystemOption of invalidNumberingSystemOptions) { >+ assert.throws(RangeError, function() { >+ new Intl.Locale("en", {numberingSystem: invalidNumberingSystemOption}); >+ }, `${invalidNumberingSystemOption} is an invalid numberingSystem option value`); >+} >diff --git a/JSTests/test262/test/intl402/Locale/constructor-options-numberingsystem-valid.js b/JSTests/test262/test/intl402/Locale/constructor-options-numberingsystem-valid.js >new file mode 100644 >index 0000000000000000000000000000000000000000..517094c2824e956ccc9d83f8885217c2afbf45e4 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-options-numberingsystem-valid.js >@@ -0,0 +1,63 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks valid cases for the options argument to the Locale constructor. >+info: | >+ Intl.Locale( tag [, options] ) >+ >+ ... >+ 27. Let numberingSystem be ? GetOption(options, "numberingSystem", "string", undefined, undefined). >+ ... >+ 29. Set opt.[[nu]] to numberingSystem. >+ ... >+ 30. Let r be ! ApplyUnicodeExtensionToTag(tag, opt, relevantExtensionKeys). >+ ... >+ >+ ApplyUnicodeExtensionToTag( tag, options, relevantExtensionKeys ) >+ >+ ... >+ 8. Let locale be the String value that is tag with all Unicode locale extension sequences removed. >+ 9. Let newExtension be ! CanonicalizeUnicodeExtension(attributes, keywords). >+ 10. If newExtension is not the empty String, then >+ a. Let locale be ! InsertUnicodeExtension(locale, newExtension). >+ ... >+ >+ CanonicalizeUnicodeExtension( attributes, keywords ) >+ ... >+ 4. Repeat for each element entry of keywords in List order, >+ a. Let keyword be entry.[[Key]]. >+ b. If entry.[[Value]] is not the empty String, then >+ i. Let keyword be the string-concatenation of keyword, "-", and entry.[[Value]]. >+ c. Append keyword to fullKeywords. >+ ... >+features: [Intl.Locale] >+---*/ >+ >+const validNumberingSystemOptions = [ >+ ["", "en-u-nu"], >+ ["abc", "en-u-nu-abc"], >+ ["abcd", "en-u-nu-abcd"], >+ ["abcde", "en-u-nu-abcde"], >+ ["abcdef", "en-u-nu-abcdef"], >+ ["abcdefg", "en-u-nu-abcdefg"], >+ ["abcdefgh", "en-u-nu-abcdefgh"], >+ ["12345678", "en-u-nu-12345678"], >+ ["1234abcd", "en-u-nu-1234abcd"], >+ ["1234abcd-abc123", "en-u-nu-1234abcd-abc123"], >+]; >+for (const [numberingSystem, expected] of validNumberingSystemOptions) { >+ let options = { numberingSystem }; >+ assert.sameValue( >+ new Intl.Locale('en', options).toString(), >+ expected, >+ `new Intl.Locale('en', options).toString() equals the value of ${expected}` >+ ); >+ assert.sameValue( >+ new Intl.Locale('en-u-nu-latn', options).toString(), >+ expected, >+ `new Intl.Locale('en-u-nu-latn', options).toString() equals the value of ${expected}` >+ ); >+} >diff --git a/JSTests/test262/test/intl402/Locale/constructor-options-numeric-valid.js b/JSTests/test262/test/intl402/Locale/constructor-options-numeric-valid.js >new file mode 100644 >index 0000000000000000000000000000000000000000..6e75542b930544c874ab279227b4c2f0d3cb99ee >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-options-numeric-valid.js >@@ -0,0 +1,65 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks valid cases for the options argument to the Locale constructor. >+info: | >+ Intl.Locale( tag [, options] ) >+ >+ ... >+ 24. Let kn be ? GetOption(options, "numeric", "boolean", undefined, undefined). >+ 25. If kn is not undefined, set kn to ! ToString(kn). >+ ... >+ 30. Let r be ! ApplyUnicodeExtensionToTag(tag, opt, relevantExtensionKeys). >+ ... >+ >+ ApplyUnicodeExtensionToTag( tag, options, relevantExtensionKeys ) >+ >+ ... >+ 8. Let locale be the String value that is tag with all Unicode locale extension sequences removed. >+ 9. Let newExtension be ! CanonicalizeUnicodeExtension(attributes, keywords). >+ 10. If newExtension is not the empty String, then >+ a. Let locale be ! InsertUnicodeExtension(locale, newExtension). >+ ... >+ >+ CanonicalizeUnicodeExtension( attributes, keywords ) >+ ... >+ 4. Repeat for each element entry of keywords in List order, >+ a. Let keyword be entry.[[Key]]. >+ b. If entry.[[Value]] is not the empty String, then >+ i. Let keyword be the string-concatenation of keyword, "-", and entry.[[Value]]. >+ c. Append keyword to fullKeywords. >+ ... >+features: [Intl.Locale] >+---*/ >+ >+const validNumericOptions = [ >+ [undefined, undefined], >+ [false, "false"], >+ [true, "true"], >+ [null, "false"], >+ [0, "false"], >+ [0.5, "true"], >+ [{ valueOf() { return false; } }, "true"], >+]; >+for (const [numeric, expected] of validNumericOptions) { >+ const options = { numeric }; >+ assert.sameValue( >+ new Intl.Locale('en', options).toString(), >+ expected ? ("en-u-kn-" + expected) : "en", >+ ); >+ >+ assert.sameValue( >+ new Intl.Locale('en-u-kn-true', options).toString(), >+ "en-u-kn-" + (expected || "true"), >+ ); >+ >+ if ("numeric" in Intl.Locale.prototype) { >+ assert.sameValue( >+ new Intl.Locale('en-u-kf-lower', options).numeric, >+ expected, >+ ); >+ } >+} >diff --git a/JSTests/test262/test/intl402/Locale/constructor-options-region-valid.js b/JSTests/test262/test/intl402/Locale/constructor-options-region-valid.js >index 00d4762736606f8f095b026c7fcdaec315960900..f9cb7eaddf3282ae549fb6d3d500e235ee0dea9f 100644 >--- a/JSTests/test262/test/intl402/Locale/constructor-options-region-valid.js >+++ b/JSTests/test262/test/intl402/Locale/constructor-options-region-valid.js >@@ -17,30 +17,51 @@ > ... > 7. Let region be ? GetOption(options, "region", "string", undefined, undefined). > ... >- 9. If tag matches the langtag production, then >+ 9. If tag matches neither the privateuse nor the grandfathered production, then > ... >- c. If region is not undefined, then >+ d. If region is not undefined, then > i. If tag does not contain a region production, then > 1. Set tag to the concatenation of the language production of tag, the substring corresponding to the "-" script production if present, "-", region, and the rest of tag. >+ ii. Else, >+ 1. Set tag to tag with the substring corresponding to the region production replaced by the string region. > > features: [Intl.Locale] > ---*/ > > const validRegionOptions = [ >- ["FR", "en-FR"], >- ["554", "en-554"], >- [554, "en-554"], >+ [undefined, undefined], >+ ['FR', 'en-FR'], >+ ['554', 'en-554'], >+ [554, 'en-554'], > ]; > for (const [region, expected] of validRegionOptions) { > let options = { region }; >+ let expect = expected || 'en'; >+ > assert.sameValue( > new Intl.Locale('en', options).toString(), >- expected, >- `new Intl.Locale('en', options).toString() equals the value of ${expected}` >+ expect, >+ `new Intl.Locale('en', options).toString() equals the value of ${expect}` > ); >+ >+ expect = expected || 'en-US'; > assert.sameValue( > new Intl.Locale('en-US', options).toString(), >- expected, >- `new Intl.Locale('en-US', options).toString() equals the value of ${expected}` >+ expect, >+ `new Intl.Locale('en-US', options).toString() equals the value of ${expect}` >+ ); >+ >+ expect = (expected || 'en') + '-u-ca-gregory'; >+ assert.sameValue( >+ new Intl.Locale('en-u-ca-gregory', options).toString(), >+ expect, >+ `new Intl.Locale('en-u-ca-gregory', options).toString() equals the value of ${expect}` >+ ); >+ >+ expect = (expected || 'en-US') + '-u-ca-gregory'; >+ assert.sameValue( >+ new Intl.Locale('en-US-u-ca-gregory', options).toString(), >+ expect, >+ `new Intl.Locale('en-US-u-ca-gregory', options).toString() equals the value of ${expect}` > ); > } >diff --git a/JSTests/test262/test/intl402/Locale/constructor-options-script-valid.js b/JSTests/test262/test/intl402/Locale/constructor-options-script-valid.js >index a9c10a4dd1c074740e7fc7c1e2d1a44f1652b2e0..8104cb97cc358ed90945d156b8219db2948ab642 100644 >--- a/JSTests/test262/test/intl402/Locale/constructor-options-script-valid.js >+++ b/JSTests/test262/test/intl402/Locale/constructor-options-script-valid.js >@@ -17,9 +17,9 @@ > ... > 5. Let script be ? GetOption(options, "script", "string", undefined, undefined). > ... >- 9. If tag matches the langtag production, then >+ 9. If tag matches neither the privateuse nor the grandfathered production, then > ... >- b. If script is not undefined, then >+ c. If script is not undefined, then > i. If tag does not contain a script production, then > 1. Set tag to the concatenation of the language production of tag, "-", script, and the rest of tag. > ii. Else, >@@ -30,22 +30,34 @@ > ---*/ > > const validScriptOptions = [ >- [null, "en-Null"], >- ["bali", "en-Bali"], >- ["Bali", "en-Bali"], >- ["bALI", "en-BALI"], // TODO REVIEW: is this the correct case regularization? >- [{ toString() { return "Brai" } }, "en-Brai"], >+ [undefined, undefined], >+ [null, 'Null'], >+ ['bali', 'Bali'], >+ ['Bali', 'Bali'], >+ ['bALI', 'BALI'], // TODO REVIEW: is this the correct case regularization? >+ [{ toString() { return 'Brai' } }, 'Brai'], > ]; > for (const [script, expected] of validScriptOptions) { > let options = { script }; >+ let expect = expected ? 'en-' + expected : 'en'; >+ > assert.sameValue( >- new Intl.Locale("en", options).toString(), >- expected, >- `new Intl.Locale("en", options).toString() equals the value of ${expected}` >+ new Intl.Locale('en', options).toString(), >+ expect, >+ `new Intl.Locale('en', options).toString() equals the value of ${expect}` > ); >+ >+ expect = (expected ? ('en-' + expected) : 'en') + '-DK'; >+ assert.sameValue( >+ new Intl.Locale('en-DK', options).toString(), >+ expect, >+ `new Intl.Locale('en', options).toString() equals the value of ${expect}` >+ ); >+ >+ expect = expected ? ('en-' + expected) : 'en-Cyrl'; > assert.sameValue( >- new Intl.Locale("en-Cyrl", options).toString(), >- expected, >- `new Intl.Locale("en-Cyrl", options).toString() equals the value of ${expected}` >+ new Intl.Locale('en-Cyrl', options).toString(), >+ expect, >+ `new Intl.Locale('en-Cyrl', options).toString() equals the value of ${expect}` > ); > } >diff --git a/JSTests/test262/test/intl402/Locale/constructor-parse-twice.js b/JSTests/test262/test/intl402/Locale/constructor-parse-twice.js >new file mode 100644 >index 0000000000000000000000000000000000000000..0c9dde16c9bf4328acc91de27e2b3a92c9838698 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-parse-twice.js >@@ -0,0 +1,93 @@ >+// Copyright 2018 André Bargull; Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Verifies the handling of options with grandfathered tags. >+info: | >+ Intl.Locale( tag [, options] ) >+ 12. Set tag to ? ApplyOptionsToTag(tag, options). >+ 14. Let calendar be ? GetOption(options, "calendar", "string", undefined, undefined). >+ 16. Set opt.[[ca]] to calendar. >+ 30. Let r be ! ApplyUnicodeExtensionToTag(tag, opt, relevantExtensionKeys). >+ >+ ApplyOptionsToTag( tag, options ) >+ 9. If tag matches neither the privateuse nor the grandfathered production, then >+ 10. Return CanonicalizeLanguageTag(tag). >+features: [Intl.Locale] >+---*/ >+ >+const testData = [ >+ // Irregular grandfathered tags. >+ >+ // "en-GB-oed" is a grandfathered tag, so we can't add "US". After it is >+ // canonicalized to "en-GB-oxendict" we can append "u-ca-gregory". >+ { >+ tag: "en-GB-oed", >+ options: { >+ region: "US", >+ calendar: "gregory", >+ }, >+ canonical: "en-GB-oxendict-u-ca-gregory", >+ }, >+ >+ // Canonicalized version of the above, which we can add "US" to. >+ { >+ tag: "en-GB-oxendict", >+ options: { >+ region: "US", >+ calendar: "gregory", >+ }, >+ canonical: "en-US-oxendict-u-ca-gregory", >+ }, >+ >+ // Regular grandfathered tags. >+ >+ // "no-bok" is a grandfathered, so "NO"/"SE" isn't added. After >+ // canonicalization we can append "u-ca-gregory". >+ { >+ tag: "no-bok", >+ options: { >+ region: "NO", >+ calendar: "gregory", >+ }, >+ canonical: "nb-u-ca-gregory", >+ }, >+ >+ { >+ tag: "no-bok", >+ options: { >+ region: "SE", >+ calendar: "gregory", >+ }, >+ canonical: "nb-u-ca-gregory", >+ }, >+ >+ // "no-bok-NO" isn't a grandfathered tag, so we can replace "NO" with "SE" >+ // and can also append "u-ca-gregory". >+ { >+ tag: "no-bok-NO", >+ options: { >+ region: "SE", >+ calendar: "gregory", >+ }, >+ canonical: "no-bok-SE-u-ca-gregory", >+ }, >+ >+ // "no-bok-SE" isn't a grandfathered tag, so we can replace "SE" with "NO" >+ // and can also append "u-ca-gregory". >+ { >+ tag: "no-bok-SE", >+ options: { >+ region: "NO", >+ calendar: "gregory", >+ }, >+ canonical: "no-bok-NO-u-ca-gregory", >+ }, >+]; >+ >+for (const {tag, options, canonical} of testData) { >+ const loc = new Intl.Locale(tag, options); >+ assert.sameValue(loc.toString(), canonical); >+} >diff --git a/JSTests/test262/test/intl402/Locale/constructor-tag-tostring.js b/JSTests/test262/test/intl402/Locale/constructor-tag-tostring.js >new file mode 100644 >index 0000000000000000000000000000000000000000..733a5cd90dc3a2f82c04d65ace19d90c075cca3e >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-tag-tostring.js >@@ -0,0 +1,35 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks error cases for the string conversion of the locale argument to the >+ Locale constructor. >+info: | >+ Intl.Locale( tag [, options] ) >+ >+ ... >+ 8. If Type(tag) is Object and tag has an [[InitializedLocale]] internal slot, then >+ 9. Else, >+ a. Let tag be ? ToString(tag). >+features: [Intl.Locale] >+---*/ >+ >+function CustomError() {} >+function WrongCustomError() {} >+ >+const errors = [ >+ { get [Symbol.toPrimitive]() { throw new CustomError(); } }, >+ { [Symbol.toPrimitive](hint) { assert.sameValue(hint, "string"); throw new CustomError(); } }, >+ { get toString() { throw new CustomError(); }, get valueOf() { throw new WrongCustomError(); } }, >+ { toString() { throw new CustomError(); }, get valueOf() { throw new WrongCustomError(); } }, >+ { toString: undefined, get valueOf() { throw new CustomError(); } }, >+ { toString: undefined, valueOf() { throw new CustomError(); } }, >+ { toString() { return {} }, get valueOf() { throw new CustomError(); } }, >+ { toString() { return {} }, valueOf() { throw new CustomError(); } }, >+]; >+ >+for (const input of errors) { >+ assert.throws(CustomError, function() { new Intl.Locale(input) }); >+} >diff --git a/JSTests/test262/test/intl402/Locale/constructor-unicode-ext-invalid.js b/JSTests/test262/test/intl402/Locale/constructor-unicode-ext-invalid.js >new file mode 100644 >index 0000000000000000000000000000000000000000..1f1cb08ce96d33bda1fd860848a7f2cda93b6e3d >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-unicode-ext-invalid.js >@@ -0,0 +1,30 @@ >+// Copyright 2018 André Bargull; Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Verifies treatment of specific structurally invalid tags. >+info: | >+ ApplyOptionsToTag( tag, options ) >+ 2. If IsStructurallyValidLanguageTag(tag) is false, throw a RangeError exception. >+features: [Intl.Locale] >+---*/ >+ >+const invalidLanguageTags = [ >+ // Unicode extension sequence is incomplete. >+ "da-u", >+ "da-u-", >+ "da-u--", >+ "da-u-t-latn", >+ "da-u-x-priv", >+ >+ // Duplicate 'u' singleton. >+ "da-u-ca-gregory-u-ca-buddhist" >+]; >+ >+for (const langtag of invalidLanguageTags) { >+ assert.throws(RangeError, function() { >+ new Intl.Locale(langtag) >+ }); >+} >diff --git a/JSTests/test262/test/intl402/Locale/constructor-unicode-ext-valid.js b/JSTests/test262/test/intl402/Locale/constructor-unicode-ext-valid.js >new file mode 100644 >index 0000000000000000000000000000000000000000..55ed30cb8cc98535e224c7ae947b4c1bd3692861 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/constructor-unicode-ext-valid.js >@@ -0,0 +1,34 @@ >+// Copyright 2018 André Bargull; Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Verifies canonicalization of specific tags. >+info: | >+ ApplyOptionsToTag( tag, options ) >+ 10. Return CanonicalizeLanguageTag(tag). >+features: [Intl.Locale] >+---*/ >+ >+const validLanguageTags = { >+ // Duplicate keywords are removed. >+ "da-u-ca-gregory-ca-buddhist": "da-u-ca-gregory", >+ >+ // Keywords currently used in Intl specs are reordered in US-ASCII order. >+ "zh-u-nu-hans-ca-chinese": "zh-u-ca-chinese-nu-hans", >+ "zh-u-ca-chinese-nu-hans": "zh-u-ca-chinese-nu-hans", >+ >+ // Even keywords currently not used in Intl specs are reordered in US-ASCII order. >+ "de-u-cu-eur-nu-latn": "de-u-cu-eur-nu-latn", >+ "de-u-nu-latn-cu-eur": "de-u-cu-eur-nu-latn", >+ >+ // Attributes in Unicode extensions are reordered in US-ASCII order. >+ "pt-u-attr-ca-gregory": "pt-u-attr-ca-gregory", >+ "pt-u-attr1-attr2-ca-gregory": "pt-u-attr1-attr2-ca-gregory", >+ "pt-u-attr2-attr1-ca-gregory": "pt-u-attr1-attr2-ca-gregory", >+}; >+ >+for (const [langtag, canonical] of Object.entries(validLanguageTags)) { >+ assert.sameValue(new Intl.Locale(langtag).toString(), canonical); >+} >diff --git a/JSTests/test262/test/intl402/Locale/extensions-grandfathered.js b/JSTests/test262/test/intl402/Locale/extensions-grandfathered.js >new file mode 100644 >index 0000000000000000000000000000000000000000..7601934f8d93d9f140d1f2df5f8397f67411e473 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/extensions-grandfathered.js >@@ -0,0 +1,117 @@ >+// Copyright 2018 André Bargull; Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Verifies handling of options with grandfathered tags. >+info: | >+ ApplyOptionsToTag( tag, options ) >+ >+ ... >+ 9. If tag matches neither the privateuse nor the grandfathered production, then >+ ... >+ >+ ApplyUnicodeExtensionToTag( tag, options, relevantExtensionKeys ) >+ >+ ... >+ 2. If tag matches the privateuse or the grandfathered production, then >+ a. Let result be a new Record. >+ b. Repeat for each element key of relevantExtensionKeys in List order, >+ i. Set result.[[<key>]] to undefined. >+ c. Set result.[[locale]] to tag. >+ d. Return result. >+ ... >+ 7. Repeat for each element key of relevantExtensionKeys in List order, >+ e. Let optionsValue be options.[[<key>]]. >+ f. If optionsValue is not undefined, then >+ ii. Let value be optionsValue. >+ iv. Else, >+ 1. Append the Record{[[Key]]: key, [[Value]]: value} to keywords. >+ ... >+ >+features: [Intl.Locale] >+---*/ >+ >+const testData = [ >+ // Irregular grandfathered without modern replacement. >+ { >+ tag: "i-default", >+ options: { >+ language: "fr", >+ script: "Cyrl", >+ region: "DE", >+ numberingSystem: "latn", >+ }, >+ canonical: "i-default", >+ extensions: { >+ language: undefined, >+ script: undefined, >+ region: undefined, >+ numberingSystem: undefined, >+ }, >+ }, >+ >+ // Irregular grandfathered with modern replacement. >+ { >+ tag: "en-gb-oed", >+ options: { >+ language: "fr", >+ script: "Cyrl", >+ region: "US", >+ numberingSystem: "latn", >+ }, >+ canonical: "en-GB-oxendict-u-nu-latn", >+ extensions: { >+ language: "en", >+ script: undefined, >+ region: "GB", >+ numberingSystem: "latn", >+ }, >+ }, >+ >+ // Regular grandfathered without modern replacement. >+ { >+ tag: "cel-gaulish", >+ options: { >+ language: "fr", >+ script: "Cyrl", >+ region: "FR", >+ numberingSystem: "latn", >+ }, >+ canonical: "cel-gaulish", >+ extensions: { >+ language: undefined, >+ script: undefined, >+ region: undefined, >+ numberingSystem: undefined, >+ }, >+ }, >+ >+ // Regular grandfathered with modern replacement. >+ { >+ tag: "art-lojban", >+ options: { >+ language: "fr", >+ script: "Cyrl", >+ region: "ZZ", >+ numberingSystem: "latn", >+ }, >+ canonical: "jbo-u-nu-latn", >+ extensions: { >+ language: "jbo", >+ script: undefined, >+ region: undefined, >+ numberingSystem: "latn", >+ }, >+ }, >+]; >+ >+for (const {tag, options, canonical, extensions} of testData) { >+ const loc = new Intl.Locale(tag, options); >+ assert.sameValue(loc.toString(), canonical); >+ >+ for (const [name, value] of Object.entries(extensions)) { >+ assert.sameValue(loc[name], value); >+ } >+} >diff --git a/JSTests/test262/test/intl402/Locale/extensions-private.js b/JSTests/test262/test/intl402/Locale/extensions-private.js >new file mode 100644 >index 0000000000000000000000000000000000000000..e8f39c976d69d893f415d8ff383a44a06668012c >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/extensions-private.js >@@ -0,0 +1,46 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Verifies handling of options with privateuse tags. >+info: | >+ ApplyOptionsToTag( tag, options ) >+ >+ ... >+ 9. If tag matches neither the privateuse nor the grandfathered production, then >+ ... >+ >+ ApplyUnicodeExtensionToTag( tag, options, relevantExtensionKeys ) >+ >+ ... >+ 2. If tag matches the privateuse or the grandfathered production, then >+ a. Let result be a new Record. >+ b. Repeat for each element key of relevantExtensionKeys in List order, >+ i. Set result.[[<key>]] to undefined. >+ c. Set result.[[locale]] to tag. >+ d. Return result. >+ ... >+ 7. Repeat for each element key of relevantExtensionKeys in List order, >+ e. Let optionsValue be options.[[<key>]]. >+ f. If optionsValue is not undefined, then >+ ii. Let value be optionsValue. >+ iv. Else, >+ 1. Append the Record{[[Key]]: key, [[Value]]: value} to keywords. >+ ... >+ >+features: [Intl.Locale] >+---*/ >+ >+const loc = new Intl.Locale("x-default", { >+ language: "fr", >+ script: "Cyrl", >+ region: "DE", >+ numberingSystem: "latn", >+}); >+assert.sameValue(loc.toString(), "x-default"); >+assert.sameValue(loc.language, undefined); >+assert.sameValue(loc.script, undefined); >+assert.sameValue(loc.region, undefined); >+assert.sameValue(loc.numberingSystem, undefined); >diff --git a/JSTests/test262/test/intl402/Locale/getters-grandfathered.js b/JSTests/test262/test/intl402/Locale/getters-grandfathered.js >new file mode 100644 >index 0000000000000000000000000000000000000000..d4f23f6145adc320c84eda46b972051cd1ab16a3 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/getters-grandfathered.js >@@ -0,0 +1,45 @@ >+// Copyright 2018 André Bargull; Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Verifies getters with grandfathered tags. >+info: | >+ get Intl.Locale.prototype.baseName >+ 4. If locale does not match the langtag production, return locale. >+ 5. Return the substring of locale corresponding to the >+ language ["-" script] ["-" region] *("-" variant) >+ subsequence of the langtag grammar. >+ >+ get Intl.Locale.prototype.language >+ 4. If locale matches the privateuse or the grandfathered production, return undefined. >+ >+ get Intl.Locale.prototype.script >+ 4. If locale matches the privateuse or the grandfathered production, return undefined. >+ >+ get Intl.Locale.prototype.region >+ 4. If locale matches the privateuse or the grandfathered production, return undefined. >+features: [Intl.Locale] >+---*/ >+ >+// Irregular grandfathered language tag. >+var loc = new Intl.Locale("i-default"); >+assert.sameValue(loc.baseName, "i-default"); // Step 4. >+assert.sameValue(loc.language, undefined); >+assert.sameValue(loc.script, undefined); >+assert.sameValue(loc.region, undefined); >+ >+// Regular grandfathered language tag. >+var loc = new Intl.Locale("cel-gaulish"); >+assert.sameValue(loc.baseName, "cel-gaulish"); // Step 5. >+assert.sameValue(loc.language, undefined); >+assert.sameValue(loc.script, undefined); >+assert.sameValue(loc.region, undefined); >+ >+// Regular grandfathered language tag. >+var loc = new Intl.Locale("zh-min"); >+assert.sameValue(loc.baseName, "zh-min"); // Step 5. >+assert.sameValue(loc.language, undefined); >+assert.sameValue(loc.script, undefined); >+assert.sameValue(loc.region, undefined); >diff --git a/JSTests/test262/test/intl402/Locale/getters-missing.js b/JSTests/test262/test/intl402/Locale/getters-missing.js >new file mode 100644 >index 0000000000000000000000000000000000000000..e57c8a300e6b4859d3e5d814e7fa65c745fcc6a6 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/getters-missing.js >@@ -0,0 +1,53 @@ >+// Copyright 2018 André Bargull; Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Verifies getters with missing tags. >+info: | >+ get Intl.Locale.prototype.baseName >+ 5. Return the substring of locale corresponding to the >+ language ["-" script] ["-" region] *("-" variant) >+ subsequence of the langtag grammar. >+ >+ get Intl.Locale.prototype.language >+ 4. Return the substring of locale corresponding to the language production. >+ >+ get Intl.Locale.prototype.script >+ 6. If locale does not contain the ["-" script] sequence, return undefined. >+ 7. Return the substring of locale corresponding to the script production. >+ >+ get Intl.Locale.prototype.region >+ 6. If locale does not contain the ["-" region] sequence, return undefined. >+ 7. Return the substring of locale corresponding to the region production. >+features: [Intl.Locale] >+---*/ >+ >+// 'script' and 'region' subtags not present. >+var loc = new Intl.Locale("sv"); >+assert.sameValue(loc.baseName, "sv"); >+assert.sameValue(loc.language, "sv"); >+assert.sameValue(loc.script, undefined); >+assert.sameValue(loc.region, undefined); >+ >+// 'region' subtag not present. >+var loc = new Intl.Locale("sv-Latn"); >+assert.sameValue(loc.baseName, "sv-Latn"); >+assert.sameValue(loc.language, "sv"); >+assert.sameValue(loc.script, "Latn"); >+assert.sameValue(loc.region, undefined); >+ >+// 'script' subtag not present. >+var loc = new Intl.Locale("sv-SE"); >+assert.sameValue(loc.baseName, "sv-SE"); >+assert.sameValue(loc.language, "sv"); >+assert.sameValue(loc.script, undefined); >+assert.sameValue(loc.region, "SE"); >+ >+// 'variant' subtag present. >+var loc = new Intl.Locale("de-1901"); >+assert.sameValue(loc.baseName, "de-1901"); >+assert.sameValue(loc.language, "de"); >+assert.sameValue(loc.script, undefined); >+assert.sameValue(loc.region, undefined); >diff --git a/JSTests/test262/test/intl402/Locale/getters-privateuse.js b/JSTests/test262/test/intl402/Locale/getters-privateuse.js >new file mode 100644 >index 0000000000000000000000000000000000000000..3aab960681eac50dd42fd47a165509aef9ec58b1 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/getters-privateuse.js >@@ -0,0 +1,28 @@ >+// Copyright 2018 André Bargull; Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Verifies getters with privateuse tags. >+info: | >+ get Intl.Locale.prototype.baseName >+ 4. If locale does not match the langtag production, return locale. >+ >+ get Intl.Locale.prototype.language >+ 4. If locale matches the privateuse or the grandfathered production, return undefined. >+ >+ get Intl.Locale.prototype.script >+ 4. If locale matches the privateuse or the grandfathered production, return undefined. >+ >+ get Intl.Locale.prototype.region >+ 4. If locale matches the privateuse or the grandfathered production, return undefined. >+features: [Intl.Locale] >+---*/ >+ >+// Privateuse only language tag. >+var loc = new Intl.Locale("x-private"); >+assert.sameValue(loc.baseName, "x-private"); >+assert.sameValue(loc.language, undefined); >+assert.sameValue(loc.script, undefined); >+assert.sameValue(loc.region, undefined); >diff --git a/JSTests/test262/test/intl402/Locale/getters.js b/JSTests/test262/test/intl402/Locale/getters.js >new file mode 100644 >index 0000000000000000000000000000000000000000..9dbe4b419f556bfe363faa4015ef142f18e1ad22 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/getters.js >@@ -0,0 +1,122 @@ >+// Copyright 2018 André Bargull; Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Verifies getters with normal tags. >+info: | >+ Intl.Locale.prototype.toString () >+ 3. Return loc.[[Locale]]. >+ >+ get Intl.Locale.prototype.baseName >+ 5. Return the substring of locale corresponding to the >+ language ["-" script] ["-" region] *("-" variant) >+ subsequence of the langtag grammar. >+ >+ get Intl.Locale.prototype.language >+ 4. Return the substring of locale corresponding to the language production. >+ >+ get Intl.Locale.prototype.script >+ 7. Return the substring of locale corresponding to the script production. >+ >+ get Intl.Locale.prototype.region >+ 7. Return the substring of locale corresponding to the region production. >+ >+ get Intl.Locale.prototype.calendar >+ 3. Return loc.[[Calendar]]. >+ >+ get Intl.Locale.prototype.collation >+ 3. Return loc.[[Collation]]. >+ >+ get Intl.Locale.prototype.hourCycle >+ 3. Return loc.[[HourCycle]]. >+ >+ get Intl.Locale.prototype.caseFirst >+ This property only exists if %Locale%.[[RelevantExtensionKeys]] contains "kf". >+ 3. Return loc.[[CaseFirst]]. >+ >+ get Intl.Locale.prototype.numeric >+ This property only exists if %Locale%.[[RelevantExtensionKeys]] contains "kn". >+ 3. Return loc.[[Numeric]]. >+ >+ get Intl.Locale.prototype.numberingSystem >+ 3. Return loc.[[NumberingSystem]]. >+ >+features: [Intl.Locale] >+---*/ >+ >+// Test all getters return the expected results. >+var langtag = "de-latn-de-u-ca-gregory-co-phonebk-hc-h23-kf-true-kn-false-nu-latn"; >+var loc = new Intl.Locale(langtag); >+ >+assert.sameValue(loc.toString(), "de-Latn-DE-u-ca-gregory-co-phonebk-hc-h23-kf-true-kn-false-nu-latn"); >+assert.sameValue(loc.baseName, "de-Latn-DE"); >+assert.sameValue(loc.language, "de"); >+assert.sameValue(loc.script, "Latn"); >+assert.sameValue(loc.region, "DE"); >+assert.sameValue(loc.calendar, "gregory"); >+assert.sameValue(loc.collation, "phonebk"); >+assert.sameValue(loc.hourCycle, "h23"); >+if ("caseFirst" in loc) { >+ assert.sameValue(loc.caseFirst, "true"); >+} >+if ("numeric" in loc) { >+ assert.sameValue(loc.numeric, "false"); >+} >+assert.sameValue(loc.numberingSystem, "latn"); >+ >+// Replace all components through option values and validate the getters still >+// return the expected results. >+var loc = new Intl.Locale(langtag, { >+ language: "ja", >+ script: "jpan", >+ region: "jp", >+ calendar: "japanese", >+ collation: "search", >+ hourCycle: "h24", >+ caseFirst: "false", >+ numeric: "true", >+ numberingSystem: "jpanfin", >+}); >+ >+assert.sameValue(loc.toString(), "ja-Jpan-JP-u-ca-japanese-co-search-hc-h24-kf-false-kn-true-nu-jpanfin"); >+assert.sameValue(loc.baseName, "ja-Jpan-JP"); >+assert.sameValue(loc.language, "ja"); >+assert.sameValue(loc.script, "Jpan"); >+assert.sameValue(loc.region, "JP"); >+assert.sameValue(loc.calendar, "japanese"); >+assert.sameValue(loc.collation, "search"); >+assert.sameValue(loc.hourCycle, "h24"); >+if ("caseFirst" in loc) { >+ assert.sameValue(loc.caseFirst, "false"); >+} >+if ("numeric" in loc) { >+ assert.sameValue(loc.numeric, "true"); >+} >+assert.sameValue(loc.numberingSystem, "jpanfin"); >+ >+// Replace only some components through option values and validate the getters >+// return the expected results. >+var loc = new Intl.Locale(langtag, { >+ language: "fr", >+ region: "ca", >+ collation: "standard", >+ hourCycle: "h11", >+}); >+ >+assert.sameValue(loc.toString(), "fr-Latn-CA-u-ca-gregory-co-standard-hc-h11-kf-true-kn-false-nu-latn"); >+assert.sameValue(loc.baseName, "fr-Latn-CA"); >+assert.sameValue(loc.language, "fr"); >+assert.sameValue(loc.script, "Latn"); >+assert.sameValue(loc.region, "CA"); >+assert.sameValue(loc.calendar, "gregory"); >+assert.sameValue(loc.collation, "standard"); >+assert.sameValue(loc.hourCycle, "h11"); >+if ("caseFirst" in loc) { >+ assert.sameValue(loc.caseFirst, "true"); >+} >+if ("numeric" in loc) { >+ assert.sameValue(loc.numeric, "false"); >+} >+assert.sameValue(loc.numberingSystem, "latn"); >diff --git a/JSTests/test262/test/intl402/Locale/invalid-tag-throws-symbol.js b/JSTests/test262/test/intl402/Locale/invalid-tag-throws-symbol.js >index a56882e47b14b096378e0e97999b0b38cb62234d..d99264671df54e6f7c64fc671347c80117af4880 100644 >--- a/JSTests/test262/test/intl402/Locale/invalid-tag-throws-symbol.js >+++ b/JSTests/test262/test/intl402/Locale/invalid-tag-throws-symbol.js >@@ -9,7 +9,7 @@ > Intl.Locale( tag [, options] ) > > 7. If Type(tag) is not String or Object, throw a TypeError exception. >-features: [Intl.Locale] >+features: [Intl.Locale, Symbol] > ---*/ > > assert.throws(TypeError, function() { >diff --git a/JSTests/test262/test/intl402/Locale/likely-subtags-grandfathered.js b/JSTests/test262/test/intl402/Locale/likely-subtags-grandfathered.js >new file mode 100644 >index 0000000000000000000000000000000000000000..2dcee9460600ebf8e05f53330e65f1d94441723f >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/likely-subtags-grandfathered.js >@@ -0,0 +1,202 @@ >+// Copyright 2018 André Bargull; Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Verifies canonicalization, minimization and maximization of specific tags. >+info: | >+ ApplyOptionsToTag( tag, options ) >+ 10. Return CanonicalizeLanguageTag(tag). >+ >+ Intl.Locale.prototype.maximize () >+ 3. Let maximal be the result of the Add Likely Subtags algorithm applied to loc.[[Locale]]. >+ >+ Intl.Locale.prototype.minimize () >+ 3. Let minimal be the result of the Remove Likely Subtags algorithm applied to loc.[[Locale]]. >+features: [Intl.Locale] >+---*/ >+ >+const irregularGrandfathered = [ >+ { >+ tag: "en-GB-oed", >+ canonical: "en-GB-oxendict", >+ maximized: "en-Latn-GB-oxendict", >+ }, >+ { >+ tag: "i-ami", >+ canonical: "ami", >+ }, >+ { >+ tag: "i-bnn", >+ canonical: "bnn", >+ }, >+ { >+ tag: "i-default", >+ canonical: "i-default", >+ }, >+ { >+ tag: "i-enochian", >+ canonical: "i-enochian", >+ }, >+ { >+ tag: "i-hak", >+ canonical: "hak", >+ maximized: "hak-Hans-CN", >+ }, >+ { >+ tag: "i-klingon", >+ canonical: "tlh", >+ }, >+ { >+ tag: "i-lux", >+ canonical: "lb", >+ maximized: "lb-Latn-LU", >+ }, >+ { >+ tag: "i-mingo", >+ canonical: "i-mingo", >+ }, >+ { >+ tag: "i-navajo", >+ canonical: "nv", >+ maximized: "nv-Latn-US", >+ }, >+ { >+ tag: "i-pwn", >+ canonical: "pwn", >+ }, >+ { >+ tag: "i-tao", >+ canonical: "tao", >+ }, >+ { >+ tag: "i-tay", >+ canonical: "tay", >+ }, >+ { >+ tag: "i-tsu", >+ canonical: "tsu", >+ }, >+ { >+ tag: "sgn-BE-FR", >+ canonical: "sfb", >+ }, >+ { >+ tag: "sgn-BE-NL", >+ canonical: "vgt", >+ }, >+ { >+ tag: "sgn-CH-DE", >+ canonical: "sgg", >+ }, >+]; >+ >+for (const {tag, canonical, maximized = canonical, minimized = canonical} of irregularGrandfathered) { >+ assert.sameValue(Intl.getCanonicalLocales(tag)[0], canonical); >+ >+ const loc = new Intl.Locale(tag); >+ assert.sameValue(loc.toString(), canonical); >+ >+ assert.sameValue(loc.maximize().toString(), maximized); >+ assert.sameValue(loc.maximize().maximize().toString(), maximized); >+ >+ assert.sameValue(loc.minimize().toString(), minimized); >+ assert.sameValue(loc.minimize().minimize().toString(), minimized); >+ >+ assert.sameValue(loc.maximize().minimize().toString(), minimized); >+ assert.sameValue(loc.minimize().maximize().toString(), maximized); >+} >+ >+const regularGrandfathered = [ >+ { >+ tag: "art-lojban", >+ canonical: "jbo", >+ maximized: "jbo-Latn-001", >+ }, >+ { >+ tag: "cel-gaulish", >+ canonical: "cel-gaulish", >+ }, >+ { >+ tag: "no-bok", >+ canonical: "nb", >+ maximized: "nb-Latn-NO", >+ }, >+ { >+ tag: "no-nyn", >+ canonical: "nn", >+ maximized: "nn-Latn-NO", >+ }, >+ { >+ tag: "zh-guoyu", >+ canonical: "cmn", >+ }, >+ { >+ tag: "zh-hakka", >+ canonical: "hak", >+ maximized: "hak-Hans-CN", >+ }, >+ { >+ tag: "zh-min", >+ canonical: "zh-min", >+ }, >+ { >+ tag: "zh-min-nan", >+ canonical: "nan", >+ maximized: "nan-Hans-CN", >+ }, >+ { >+ tag: "zh-xiang", >+ canonical: "hsn", >+ maximized: "hsn-Hans-CN", >+ }, >+]; >+ >+for (const {tag, canonical, maximized = canonical, minimized = canonical} of regularGrandfathered) { >+ assert.sameValue(Intl.getCanonicalLocales(tag)[0], canonical); >+ >+ const loc = new Intl.Locale(tag); >+ assert.sameValue(loc.toString(), canonical); >+ >+ assert.sameValue(loc.maximize().toString(), maximized); >+ assert.sameValue(loc.maximize().maximize().toString(), maximized); >+ >+ assert.sameValue(loc.minimize().toString(), minimized); >+ assert.sameValue(loc.minimize().minimize().toString(), minimized); >+ >+ assert.sameValue(loc.maximize().minimize().toString(), minimized); >+ assert.sameValue(loc.minimize().maximize().toString(), maximized); >+} >+ >+// Add constiants, extensions, and privateuse subtags to regular grandfathered >+// language tags and ensure it produces the "expected" result. >+const extras = [ >+ "fonipa", >+ "a-not-assigned", >+ "u-attr", >+ "u-co", >+ "u-co-phonebk", >+ "x-private", >+]; >+ >+for (const {tag} of regularGrandfathered) { >+ const priv = "-x-0"; >+ const tagMax = new Intl.Locale(tag + priv).maximize().toString().slice(0, -priv.length); >+ const tagMin = new Intl.Locale(tag + priv).minimize().toString().slice(0, -priv.length); >+ >+ for (const extra of extras) { >+ const loc = new Intl.Locale(tag + "-" + extra); >+ assert.sameValue(loc.toString(), tag + "-" + extra); >+ >+ assert.sameValue(loc.maximize().toString(), tagMax + "-" + extra); >+ assert.sameValue(loc.maximize().maximize().toString(), tagMax + "-" + extra); >+ >+ assert.sameValue(loc.minimize().toString(), tagMin + "-" + extra); >+ assert.sameValue(loc.minimize().minimize().toString(), tagMin + "-" + extra); >+ >+ assert.sameValue(loc.maximize().minimize().toString(), tagMin + "-" + extra); >+ assert.sameValue(loc.minimize().maximize().toString(), tagMax + "-" + extra); >+ } >+} >+ >diff --git a/JSTests/test262/test/intl402/Locale/prop-desc.js b/JSTests/test262/test/intl402/Locale/prop-desc.js >index 7be47a352c50bda545d8127f69e53cb8d5532da0..53e108314be5cb1812d291fc0fe5d3f1c6d5d51b 100644 >--- a/JSTests/test262/test/intl402/Locale/prop-desc.js >+++ b/JSTests/test262/test/intl402/Locale/prop-desc.js >@@ -4,23 +4,30 @@ > /*--- > esid: sec-intl.locale > description: > >- The value of the [[Prototype]] internal slot of the Intl.Locale constructor is the >- intrinsic object %FunctionPrototype%. >+ "Locale" property of Intl. > info: | >- The value of Intl.Locale.prototype is %LocalePrototype%. >+ Intl.Locale (...) > >- This property has the attributes >- { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }. >+ 7 Requirements for Standard Built-in ECMAScript Objects >+ >+ Unless specified otherwise in this document, the objects, functions, and constructors >+ described in this standard are subject to the generic requirements and restrictions >+ specified for standard built-in ECMAScript objects in the ECMAScript 2018 Language >+ Specification, 9th edition, clause 17, or successor. >+ >+ 17 ECMAScript Standard Built-in Objects: >+ >+ Every other data property described in clauses 18 through 26 and in Annex B.2 has the >+ attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } >+ unless otherwise specified. > > includes: [propertyHelper.js] > features: [Intl.Locale] > ---*/ > >-assert.sameValue(typeof Intl.Locale, "function", "typeof Intl.Locale is function"); >- > verifyProperty(Intl, "Locale", { > value: Intl.Locale, >- writable: false, >+ writable: true, > enumerable: false, >- configurable: false, >+ configurable: true, > }); >diff --git a/JSTests/test262/test/intl402/Locale/prototype/baseName/prop-desc.js b/JSTests/test262/test/intl402/Locale/prototype/baseName/prop-desc.js >new file mode 100644 >index 0000000000000000000000000000000000000000..8c3be4bfc09ceaa391f75a6807eae97f5c0a9c03 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/prototype/baseName/prop-desc.js >@@ -0,0 +1,28 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks the "baseName" property of the Locale prototype object. >+info: | >+ Intl.Locale.prototype.baseName >+ >+ Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10th edition, clause 17, or successor. >+ >+ Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string. >+ >+ Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined. >+includes: [propertyHelper.js] >+features: [Intl.Locale] >+---*/ >+ >+const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "baseName"); >+assert.sameValue(propdesc.set, undefined); >+assert.sameValue(typeof propdesc.get, "function"); >+assert.sameValue(propdesc.get.name, "get baseName"); >+ >+verifyProperty(Intl.Locale.prototype, "baseName", { >+ enumerable: false, >+ configurable: true, >+}); >diff --git a/JSTests/test262/test/intl402/Locale/prototype/calendar/prop-desc.js b/JSTests/test262/test/intl402/Locale/prototype/calendar/prop-desc.js >new file mode 100644 >index 0000000000000000000000000000000000000000..df376f92c467f8705c2f9f13c57127a789b076b6 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/prototype/calendar/prop-desc.js >@@ -0,0 +1,28 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks the "calendar" property of the Locale prototype object. >+info: | >+ Intl.Locale.prototype.calendar >+ >+ Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10th edition, clause 17, or successor. >+ >+ Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string. >+ >+ Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined. >+includes: [propertyHelper.js] >+features: [Intl.Locale] >+---*/ >+ >+const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "calendar"); >+assert.sameValue(propdesc.set, undefined); >+assert.sameValue(typeof propdesc.get, "function"); >+assert.sameValue(propdesc.get.name, "get calendar"); >+ >+verifyProperty(Intl.Locale.prototype, "calendar", { >+ enumerable: false, >+ configurable: true, >+}); >diff --git a/JSTests/test262/test/intl402/Locale/prototype/caseFirst/prop-desc.js b/JSTests/test262/test/intl402/Locale/prototype/caseFirst/prop-desc.js >new file mode 100644 >index 0000000000000000000000000000000000000000..ad370db8b4e5c4b4b40dbb8ca6f088be9e61fa19 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/prototype/caseFirst/prop-desc.js >@@ -0,0 +1,30 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks the "caseFirst" property of the Locale prototype object. >+info: | >+ Intl.Locale.prototype.caseFirst >+ >+ Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10th edition, clause 17, or successor. >+ >+ Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string. >+ >+ Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined. >+includes: [propertyHelper.js] >+features: [Intl.Locale] >+---*/ >+ >+const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "caseFirst"); >+if (propdesc) { >+ assert.sameValue(propdesc.set, undefined); >+ assert.sameValue(typeof propdesc.get, "function"); >+ assert.sameValue(propdesc.get.name, "get caseFirst"); >+ >+ verifyProperty(Intl.Locale.prototype, "caseFirst", { >+ enumerable: false, >+ configurable: true, >+ }); >+} >diff --git a/JSTests/test262/test/intl402/Locale/prototype/collation/prop-desc.js b/JSTests/test262/test/intl402/Locale/prototype/collation/prop-desc.js >new file mode 100644 >index 0000000000000000000000000000000000000000..243559abb9e135662c191f7207a87e1d66acd1d9 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/prototype/collation/prop-desc.js >@@ -0,0 +1,28 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks the "collation" property of the Locale prototype object. >+info: | >+ Intl.Locale.prototype.collation >+ >+ Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10th edition, clause 17, or successor. >+ >+ Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string. >+ >+ Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined. >+includes: [propertyHelper.js] >+features: [Intl.Locale] >+---*/ >+ >+const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "collation"); >+assert.sameValue(propdesc.set, undefined); >+assert.sameValue(typeof propdesc.get, "function"); >+assert.sameValue(propdesc.get.name, "get collation"); >+ >+verifyProperty(Intl.Locale.prototype, "collation", { >+ enumerable: false, >+ configurable: true, >+}); >diff --git a/JSTests/test262/test/intl402/Locale/prototype/constructor.js b/JSTests/test262/test/intl402/Locale/prototype/constructor.js >deleted file mode 100644 >index e2c7c95dd72cb77f00a09b4d2c1a3963d8f1350b..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/intl402/Locale/prototype/constructor.js >+++ /dev/null >@@ -1,25 +0,0 @@ >-// Copyright 2018 Igalia, S.L. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >- >-/*--- >-esid: sec-intl.locale.prototype.constructor >-description: > >- Checks the "constructor" property of the Locale prototype object. >-info: | >- Intl.Locale.prototype.constructor >- >- The initial value of Intl.Locale.prototype.constructor is %Locale%. >- >- Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10th edition, clause 17, or successor. >- >- Every other data property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. >-includes: [propertyHelper.js] >-features: [Intl.Locale] >----*/ >- >-verifyProperty(Intl.Locale.prototype, 'constructor', { >- value: Intl.Locale, >- writable: true, >- enumerable: false, >- configurable: true, >-}); >diff --git a/JSTests/test262/test/intl402/Locale/prototype/constructor/prop-desc.js b/JSTests/test262/test/intl402/Locale/prototype/constructor/prop-desc.js >new file mode 100644 >index 0000000000000000000000000000000000000000..e2c7c95dd72cb77f00a09b4d2c1a3963d8f1350b >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/prototype/constructor/prop-desc.js >@@ -0,0 +1,25 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale.prototype.constructor >+description: > >+ Checks the "constructor" property of the Locale prototype object. >+info: | >+ Intl.Locale.prototype.constructor >+ >+ The initial value of Intl.Locale.prototype.constructor is %Locale%. >+ >+ Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10th edition, clause 17, or successor. >+ >+ Every other data property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. >+includes: [propertyHelper.js] >+features: [Intl.Locale] >+---*/ >+ >+verifyProperty(Intl.Locale.prototype, 'constructor', { >+ value: Intl.Locale, >+ writable: true, >+ enumerable: false, >+ configurable: true, >+}); >diff --git a/JSTests/test262/test/intl402/Locale/prototype/hourCycle/prop-desc.js b/JSTests/test262/test/intl402/Locale/prototype/hourCycle/prop-desc.js >new file mode 100644 >index 0000000000000000000000000000000000000000..72275a3e32d84a15052df2258630f340bdec245d >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/prototype/hourCycle/prop-desc.js >@@ -0,0 +1,28 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks the "hourCycle" property of the Locale prototype object. >+info: | >+ Intl.Locale.prototype.hourCycle >+ >+ Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10th edition, clause 17, or successor. >+ >+ Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string. >+ >+ Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined. >+includes: [propertyHelper.js] >+features: [Intl.Locale] >+---*/ >+ >+const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "hourCycle"); >+assert.sameValue(propdesc.set, undefined); >+assert.sameValue(typeof propdesc.get, "function"); >+assert.sameValue(propdesc.get.name, "get hourCycle"); >+ >+verifyProperty(Intl.Locale.prototype, "hourCycle", { >+ enumerable: false, >+ configurable: true, >+}); >diff --git a/JSTests/test262/test/intl402/Locale/prototype/language/prop-desc.js b/JSTests/test262/test/intl402/Locale/prototype/language/prop-desc.js >new file mode 100644 >index 0000000000000000000000000000000000000000..2b7eacaaba9626d383cc9bb1a85a3ae72ff93ff6 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/prototype/language/prop-desc.js >@@ -0,0 +1,28 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks the "language" property of the Locale prototype object. >+info: | >+ Intl.Locale.prototype.language >+ >+ Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10th edition, clause 17, or successor. >+ >+ Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string. >+ >+ Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined. >+includes: [propertyHelper.js] >+features: [Intl.Locale] >+---*/ >+ >+const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "language"); >+assert.sameValue(propdesc.set, undefined); >+assert.sameValue(typeof propdesc.get, "function"); >+assert.sameValue(propdesc.get.name, "get language"); >+ >+verifyProperty(Intl.Locale.prototype, "language", { >+ enumerable: false, >+ configurable: true, >+}); >diff --git a/JSTests/test262/test/intl402/Locale/prototype/maximize/length.js b/JSTests/test262/test/intl402/Locale/prototype/maximize/length.js >index dc59be0d579d361c22952e01704373f2be4d03f5..3d874b02e8e93fef7b2dc6d7e4ead8be06832f1a 100644 >--- a/JSTests/test262/test/intl402/Locale/prototype/maximize/length.js >+++ b/JSTests/test262/test/intl402/Locale/prototype/maximize/length.js >@@ -15,7 +15,7 @@ > ---*/ > > verifyProperty(Intl.Locale.prototype.maximize, 'length', { >- value: 1, >+ value: 0, > writable: false, > enumerable: false, > configurable: true >diff --git a/JSTests/test262/test/intl402/Locale/prototype/maximize/prop-desc.js b/JSTests/test262/test/intl402/Locale/prototype/maximize/prop-desc.js >index c5ff64d6e447705de180cc6d1d1245c061020f36..0dc72e02f8b95a4f1370e0524445854e95fc6623 100644 >--- a/JSTests/test262/test/intl402/Locale/prototype/maximize/prop-desc.js >+++ b/JSTests/test262/test/intl402/Locale/prototype/maximize/prop-desc.js >@@ -16,14 +16,14 @@ > ---*/ > > assert.sameValue( >- typeof Intl.Locale.prototype.maximize, >- 'function', >- "typeof Intl.Locale.prototype.maximize is function" >+ typeof Intl.Locale.prototype.maximize, >+ 'function', >+ 'typeof Intl.Locale.prototype.maximize is function' > ); > > verifyProperty(Intl.Locale.prototype, 'maximize', { > writable: true, > enumerable: false, >- configurable: false, >+ configurable: true, > }); > >diff --git a/JSTests/test262/test/intl402/Locale/prototype/minimize/length.js b/JSTests/test262/test/intl402/Locale/prototype/minimize/length.js >new file mode 100644 >index 0000000000000000000000000000000000000000..b52ff8bf6d5e1710b43a527855f718b5f0e95d91 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/prototype/minimize/length.js >@@ -0,0 +1,22 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale.prototype.minimize >+description: > >+ Checks the "length" property of Intl.Locale.prototype.minimize(). >+info: | >+ Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10th edition, clause 17, or successor. >+ The Locale constructor is a standard built-in property of the Intl object. >+ Every built-in function object, including constructors, has a length property whose value is an integer. Unless otherwise specified, this value is equal to the largest number of named arguments shown in the subclause headings for the function description. Optional parameters (which are indicated with brackets: [ ]) or rest parameters (which are shown using the form «...name») are not included in the default argument count. >+ Unless otherwise specified, the length property of a built-in function object has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. >+includes: [propertyHelper.js] >+features: [Intl.Locale] >+---*/ >+ >+verifyProperty(Intl.Locale.prototype.minimize, 'length', { >+ value: 0, >+ writable: false, >+ enumerable: false, >+ configurable: true, >+}); >diff --git a/JSTests/test262/test/intl402/Locale/prototype/minimize/name.js b/JSTests/test262/test/intl402/Locale/prototype/minimize/name.js >new file mode 100644 >index 0000000000000000000000000000000000000000..9571fd72639fefc1b54bda7a65e8ea253be56d6d >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/prototype/minimize/name.js >@@ -0,0 +1,21 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale.prototype.minimize >+description: > >+ Checks the "name" property of Intl.Locale.prototype.minimize(). >+info: | >+ Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10th edition, clause 17, or successor. >+ Every built-in function object, including constructors, that is not identified as an anonymous function has a name property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification. >+ Unless otherwise specified, the name property of a built-in function object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. >+includes: [propertyHelper.js] >+features: [Intl.Locale] >+---*/ >+ >+verifyProperty(Intl.Locale.prototype.minimize, 'name', { >+ value: 'minimize', >+ writable: false, >+ enumerable: false, >+ configurable: true, >+}); >diff --git a/JSTests/test262/test/intl402/Locale/prototype/minimize/prop-desc.js b/JSTests/test262/test/intl402/Locale/prototype/minimize/prop-desc.js >new file mode 100644 >index 0000000000000000000000000000000000000000..17f645034ce3f4ec7608fd36c961518b0073234e >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/prototype/minimize/prop-desc.js >@@ -0,0 +1,28 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks the "minimize" property of the Locale prototype object. >+info: | >+ Intl.Locale.prototype.minimize () >+ >+ Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10th edition, clause 17, or successor. >+ >+ Every other data property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. >+includes: [propertyHelper.js] >+features: [Intl.Locale] >+---*/ >+ >+assert.sameValue( >+ typeof Intl.Locale.prototype.minimize, >+ 'function', >+ 'typeof Intl.Locale.prototype.minimize is function' >+); >+ >+verifyProperty(Intl.Locale.prototype, 'minimize', { >+ writable: true, >+ enumerable: false, >+ configurable: true, >+}); >diff --git a/JSTests/test262/test/intl402/Locale/prototype/numberingSystem/prop-desc.js b/JSTests/test262/test/intl402/Locale/prototype/numberingSystem/prop-desc.js >new file mode 100644 >index 0000000000000000000000000000000000000000..d8f4d2474695e1a66d6ae55bfe37ad516d426ffb >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/prototype/numberingSystem/prop-desc.js >@@ -0,0 +1,28 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks the "numberingSystem" property of the Locale prototype object. >+info: | >+ Intl.Locale.prototype.numberingSystem >+ >+ Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10th edition, clause 17, or successor. >+ >+ Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string. >+ >+ Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined. >+includes: [propertyHelper.js] >+features: [Intl.Locale] >+---*/ >+ >+const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numberingSystem"); >+assert.sameValue(propdesc.set, undefined); >+assert.sameValue(typeof propdesc.get, "function"); >+assert.sameValue(propdesc.get.name, "get numberingSystem"); >+ >+verifyProperty(Intl.Locale.prototype, "numberingSystem", { >+ enumerable: false, >+ configurable: true, >+}); >diff --git a/JSTests/test262/test/intl402/Locale/prototype/numeric/prop-desc.js b/JSTests/test262/test/intl402/Locale/prototype/numeric/prop-desc.js >new file mode 100644 >index 0000000000000000000000000000000000000000..6772aeb60f77d225757166f7abd50f78f9529a95 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/prototype/numeric/prop-desc.js >@@ -0,0 +1,30 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks the "numeric" property of the Locale prototype object. >+info: | >+ Intl.Locale.prototype.numeric >+ >+ Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10th edition, clause 17, or successor. >+ >+ Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string. >+ >+ Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined. >+includes: [propertyHelper.js] >+features: [Intl.Locale] >+---*/ >+ >+const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numeric"); >+if (propdesc) { >+ assert.sameValue(propdesc.set, undefined); >+ assert.sameValue(typeof propdesc.get, "function"); >+ assert.sameValue(propdesc.get.name, "get numeric"); >+ >+ verifyProperty(Intl.Locale.prototype, "numeric", { >+ enumerable: false, >+ configurable: true, >+ }); >+} >diff --git a/JSTests/test262/test/intl402/Locale/prototype/region/prop-desc.js b/JSTests/test262/test/intl402/Locale/prototype/region/prop-desc.js >new file mode 100644 >index 0000000000000000000000000000000000000000..f361c50d5cc9fa03571cbebeece0d379435dc520 >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/prototype/region/prop-desc.js >@@ -0,0 +1,28 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks the "region" property of the Locale prototype object. >+info: | >+ Intl.Locale.prototype.region >+ >+ Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAregion objects in the ECMAregion 2019 region Specification, 10th edition, clause 17, or successor. >+ >+ Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string. >+ >+ Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined. >+includes: [propertyHelper.js] >+features: [Intl.Locale] >+---*/ >+ >+const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "region"); >+assert.sameValue(propdesc.set, undefined); >+assert.sameValue(typeof propdesc.get, "function"); >+assert.sameValue(propdesc.get.name, "get region"); >+ >+verifyProperty(Intl.Locale.prototype, "region", { >+ enumerable: false, >+ configurable: true, >+}); >diff --git a/JSTests/test262/test/intl402/Locale/prototype/script/prop-desc.js b/JSTests/test262/test/intl402/Locale/prototype/script/prop-desc.js >new file mode 100644 >index 0000000000000000000000000000000000000000..def900264233ba3d72fb60bdec57bffdbb90402d >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/prototype/script/prop-desc.js >@@ -0,0 +1,28 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks the "script" property of the Locale prototype object. >+info: | >+ Intl.Locale.prototype.script >+ >+ Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 script Specification, 10th edition, clause 17, or successor. >+ >+ Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string. >+ >+ Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined. >+includes: [propertyHelper.js] >+features: [Intl.Locale] >+---*/ >+ >+const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "script"); >+assert.sameValue(propdesc.set, undefined); >+assert.sameValue(typeof propdesc.get, "function"); >+assert.sameValue(propdesc.get.name, "get script"); >+ >+verifyProperty(Intl.Locale.prototype, "script", { >+ enumerable: false, >+ configurable: true, >+}); >diff --git a/JSTests/test262/test/intl402/Locale/prototype/toString/prop-desc.js b/JSTests/test262/test/intl402/Locale/prototype/toString/prop-desc.js >new file mode 100644 >index 0000000000000000000000000000000000000000..1b39a06a2e74acf77948601cf02ef55a3f7a0c4a >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/prototype/toString/prop-desc.js >@@ -0,0 +1,28 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale >+description: > >+ Checks the "toString" property of the Locale prototype object. >+info: | >+ Intl.Locale.prototype.toString () >+ >+ Unless specified otherwise in this document, the objects, functions, and constructors described in this standard are subject to the generic requirements and restrictions specified for standard built-in ECMAScript objects in the ECMAScript 2019 Language Specification, 10th edition, clause 17, or successor. >+ >+ Every other data property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. >+includes: [propertyHelper.js] >+features: [Intl.Locale] >+---*/ >+ >+assert.sameValue( >+ typeof Intl.Locale.prototype.toString, >+ "function", >+ "typeof Intl.Locale.prototype.toString is function" >+); >+ >+verifyProperty(Intl.Locale.prototype, "toString", { >+ writable: true, >+ enumerable: false, >+ configurable: true, >+}); >diff --git a/JSTests/test262/test/intl402/Locale/prototype/toStringTag.js b/JSTests/test262/test/intl402/Locale/prototype/toStringTag.js >deleted file mode 100644 >index dd939b574f8e780a622ecba9c87544b67478c93e..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/intl402/Locale/prototype/toStringTag.js >+++ /dev/null >@@ -1,23 +0,0 @@ >-// Copyright 2018 Igalia, S.L. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >- >-/*--- >-esid: sec-intl.locale.prototype-@@tostringtag >-description: > >- Checks the @@toStringTag property of the Locale prototype object. >-info: | >- Intl.Locale.prototype[ @@toStringTag ] >- >- The initial value of the @@toStringTag property is the string value "Intl.Locale". >- >- This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. >-includes: [propertyHelper.js] >-features: [Intl.Locale, Symbol.toStringTag] >----*/ >- >-verifyProperty(Intl.Locale.prototype, Symbol.toStringTag, { >- value: 'Intl.Locale', >- writable: false, >- enumerable: false, >- configurable: true >-}); >diff --git a/JSTests/test262/test/intl402/Locale/prototype/toStringTag/toStringTag.js b/JSTests/test262/test/intl402/Locale/prototype/toStringTag/toStringTag.js >new file mode 100644 >index 0000000000000000000000000000000000000000..dd939b574f8e780a622ecba9c87544b67478c93e >--- /dev/null >+++ b/JSTests/test262/test/intl402/Locale/prototype/toStringTag/toStringTag.js >@@ -0,0 +1,23 @@ >+// Copyright 2018 Igalia, S.L. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-intl.locale.prototype-@@tostringtag >+description: > >+ Checks the @@toStringTag property of the Locale prototype object. >+info: | >+ Intl.Locale.prototype[ @@toStringTag ] >+ >+ The initial value of the @@toStringTag property is the string value "Intl.Locale". >+ >+ This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. >+includes: [propertyHelper.js] >+features: [Intl.Locale, Symbol.toStringTag] >+---*/ >+ >+verifyProperty(Intl.Locale.prototype, Symbol.toStringTag, { >+ value: 'Intl.Locale', >+ writable: false, >+ enumerable: false, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/intl402/Number/prototype/toLocaleString/length.js b/JSTests/test262/test/intl402/Number/prototype/toLocaleString/length.js >index ff1538355ae2d698e85126af91759a3f4b75f090..48571eaaa6067463e3cbfcf7fdf4e3e451574734 100644 >--- a/JSTests/test262/test/intl402/Number/prototype/toLocaleString/length.js >+++ b/JSTests/test262/test/intl402/Number/prototype/toLocaleString/length.js >@@ -24,8 +24,9 @@ > includes: [propertyHelper.js] > ---*/ > >-assert.sameValue(Number.prototype.toLocaleString.length, 0); >- >-verifyNotEnumerable(Number.prototype.toLocaleString, "length"); >-verifyNotWritable(Number.prototype.toLocaleString, "length"); >-verifyConfigurable(Number.prototype.toLocaleString, "length"); >+verifyProperty(Number.prototype.toLocaleString, 'length', { >+ value: 0, >+ writable: false, >+ enumerable: false, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/intl402/NumberFormat/length.js b/JSTests/test262/test/intl402/NumberFormat/length.js >index e46a596ef124fa6fc72d666e2e0653a6615688ec..647a1aca97d3b195d8cab525fad00f56bae7f25b 100644 >--- a/JSTests/test262/test/intl402/NumberFormat/length.js >+++ b/JSTests/test262/test/intl402/NumberFormat/length.js >@@ -29,3 +29,10 @@ > verifyNotEnumerable(Intl.NumberFormat, "length"); > verifyNotWritable(Intl.NumberFormat, "length"); > verifyConfigurable(Intl.NumberFormat, "length"); >+ >+verifyProperty(Intl.NumberFormat, 'length', { >+ value: 0, >+ writable: false, >+ enumerable: false, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/intl402/NumberFormat/name.js b/JSTests/test262/test/intl402/NumberFormat/name.js >index 5e9593136696b73419e9cd8ce6a9a338fe55cd7c..41c0fcf1994ebe1f5aec290f91f1c211d7601244 100644 >--- a/JSTests/test262/test/intl402/NumberFormat/name.js >+++ b/JSTests/test262/test/intl402/NumberFormat/name.js >@@ -19,8 +19,9 @@ > includes: [propertyHelper.js] > ---*/ > >-assert.sameValue(Intl.NumberFormat.name, "NumberFormat"); >- >-verifyNotEnumerable(Intl.NumberFormat, "name"); >-verifyNotWritable(Intl.NumberFormat, "name"); >-verifyConfigurable(Intl.NumberFormat, "name"); >+verifyProperty(Intl.NumberFormat, 'name', { >+ value: 'NumberFormat', >+ writable: false, >+ enumerable: false, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/intl402/NumberFormat/prop-desc.js b/JSTests/test262/test/intl402/NumberFormat/prop-desc.js >index e5878a70e9602dd9e7e1746c3fb16fc2395900ee..81ed2e5a2b60b2a80b505f9d276f0d3696f42b39 100644 >--- a/JSTests/test262/test/intl402/NumberFormat/prop-desc.js >+++ b/JSTests/test262/test/intl402/NumberFormat/prop-desc.js >@@ -24,6 +24,8 @@ > includes: [propertyHelper.js] > ---*/ > >-verifyNotEnumerable(Intl, "NumberFormat"); >-verifyWritable(Intl, "NumberFormat"); >-verifyConfigurable(Intl, "NumberFormat"); >+verifyProperty(Intl, 'NumberFormat', { >+ writable: true, >+ enumerable: false, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/intl402/PluralRules/length.js b/JSTests/test262/test/intl402/PluralRules/length.js >index 9f701deff438b9b1b3b564092bd17edca2354120..33adaf70d1509ff88986a2cdb6cccc7689b1a6cf 100644 >--- a/JSTests/test262/test/intl402/PluralRules/length.js >+++ b/JSTests/test262/test/intl402/PluralRules/length.js >@@ -8,8 +8,9 @@ > includes: [propertyHelper.js] > ---*/ > >-assert.sameValue(Intl.PluralRules.length, 0); >- >-verifyNotEnumerable(Intl.PluralRules, "length"); >-verifyNotWritable(Intl.PluralRules, "length"); >-verifyConfigurable(Intl.PluralRules, "length"); >+verifyProperty(Intl.PluralRules, 'length', { >+ value: 0, >+ writable: false, >+ enumerable: false, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/intl402/PluralRules/name.js b/JSTests/test262/test/intl402/PluralRules/name.js >index c5126aa88fa6ca18c915eb7cdcb0525730b85949..075d349dc87dc9b1f470494c3d6d068022776768 100644 >--- a/JSTests/test262/test/intl402/PluralRules/name.js >+++ b/JSTests/test262/test/intl402/PluralRules/name.js >@@ -8,8 +8,9 @@ > includes: [propertyHelper.js] > ---*/ > >-assert.sameValue(Intl.PluralRules.name, "PluralRules"); >- >-verifyNotEnumerable(Intl.PluralRules, "name"); >-verifyNotWritable(Intl.PluralRules, "name"); >-verifyConfigurable(Intl.PluralRules, "name"); >+verifyProperty(Intl.PluralRules, 'name', { >+ value: 'PluralRules', >+ writable: false, >+ enumerable: false, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/intl402/PluralRules/prop-desc.js b/JSTests/test262/test/intl402/PluralRules/prop-desc.js >new file mode 100644 >index 0000000000000000000000000000000000000000..e0597da28ebc1fa0a9c5e56adaab49a6bc7d5ccd >--- /dev/null >+++ b/JSTests/test262/test/intl402/PluralRules/prop-desc.js >@@ -0,0 +1,31 @@ >+// Copyright (C) 2017 André Bargull. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-Intl.PluralRules >+description: > >+ "PluralRules" property of Intl. >+info: | >+ Intl.PluralRules (...) >+ >+ 7 Requirements for Standard Built-in ECMAScript Objects >+ >+ Unless specified otherwise in this document, the objects, functions, and constructors >+ described in this standard are subject to the generic requirements and restrictions >+ specified for standard built-in ECMAScript objects in the ECMAScript 2018 Language >+ Specification, 9th edition, clause 17, or successor. >+ >+ 17 ECMAScript Standard Built-in Objects: >+ >+ Every other data property described in clauses 18 through 26 and in Annex B.2 has the >+ attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } >+ unless otherwise specified. >+ >+includes: [propertyHelper.js] >+---*/ >+ >+verifyProperty(Intl, 'PluralRules', { >+ writable: true, >+ enumerable: false, >+ configurable: true >+}); >diff --git a/JSTests/test262/test/language/expressions/addition/bigint-and-number.js b/JSTests/test262/test/language/expressions/addition/bigint-and-number.js >index 1d41b3985cb07b1b83b76e9dcb5130c644b08cfc..c4c47f3bc507f2881c35fb2b953d8a79259a9065 100644 >--- a/JSTests/test262/test/language/expressions/addition/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/addition/bigint-and-number.js >@@ -12,22 +12,74 @@ > Let rnum be ? ToNumeric(rprim) > If Type(lnum) does not equal Type(rnum), throw a TypeError exception. > ---*/ >+assert.throws(TypeError, function() { >+ 1n + 1; >+}, '1n + 1 throws TypeError'); > >-assert.throws(TypeError, function() { 1n + 1; }, "1n + 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 + 1n; }, "1 + 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) + 1; }, "Object(1n) + 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 + Object(1n); }, "1 + Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n + Object(1); }, "1n + Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) + 1n; }, "Object(1) + 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) + Object(1); }, "Object(1n) + Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) + Object(1n); }, "Object(1) + Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n + NaN; }, "1n + NaN throws TypeError"); >-assert.throws(TypeError, function() { NaN + 1n; }, "NaN + 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n + Infinity; }, "1n + Infinity throws TypeError"); >-assert.throws(TypeError, function() { Infinity + 1n; }, "Infinity + 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n + true; }, "1n + true throws TypeError"); >-assert.throws(TypeError, function() { true + 1n; }, "true + 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n + null; }, "1n + null throws TypeError"); >-assert.throws(TypeError, function() { null + 1n; }, "null + 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n + undefined; }, "1n + undefined throws TypeError"); >-assert.throws(TypeError, function() { undefined + 1n; }, "undefined + 1n throws TypeError"); >+assert.throws(TypeError, function() { >+ 1 + 1n; >+}, '1 + 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) + 1; >+}, 'Object(1n) + 1 throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1 + Object(1n); >+}, '1 + Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n + Object(1); >+}, '1n + Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) + 1n; >+}, 'Object(1) + 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) + Object(1); >+}, 'Object(1n) + Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) + Object(1n); >+}, 'Object(1) + Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n + NaN; >+}, '1n + NaN throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ NaN + 1n; >+}, 'NaN + 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n + Infinity; >+}, '1n + Infinity throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Infinity + 1n; >+}, 'Infinity + 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n + true; >+}, '1n + true throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ true + 1n; >+}, 'true + 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n + null; >+}, '1n + null throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ null + 1n; >+}, 'null + 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n + undefined; >+}, '1n + undefined throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ undefined + 1n; >+}, 'undefined + 1n throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/addition/bigint-arithmetic.js b/JSTests/test262/test/language/expressions/addition/bigint-arithmetic.js >index 71a3434e7cbc31d8dbc11a4cd8c8f88c40310e1e..2d1b72d0b327d8293e7eeb8b299318f35267398a 100644 >--- a/JSTests/test262/test/language/expressions/addition/bigint-arithmetic.js >+++ b/JSTests/test262/test/language/expressions/addition/bigint-arithmetic.js >@@ -1,167 +1,1401 @@ > // Copyright (C) 2017 Robin Templeton. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > esid: sec-addition-operator-plus-runtime-semantics-evaluation > description: BigInt addition arithmetic > features: [BigInt] > ---*/ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0xFEDCBA9876543210n, >+ 0x1FDB97530ECA86420n, >+ 'The result of (0xFEDCBA9876543210n + 0xFEDCBA9876543210n) is 0x1FDB97530ECA86420n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0xFEDCBA9876543210n, >+ 0x1FDB97530ECA86420n, >+ 'The result of (0xFEDCBA9876543210n + 0xFEDCBA9876543210n) is 0x1FDB97530ECA86420n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0xFEDCBA987654320Fn, >+ 0x1FDB97530ECA8641Fn, >+ 'The result of (0xFEDCBA9876543210n + 0xFEDCBA987654320Fn) is 0x1FDB97530ECA8641Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0xFEDCBA987654320Fn, >+ 0x1FDB97530ECA8641Fn, >+ 'The result of (0xFEDCBA9876543210n + 0xFEDCBA987654320Fn) is 0x1FDB97530ECA8641Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0xFEDCBA98n, >+ 0xFEDCBA997530ECA8n, >+ 'The result of (0xFEDCBA9876543210n + 0xFEDCBA98n) is 0xFEDCBA997530ECA8n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0xFEDCBA98n, >+ 0xFEDCBA997530ECA8n, >+ 'The result of (0xFEDCBA9876543210n + 0xFEDCBA98n) is 0xFEDCBA997530ECA8n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0xFEDCBA97n, >+ 0xFEDCBA997530ECA7n, >+ 'The result of (0xFEDCBA9876543210n + 0xFEDCBA97n) is 0xFEDCBA997530ECA7n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0xFEDCBA97n, >+ 0xFEDCBA997530ECA7n, >+ 'The result of (0xFEDCBA9876543210n + 0xFEDCBA97n) is 0xFEDCBA997530ECA7n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0x1234n, >+ 0xFEDCBA9876544444n, >+ 'The result of (0xFEDCBA9876543210n + 0x1234n) is 0xFEDCBA9876544444n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0x1234n, >+ 0xFEDCBA9876544444n, >+ 'The result of (0xFEDCBA9876543210n + 0x1234n) is 0xFEDCBA9876544444n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0x3n, >+ 0xFEDCBA9876543213n, >+ 'The result of (0xFEDCBA9876543210n + 0x3n) is 0xFEDCBA9876543213n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0x3n, >+ 0xFEDCBA9876543213n, >+ 'The result of (0xFEDCBA9876543210n + 0x3n) is 0xFEDCBA9876543213n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0x2n, >+ 0xFEDCBA9876543212n, >+ 'The result of (0xFEDCBA9876543210n + 0x2n) is 0xFEDCBA9876543212n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0x2n, >+ 0xFEDCBA9876543212n, >+ 'The result of (0xFEDCBA9876543210n + 0x2n) is 0xFEDCBA9876543212n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0x1n, >+ 0xFEDCBA9876543211n, >+ 'The result of (0xFEDCBA9876543210n + 0x1n) is 0xFEDCBA9876543211n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0x1n, >+ 0xFEDCBA9876543211n, >+ 'The result of (0xFEDCBA9876543210n + 0x1n) is 0xFEDCBA9876543211n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0x0n, >+ 0xFEDCBA9876543210n, >+ 'The result of (0xFEDCBA9876543210n + 0x0n) is 0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + 0x0n, >+ 0xFEDCBA9876543210n, >+ 'The result of (0xFEDCBA9876543210n + 0x0n) is 0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + -0x1n, >+ 0xFEDCBA987654320Fn, >+ 'The result of (0xFEDCBA9876543210n + -0x1n) is 0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + -0x1n, >+ 0xFEDCBA987654320Fn, >+ 'The result of (0xFEDCBA9876543210n + -0x1n) is 0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + -0x2n, >+ 0xFEDCBA987654320En, >+ 'The result of (0xFEDCBA9876543210n + -0x2n) is 0xFEDCBA987654320En' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + -0x2n, >+ 0xFEDCBA987654320En, >+ 'The result of (0xFEDCBA9876543210n + -0x2n) is 0xFEDCBA987654320En' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + -0x3n, >+ 0xFEDCBA987654320Dn, >+ 'The result of (0xFEDCBA9876543210n + -0x3n) is 0xFEDCBA987654320Dn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + -0x3n, >+ 0xFEDCBA987654320Dn, >+ 'The result of (0xFEDCBA9876543210n + -0x3n) is 0xFEDCBA987654320Dn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + -0x1234n, >+ 0xFEDCBA9876541FDCn, >+ 'The result of (0xFEDCBA9876543210n + -0x1234n) is 0xFEDCBA9876541FDCn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + -0x1234n, >+ 0xFEDCBA9876541FDCn, >+ 'The result of (0xFEDCBA9876543210n + -0x1234n) is 0xFEDCBA9876541FDCn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + -0xFEDCBA97n, >+ 0xFEDCBA9777777779n, >+ 'The result of (0xFEDCBA9876543210n + -0xFEDCBA97n) is 0xFEDCBA9777777779n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + -0xFEDCBA97n, >+ 0xFEDCBA9777777779n, >+ 'The result of (0xFEDCBA9876543210n + -0xFEDCBA97n) is 0xFEDCBA9777777779n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + -0xFEDCBA98n, >+ 0xFEDCBA9777777778n, >+ 'The result of (0xFEDCBA9876543210n + -0xFEDCBA98n) is 0xFEDCBA9777777778n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + -0xFEDCBA98n, >+ 0xFEDCBA9777777778n, >+ 'The result of (0xFEDCBA9876543210n + -0xFEDCBA98n) is 0xFEDCBA9777777778n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + -0xFEDCBA987654320Fn, >+ 0x1n, >+ 'The result of (0xFEDCBA9876543210n + -0xFEDCBA987654320Fn) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + -0xFEDCBA987654320Fn, >+ 0x1n, >+ 'The result of (0xFEDCBA9876543210n + -0xFEDCBA987654320Fn) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0xFEDCBA9876543210n + -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n + -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0xFEDCBA9876543210n + -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + 0xFEDCBA987654320Fn, >+ 0x1FDB97530ECA8641En, >+ 'The result of (0xFEDCBA987654320Fn + 0xFEDCBA987654320Fn) is 0x1FDB97530ECA8641En' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + 0xFEDCBA987654320Fn, >+ 0x1FDB97530ECA8641En, >+ 'The result of (0xFEDCBA987654320Fn + 0xFEDCBA987654320Fn) is 0x1FDB97530ECA8641En' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + 0xFEDCBA98n, >+ 0xFEDCBA997530ECA7n, >+ 'The result of (0xFEDCBA987654320Fn + 0xFEDCBA98n) is 0xFEDCBA997530ECA7n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + 0xFEDCBA98n, >+ 0xFEDCBA997530ECA7n, >+ 'The result of (0xFEDCBA987654320Fn + 0xFEDCBA98n) is 0xFEDCBA997530ECA7n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + 0xFEDCBA97n, >+ 0xFEDCBA997530ECA6n, >+ 'The result of (0xFEDCBA987654320Fn + 0xFEDCBA97n) is 0xFEDCBA997530ECA6n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + 0xFEDCBA97n, >+ 0xFEDCBA997530ECA6n, >+ 'The result of (0xFEDCBA987654320Fn + 0xFEDCBA97n) is 0xFEDCBA997530ECA6n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + 0x1234n, >+ 0xFEDCBA9876544443n, >+ 'The result of (0xFEDCBA987654320Fn + 0x1234n) is 0xFEDCBA9876544443n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + 0x1234n, >+ 0xFEDCBA9876544443n, >+ 'The result of (0xFEDCBA987654320Fn + 0x1234n) is 0xFEDCBA9876544443n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + 0x3n, >+ 0xFEDCBA9876543212n, >+ 'The result of (0xFEDCBA987654320Fn + 0x3n) is 0xFEDCBA9876543212n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + 0x3n, >+ 0xFEDCBA9876543212n, >+ 'The result of (0xFEDCBA987654320Fn + 0x3n) is 0xFEDCBA9876543212n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + 0x2n, >+ 0xFEDCBA9876543211n, >+ 'The result of (0xFEDCBA987654320Fn + 0x2n) is 0xFEDCBA9876543211n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + 0x2n, >+ 0xFEDCBA9876543211n, >+ 'The result of (0xFEDCBA987654320Fn + 0x2n) is 0xFEDCBA9876543211n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + 0x1n, >+ 0xFEDCBA9876543210n, >+ 'The result of (0xFEDCBA987654320Fn + 0x1n) is 0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + 0x1n, >+ 0xFEDCBA9876543210n, >+ 'The result of (0xFEDCBA987654320Fn + 0x1n) is 0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + 0x0n, >+ 0xFEDCBA987654320Fn, >+ 'The result of (0xFEDCBA987654320Fn + 0x0n) is 0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + 0x0n, >+ 0xFEDCBA987654320Fn, >+ 'The result of (0xFEDCBA987654320Fn + 0x0n) is 0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + -0x1n, >+ 0xFEDCBA987654320En, >+ 'The result of (0xFEDCBA987654320Fn + -0x1n) is 0xFEDCBA987654320En' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + -0x1n, >+ 0xFEDCBA987654320En, >+ 'The result of (0xFEDCBA987654320Fn + -0x1n) is 0xFEDCBA987654320En' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + -0x2n, >+ 0xFEDCBA987654320Dn, >+ 'The result of (0xFEDCBA987654320Fn + -0x2n) is 0xFEDCBA987654320Dn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + -0x2n, >+ 0xFEDCBA987654320Dn, >+ 'The result of (0xFEDCBA987654320Fn + -0x2n) is 0xFEDCBA987654320Dn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + -0x3n, >+ 0xFEDCBA987654320Cn, >+ 'The result of (0xFEDCBA987654320Fn + -0x3n) is 0xFEDCBA987654320Cn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + -0x3n, >+ 0xFEDCBA987654320Cn, >+ 'The result of (0xFEDCBA987654320Fn + -0x3n) is 0xFEDCBA987654320Cn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + -0x1234n, >+ 0xFEDCBA9876541FDBn, >+ 'The result of (0xFEDCBA987654320Fn + -0x1234n) is 0xFEDCBA9876541FDBn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + -0x1234n, >+ 0xFEDCBA9876541FDBn, >+ 'The result of (0xFEDCBA987654320Fn + -0x1234n) is 0xFEDCBA9876541FDBn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + -0xFEDCBA97n, >+ 0xFEDCBA9777777778n, >+ 'The result of (0xFEDCBA987654320Fn + -0xFEDCBA97n) is 0xFEDCBA9777777778n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + -0xFEDCBA97n, >+ 0xFEDCBA9777777778n, >+ 'The result of (0xFEDCBA987654320Fn + -0xFEDCBA97n) is 0xFEDCBA9777777778n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + -0xFEDCBA98n, >+ 0xFEDCBA9777777777n, >+ 'The result of (0xFEDCBA987654320Fn + -0xFEDCBA98n) is 0xFEDCBA9777777777n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + -0xFEDCBA98n, >+ 0xFEDCBA9777777777n, >+ 'The result of (0xFEDCBA987654320Fn + -0xFEDCBA98n) is 0xFEDCBA9777777777n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0xFEDCBA987654320Fn + -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0xFEDCBA987654320Fn + -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + -0xFEDCBA9876543210n, >+ -0x1n, >+ 'The result of (0xFEDCBA987654320Fn + -0xFEDCBA9876543210n) is -0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn + -0xFEDCBA9876543210n, >+ -0x1n, >+ 'The result of (0xFEDCBA987654320Fn + -0xFEDCBA9876543210n) is -0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + 0xFEDCBA98n, >+ 0x1FDB97530n, >+ 'The result of (0xFEDCBA98n + 0xFEDCBA98n) is 0x1FDB97530n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + 0xFEDCBA98n, >+ 0x1FDB97530n, >+ 'The result of (0xFEDCBA98n + 0xFEDCBA98n) is 0x1FDB97530n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + 0xFEDCBA97n, >+ 0x1FDB9752Fn, >+ 'The result of (0xFEDCBA98n + 0xFEDCBA97n) is 0x1FDB9752Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + 0xFEDCBA97n, >+ 0x1FDB9752Fn, >+ 'The result of (0xFEDCBA98n + 0xFEDCBA97n) is 0x1FDB9752Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + 0x1234n, >+ 0xFEDCCCCCn, >+ 'The result of (0xFEDCBA98n + 0x1234n) is 0xFEDCCCCCn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + 0x1234n, >+ 0xFEDCCCCCn, >+ 'The result of (0xFEDCBA98n + 0x1234n) is 0xFEDCCCCCn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + 0x3n, >+ 0xFEDCBA9Bn, >+ 'The result of (0xFEDCBA98n + 0x3n) is 0xFEDCBA9Bn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + 0x3n, >+ 0xFEDCBA9Bn, >+ 'The result of (0xFEDCBA98n + 0x3n) is 0xFEDCBA9Bn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + 0x2n, >+ 0xFEDCBA9An, >+ 'The result of (0xFEDCBA98n + 0x2n) is 0xFEDCBA9An' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + 0x2n, >+ 0xFEDCBA9An, >+ 'The result of (0xFEDCBA98n + 0x2n) is 0xFEDCBA9An' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + 0x1n, >+ 0xFEDCBA99n, >+ 'The result of (0xFEDCBA98n + 0x1n) is 0xFEDCBA99n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + 0x1n, >+ 0xFEDCBA99n, >+ 'The result of (0xFEDCBA98n + 0x1n) is 0xFEDCBA99n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + 0x0n, >+ 0xFEDCBA98n, >+ 'The result of (0xFEDCBA98n + 0x0n) is 0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + 0x0n, >+ 0xFEDCBA98n, >+ 'The result of (0xFEDCBA98n + 0x0n) is 0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + -0x1n, >+ 0xFEDCBA97n, >+ 'The result of (0xFEDCBA98n + -0x1n) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + -0x1n, >+ 0xFEDCBA97n, >+ 'The result of (0xFEDCBA98n + -0x1n) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + -0x2n, >+ 0xFEDCBA96n, >+ 'The result of (0xFEDCBA98n + -0x2n) is 0xFEDCBA96n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + -0x2n, >+ 0xFEDCBA96n, >+ 'The result of (0xFEDCBA98n + -0x2n) is 0xFEDCBA96n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + -0x3n, >+ 0xFEDCBA95n, >+ 'The result of (0xFEDCBA98n + -0x3n) is 0xFEDCBA95n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + -0x3n, >+ 0xFEDCBA95n, >+ 'The result of (0xFEDCBA98n + -0x3n) is 0xFEDCBA95n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + -0x1234n, >+ 0xFEDCA864n, >+ 'The result of (0xFEDCBA98n + -0x1234n) is 0xFEDCA864n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + -0x1234n, >+ 0xFEDCA864n, >+ 'The result of (0xFEDCBA98n + -0x1234n) is 0xFEDCA864n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + -0xFEDCBA97n, >+ 0x1n, >+ 'The result of (0xFEDCBA98n + -0xFEDCBA97n) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + -0xFEDCBA97n, >+ 0x1n, >+ 'The result of (0xFEDCBA98n + -0xFEDCBA97n) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + -0xFEDCBA98n, >+ 0x0n, >+ 'The result of (0xFEDCBA98n + -0xFEDCBA98n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + -0xFEDCBA98n, >+ 0x0n, >+ 'The result of (0xFEDCBA98n + -0xFEDCBA98n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA9777777777n, >+ 'The result of (0xFEDCBA98n + -0xFEDCBA987654320Fn) is -0xFEDCBA9777777777n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA9777777777n, >+ 'The result of (0xFEDCBA98n + -0xFEDCBA987654320Fn) is -0xFEDCBA9777777777n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + -0xFEDCBA9876543210n, >+ -0xFEDCBA9777777778n, >+ 'The result of (0xFEDCBA98n + -0xFEDCBA9876543210n) is -0xFEDCBA9777777778n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n + -0xFEDCBA9876543210n, >+ -0xFEDCBA9777777778n, >+ 'The result of (0xFEDCBA98n + -0xFEDCBA9876543210n) is -0xFEDCBA9777777778n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + 0xFEDCBA97n, >+ 0x1FDB9752En, >+ 'The result of (0xFEDCBA97n + 0xFEDCBA97n) is 0x1FDB9752En' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + 0xFEDCBA97n, >+ 0x1FDB9752En, >+ 'The result of (0xFEDCBA97n + 0xFEDCBA97n) is 0x1FDB9752En' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + 0x1234n, >+ 0xFEDCCCCBn, >+ 'The result of (0xFEDCBA97n + 0x1234n) is 0xFEDCCCCBn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + 0x1234n, >+ 0xFEDCCCCBn, >+ 'The result of (0xFEDCBA97n + 0x1234n) is 0xFEDCCCCBn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + 0x3n, >+ 0xFEDCBA9An, >+ 'The result of (0xFEDCBA97n + 0x3n) is 0xFEDCBA9An' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + 0x3n, >+ 0xFEDCBA9An, >+ 'The result of (0xFEDCBA97n + 0x3n) is 0xFEDCBA9An' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + 0x2n, >+ 0xFEDCBA99n, >+ 'The result of (0xFEDCBA97n + 0x2n) is 0xFEDCBA99n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + 0x2n, >+ 0xFEDCBA99n, >+ 'The result of (0xFEDCBA97n + 0x2n) is 0xFEDCBA99n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + 0x1n, >+ 0xFEDCBA98n, >+ 'The result of (0xFEDCBA97n + 0x1n) is 0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + 0x1n, >+ 0xFEDCBA98n, >+ 'The result of (0xFEDCBA97n + 0x1n) is 0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + 0x0n, >+ 0xFEDCBA97n, >+ 'The result of (0xFEDCBA97n + 0x0n) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + 0x0n, >+ 0xFEDCBA97n, >+ 'The result of (0xFEDCBA97n + 0x0n) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + -0x1n, >+ 0xFEDCBA96n, >+ 'The result of (0xFEDCBA97n + -0x1n) is 0xFEDCBA96n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + -0x1n, >+ 0xFEDCBA96n, >+ 'The result of (0xFEDCBA97n + -0x1n) is 0xFEDCBA96n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + -0x2n, >+ 0xFEDCBA95n, >+ 'The result of (0xFEDCBA97n + -0x2n) is 0xFEDCBA95n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + -0x2n, >+ 0xFEDCBA95n, >+ 'The result of (0xFEDCBA97n + -0x2n) is 0xFEDCBA95n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + -0x3n, >+ 0xFEDCBA94n, >+ 'The result of (0xFEDCBA97n + -0x3n) is 0xFEDCBA94n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + -0x3n, >+ 0xFEDCBA94n, >+ 'The result of (0xFEDCBA97n + -0x3n) is 0xFEDCBA94n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + -0x1234n, >+ 0xFEDCA863n, >+ 'The result of (0xFEDCBA97n + -0x1234n) is 0xFEDCA863n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + -0x1234n, >+ 0xFEDCA863n, >+ 'The result of (0xFEDCBA97n + -0x1234n) is 0xFEDCA863n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + -0xFEDCBA97n, >+ 0x0n, >+ 'The result of (0xFEDCBA97n + -0xFEDCBA97n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + -0xFEDCBA97n, >+ 0x0n, >+ 'The result of (0xFEDCBA97n + -0xFEDCBA97n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + -0xFEDCBA98n, >+ -0x1n, >+ 'The result of (0xFEDCBA97n + -0xFEDCBA98n) is -0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + -0xFEDCBA98n, >+ -0x1n, >+ 'The result of (0xFEDCBA97n + -0xFEDCBA98n) is -0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA9777777778n, >+ 'The result of (0xFEDCBA97n + -0xFEDCBA987654320Fn) is -0xFEDCBA9777777778n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA9777777778n, >+ 'The result of (0xFEDCBA97n + -0xFEDCBA987654320Fn) is -0xFEDCBA9777777778n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + -0xFEDCBA9876543210n, >+ -0xFEDCBA9777777779n, >+ 'The result of (0xFEDCBA97n + -0xFEDCBA9876543210n) is -0xFEDCBA9777777779n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n + -0xFEDCBA9876543210n, >+ -0xFEDCBA9777777779n, >+ 'The result of (0xFEDCBA97n + -0xFEDCBA9876543210n) is -0xFEDCBA9777777779n' >+); >+ >+assert.sameValue(0x1234n + 0x1234n, 0x2468n, 'The result of (0x1234n + 0x1234n) is 0x2468n'); >+assert.sameValue(0x1234n + 0x1234n, 0x2468n, 'The result of (0x1234n + 0x1234n) is 0x2468n'); >+assert.sameValue(0x1234n + 0x3n, 0x1237n, 'The result of (0x1234n + 0x3n) is 0x1237n'); >+assert.sameValue(0x1234n + 0x3n, 0x1237n, 'The result of (0x1234n + 0x3n) is 0x1237n'); >+assert.sameValue(0x1234n + 0x2n, 0x1236n, 'The result of (0x1234n + 0x2n) is 0x1236n'); >+assert.sameValue(0x1234n + 0x2n, 0x1236n, 'The result of (0x1234n + 0x2n) is 0x1236n'); >+assert.sameValue(0x1234n + 0x1n, 0x1235n, 'The result of (0x1234n + 0x1n) is 0x1235n'); >+assert.sameValue(0x1234n + 0x1n, 0x1235n, 'The result of (0x1234n + 0x1n) is 0x1235n'); >+assert.sameValue(0x1234n + 0x0n, 0x1234n, 'The result of (0x1234n + 0x0n) is 0x1234n'); >+assert.sameValue(0x1234n + 0x0n, 0x1234n, 'The result of (0x1234n + 0x0n) is 0x1234n'); >+assert.sameValue(0x1234n + -0x1n, 0x1233n, 'The result of (0x1234n + -0x1n) is 0x1233n'); >+assert.sameValue(0x1234n + -0x1n, 0x1233n, 'The result of (0x1234n + -0x1n) is 0x1233n'); >+assert.sameValue(0x1234n + -0x2n, 0x1232n, 'The result of (0x1234n + -0x2n) is 0x1232n'); >+assert.sameValue(0x1234n + -0x2n, 0x1232n, 'The result of (0x1234n + -0x2n) is 0x1232n'); >+assert.sameValue(0x1234n + -0x3n, 0x1231n, 'The result of (0x1234n + -0x3n) is 0x1231n'); >+assert.sameValue(0x1234n + -0x3n, 0x1231n, 'The result of (0x1234n + -0x3n) is 0x1231n'); >+assert.sameValue(0x1234n + -0x1234n, 0x0n, 'The result of (0x1234n + -0x1234n) is 0x0n'); >+assert.sameValue(0x1234n + -0x1234n, 0x0n, 'The result of (0x1234n + -0x1234n) is 0x0n'); >+ >+assert.sameValue( >+ 0x1234n + -0xFEDCBA97n, >+ -0xFEDCA863n, >+ 'The result of (0x1234n + -0xFEDCBA97n) is -0xFEDCA863n' >+); >+ >+assert.sameValue( >+ 0x1234n + -0xFEDCBA97n, >+ -0xFEDCA863n, >+ 'The result of (0x1234n + -0xFEDCBA97n) is -0xFEDCA863n' >+); >+ >+assert.sameValue( >+ 0x1234n + -0xFEDCBA98n, >+ -0xFEDCA864n, >+ 'The result of (0x1234n + -0xFEDCBA98n) is -0xFEDCA864n' >+); >+ >+assert.sameValue( >+ 0x1234n + -0xFEDCBA98n, >+ -0xFEDCA864n, >+ 'The result of (0x1234n + -0xFEDCBA98n) is -0xFEDCA864n' >+); >+ >+assert.sameValue( >+ 0x1234n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA9876541FDBn, >+ 'The result of (0x1234n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876541FDBn' >+); >+ >+assert.sameValue( >+ 0x1234n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA9876541FDBn, >+ 'The result of (0x1234n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876541FDBn' >+); >+ >+assert.sameValue( >+ 0x1234n + -0xFEDCBA9876543210n, >+ -0xFEDCBA9876541FDCn, >+ 'The result of (0x1234n + -0xFEDCBA9876543210n) is -0xFEDCBA9876541FDCn' >+); >+ >+assert.sameValue( >+ 0x1234n + -0xFEDCBA9876543210n, >+ -0xFEDCBA9876541FDCn, >+ 'The result of (0x1234n + -0xFEDCBA9876543210n) is -0xFEDCBA9876541FDCn' >+); >+ >+assert.sameValue(0x3n + 0x3n, 0x6n, 'The result of (0x3n + 0x3n) is 0x6n'); >+assert.sameValue(0x3n + 0x3n, 0x6n, 'The result of (0x3n + 0x3n) is 0x6n'); >+assert.sameValue(0x3n + 0x2n, 0x5n, 'The result of (0x3n + 0x2n) is 0x5n'); >+assert.sameValue(0x3n + 0x2n, 0x5n, 'The result of (0x3n + 0x2n) is 0x5n'); >+assert.sameValue(0x3n + 0x1n, 0x4n, 'The result of (0x3n + 0x1n) is 0x4n'); >+assert.sameValue(0x3n + 0x1n, 0x4n, 'The result of (0x3n + 0x1n) is 0x4n'); >+assert.sameValue(0x3n + 0x0n, 0x3n, 'The result of (0x3n + 0x0n) is 0x3n'); >+assert.sameValue(0x3n + 0x0n, 0x3n, 'The result of (0x3n + 0x0n) is 0x3n'); >+assert.sameValue(0x3n + -0x1n, 0x2n, 'The result of (0x3n + -0x1n) is 0x2n'); >+assert.sameValue(0x3n + -0x1n, 0x2n, 'The result of (0x3n + -0x1n) is 0x2n'); >+assert.sameValue(0x3n + -0x2n, 0x1n, 'The result of (0x3n + -0x2n) is 0x1n'); >+assert.sameValue(0x3n + -0x2n, 0x1n, 'The result of (0x3n + -0x2n) is 0x1n'); >+assert.sameValue(0x3n + -0x3n, 0x0n, 'The result of (0x3n + -0x3n) is 0x0n'); >+assert.sameValue(0x3n + -0x3n, 0x0n, 'The result of (0x3n + -0x3n) is 0x0n'); >+assert.sameValue(0x3n + -0x1234n, -0x1231n, 'The result of (0x3n + -0x1234n) is -0x1231n'); >+assert.sameValue(0x3n + -0x1234n, -0x1231n, 'The result of (0x3n + -0x1234n) is -0x1231n'); >+ >+assert.sameValue( >+ 0x3n + -0xFEDCBA97n, >+ -0xFEDCBA94n, >+ 'The result of (0x3n + -0xFEDCBA97n) is -0xFEDCBA94n' >+); >+ >+assert.sameValue( >+ 0x3n + -0xFEDCBA97n, >+ -0xFEDCBA94n, >+ 'The result of (0x3n + -0xFEDCBA97n) is -0xFEDCBA94n' >+); >+ >+assert.sameValue( >+ 0x3n + -0xFEDCBA98n, >+ -0xFEDCBA95n, >+ 'The result of (0x3n + -0xFEDCBA98n) is -0xFEDCBA95n' >+); >+ >+assert.sameValue( >+ 0x3n + -0xFEDCBA98n, >+ -0xFEDCBA95n, >+ 'The result of (0x3n + -0xFEDCBA98n) is -0xFEDCBA95n' >+); >+ >+assert.sameValue( >+ 0x3n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA987654320Cn, >+ 'The result of (0x3n + -0xFEDCBA987654320Fn) is -0xFEDCBA987654320Cn' >+); >+ >+assert.sameValue( >+ 0x3n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA987654320Cn, >+ 'The result of (0x3n + -0xFEDCBA987654320Fn) is -0xFEDCBA987654320Cn' >+); >+ >+assert.sameValue( >+ 0x3n + -0xFEDCBA9876543210n, >+ -0xFEDCBA987654320Dn, >+ 'The result of (0x3n + -0xFEDCBA9876543210n) is -0xFEDCBA987654320Dn' >+); >+ >+assert.sameValue( >+ 0x3n + -0xFEDCBA9876543210n, >+ -0xFEDCBA987654320Dn, >+ 'The result of (0x3n + -0xFEDCBA9876543210n) is -0xFEDCBA987654320Dn' >+); >+ >+assert.sameValue(0x2n + 0x2n, 0x4n, 'The result of (0x2n + 0x2n) is 0x4n'); >+assert.sameValue(0x2n + 0x2n, 0x4n, 'The result of (0x2n + 0x2n) is 0x4n'); >+assert.sameValue(0x2n + 0x1n, 0x3n, 'The result of (0x2n + 0x1n) is 0x3n'); >+assert.sameValue(0x2n + 0x1n, 0x3n, 'The result of (0x2n + 0x1n) is 0x3n'); >+assert.sameValue(0x2n + 0x0n, 0x2n, 'The result of (0x2n + 0x0n) is 0x2n'); >+assert.sameValue(0x2n + 0x0n, 0x2n, 'The result of (0x2n + 0x0n) is 0x2n'); >+assert.sameValue(0x2n + -0x1n, 0x1n, 'The result of (0x2n + -0x1n) is 0x1n'); >+assert.sameValue(0x2n + -0x1n, 0x1n, 'The result of (0x2n + -0x1n) is 0x1n'); >+assert.sameValue(0x2n + -0x2n, 0x0n, 'The result of (0x2n + -0x2n) is 0x0n'); >+assert.sameValue(0x2n + -0x2n, 0x0n, 'The result of (0x2n + -0x2n) is 0x0n'); >+assert.sameValue(0x2n + -0x3n, -0x1n, 'The result of (0x2n + -0x3n) is -0x1n'); >+assert.sameValue(0x2n + -0x3n, -0x1n, 'The result of (0x2n + -0x3n) is -0x1n'); >+assert.sameValue(0x2n + -0x1234n, -0x1232n, 'The result of (0x2n + -0x1234n) is -0x1232n'); >+assert.sameValue(0x2n + -0x1234n, -0x1232n, 'The result of (0x2n + -0x1234n) is -0x1232n'); >+ >+assert.sameValue( >+ 0x2n + -0xFEDCBA97n, >+ -0xFEDCBA95n, >+ 'The result of (0x2n + -0xFEDCBA97n) is -0xFEDCBA95n' >+); >+ >+assert.sameValue( >+ 0x2n + -0xFEDCBA97n, >+ -0xFEDCBA95n, >+ 'The result of (0x2n + -0xFEDCBA97n) is -0xFEDCBA95n' >+); >+ >+assert.sameValue( >+ 0x2n + -0xFEDCBA98n, >+ -0xFEDCBA96n, >+ 'The result of (0x2n + -0xFEDCBA98n) is -0xFEDCBA96n' >+); >+ >+assert.sameValue( >+ 0x2n + -0xFEDCBA98n, >+ -0xFEDCBA96n, >+ 'The result of (0x2n + -0xFEDCBA98n) is -0xFEDCBA96n' >+); >+ >+assert.sameValue( >+ 0x2n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA987654320Dn, >+ 'The result of (0x2n + -0xFEDCBA987654320Fn) is -0xFEDCBA987654320Dn' >+); >+ >+assert.sameValue( >+ 0x2n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA987654320Dn, >+ 'The result of (0x2n + -0xFEDCBA987654320Fn) is -0xFEDCBA987654320Dn' >+); >+ >+assert.sameValue( >+ 0x2n + -0xFEDCBA9876543210n, >+ -0xFEDCBA987654320En, >+ 'The result of (0x2n + -0xFEDCBA9876543210n) is -0xFEDCBA987654320En' >+); >+ >+assert.sameValue( >+ 0x2n + -0xFEDCBA9876543210n, >+ -0xFEDCBA987654320En, >+ 'The result of (0x2n + -0xFEDCBA9876543210n) is -0xFEDCBA987654320En' >+); >+ >+assert.sameValue(0x1n + 0x1n, 0x2n, 'The result of (0x1n + 0x1n) is 0x2n'); >+assert.sameValue(0x1n + 0x1n, 0x2n, 'The result of (0x1n + 0x1n) is 0x2n'); >+assert.sameValue(0x1n + 0x0n, 0x1n, 'The result of (0x1n + 0x0n) is 0x1n'); >+assert.sameValue(0x1n + 0x0n, 0x1n, 'The result of (0x1n + 0x0n) is 0x1n'); >+assert.sameValue(0x1n + -0x1n, 0x0n, 'The result of (0x1n + -0x1n) is 0x0n'); >+assert.sameValue(0x1n + -0x1n, 0x0n, 'The result of (0x1n + -0x1n) is 0x0n'); >+assert.sameValue(0x1n + -0x2n, -0x1n, 'The result of (0x1n + -0x2n) is -0x1n'); >+assert.sameValue(0x1n + -0x2n, -0x1n, 'The result of (0x1n + -0x2n) is -0x1n'); >+assert.sameValue(0x1n + -0x3n, -0x2n, 'The result of (0x1n + -0x3n) is -0x2n'); >+assert.sameValue(0x1n + -0x3n, -0x2n, 'The result of (0x1n + -0x3n) is -0x2n'); >+assert.sameValue(0x1n + -0x1234n, -0x1233n, 'The result of (0x1n + -0x1234n) is -0x1233n'); >+assert.sameValue(0x1n + -0x1234n, -0x1233n, 'The result of (0x1n + -0x1234n) is -0x1233n'); >+ >+assert.sameValue( >+ 0x1n + -0xFEDCBA97n, >+ -0xFEDCBA96n, >+ 'The result of (0x1n + -0xFEDCBA97n) is -0xFEDCBA96n' >+); >+ >+assert.sameValue( >+ 0x1n + -0xFEDCBA97n, >+ -0xFEDCBA96n, >+ 'The result of (0x1n + -0xFEDCBA97n) is -0xFEDCBA96n' >+); >+ >+assert.sameValue( >+ 0x1n + -0xFEDCBA98n, >+ -0xFEDCBA97n, >+ 'The result of (0x1n + -0xFEDCBA98n) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0x1n + -0xFEDCBA98n, >+ -0xFEDCBA97n, >+ 'The result of (0x1n + -0xFEDCBA98n) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0x1n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA987654320En, >+ 'The result of (0x1n + -0xFEDCBA987654320Fn) is -0xFEDCBA987654320En' >+); >+ >+assert.sameValue( >+ 0x1n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA987654320En, >+ 'The result of (0x1n + -0xFEDCBA987654320Fn) is -0xFEDCBA987654320En' >+); >+ >+assert.sameValue( >+ 0x1n + -0xFEDCBA9876543210n, >+ -0xFEDCBA987654320Fn, >+ 'The result of (0x1n + -0xFEDCBA9876543210n) is -0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0x1n + -0xFEDCBA9876543210n, >+ -0xFEDCBA987654320Fn, >+ 'The result of (0x1n + -0xFEDCBA9876543210n) is -0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue(0x0n + 0x0n, 0x0n, 'The result of (0x0n + 0x0n) is 0x0n'); >+assert.sameValue(0x0n + 0x0n, 0x0n, 'The result of (0x0n + 0x0n) is 0x0n'); >+assert.sameValue(0x0n + -0x1n, -0x1n, 'The result of (0x0n + -0x1n) is -0x1n'); >+assert.sameValue(0x0n + -0x1n, -0x1n, 'The result of (0x0n + -0x1n) is -0x1n'); >+assert.sameValue(0x0n + -0x2n, -0x2n, 'The result of (0x0n + -0x2n) is -0x2n'); >+assert.sameValue(0x0n + -0x2n, -0x2n, 'The result of (0x0n + -0x2n) is -0x2n'); >+assert.sameValue(0x0n + -0x3n, -0x3n, 'The result of (0x0n + -0x3n) is -0x3n'); >+assert.sameValue(0x0n + -0x3n, -0x3n, 'The result of (0x0n + -0x3n) is -0x3n'); >+assert.sameValue(0x0n + -0x1234n, -0x1234n, 'The result of (0x0n + -0x1234n) is -0x1234n'); >+assert.sameValue(0x0n + -0x1234n, -0x1234n, 'The result of (0x0n + -0x1234n) is -0x1234n'); >+ >+assert.sameValue( >+ 0x0n + -0xFEDCBA97n, >+ -0xFEDCBA97n, >+ 'The result of (0x0n + -0xFEDCBA97n) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0x0n + -0xFEDCBA97n, >+ -0xFEDCBA97n, >+ 'The result of (0x0n + -0xFEDCBA97n) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0x0n + -0xFEDCBA98n, >+ -0xFEDCBA98n, >+ 'The result of (0x0n + -0xFEDCBA98n) is -0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0x0n + -0xFEDCBA98n, >+ -0xFEDCBA98n, >+ 'The result of (0x0n + -0xFEDCBA98n) is -0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0x0n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA987654320Fn, >+ 'The result of (0x0n + -0xFEDCBA987654320Fn) is -0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0x0n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA987654320Fn, >+ 'The result of (0x0n + -0xFEDCBA987654320Fn) is -0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0x0n + -0xFEDCBA9876543210n, >+ -0xFEDCBA9876543210n, >+ 'The result of (0x0n + -0xFEDCBA9876543210n) is -0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ 0x0n + -0xFEDCBA9876543210n, >+ -0xFEDCBA9876543210n, >+ 'The result of (0x0n + -0xFEDCBA9876543210n) is -0xFEDCBA9876543210n' >+); >+ >+assert.sameValue(-0x1n + -0x1n, -0x2n, 'The result of (-0x1n + -0x1n) is -0x2n'); >+assert.sameValue(-0x1n + -0x1n, -0x2n, 'The result of (-0x1n + -0x1n) is -0x2n'); >+assert.sameValue(-0x1n + -0x2n, -0x3n, 'The result of (-0x1n + -0x2n) is -0x3n'); >+assert.sameValue(-0x1n + -0x2n, -0x3n, 'The result of (-0x1n + -0x2n) is -0x3n'); >+assert.sameValue(-0x1n + -0x3n, -0x4n, 'The result of (-0x1n + -0x3n) is -0x4n'); >+assert.sameValue(-0x1n + -0x3n, -0x4n, 'The result of (-0x1n + -0x3n) is -0x4n'); >+assert.sameValue(-0x1n + -0x1234n, -0x1235n, 'The result of (-0x1n + -0x1234n) is -0x1235n'); >+assert.sameValue(-0x1n + -0x1234n, -0x1235n, 'The result of (-0x1n + -0x1234n) is -0x1235n'); >+ >+assert.sameValue( >+ -0x1n + -0xFEDCBA97n, >+ -0xFEDCBA98n, >+ 'The result of (-0x1n + -0xFEDCBA97n) is -0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ -0x1n + -0xFEDCBA97n, >+ -0xFEDCBA98n, >+ 'The result of (-0x1n + -0xFEDCBA97n) is -0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ -0x1n + -0xFEDCBA98n, >+ -0xFEDCBA99n, >+ 'The result of (-0x1n + -0xFEDCBA98n) is -0xFEDCBA99n' >+); >+ >+assert.sameValue( >+ -0x1n + -0xFEDCBA98n, >+ -0xFEDCBA99n, >+ 'The result of (-0x1n + -0xFEDCBA98n) is -0xFEDCBA99n' >+); >+ >+assert.sameValue( >+ -0x1n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA9876543210n, >+ 'The result of (-0x1n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ -0x1n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA9876543210n, >+ 'The result of (-0x1n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ -0x1n + -0xFEDCBA9876543210n, >+ -0xFEDCBA9876543211n, >+ 'The result of (-0x1n + -0xFEDCBA9876543210n) is -0xFEDCBA9876543211n' >+); >+ >+assert.sameValue( >+ -0x1n + -0xFEDCBA9876543210n, >+ -0xFEDCBA9876543211n, >+ 'The result of (-0x1n + -0xFEDCBA9876543210n) is -0xFEDCBA9876543211n' >+); >+ >+assert.sameValue(-0x2n + -0x2n, -0x4n, 'The result of (-0x2n + -0x2n) is -0x4n'); >+assert.sameValue(-0x2n + -0x2n, -0x4n, 'The result of (-0x2n + -0x2n) is -0x4n'); >+assert.sameValue(-0x2n + -0x3n, -0x5n, 'The result of (-0x2n + -0x3n) is -0x5n'); >+assert.sameValue(-0x2n + -0x3n, -0x5n, 'The result of (-0x2n + -0x3n) is -0x5n'); >+assert.sameValue(-0x2n + -0x1234n, -0x1236n, 'The result of (-0x2n + -0x1234n) is -0x1236n'); >+assert.sameValue(-0x2n + -0x1234n, -0x1236n, 'The result of (-0x2n + -0x1234n) is -0x1236n'); >+ >+assert.sameValue( >+ -0x2n + -0xFEDCBA97n, >+ -0xFEDCBA99n, >+ 'The result of (-0x2n + -0xFEDCBA97n) is -0xFEDCBA99n' >+); >+ >+assert.sameValue( >+ -0x2n + -0xFEDCBA97n, >+ -0xFEDCBA99n, >+ 'The result of (-0x2n + -0xFEDCBA97n) is -0xFEDCBA99n' >+); >+ >+assert.sameValue( >+ -0x2n + -0xFEDCBA98n, >+ -0xFEDCBA9An, >+ 'The result of (-0x2n + -0xFEDCBA98n) is -0xFEDCBA9An' >+); >+ >+assert.sameValue( >+ -0x2n + -0xFEDCBA98n, >+ -0xFEDCBA9An, >+ 'The result of (-0x2n + -0xFEDCBA98n) is -0xFEDCBA9An' >+); >+ >+assert.sameValue( >+ -0x2n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA9876543211n, >+ 'The result of (-0x2n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876543211n' >+); >+ >+assert.sameValue( >+ -0x2n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA9876543211n, >+ 'The result of (-0x2n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876543211n' >+); >+ >+assert.sameValue( >+ -0x2n + -0xFEDCBA9876543210n, >+ -0xFEDCBA9876543212n, >+ 'The result of (-0x2n + -0xFEDCBA9876543210n) is -0xFEDCBA9876543212n' >+); >+ >+assert.sameValue( >+ -0x2n + -0xFEDCBA9876543210n, >+ -0xFEDCBA9876543212n, >+ 'The result of (-0x2n + -0xFEDCBA9876543210n) is -0xFEDCBA9876543212n' >+); >+ >+assert.sameValue(-0x3n + -0x3n, -0x6n, 'The result of (-0x3n + -0x3n) is -0x6n'); >+assert.sameValue(-0x3n + -0x3n, -0x6n, 'The result of (-0x3n + -0x3n) is -0x6n'); >+assert.sameValue(-0x3n + -0x1234n, -0x1237n, 'The result of (-0x3n + -0x1234n) is -0x1237n'); >+assert.sameValue(-0x3n + -0x1234n, -0x1237n, 'The result of (-0x3n + -0x1234n) is -0x1237n'); >+ >+assert.sameValue( >+ -0x3n + -0xFEDCBA97n, >+ -0xFEDCBA9An, >+ 'The result of (-0x3n + -0xFEDCBA97n) is -0xFEDCBA9An' >+); >+ >+assert.sameValue( >+ -0x3n + -0xFEDCBA97n, >+ -0xFEDCBA9An, >+ 'The result of (-0x3n + -0xFEDCBA97n) is -0xFEDCBA9An' >+); >+ >+assert.sameValue( >+ -0x3n + -0xFEDCBA98n, >+ -0xFEDCBA9Bn, >+ 'The result of (-0x3n + -0xFEDCBA98n) is -0xFEDCBA9Bn' >+); >+ >+assert.sameValue( >+ -0x3n + -0xFEDCBA98n, >+ -0xFEDCBA9Bn, >+ 'The result of (-0x3n + -0xFEDCBA98n) is -0xFEDCBA9Bn' >+); >+ >+assert.sameValue( >+ -0x3n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA9876543212n, >+ 'The result of (-0x3n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876543212n' >+); >+ >+assert.sameValue( >+ -0x3n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA9876543212n, >+ 'The result of (-0x3n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876543212n' >+); >+ >+assert.sameValue( >+ -0x3n + -0xFEDCBA9876543210n, >+ -0xFEDCBA9876543213n, >+ 'The result of (-0x3n + -0xFEDCBA9876543210n) is -0xFEDCBA9876543213n' >+); >+ >+assert.sameValue( >+ -0x3n + -0xFEDCBA9876543210n, >+ -0xFEDCBA9876543213n, >+ 'The result of (-0x3n + -0xFEDCBA9876543210n) is -0xFEDCBA9876543213n' >+); >+ >+assert.sameValue(-0x1234n + -0x1234n, -0x2468n, 'The result of (-0x1234n + -0x1234n) is -0x2468n'); >+assert.sameValue(-0x1234n + -0x1234n, -0x2468n, 'The result of (-0x1234n + -0x1234n) is -0x2468n'); >+ >+assert.sameValue( >+ -0x1234n + -0xFEDCBA97n, >+ -0xFEDCCCCBn, >+ 'The result of (-0x1234n + -0xFEDCBA97n) is -0xFEDCCCCBn' >+); >+ >+assert.sameValue( >+ -0x1234n + -0xFEDCBA97n, >+ -0xFEDCCCCBn, >+ 'The result of (-0x1234n + -0xFEDCBA97n) is -0xFEDCCCCBn' >+); >+ >+assert.sameValue( >+ -0x1234n + -0xFEDCBA98n, >+ -0xFEDCCCCCn, >+ 'The result of (-0x1234n + -0xFEDCBA98n) is -0xFEDCCCCCn' >+); >+ >+assert.sameValue( >+ -0x1234n + -0xFEDCBA98n, >+ -0xFEDCCCCCn, >+ 'The result of (-0x1234n + -0xFEDCBA98n) is -0xFEDCCCCCn' >+); >+ >+assert.sameValue( >+ -0x1234n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA9876544443n, >+ 'The result of (-0x1234n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876544443n' >+); >+ >+assert.sameValue( >+ -0x1234n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA9876544443n, >+ 'The result of (-0x1234n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876544443n' >+); >+ >+assert.sameValue( >+ -0x1234n + -0xFEDCBA9876543210n, >+ -0xFEDCBA9876544444n, >+ 'The result of (-0x1234n + -0xFEDCBA9876543210n) is -0xFEDCBA9876544444n' >+); >+ >+assert.sameValue( >+ -0x1234n + -0xFEDCBA9876543210n, >+ -0xFEDCBA9876544444n, >+ 'The result of (-0x1234n + -0xFEDCBA9876543210n) is -0xFEDCBA9876544444n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n + -0xFEDCBA97n, >+ -0x1FDB9752En, >+ 'The result of (-0xFEDCBA97n + -0xFEDCBA97n) is -0x1FDB9752En' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n + -0xFEDCBA97n, >+ -0x1FDB9752En, >+ 'The result of (-0xFEDCBA97n + -0xFEDCBA97n) is -0x1FDB9752En' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n + -0xFEDCBA98n, >+ -0x1FDB9752Fn, >+ 'The result of (-0xFEDCBA97n + -0xFEDCBA98n) is -0x1FDB9752Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n + -0xFEDCBA98n, >+ -0x1FDB9752Fn, >+ 'The result of (-0xFEDCBA97n + -0xFEDCBA98n) is -0x1FDB9752Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA997530ECA6n, >+ 'The result of (-0xFEDCBA97n + -0xFEDCBA987654320Fn) is -0xFEDCBA997530ECA6n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA997530ECA6n, >+ 'The result of (-0xFEDCBA97n + -0xFEDCBA987654320Fn) is -0xFEDCBA997530ECA6n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n + -0xFEDCBA9876543210n, >+ -0xFEDCBA997530ECA7n, >+ 'The result of (-0xFEDCBA97n + -0xFEDCBA9876543210n) is -0xFEDCBA997530ECA7n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n + -0xFEDCBA9876543210n, >+ -0xFEDCBA997530ECA7n, >+ 'The result of (-0xFEDCBA97n + -0xFEDCBA9876543210n) is -0xFEDCBA997530ECA7n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n + -0xFEDCBA98n, >+ -0x1FDB97530n, >+ 'The result of (-0xFEDCBA98n + -0xFEDCBA98n) is -0x1FDB97530n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n + -0xFEDCBA98n, >+ -0x1FDB97530n, >+ 'The result of (-0xFEDCBA98n + -0xFEDCBA98n) is -0x1FDB97530n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA997530ECA7n, >+ 'The result of (-0xFEDCBA98n + -0xFEDCBA987654320Fn) is -0xFEDCBA997530ECA7n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n + -0xFEDCBA987654320Fn, >+ -0xFEDCBA997530ECA7n, >+ 'The result of (-0xFEDCBA98n + -0xFEDCBA987654320Fn) is -0xFEDCBA997530ECA7n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n + -0xFEDCBA9876543210n, >+ -0xFEDCBA997530ECA8n, >+ 'The result of (-0xFEDCBA98n + -0xFEDCBA9876543210n) is -0xFEDCBA997530ECA8n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n + -0xFEDCBA9876543210n, >+ -0xFEDCBA997530ECA8n, >+ 'The result of (-0xFEDCBA98n + -0xFEDCBA9876543210n) is -0xFEDCBA997530ECA8n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn + -0xFEDCBA987654320Fn, >+ -0x1FDB97530ECA8641En, >+ 'The result of (-0xFEDCBA987654320Fn + -0xFEDCBA987654320Fn) is -0x1FDB97530ECA8641En' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn + -0xFEDCBA987654320Fn, >+ -0x1FDB97530ECA8641En, >+ 'The result of (-0xFEDCBA987654320Fn + -0xFEDCBA987654320Fn) is -0x1FDB97530ECA8641En' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn + -0xFEDCBA9876543210n, >+ -0x1FDB97530ECA8641Fn, >+ 'The result of (-0xFEDCBA987654320Fn + -0xFEDCBA9876543210n) is -0x1FDB97530ECA8641Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn + -0xFEDCBA9876543210n, >+ -0x1FDB97530ECA8641Fn, >+ 'The result of (-0xFEDCBA987654320Fn + -0xFEDCBA9876543210n) is -0x1FDB97530ECA8641Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n + -0xFEDCBA9876543210n, >+ -0x1FDB97530ECA86420n, >+ 'The result of (-0xFEDCBA9876543210n + -0xFEDCBA9876543210n) is -0x1FDB97530ECA86420n' >+); > >-function testAdd(x, y, z) { >- assert.sameValue(x + y, z, x + " + " + y + " = " + z); >- assert.sameValue(y + x, z, y + " + " + x + " = " + z); >-} >- >-testAdd(0xFEDCBA9876543210n, 0xFEDCBA9876543210n, 0x1FDB97530ECA86420n); >-testAdd(0xFEDCBA9876543210n, 0xFEDCBA987654320Fn, 0x1FDB97530ECA8641Fn); >-testAdd(0xFEDCBA9876543210n, 0xFEDCBA98n, 0xFEDCBA997530ECA8n); >-testAdd(0xFEDCBA9876543210n, 0xFEDCBA97n, 0xFEDCBA997530ECA7n); >-testAdd(0xFEDCBA9876543210n, 0x1234n, 0xFEDCBA9876544444n); >-testAdd(0xFEDCBA9876543210n, 0x3n, 0xFEDCBA9876543213n); >-testAdd(0xFEDCBA9876543210n, 0x2n, 0xFEDCBA9876543212n); >-testAdd(0xFEDCBA9876543210n, 0x1n, 0xFEDCBA9876543211n); >-testAdd(0xFEDCBA9876543210n, 0x0n, 0xFEDCBA9876543210n); >-testAdd(0xFEDCBA9876543210n, -0x1n, 0xFEDCBA987654320Fn); >-testAdd(0xFEDCBA9876543210n, -0x2n, 0xFEDCBA987654320En); >-testAdd(0xFEDCBA9876543210n, -0x3n, 0xFEDCBA987654320Dn); >-testAdd(0xFEDCBA9876543210n, -0x1234n, 0xFEDCBA9876541FDCn); >-testAdd(0xFEDCBA9876543210n, -0xFEDCBA97n, 0xFEDCBA9777777779n); >-testAdd(0xFEDCBA9876543210n, -0xFEDCBA98n, 0xFEDCBA9777777778n); >-testAdd(0xFEDCBA9876543210n, -0xFEDCBA987654320Fn, 0x1n); >-testAdd(0xFEDCBA9876543210n, -0xFEDCBA9876543210n, 0x0n); >-testAdd(0xFEDCBA987654320Fn, 0xFEDCBA987654320Fn, 0x1FDB97530ECA8641En); >-testAdd(0xFEDCBA987654320Fn, 0xFEDCBA98n, 0xFEDCBA997530ECA7n); >-testAdd(0xFEDCBA987654320Fn, 0xFEDCBA97n, 0xFEDCBA997530ECA6n); >-testAdd(0xFEDCBA987654320Fn, 0x1234n, 0xFEDCBA9876544443n); >-testAdd(0xFEDCBA987654320Fn, 0x3n, 0xFEDCBA9876543212n); >-testAdd(0xFEDCBA987654320Fn, 0x2n, 0xFEDCBA9876543211n); >-testAdd(0xFEDCBA987654320Fn, 0x1n, 0xFEDCBA9876543210n); >-testAdd(0xFEDCBA987654320Fn, 0x0n, 0xFEDCBA987654320Fn); >-testAdd(0xFEDCBA987654320Fn, -0x1n, 0xFEDCBA987654320En); >-testAdd(0xFEDCBA987654320Fn, -0x2n, 0xFEDCBA987654320Dn); >-testAdd(0xFEDCBA987654320Fn, -0x3n, 0xFEDCBA987654320Cn); >-testAdd(0xFEDCBA987654320Fn, -0x1234n, 0xFEDCBA9876541FDBn); >-testAdd(0xFEDCBA987654320Fn, -0xFEDCBA97n, 0xFEDCBA9777777778n); >-testAdd(0xFEDCBA987654320Fn, -0xFEDCBA98n, 0xFEDCBA9777777777n); >-testAdd(0xFEDCBA987654320Fn, -0xFEDCBA987654320Fn, 0x0n); >-testAdd(0xFEDCBA987654320Fn, -0xFEDCBA9876543210n, -0x1n); >-testAdd(0xFEDCBA98n, 0xFEDCBA98n, 0x1FDB97530n); >-testAdd(0xFEDCBA98n, 0xFEDCBA97n, 0x1FDB9752Fn); >-testAdd(0xFEDCBA98n, 0x1234n, 0xFEDCCCCCn); >-testAdd(0xFEDCBA98n, 0x3n, 0xFEDCBA9Bn); >-testAdd(0xFEDCBA98n, 0x2n, 0xFEDCBA9An); >-testAdd(0xFEDCBA98n, 0x1n, 0xFEDCBA99n); >-testAdd(0xFEDCBA98n, 0x0n, 0xFEDCBA98n); >-testAdd(0xFEDCBA98n, -0x1n, 0xFEDCBA97n); >-testAdd(0xFEDCBA98n, -0x2n, 0xFEDCBA96n); >-testAdd(0xFEDCBA98n, -0x3n, 0xFEDCBA95n); >-testAdd(0xFEDCBA98n, -0x1234n, 0xFEDCA864n); >-testAdd(0xFEDCBA98n, -0xFEDCBA97n, 0x1n); >-testAdd(0xFEDCBA98n, -0xFEDCBA98n, 0x0n); >-testAdd(0xFEDCBA98n, -0xFEDCBA987654320Fn, -0xFEDCBA9777777777n); >-testAdd(0xFEDCBA98n, -0xFEDCBA9876543210n, -0xFEDCBA9777777778n); >-testAdd(0xFEDCBA97n, 0xFEDCBA97n, 0x1FDB9752En); >-testAdd(0xFEDCBA97n, 0x1234n, 0xFEDCCCCBn); >-testAdd(0xFEDCBA97n, 0x3n, 0xFEDCBA9An); >-testAdd(0xFEDCBA97n, 0x2n, 0xFEDCBA99n); >-testAdd(0xFEDCBA97n, 0x1n, 0xFEDCBA98n); >-testAdd(0xFEDCBA97n, 0x0n, 0xFEDCBA97n); >-testAdd(0xFEDCBA97n, -0x1n, 0xFEDCBA96n); >-testAdd(0xFEDCBA97n, -0x2n, 0xFEDCBA95n); >-testAdd(0xFEDCBA97n, -0x3n, 0xFEDCBA94n); >-testAdd(0xFEDCBA97n, -0x1234n, 0xFEDCA863n); >-testAdd(0xFEDCBA97n, -0xFEDCBA97n, 0x0n); >-testAdd(0xFEDCBA97n, -0xFEDCBA98n, -0x1n); >-testAdd(0xFEDCBA97n, -0xFEDCBA987654320Fn, -0xFEDCBA9777777778n); >-testAdd(0xFEDCBA97n, -0xFEDCBA9876543210n, -0xFEDCBA9777777779n); >-testAdd(0x1234n, 0x1234n, 0x2468n); >-testAdd(0x1234n, 0x3n, 0x1237n); >-testAdd(0x1234n, 0x2n, 0x1236n); >-testAdd(0x1234n, 0x1n, 0x1235n); >-testAdd(0x1234n, 0x0n, 0x1234n); >-testAdd(0x1234n, -0x1n, 0x1233n); >-testAdd(0x1234n, -0x2n, 0x1232n); >-testAdd(0x1234n, -0x3n, 0x1231n); >-testAdd(0x1234n, -0x1234n, 0x0n); >-testAdd(0x1234n, -0xFEDCBA97n, -0xFEDCA863n); >-testAdd(0x1234n, -0xFEDCBA98n, -0xFEDCA864n); >-testAdd(0x1234n, -0xFEDCBA987654320Fn, -0xFEDCBA9876541FDBn); >-testAdd(0x1234n, -0xFEDCBA9876543210n, -0xFEDCBA9876541FDCn); >-testAdd(0x3n, 0x3n, 0x6n); >-testAdd(0x3n, 0x2n, 0x5n); >-testAdd(0x3n, 0x1n, 0x4n); >-testAdd(0x3n, 0x0n, 0x3n); >-testAdd(0x3n, -0x1n, 0x2n); >-testAdd(0x3n, -0x2n, 0x1n); >-testAdd(0x3n, -0x3n, 0x0n); >-testAdd(0x3n, -0x1234n, -0x1231n); >-testAdd(0x3n, -0xFEDCBA97n, -0xFEDCBA94n); >-testAdd(0x3n, -0xFEDCBA98n, -0xFEDCBA95n); >-testAdd(0x3n, -0xFEDCBA987654320Fn, -0xFEDCBA987654320Cn); >-testAdd(0x3n, -0xFEDCBA9876543210n, -0xFEDCBA987654320Dn); >-testAdd(0x2n, 0x2n, 0x4n); >-testAdd(0x2n, 0x1n, 0x3n); >-testAdd(0x2n, 0x0n, 0x2n); >-testAdd(0x2n, -0x1n, 0x1n); >-testAdd(0x2n, -0x2n, 0x0n); >-testAdd(0x2n, -0x3n, -0x1n); >-testAdd(0x2n, -0x1234n, -0x1232n); >-testAdd(0x2n, -0xFEDCBA97n, -0xFEDCBA95n); >-testAdd(0x2n, -0xFEDCBA98n, -0xFEDCBA96n); >-testAdd(0x2n, -0xFEDCBA987654320Fn, -0xFEDCBA987654320Dn); >-testAdd(0x2n, -0xFEDCBA9876543210n, -0xFEDCBA987654320En); >-testAdd(0x1n, 0x1n, 0x2n); >-testAdd(0x1n, 0x0n, 0x1n); >-testAdd(0x1n, -0x1n, 0x0n); >-testAdd(0x1n, -0x2n, -0x1n); >-testAdd(0x1n, -0x3n, -0x2n); >-testAdd(0x1n, -0x1234n, -0x1233n); >-testAdd(0x1n, -0xFEDCBA97n, -0xFEDCBA96n); >-testAdd(0x1n, -0xFEDCBA98n, -0xFEDCBA97n); >-testAdd(0x1n, -0xFEDCBA987654320Fn, -0xFEDCBA987654320En); >-testAdd(0x1n, -0xFEDCBA9876543210n, -0xFEDCBA987654320Fn); >-testAdd(0x0n, 0x0n, 0x0n); >-testAdd(0x0n, -0x1n, -0x1n); >-testAdd(0x0n, -0x2n, -0x2n); >-testAdd(0x0n, -0x3n, -0x3n); >-testAdd(0x0n, -0x1234n, -0x1234n); >-testAdd(0x0n, -0xFEDCBA97n, -0xFEDCBA97n); >-testAdd(0x0n, -0xFEDCBA98n, -0xFEDCBA98n); >-testAdd(0x0n, -0xFEDCBA987654320Fn, -0xFEDCBA987654320Fn); >-testAdd(0x0n, -0xFEDCBA9876543210n, -0xFEDCBA9876543210n); >-testAdd(-0x1n, -0x1n, -0x2n); >-testAdd(-0x1n, -0x2n, -0x3n); >-testAdd(-0x1n, -0x3n, -0x4n); >-testAdd(-0x1n, -0x1234n, -0x1235n); >-testAdd(-0x1n, -0xFEDCBA97n, -0xFEDCBA98n); >-testAdd(-0x1n, -0xFEDCBA98n, -0xFEDCBA99n); >-testAdd(-0x1n, -0xFEDCBA987654320Fn, -0xFEDCBA9876543210n); >-testAdd(-0x1n, -0xFEDCBA9876543210n, -0xFEDCBA9876543211n); >-testAdd(-0x2n, -0x2n, -0x4n); >-testAdd(-0x2n, -0x3n, -0x5n); >-testAdd(-0x2n, -0x1234n, -0x1236n); >-testAdd(-0x2n, -0xFEDCBA97n, -0xFEDCBA99n); >-testAdd(-0x2n, -0xFEDCBA98n, -0xFEDCBA9An); >-testAdd(-0x2n, -0xFEDCBA987654320Fn, -0xFEDCBA9876543211n); >-testAdd(-0x2n, -0xFEDCBA9876543210n, -0xFEDCBA9876543212n); >-testAdd(-0x3n, -0x3n, -0x6n); >-testAdd(-0x3n, -0x1234n, -0x1237n); >-testAdd(-0x3n, -0xFEDCBA97n, -0xFEDCBA9An); >-testAdd(-0x3n, -0xFEDCBA98n, -0xFEDCBA9Bn); >-testAdd(-0x3n, -0xFEDCBA987654320Fn, -0xFEDCBA9876543212n); >-testAdd(-0x3n, -0xFEDCBA9876543210n, -0xFEDCBA9876543213n); >-testAdd(-0x1234n, -0x1234n, -0x2468n); >-testAdd(-0x1234n, -0xFEDCBA97n, -0xFEDCCCCBn); >-testAdd(-0x1234n, -0xFEDCBA98n, -0xFEDCCCCCn); >-testAdd(-0x1234n, -0xFEDCBA987654320Fn, -0xFEDCBA9876544443n); >-testAdd(-0x1234n, -0xFEDCBA9876543210n, -0xFEDCBA9876544444n); >-testAdd(-0xFEDCBA97n, -0xFEDCBA97n, -0x1FDB9752En); >-testAdd(-0xFEDCBA97n, -0xFEDCBA98n, -0x1FDB9752Fn); >-testAdd(-0xFEDCBA97n, -0xFEDCBA987654320Fn, -0xFEDCBA997530ECA6n); >-testAdd(-0xFEDCBA97n, -0xFEDCBA9876543210n, -0xFEDCBA997530ECA7n); >-testAdd(-0xFEDCBA98n, -0xFEDCBA98n, -0x1FDB97530n); >-testAdd(-0xFEDCBA98n, -0xFEDCBA987654320Fn, -0xFEDCBA997530ECA7n); >-testAdd(-0xFEDCBA98n, -0xFEDCBA9876543210n, -0xFEDCBA997530ECA8n); >-testAdd(-0xFEDCBA987654320Fn, -0xFEDCBA987654320Fn, -0x1FDB97530ECA8641En); >-testAdd(-0xFEDCBA987654320Fn, -0xFEDCBA9876543210n, -0x1FDB97530ECA8641Fn); >-testAdd(-0xFEDCBA9876543210n, -0xFEDCBA9876543210n, -0x1FDB97530ECA86420n); >+assert.sameValue( >+ -0xFEDCBA9876543210n + -0xFEDCBA9876543210n, >+ -0x1FDB97530ECA86420n, >+ 'The result of (-0xFEDCBA9876543210n + -0xFEDCBA9876543210n) is -0x1FDB97530ECA86420n' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/addition/bigint-errors.js b/JSTests/test262/test/language/expressions/addition/bigint-errors.js >index 7edc78a7bbba27de92664f86fabdef4910dbad7e..43a4edaa47dc8d5c8fcd9105a74c8c33ee854bfa 100644 >--- a/JSTests/test262/test/language/expressions/addition/bigint-errors.js >+++ b/JSTests/test262/test/language/expressions/addition/bigint-errors.js >@@ -5,58 +5,66 @@ > esid: sec-addition-operator-plus-runtime-semantics-evaluation > features: [BigInt, Symbol, Symbol.toPrimitive, computed-property-names] > ---*/ >- > assert.throws(TypeError, function() { >- Symbol("1") + 0n; >-}, "ToBigInt: Symbol => TypeError"); >+ Symbol('1') + 0n; >+}, 'Symbol("1") + 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n + Symbol("1"); >-}, "ToBigInt: Symbol => TypeError"); >+ 0n + Symbol('1'); >+}, '0n + Symbol("1") throws TypeError'); >+ > assert.throws(TypeError, function() { >- Object(Symbol("1")) + 0n; >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ Object(Symbol('1')) + 0n; >+}, 'Object(Symbol("1")) + 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n + Object(Symbol("1")); >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ 0n + Object(Symbol('1')); >+}, '0n + Object(Symbol("1")) throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) + 0n; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '({[Symbol.toPrimitive]: function() {return Symbol("1");}}) + 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n + { > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '0n + {[Symbol.toPrimitive]: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) + 0n; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '({valueOf: function() {return Symbol("1");}}) + 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n + { > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '0n + {valueOf: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) + 0n; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '({toString: function() {return Symbol("1");}}) + 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n + { > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '0n + {toString: function() {return Symbol("1");}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/addition/bigint-toprimitive.js b/JSTests/test262/test/language/expressions/addition/bigint-toprimitive.js >index 771b50843bab2f8df4acfef7386026f160ab28dc..0162cf422b4f173c60b47765893a90694114665a 100644 >--- a/JSTests/test262/test/language/expressions/addition/bigint-toprimitive.js >+++ b/JSTests/test262/test/language/expressions/addition/bigint-toprimitive.js >@@ -5,304 +5,368 @@ > esid: sec-addition-operator-plus-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >- > function err() { > throw new Test262Error(); > } > > function MyError() {} > >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}) + 1n, 3n, "ToPrimitive: @@toPrimitive takes precedence"); >+} + 1n, 3n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) + 1n) is 3n'); >+ > assert.sameValue(1n + { > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}, 3n, "ToPrimitive: @@toPrimitive takes precedence"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n + {[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) is 3n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > }, >+ > toString: err >-}) + 1n, 3n, "ToPrimitive: valueOf takes precedence over toString"); >+} + 1n, 3n, 'The result of (({valueOf: function() {return 2n;}, toString: err}) + 1n) is 3n'); >+ > assert.sameValue(1n + { > valueOf: function() { > return 2n; > }, >+ > toString: err >-}, 3n, "ToPrimitive: valueOf takes precedence over toString"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n + {valueOf: function() {return 2n;}, toString: err}) is 3n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) + 1n, 3n, "ToPrimitive: toString with no valueOf"); >+} + 1n, 3n, 'The result of (({toString: function() {return 2n;}}) + 1n) is 3n'); >+ > assert.sameValue(1n + { > toString: function() { > return 2n; > } >-}, 3n, "ToPrimitive: toString with no valueOf"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n + {toString: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}) + 1n, 3n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >+} + 1n, 3n, 'The result of (({[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) + 1n) is 3n'); >+ > assert.sameValue(1n + { > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}, 3n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n + {[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}) + 1n, 3n, "ToPrimitive: skip @@toPrimitive when it's null"); >+} + 1n, 3n, 'The result of (({[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) + 1n) is 3n'); >+ > assert.sameValue(1n + { > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}, 3n, "ToPrimitive: skip @@toPrimitive when it's null"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n + {[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > valueOf: null, >+ > toString: function() { > return 2n; > } >-}) + 1n, 3n, "ToPrimitive: skip valueOf when it's not callable"); >+} + 1n, 3n, 'The result of (({valueOf: null, toString: function() {return 2n;}}) + 1n) is 3n'); >+ > assert.sameValue(1n + { > valueOf: null, >+ > toString: function() { > return 2n; > } >-}, 3n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n + {valueOf: null, toString: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}) + 1n, 3n, "ToPrimitive: skip valueOf when it's not callable"); >+} + 1n, 3n, 'The result of (({valueOf: 1, toString: function() {return 2n;}}) + 1n) is 3n'); >+ > assert.sameValue(1n + { > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}, 3n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n + {valueOf: 1, toString: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}) + 1n, 3n, "ToPrimitive: skip valueOf when it's not callable"); >+} + 1n, 3n, 'The result of (({valueOf: {}, toString: function() {return 2n;}}) + 1n) is 3n'); >+ > assert.sameValue(1n + { > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}, 3n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n + {valueOf: {}, toString: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}) + 1n, 3n, "ToPrimitive: skip valueOf when it returns an object"); >+} + 1n, 3n, 'The result of (({valueOf: function() {return {};}, toString: function() {return 2n;}}) + 1n) is 3n'); >+ > assert.sameValue(1n + { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}, 3n, "ToPrimitive: skip valueOf when it returns an object"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n + {valueOf: function() {return {};}, toString: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}) + 1n, 3n, "ToPrimitive: skip valueOf when it returns an object"); >+} + 1n, 3n, 'The result of (({valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) + 1n) is 3n'); >+ > assert.sameValue(1n + { > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}, 3n, "ToPrimitive: skip valueOf when it returns an object"); >+}, 3n, 'The result of (1n + {valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) is 3n'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: 1 > }) + 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: 1}) + 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n + { > [Symbol.toPrimitive]: 1 > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n + {[Symbol.toPrimitive]: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: {} > }) + 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: {}}) + 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n + { > [Symbol.toPrimitive]: {} > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n + {[Symbol.toPrimitive]: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return Object(1); > } > }) + 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return Object(1);}}) + 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n + { > [Symbol.toPrimitive]: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n + {[Symbol.toPrimitive]: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return {}; > } > }) + 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return {};}}) + 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n + { > [Symbol.toPrimitive]: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n + {[Symbol.toPrimitive]: function() {return {};}} throws TypeError'); >+ > assert.throws(MyError, function() { > ({ > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }) + 0n; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '({[Symbol.toPrimitive]: function() {throw new MyError();}}) + 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n + { > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '0n + {[Symbol.toPrimitive]: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > valueOf: function() { > throw new MyError(); > } > }) + 0n; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '({valueOf: function() {throw new MyError();}}) + 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n + { > valueOf: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '0n + {valueOf: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > toString: function() { > throw new MyError(); > } > }) + 0n; >-}, "ToPrimitive: propagate errors from toString"); >+}, '({toString: function() {throw new MyError();}}) + 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n + { > toString: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from toString"); >+}, '0n + {toString: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: null, > toString: null > }) + 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: null, toString: null}) + 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n + { > valueOf: null, > toString: null > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n + {valueOf: null, toString: null} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: 1, > toString: 1 > }) + 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: 1, toString: 1}) + 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n + { > valueOf: 1, > toString: 1 > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n + {valueOf: 1, toString: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: {}, > toString: {} > }) + 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: {}, toString: {}}) + 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n + { > valueOf: {}, > toString: {} > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n + {valueOf: {}, toString: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }) + 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return Object(1);}, toString: function() {return Object(1);}}) + 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n + { > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n + {valueOf: function() {return Object(1);}, toString: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }) + 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return {};}, toString: function() {return {};}}) + 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n + { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n + {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/addition/bigint-wrapped-values.js b/JSTests/test262/test/language/expressions/addition/bigint-wrapped-values.js >index a69e10b585d330a4ae16329545e2b15d80b81f76..ef9ac31fc2b4000743694652d083174e079cb900 100644 >--- a/JSTests/test262/test/language/expressions/addition/bigint-wrapped-values.js >+++ b/JSTests/test262/test/language/expressions/addition/bigint-wrapped-values.js >@@ -5,36 +5,41 @@ > esid: sec-addition-operator-plus-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >+assert.sameValue(Object(2n) + 1n, 3n, 'The result of (Object(2n) + 1n) is 3n'); >+assert.sameValue(1n + Object(2n), 3n, 'The result of (1n + Object(2n)) is 3n'); > >-assert.sameValue(Object(2n) + 1n, 3n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(1n + Object(2n), 3n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > } >-}) + 1n, 3n, "ToPrimitive: @@toPrimitive"); >+} + 1n, 3n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}}) + 1n) is 3n'); >+ > assert.sameValue(1n + { > [Symbol.toPrimitive]: function() { > return 2n; > } >-}, 3n, "ToPrimitive: @@toPrimitive"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n + {[Symbol.toPrimitive]: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > } >-}) + 1n, 3n, "ToPrimitive: valueOf"); >+} + 1n, 3n, 'The result of (({valueOf: function() {return 2n;}}) + 1n) is 3n'); >+ > assert.sameValue(1n + { > valueOf: function() { > return 2n; > } >-}, 3n, "ToPrimitive: valueOf"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n + {valueOf: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) + 1n, 3n, "ToPrimitive: toString"); >+} + 1n, 3n, 'The result of (({toString: function() {return 2n;}}) + 1n) is 3n'); >+ > assert.sameValue(1n + { > toString: function() { > return 2n; > } >-}, 3n, "ToPrimitive: toString"); >+}, 3n, 'The result of (1n + {toString: function() {return 2n;}}) is 3n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/bitwise-and/bigint-and-number.js b/JSTests/test262/test/language/expressions/bitwise-and/bigint-and-number.js >index db1b23e8e188d4184f8a1c171cb6196e0fddb278..b347a2ec8dbc1659f77b867c2a579271568e6f98 100644 >--- a/JSTests/test262/test/language/expressions/bitwise-and/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/bitwise-and/bigint-and-number.js >@@ -9,24 +9,82 @@ > Let rnum be ? ToNumeric(rightValue). > If Type(lnum) does not equal Type(rnum), throw a TypeError exception. > ---*/ >+assert.throws(TypeError, function() { >+ 1n & 1; >+}, '1n & 1 throws TypeError'); > >-assert.throws(TypeError, function() { 1n & 1; }, "1n & 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 & 1n; }, "1 & 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) & 1; }, "Object(1n) & 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 & Object(1n); }, "1 & Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n & Object(1); }, "1n & Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) & 1n; }, "Object(1) & 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) & Object(1); }, "Object(1n) & Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) & Object(1n); }, "Object(1) & Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n & NaN; }, "1n & NaN throws TypeError"); >-assert.throws(TypeError, function() { NaN & 1n; }, "NaN & 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n & Infinity; }, "1n & Infinity throws TypeError"); >-assert.throws(TypeError, function() { Infinity & 1n; }, "Infinity & 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n & true; }, "1n & true throws TypeError"); >-assert.throws(TypeError, function() { true & 1n; }, "true & 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n & "1"; }, '1n & "1" throws TypeError'); >-assert.throws(TypeError, function() { "1" & 1n; }, '"1" & 1n throws TypeError'); >-assert.throws(TypeError, function() { 1n & null; }, "1n & null throws TypeError"); >-assert.throws(TypeError, function() { null & 1n; }, "null & 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n & undefined; }, "1n & undefined throws TypeError"); >-assert.throws(TypeError, function() { undefined & 1n; }, "undefined & 1n throws TypeError"); >+assert.throws(TypeError, function() { >+ 1 & 1n; >+}, '1 & 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) & 1; >+}, 'Object(1n) & 1 throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1 & Object(1n); >+}, '1 & Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n & Object(1); >+}, '1n & Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) & 1n; >+}, 'Object(1) & 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) & Object(1); >+}, 'Object(1n) & Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) & Object(1n); >+}, 'Object(1) & Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n & NaN; >+}, '1n & NaN throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ NaN & 1n; >+}, 'NaN & 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n & Infinity; >+}, '1n & Infinity throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Infinity & 1n; >+}, 'Infinity & 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n & true; >+}, '1n & true throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ true & 1n; >+}, 'true & 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n & '1'; >+}, '1n & "1" throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ '1' & 1n; >+}, '"1" & 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n & null; >+}, '1n & null throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ null & 1n; >+}, 'null & 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n & undefined; >+}, '1n & undefined throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ undefined & 1n; >+}, 'undefined & 1n throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/bitwise-and/bigint-errors.js b/JSTests/test262/test/language/expressions/bitwise-and/bigint-errors.js >index 0f57b1431c75fa56fecacd7c6fb7cb7157134dbf..f4fe031516c02ea5273ed0998bc0308c964b253d 100644 >--- a/JSTests/test262/test/language/expressions/bitwise-and/bigint-errors.js >+++ b/JSTests/test262/test/language/expressions/bitwise-and/bigint-errors.js >@@ -5,58 +5,66 @@ > esid: sec-binary-bitwise-operators-runtime-semantics-evaluation > features: [BigInt, Symbol, Symbol.toPrimitive, computed-property-names] > ---*/ >- > assert.throws(TypeError, function() { >- Symbol("1") & 0n; >-}, "ToBigInt: Symbol => TypeError"); >+ Symbol('1') & 0n; >+}, 'Symbol("1") & 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n & Symbol("1"); >-}, "ToBigInt: Symbol => TypeError"); >+ 0n & Symbol('1'); >+}, '0n & Symbol("1") throws TypeError'); >+ > assert.throws(TypeError, function() { >- Object(Symbol("1")) & 0n; >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ Object(Symbol('1')) & 0n; >+}, 'Object(Symbol("1")) & 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n & Object(Symbol("1")); >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ 0n & Object(Symbol('1')); >+}, '0n & Object(Symbol("1")) throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) & 0n; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '({[Symbol.toPrimitive]: function() {return Symbol("1");}}) & 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n & { > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '0n & {[Symbol.toPrimitive]: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) & 0n; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '({valueOf: function() {return Symbol("1");}}) & 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n & { > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '0n & {valueOf: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) & 0n; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '({toString: function() {return Symbol("1");}}) & 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n & { > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '0n & {toString: function() {return Symbol("1");}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/bitwise-and/bigint-non-primitive.js b/JSTests/test262/test/language/expressions/bitwise-and/bigint-non-primitive.js >index 2afe7e98d802d8ca5c8cd24e632a26fd8ef82452..393abed9fb4ff18f563c8da0af98c56180d391ae 100644 >--- a/JSTests/test262/test/language/expressions/bitwise-and/bigint-non-primitive.js >+++ b/JSTests/test262/test/language/expressions/bitwise-and/bigint-non-primitive.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Bitwise AND for BigInt non-primitive values > esid: sec-binary-bitwise-operators-runtime-semantics-evaluation >@@ -13,30 +12,70 @@ > > features: [BigInt] > ---*/ >+assert.sameValue( >+ Object(0b101n) & 0b011n, >+ 0b001n, >+ 'The result of (Object(0b101n) & 0b011n) is 0b001n' >+); > >-assert.sameValue(Object(0b101n) & 0b011n, 0b001n, "Object(0b101n) & 0b011n === 0b001n"); >-assert.sameValue(0b011n & Object(0b101n), 0b001n, "0b011n & Object(0b101n) === 0b001n"); >-assert.sameValue(Object(0b101n) & Object(0b011n), 0b001n, "Object(0b101n) & Object(0b011n) === 0b001n"); >+assert.sameValue( >+ 0b011n & Object(0b101n), >+ 0b001n, >+ 'The result of (0b011n & Object(0b101n)) is 0b001n' >+); >+ >+assert.sameValue( >+ Object(0b101n) & Object(0b011n), >+ 0b001n, >+ 'The result of (Object(0b101n) & Object(0b011n)) is 0b001n' >+); > > function err() { > throw new Test262Error(); > } > >-assert.sameValue( >- {[Symbol.toPrimitive]: function() { return 0b101n; }, valueOf: err, toString: err} & 0b011n, 0b001n, >- "primitive from @@toPrimitive"); >-assert.sameValue( >- 0b011n & {[Symbol.toPrimitive]: function() { return 0b101n; }, valueOf: err, toString: err}, 0b001n, >- "primitive from @@toPrimitive"); >-assert.sameValue( >- {valueOf: function() { return 0b101n; }, toString: err} & 0b011n, 0b001n, >- "primitive from {}.valueOf"); >-assert.sameValue( >- 0b011n & {valueOf: function() { return 0b101n; }, toString: err}, 0b001n, >- "primitive from {}.valueOf"); >-assert.sameValue( >- {toString: function() { return 0b101n; }} & 0b011n, 0b001n, >- "primitive from {}.toString"); >-assert.sameValue( >- 0b011n & {toString: function() { return 0b101n; }}, 0b001n, >- "primitive from {}.toString"); >+assert.sameValue({ >+ [Symbol.toPrimitive]: function() { >+ return 0b101n; >+ }, >+ >+ valueOf: err, >+ toString: err >+} & 0b011n, 0b001n, 'The result of (({[Symbol.toPrimitive]: function() {return 0b101n;}, valueOf: err, toString: err}) & 0b011n) is 0b001n'); >+ >+assert.sameValue(0b011n & { >+ [Symbol.toPrimitive]: function() { >+ return 0b101n; >+ }, >+ >+ valueOf: err, >+ toString: err >+}, 0b001n, 'The result of (0b011n & {[Symbol.toPrimitive]: function() {return 0b101n;}, valueOf: err, toString: err}) is 0b001n'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 0b101n; >+ }, >+ >+ toString: err >+} & 0b011n, 0b001n, 'The result of (({valueOf: function() {return 0b101n;}, toString: err}) & 0b011n) is 0b001n'); >+ >+assert.sameValue(0b011n & { >+ valueOf: function() { >+ return 0b101n; >+ }, >+ >+ toString: err >+}, 0b001n, 'The result of (0b011n & {valueOf: function() {return 0b101n;}, toString: err}) is 0b001n'); >+ >+assert.sameValue({ >+ toString: function() { >+ return 0b101n; >+ } >+} & 0b011n, 0b001n, 'The result of (({toString: function() {return 0b101n;}}) & 0b011n) is 0b001n'); >+ >+assert.sameValue(0b011n & { >+ toString: function() { >+ return 0b101n; >+ } >+}, 0b001n, 'The result of (0b011n & {toString: function() {return 0b101n;}}) is 0b001n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/bitwise-and/bigint-toprimitive.js b/JSTests/test262/test/language/expressions/bitwise-and/bigint-toprimitive.js >index 88ed17b6c18d1280358e13aacf8000373c835040..8b12907dee4da955b02b00b6c0fbc155c86e9127 100644 >--- a/JSTests/test262/test/language/expressions/bitwise-and/bigint-toprimitive.js >+++ b/JSTests/test262/test/language/expressions/bitwise-and/bigint-toprimitive.js >@@ -5,304 +5,368 @@ > esid: sec-binary-bitwise-operators-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >- > function err() { > throw new Test262Error(); > } > > function MyError() {} > >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}) & 3n, 2n, "ToPrimitive: @@toPrimitive takes precedence"); >+} & 3n, 2n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) & 3n) is 2n'); >+ > assert.sameValue(3n & { > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}, 2n, "ToPrimitive: @@toPrimitive takes precedence"); >-assert.sameValue(({ >+}, 2n, 'The result of (3n & {[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) is 2n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > }, >+ > toString: err >-}) & 3n, 2n, "ToPrimitive: valueOf takes precedence over toString"); >+} & 3n, 2n, 'The result of (({valueOf: function() {return 2n;}, toString: err}) & 3n) is 2n'); >+ > assert.sameValue(3n & { > valueOf: function() { > return 2n; > }, >+ > toString: err >-}, 2n, "ToPrimitive: valueOf takes precedence over toString"); >-assert.sameValue(({ >+}, 2n, 'The result of (3n & {valueOf: function() {return 2n;}, toString: err}) is 2n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) & 3n, 2n, "ToPrimitive: toString with no valueOf"); >+} & 3n, 2n, 'The result of (({toString: function() {return 2n;}}) & 3n) is 2n'); >+ > assert.sameValue(3n & { > toString: function() { > return 2n; > } >-}, 2n, "ToPrimitive: toString with no valueOf"); >-assert.sameValue(({ >+}, 2n, 'The result of (3n & {toString: function() {return 2n;}}) is 2n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}) & 3n, 2n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >+} & 3n, 2n, 'The result of (({[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) & 3n) is 2n'); >+ > assert.sameValue(3n & { > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}, 2n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >-assert.sameValue(({ >+}, 2n, 'The result of (3n & {[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) is 2n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}) & 3n, 2n, "ToPrimitive: skip @@toPrimitive when it's null"); >+} & 3n, 2n, 'The result of (({[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) & 3n) is 2n'); >+ > assert.sameValue(3n & { > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}, 2n, "ToPrimitive: skip @@toPrimitive when it's null"); >-assert.sameValue(({ >+}, 2n, 'The result of (3n & {[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) is 2n'); >+ >+assert.sameValue({ > valueOf: null, >+ > toString: function() { > return 2n; > } >-}) & 3n, 2n, "ToPrimitive: skip valueOf when it's not callable"); >+} & 3n, 2n, 'The result of (({valueOf: null, toString: function() {return 2n;}}) & 3n) is 2n'); >+ > assert.sameValue(3n & { > valueOf: null, >+ > toString: function() { > return 2n; > } >-}, 2n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 2n, 'The result of (3n & {valueOf: null, toString: function() {return 2n;}}) is 2n'); >+ >+assert.sameValue({ > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}) & 3n, 2n, "ToPrimitive: skip valueOf when it's not callable"); >+} & 3n, 2n, 'The result of (({valueOf: 1, toString: function() {return 2n;}}) & 3n) is 2n'); >+ > assert.sameValue(3n & { > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}, 2n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 2n, 'The result of (3n & {valueOf: 1, toString: function() {return 2n;}}) is 2n'); >+ >+assert.sameValue({ > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}) & 3n, 2n, "ToPrimitive: skip valueOf when it's not callable"); >+} & 3n, 2n, 'The result of (({valueOf: {}, toString: function() {return 2n;}}) & 3n) is 2n'); >+ > assert.sameValue(3n & { > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}, 2n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 2n, 'The result of (3n & {valueOf: {}, toString: function() {return 2n;}}) is 2n'); >+ >+assert.sameValue({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}) & 3n, 2n, "ToPrimitive: skip valueOf when it returns an object"); >+} & 3n, 2n, 'The result of (({valueOf: function() {return {};}, toString: function() {return 2n;}}) & 3n) is 2n'); >+ > assert.sameValue(3n & { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}, 2n, "ToPrimitive: skip valueOf when it returns an object"); >-assert.sameValue(({ >+}, 2n, 'The result of (3n & {valueOf: function() {return {};}, toString: function() {return 2n;}}) is 2n'); >+ >+assert.sameValue({ > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}) & 3n, 2n, "ToPrimitive: skip valueOf when it returns an object"); >+} & 3n, 2n, 'The result of (({valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) & 3n) is 2n'); >+ > assert.sameValue(3n & { > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}, 2n, "ToPrimitive: skip valueOf when it returns an object"); >+}, 2n, 'The result of (3n & {valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) is 2n'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: 1 > }) & 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: 1}) & 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n & { > [Symbol.toPrimitive]: 1 > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n & {[Symbol.toPrimitive]: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: {} > }) & 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: {}}) & 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n & { > [Symbol.toPrimitive]: {} > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n & {[Symbol.toPrimitive]: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return Object(1); > } > }) & 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return Object(1);}}) & 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n & { > [Symbol.toPrimitive]: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n & {[Symbol.toPrimitive]: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return {}; > } > }) & 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return {};}}) & 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n & { > [Symbol.toPrimitive]: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n & {[Symbol.toPrimitive]: function() {return {};}} throws TypeError'); >+ > assert.throws(MyError, function() { > ({ > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }) & 0n; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '({[Symbol.toPrimitive]: function() {throw new MyError();}}) & 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n & { > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '0n & {[Symbol.toPrimitive]: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > valueOf: function() { > throw new MyError(); > } > }) & 0n; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '({valueOf: function() {throw new MyError();}}) & 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n & { > valueOf: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '0n & {valueOf: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > toString: function() { > throw new MyError(); > } > }) & 0n; >-}, "ToPrimitive: propagate errors from toString"); >+}, '({toString: function() {throw new MyError();}}) & 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n & { > toString: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from toString"); >+}, '0n & {toString: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: null, > toString: null > }) & 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: null, toString: null}) & 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n & { > valueOf: null, > toString: null > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n & {valueOf: null, toString: null} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: 1, > toString: 1 > }) & 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: 1, toString: 1}) & 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n & { > valueOf: 1, > toString: 1 > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n & {valueOf: 1, toString: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: {}, > toString: {} > }) & 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: {}, toString: {}}) & 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n & { > valueOf: {}, > toString: {} > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n & {valueOf: {}, toString: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }) & 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return Object(1);}, toString: function() {return Object(1);}}) & 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n & { > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n & {valueOf: function() {return Object(1);}, toString: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }) & 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return {};}, toString: function() {return {};}}) & 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n & { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n & {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/bitwise-and/bigint-wrapped-values.js b/JSTests/test262/test/language/expressions/bitwise-and/bigint-wrapped-values.js >index 381ca6158fdd1566c661aa54c7e2d64c1dea0e9c..9a0f6c211e93e3d44495bd64c092b67a48de12f1 100644 >--- a/JSTests/test262/test/language/expressions/bitwise-and/bigint-wrapped-values.js >+++ b/JSTests/test262/test/language/expressions/bitwise-and/bigint-wrapped-values.js >@@ -5,36 +5,41 @@ > esid: sec-binary-bitwise-operators-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >+assert.sameValue(Object(2n) & 3n, 2n, 'The result of (Object(2n) & 3n) is 2n'); >+assert.sameValue(3n & Object(2n), 2n, 'The result of (3n & Object(2n)) is 2n'); > >-assert.sameValue(Object(2n) & 3n, 2n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(3n & Object(2n), 2n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > } >-}) & 3n, 2n, "ToPrimitive: @@toPrimitive"); >+} & 3n, 2n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}}) & 3n) is 2n'); >+ > assert.sameValue(3n & { > [Symbol.toPrimitive]: function() { > return 2n; > } >-}, 2n, "ToPrimitive: @@toPrimitive"); >-assert.sameValue(({ >+}, 2n, 'The result of (3n & {[Symbol.toPrimitive]: function() {return 2n;}}) is 2n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > } >-}) & 3n, 2n, "ToPrimitive: valueOf"); >+} & 3n, 2n, 'The result of (({valueOf: function() {return 2n;}}) & 3n) is 2n'); >+ > assert.sameValue(3n & { > valueOf: function() { > return 2n; > } >-}, 2n, "ToPrimitive: valueOf"); >-assert.sameValue(({ >+}, 2n, 'The result of (3n & {valueOf: function() {return 2n;}}) is 2n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) & 3n, 2n, "ToPrimitive: toString"); >+} & 3n, 2n, 'The result of (({toString: function() {return 2n;}}) & 3n) is 2n'); >+ > assert.sameValue(3n & { > toString: function() { > return 2n; > } >-}, 2n, "ToPrimitive: toString"); >+}, 2n, 'The result of (3n & {toString: function() {return 2n;}}) is 2n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/bitwise-not/bigint-non-primitive.js b/JSTests/test262/test/language/expressions/bitwise-not/bigint-non-primitive.js >index 862219a2bc170ba3b7eea2d4f774dda370351724..9a9c178bcb1026c60e5e0b764de4e3fa531aa1b9 100644 >--- a/JSTests/test262/test/language/expressions/bitwise-not/bigint-non-primitive.js >+++ b/JSTests/test262/test/language/expressions/bitwise-not/bigint-non-primitive.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Bitwise NOT for BigInt object wrappers > esid: sec-bitwise-not-operator-runtime-semantics-evaluation >@@ -15,19 +14,31 @@ > > features: [BigInt, Symbol.toPrimitive] > ---*/ >- >-assert.sameValue(~Object(1n), -2n, "~Object(1n) === -2n"); >+assert.sameValue(~Object(1n), -2n, 'The value of ~Object(1n) is -2n'); > > function err() { > throw new Test262Error(); > } > >-assert.sameValue( >- ~{[Symbol.toPrimitive]: function() { return 1n; }, valueOf: err, toString: err}, -2n, >- "primitive from @@toPrimitive"); >-assert.sameValue( >- ~{valueOf: function() { return 1n; }, toString: err}, -2n, >- "primitive from {}.valueOf"); >-assert.sameValue( >- ~{toString: function() { return 1n; }}, -2n, >- "primitive from {}.toString"); >+assert.sameValue(~{ >+ [Symbol.toPrimitive]: function() { >+ return 1n; >+ }, >+ >+ valueOf: err, >+ toString: err >+}, -2n, 'The value of ~{[Symbol.toPrimitive]: function() {return 1n;}, valueOf: err, toString: err} is -2n'); >+ >+assert.sameValue(~{ >+ valueOf: function() { >+ return 1n; >+ }, >+ >+ toString: err >+}, -2n, 'The value of ~{valueOf: function() {return 1n;}, toString: err} is -2n'); >+ >+assert.sameValue(~{ >+ toString: function() { >+ return 1n; >+ } >+}, -2n, 'The value of ~{toString: function() {return 1n;}} is -2n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/bitwise-or/bigint-and-number.js b/JSTests/test262/test/language/expressions/bitwise-or/bigint-and-number.js >index dd9b809702b39e3943dd302dee281a3cd1fcb590..acf96ff247be9982b8b54c2c4204b17077b38c73 100644 >--- a/JSTests/test262/test/language/expressions/bitwise-or/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/bitwise-or/bigint-and-number.js >@@ -9,24 +9,82 @@ > Let rnum be ? ToNumeric(rightValue). > If Type(lnum) does not equal Type(rnum), throw a TypeError exception. > ---*/ >+assert.throws(TypeError, function() { >+ 1n | 1; >+}, '1n | 1 throws TypeError'); > >-assert.throws(TypeError, function() { 1n | 1; }, "1n | 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 | 1n; }, "1 | 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) | 1; }, "Object(1n) | 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 | Object(1n); }, "1 | Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n | Object(1); }, "1n | Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) | 1n; }, "Object(1) | 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) | Object(1); }, "Object(1n) | Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) | Object(1n); }, "Object(1) | Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n | NaN; }, "1n | NaN throws TypeError"); >-assert.throws(TypeError, function() { NaN | 1n; }, "NaN | 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n | Infinity; }, "1n | Infinity throws TypeError"); >-assert.throws(TypeError, function() { Infinity | 1n; }, "Infinity | 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n | true; }, "1n | true throws TypeError"); >-assert.throws(TypeError, function() { true | 1n; }, "true | 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n | "1"; }, '1n | "1" throws TypeError'); >-assert.throws(TypeError, function() { "1" | 1n; }, '"1" | 1n throws TypeError'); >-assert.throws(TypeError, function() { 1n | null; }, "1n | null throws TypeError"); >-assert.throws(TypeError, function() { null | 1n; }, "null | 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n | undefined; }, "1n | undefined throws TypeError"); >-assert.throws(TypeError, function() { undefined | 1n; }, "undefined | 1n throws TypeError"); >+assert.throws(TypeError, function() { >+ 1 | 1n; >+}, '1 | 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) | 1; >+}, 'Object(1n) | 1 throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1 | Object(1n); >+}, '1 | Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n | Object(1); >+}, '1n | Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) | 1n; >+}, 'Object(1) | 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) | Object(1); >+}, 'Object(1n) | Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) | Object(1n); >+}, 'Object(1) | Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n | NaN; >+}, '1n | NaN throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ NaN | 1n; >+}, 'NaN | 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n | Infinity; >+}, '1n | Infinity throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Infinity | 1n; >+}, 'Infinity | 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n | true; >+}, '1n | true throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ true | 1n; >+}, 'true | 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n | '1'; >+}, '1n | "1" throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ '1' | 1n; >+}, '"1" | 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n | null; >+}, '1n | null throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ null | 1n; >+}, 'null | 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n | undefined; >+}, '1n | undefined throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ undefined | 1n; >+}, 'undefined | 1n throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/bitwise-or/bigint-errors.js b/JSTests/test262/test/language/expressions/bitwise-or/bigint-errors.js >index 339de3b06e32101f35742894af3444e6cf3c7dc7..f0ab953b126eb0c3fcdf6eddce9e3236d4bfa2a0 100644 >--- a/JSTests/test262/test/language/expressions/bitwise-or/bigint-errors.js >+++ b/JSTests/test262/test/language/expressions/bitwise-or/bigint-errors.js >@@ -5,58 +5,66 @@ > esid: sec-binary-bitwise-operators-runtime-semantics-evaluation > features: [BigInt, Symbol, Symbol.toPrimitive, computed-property-names] > ---*/ >- > assert.throws(TypeError, function() { >- Symbol("1") | 0n; >-}, "ToBigInt: Symbol => TypeError"); >+ Symbol('1') | 0n; >+}, 'Symbol("1") | 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n | Symbol("1"); >-}, "ToBigInt: Symbol => TypeError"); >+ 0n | Symbol('1'); >+}, '0n | Symbol("1") throws TypeError'); >+ > assert.throws(TypeError, function() { >- Object(Symbol("1")) | 0n; >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ Object(Symbol('1')) | 0n; >+}, 'Object(Symbol("1")) | 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n | Object(Symbol("1")); >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ 0n | Object(Symbol('1')); >+}, '0n | Object(Symbol("1")) throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) | 0n; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '({[Symbol.toPrimitive]: function() {return Symbol("1");}}) | 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n | { > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '0n | {[Symbol.toPrimitive]: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) | 0n; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '({valueOf: function() {return Symbol("1");}}) | 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n | { > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '0n | {valueOf: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) | 0n; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '({toString: function() {return Symbol("1");}}) | 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n | { > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '0n | {toString: function() {return Symbol("1");}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/bitwise-or/bigint-non-primitive.js b/JSTests/test262/test/language/expressions/bitwise-or/bigint-non-primitive.js >index 85c59372eee501d48f9b52739cf43ce1c850caa9..1faec3e070abedd37bd4c7852107e302ec9568b8 100644 >--- a/JSTests/test262/test/language/expressions/bitwise-or/bigint-non-primitive.js >+++ b/JSTests/test262/test/language/expressions/bitwise-or/bigint-non-primitive.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Bitwise OR for BigInt non-primitive values > esid: sec-binary-bitwise-operators-runtime-semantics-evaluation >@@ -14,30 +13,70 @@ > > features: [BigInt] > ---*/ >+assert.sameValue( >+ Object(0b101n) | 0b011n, >+ 0b111n, >+ 'The result of (Object(0b101n) | 0b011n) is 0b111n' >+); > >-assert.sameValue(Object(0b101n) | 0b011n, 0b111n, "Object(0b101n) | 0b011n === 0b111n"); >-assert.sameValue(0b011n | Object(0b101n), 0b111n, "0b011n | Object(0b101n) === 0b111n"); >-assert.sameValue(Object(0b101n) | Object(0b011n), 0b111n, "Object(0b101n) | Object(0b011n) === 0b111n"); >+assert.sameValue( >+ 0b011n | Object(0b101n), >+ 0b111n, >+ 'The result of (0b011n | Object(0b101n)) is 0b111n' >+); >+ >+assert.sameValue( >+ Object(0b101n) | Object(0b011n), >+ 0b111n, >+ 'The result of (Object(0b101n) | Object(0b011n)) is 0b111n' >+); > > function err() { > throw new Test262Error(); > } > >-assert.sameValue( >- {[Symbol.toPrimitive]: function() { return 0b101n; }, valueOf: err, toString: err} | 0b011n, 0b111n, >- "primitive from @@toPrimitive"); >-assert.sameValue( >- 0b011n | {[Symbol.toPrimitive]: function() { return 0b101n; }, valueOf: err, toString: err}, 0b111n, >- "primitive from @@toPrimitive"); >-assert.sameValue( >- {valueOf: function() { return 0b101n; }, toString: err} | 0b011n, 0b111n, >- "primitive from {}.valueOf"); >-assert.sameValue( >- 0b011n | {valueOf: function() { return 0b101n; }, toString: err}, 0b111n, >- "primitive from {}.valueOf"); >-assert.sameValue( >- {toString: function() { return 0b101n; }} | 0b011n, 0b111n, >- "primitive from {}.toString"); >-assert.sameValue( >- 0b011n | {toString: function() { return 0b101n; }}, 0b111n, >- "primitive from {}.toString"); >+assert.sameValue({ >+ [Symbol.toPrimitive]: function() { >+ return 0b101n; >+ }, >+ >+ valueOf: err, >+ toString: err >+} | 0b011n, 0b111n, 'The result of (({[Symbol.toPrimitive]: function() {return 0b101n;}, valueOf: err, toString: err}) | 0b011n) is 0b111n'); >+ >+assert.sameValue(0b011n | { >+ [Symbol.toPrimitive]: function() { >+ return 0b101n; >+ }, >+ >+ valueOf: err, >+ toString: err >+}, 0b111n, 'The result of (0b011n | {[Symbol.toPrimitive]: function() {return 0b101n;}, valueOf: err, toString: err}) is 0b111n'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 0b101n; >+ }, >+ >+ toString: err >+} | 0b011n, 0b111n, 'The result of (({valueOf: function() {return 0b101n;}, toString: err}) | 0b011n) is 0b111n'); >+ >+assert.sameValue(0b011n | { >+ valueOf: function() { >+ return 0b101n; >+ }, >+ >+ toString: err >+}, 0b111n, 'The result of (0b011n | {valueOf: function() {return 0b101n;}, toString: err}) is 0b111n'); >+ >+assert.sameValue({ >+ toString: function() { >+ return 0b101n; >+ } >+} | 0b011n, 0b111n, 'The result of (({toString: function() {return 0b101n;}}) | 0b011n) is 0b111n'); >+ >+assert.sameValue(0b011n | { >+ toString: function() { >+ return 0b101n; >+ } >+}, 0b111n, 'The result of (0b011n | {toString: function() {return 0b101n;}}) is 0b111n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/bitwise-or/bigint-toprimitive.js b/JSTests/test262/test/language/expressions/bitwise-or/bigint-toprimitive.js >index 644395b8cabe00ab2c544e2a22185b9e2143cb76..c9151c5c80259784ff52e68988bf7990d4296be9 100644 >--- a/JSTests/test262/test/language/expressions/bitwise-or/bigint-toprimitive.js >+++ b/JSTests/test262/test/language/expressions/bitwise-or/bigint-toprimitive.js >@@ -5,304 +5,368 @@ > esid: sec-binary-bitwise-operators-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >- > function err() { > throw new Test262Error(); > } > > function MyError() {} > >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}) | 1n, 3n, "ToPrimitive: @@toPrimitive takes precedence"); >+} | 1n, 3n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) | 1n) is 3n'); >+ > assert.sameValue(1n | { > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}, 3n, "ToPrimitive: @@toPrimitive takes precedence"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n | {[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) is 3n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > }, >+ > toString: err >-}) | 1n, 3n, "ToPrimitive: valueOf takes precedence over toString"); >+} | 1n, 3n, 'The result of (({valueOf: function() {return 2n;}, toString: err}) | 1n) is 3n'); >+ > assert.sameValue(1n | { > valueOf: function() { > return 2n; > }, >+ > toString: err >-}, 3n, "ToPrimitive: valueOf takes precedence over toString"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n | {valueOf: function() {return 2n;}, toString: err}) is 3n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) | 1n, 3n, "ToPrimitive: toString with no valueOf"); >+} | 1n, 3n, 'The result of (({toString: function() {return 2n;}}) | 1n) is 3n'); >+ > assert.sameValue(1n | { > toString: function() { > return 2n; > } >-}, 3n, "ToPrimitive: toString with no valueOf"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n | {toString: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}) | 1n, 3n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >+} | 1n, 3n, 'The result of (({[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) | 1n) is 3n'); >+ > assert.sameValue(1n | { > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}, 3n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n | {[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}) | 1n, 3n, "ToPrimitive: skip @@toPrimitive when it's null"); >+} | 1n, 3n, 'The result of (({[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) | 1n) is 3n'); >+ > assert.sameValue(1n | { > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}, 3n, "ToPrimitive: skip @@toPrimitive when it's null"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n | {[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > valueOf: null, >+ > toString: function() { > return 2n; > } >-}) | 1n, 3n, "ToPrimitive: skip valueOf when it's not callable"); >+} | 1n, 3n, 'The result of (({valueOf: null, toString: function() {return 2n;}}) | 1n) is 3n'); >+ > assert.sameValue(1n | { > valueOf: null, >+ > toString: function() { > return 2n; > } >-}, 3n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n | {valueOf: null, toString: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}) | 1n, 3n, "ToPrimitive: skip valueOf when it's not callable"); >+} | 1n, 3n, 'The result of (({valueOf: 1, toString: function() {return 2n;}}) | 1n) is 3n'); >+ > assert.sameValue(1n | { > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}, 3n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n | {valueOf: 1, toString: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}) | 1n, 3n, "ToPrimitive: skip valueOf when it's not callable"); >+} | 1n, 3n, 'The result of (({valueOf: {}, toString: function() {return 2n;}}) | 1n) is 3n'); >+ > assert.sameValue(1n | { > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}, 3n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n | {valueOf: {}, toString: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}) | 1n, 3n, "ToPrimitive: skip valueOf when it returns an object"); >+} | 1n, 3n, 'The result of (({valueOf: function() {return {};}, toString: function() {return 2n;}}) | 1n) is 3n'); >+ > assert.sameValue(1n | { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}, 3n, "ToPrimitive: skip valueOf when it returns an object"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n | {valueOf: function() {return {};}, toString: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}) | 1n, 3n, "ToPrimitive: skip valueOf when it returns an object"); >+} | 1n, 3n, 'The result of (({valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) | 1n) is 3n'); >+ > assert.sameValue(1n | { > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}, 3n, "ToPrimitive: skip valueOf when it returns an object"); >+}, 3n, 'The result of (1n | {valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) is 3n'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: 1 > }) | 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: 1}) | 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n | { > [Symbol.toPrimitive]: 1 > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n | {[Symbol.toPrimitive]: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: {} > }) | 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: {}}) | 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n | { > [Symbol.toPrimitive]: {} > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n | {[Symbol.toPrimitive]: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return Object(1); > } > }) | 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return Object(1);}}) | 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n | { > [Symbol.toPrimitive]: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n | {[Symbol.toPrimitive]: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return {}; > } > }) | 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return {};}}) | 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n | { > [Symbol.toPrimitive]: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n | {[Symbol.toPrimitive]: function() {return {};}} throws TypeError'); >+ > assert.throws(MyError, function() { > ({ > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }) | 0n; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '({[Symbol.toPrimitive]: function() {throw new MyError();}}) | 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n | { > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '0n | {[Symbol.toPrimitive]: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > valueOf: function() { > throw new MyError(); > } > }) | 0n; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '({valueOf: function() {throw new MyError();}}) | 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n | { > valueOf: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '0n | {valueOf: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > toString: function() { > throw new MyError(); > } > }) | 0n; >-}, "ToPrimitive: propagate errors from toString"); >+}, '({toString: function() {throw new MyError();}}) | 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n | { > toString: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from toString"); >+}, '0n | {toString: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: null, > toString: null > }) | 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: null, toString: null}) | 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n | { > valueOf: null, > toString: null > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n | {valueOf: null, toString: null} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: 1, > toString: 1 > }) | 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: 1, toString: 1}) | 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n | { > valueOf: 1, > toString: 1 > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n | {valueOf: 1, toString: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: {}, > toString: {} > }) | 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: {}, toString: {}}) | 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n | { > valueOf: {}, > toString: {} > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n | {valueOf: {}, toString: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }) | 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return Object(1);}, toString: function() {return Object(1);}}) | 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n | { > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n | {valueOf: function() {return Object(1);}, toString: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }) | 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return {};}, toString: function() {return {};}}) | 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n | { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n | {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/bitwise-or/bigint-wrapped-values.js b/JSTests/test262/test/language/expressions/bitwise-or/bigint-wrapped-values.js >index 687e99f9d331fdb88292cb1398c61c78dfffc7e4..d51629dc6d09ccfd747e6a3b77a49a31eecab99a 100644 >--- a/JSTests/test262/test/language/expressions/bitwise-or/bigint-wrapped-values.js >+++ b/JSTests/test262/test/language/expressions/bitwise-or/bigint-wrapped-values.js >@@ -5,36 +5,41 @@ > esid: sec-binary-bitwise-operators-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >+assert.sameValue(Object(2n) | 1n, 3n, 'The result of (Object(2n) | 1n) is 3n'); >+assert.sameValue(1n | Object(2n), 3n, 'The result of (1n | Object(2n)) is 3n'); > >-assert.sameValue(Object(2n) | 1n, 3n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(1n | Object(2n), 3n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > } >-}) | 1n, 3n, "ToPrimitive: @@toPrimitive"); >+} | 1n, 3n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}}) | 1n) is 3n'); >+ > assert.sameValue(1n | { > [Symbol.toPrimitive]: function() { > return 2n; > } >-}, 3n, "ToPrimitive: @@toPrimitive"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n | {[Symbol.toPrimitive]: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > } >-}) | 1n, 3n, "ToPrimitive: valueOf"); >+} | 1n, 3n, 'The result of (({valueOf: function() {return 2n;}}) | 1n) is 3n'); >+ > assert.sameValue(1n | { > valueOf: function() { > return 2n; > } >-}, 3n, "ToPrimitive: valueOf"); >-assert.sameValue(({ >+}, 3n, 'The result of (1n | {valueOf: function() {return 2n;}}) is 3n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) | 1n, 3n, "ToPrimitive: toString"); >+} | 1n, 3n, 'The result of (({toString: function() {return 2n;}}) | 1n) is 3n'); >+ > assert.sameValue(1n | { > toString: function() { > return 2n; > } >-}, 3n, "ToPrimitive: toString"); >+}, 3n, 'The result of (1n | {toString: function() {return 2n;}}) is 3n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/bitwise-xor/bigint-and-number.js b/JSTests/test262/test/language/expressions/bitwise-xor/bigint-and-number.js >index 4b5f2f696e401d75493849a9e91d7e42da746517..87da2a623fe427885ea1d7205143674924217a27 100644 >--- a/JSTests/test262/test/language/expressions/bitwise-xor/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/bitwise-xor/bigint-and-number.js >@@ -9,24 +9,82 @@ > Let rnum be ? ToNumeric(rightValue). > If Type(lnum) does not equal Type(rnum), throw a TypeError exception. > ---*/ >+assert.throws(TypeError, function() { >+ 1n ^ 1; >+}, '1n ^ 1 throws TypeError'); > >-assert.throws(TypeError, function() { 1n ^ 1; }, "1n ^ 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 ^ 1n; }, "1 ^ 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) ^ 1; }, "Object(1n) ^ 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 ^ Object(1n); }, "1 ^ Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n ^ Object(1); }, "1n ^ Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) ^ 1n; }, "Object(1) ^ 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) ^ Object(1); }, "Object(1n) ^ Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) ^ Object(1n); }, "Object(1) ^ Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n ^ NaN; }, "1n ^ NaN throws TypeError"); >-assert.throws(TypeError, function() { NaN ^ 1n; }, "NaN ^ 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n ^ Infinity; }, "1n ^ Infinity throws TypeError"); >-assert.throws(TypeError, function() { Infinity ^ 1n; }, "Infinity ^ 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n ^ true; }, "1n ^ true throws TypeError"); >-assert.throws(TypeError, function() { true ^ 1n; }, "true ^ 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n ^ "1"; }, '1n ^ "1" throws TypeError'); >-assert.throws(TypeError, function() { "1" ^ 1n; }, '"1" ^ 1n throws TypeError'); >-assert.throws(TypeError, function() { 1n ^ null; }, "1n ^ null throws TypeError"); >-assert.throws(TypeError, function() { null ^ 1n; }, "null ^ 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n ^ undefined; }, "1n ^ undefined throws TypeError"); >-assert.throws(TypeError, function() { undefined ^ 1n; }, "undefined ^ 1n throws TypeError"); >+assert.throws(TypeError, function() { >+ 1 ^ 1n; >+}, '1 ^ 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) ^ 1; >+}, 'Object(1n) ^ 1 throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1 ^ Object(1n); >+}, '1 ^ Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n ^ Object(1); >+}, '1n ^ Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) ^ 1n; >+}, 'Object(1) ^ 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) ^ Object(1); >+}, 'Object(1n) ^ Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) ^ Object(1n); >+}, 'Object(1) ^ Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n ^ NaN; >+}, '1n ^ NaN throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ NaN ^ 1n; >+}, 'NaN ^ 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n ^ Infinity; >+}, '1n ^ Infinity throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Infinity ^ 1n; >+}, 'Infinity ^ 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n ^ true; >+}, '1n ^ true throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ true ^ 1n; >+}, 'true ^ 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n ^ '1'; >+}, '1n ^ "1" throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ '1' ^ 1n; >+}, '"1" ^ 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n ^ null; >+}, '1n ^ null throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ null ^ 1n; >+}, 'null ^ 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n ^ undefined; >+}, '1n ^ undefined throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ undefined ^ 1n; >+}, 'undefined ^ 1n throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/bitwise-xor/bigint-errors.js b/JSTests/test262/test/language/expressions/bitwise-xor/bigint-errors.js >index 6b3e43c458ecd722e8ab1bbb04d488f634b18bd8..b0994288e5fc527b37da5d9737b2ca7c2b158ce2 100644 >--- a/JSTests/test262/test/language/expressions/bitwise-xor/bigint-errors.js >+++ b/JSTests/test262/test/language/expressions/bitwise-xor/bigint-errors.js >@@ -5,58 +5,66 @@ > esid: sec-binary-bitwise-operators-runtime-semantics-evaluation > features: [BigInt, Symbol, Symbol.toPrimitive, computed-property-names] > ---*/ >- > assert.throws(TypeError, function() { >- Symbol("1") ^ 0n; >-}, "ToBigInt: Symbol => TypeError"); >+ Symbol('1') ^ 0n; >+}, 'Symbol("1") ^ 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n ^ Symbol("1"); >-}, "ToBigInt: Symbol => TypeError"); >+ 0n ^ Symbol('1'); >+}, '0n ^ Symbol("1") throws TypeError'); >+ > assert.throws(TypeError, function() { >- Object(Symbol("1")) ^ 0n; >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ Object(Symbol('1')) ^ 0n; >+}, 'Object(Symbol("1")) ^ 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n ^ Object(Symbol("1")); >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ 0n ^ Object(Symbol('1')); >+}, '0n ^ Object(Symbol("1")) throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) ^ 0n; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '({[Symbol.toPrimitive]: function() {return Symbol("1");}}) ^ 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ^ { > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '0n ^ {[Symbol.toPrimitive]: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) ^ 0n; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '({valueOf: function() {return Symbol("1");}}) ^ 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ^ { > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '0n ^ {valueOf: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) ^ 0n; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '({toString: function() {return Symbol("1");}}) ^ 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ^ { > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '0n ^ {toString: function() {return Symbol("1");}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/bitwise-xor/bigint-non-primitive.js b/JSTests/test262/test/language/expressions/bitwise-xor/bigint-non-primitive.js >index 853ceec24d3673f0e4bc3063cbbb1a63ed31b73e..74cfd4372f9620983e97f8a59e8f41f3747e84ee 100644 >--- a/JSTests/test262/test/language/expressions/bitwise-xor/bigint-non-primitive.js >+++ b/JSTests/test262/test/language/expressions/bitwise-xor/bigint-non-primitive.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Bitwise XOR for BigInt non-primitive values > esid: sec-binary-bitwise-operators-runtime-semantics-evaluation >@@ -14,30 +13,70 @@ > > features: [BigInt] > ---*/ >+assert.sameValue( >+ Object(0b101n) ^ 0b011n, >+ 0b110n, >+ 'The result of (Object(0b101n) ^ 0b011n) is 0b110n' >+); > >-assert.sameValue(Object(0b101n) ^ 0b011n, 0b110n, "Object(0b101n) ^ 0b011n === 0b110n"); >-assert.sameValue(0b011n ^ Object(0b101n), 0b110n, "0b011n ^ Object(0b101n) === 0b110n"); >-assert.sameValue(Object(0b101n) ^ Object(0b011n), 0b110n, "Object(0b101n) ^ Object(0b011n) === 0b110n"); >+assert.sameValue( >+ 0b011n ^ Object(0b101n), >+ 0b110n, >+ 'The result of (0b011n ^ Object(0b101n)) is 0b110n' >+); >+ >+assert.sameValue( >+ Object(0b101n) ^ Object(0b011n), >+ 0b110n, >+ 'The result of (Object(0b101n) ^ Object(0b011n)) is 0b110n' >+); > > function err() { > throw new Test262Error(); > } > >-assert.sameValue( >- {[Symbol.toPrimitive]: function() { return 0b101n; }, valueOf: err, toString: err} ^ 0b011n, 0b110n, >- "primitive from @@toPrimitive"); >-assert.sameValue( >- 0b011n ^ {[Symbol.toPrimitive]: function() { return 0b101n; }, valueOf: err, toString: err}, 0b110n, >- "primitive from @@toPrimitive"); >-assert.sameValue( >- {valueOf: function() { return 0b101n; }, toString: err} ^ 0b011n, 0b110n, >- "primitive from {}.valueOf"); >-assert.sameValue( >- 0b011n ^ {valueOf: function() { return 0b101n; }, toString: err}, 0b110n, >- "primitive from {}.valueOf"); >-assert.sameValue( >- {toString: function() { return 0b101n; }} ^ 0b011n, 0b110n, >- "primitive from {}.toString"); >-assert.sameValue( >- 0b011n ^ {toString: function() { return 0b101n; }}, 0b110n, >- "primitive from {}.toString"); >+assert.sameValue({ >+ [Symbol.toPrimitive]: function() { >+ return 0b101n; >+ }, >+ >+ valueOf: err, >+ toString: err >+} ^ 0b011n, 0b110n, 'The result of (({[Symbol.toPrimitive]: function() {return 0b101n;}, valueOf: err, toString: err}) ^ 0b011n) is 0b110n'); >+ >+assert.sameValue(0b011n ^ { >+ [Symbol.toPrimitive]: function() { >+ return 0b101n; >+ }, >+ >+ valueOf: err, >+ toString: err >+}, 0b110n, 'The result of (0b011n ^ {[Symbol.toPrimitive]: function() {return 0b101n;}, valueOf: err, toString: err}) is 0b110n'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 0b101n; >+ }, >+ >+ toString: err >+} ^ 0b011n, 0b110n, 'The result of (({valueOf: function() {return 0b101n;}, toString: err}) ^ 0b011n) is 0b110n'); >+ >+assert.sameValue(0b011n ^ { >+ valueOf: function() { >+ return 0b101n; >+ }, >+ >+ toString: err >+}, 0b110n, 'The result of (0b011n ^ {valueOf: function() {return 0b101n;}, toString: err}) is 0b110n'); >+ >+assert.sameValue({ >+ toString: function() { >+ return 0b101n; >+ } >+} ^ 0b011n, 0b110n, 'The result of (({toString: function() {return 0b101n;}}) ^ 0b011n) is 0b110n'); >+ >+assert.sameValue(0b011n ^ { >+ toString: function() { >+ return 0b101n; >+ } >+}, 0b110n, 'The result of (0b011n ^ {toString: function() {return 0b101n;}}) is 0b110n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/bitwise-xor/bigint-toprimitive.js b/JSTests/test262/test/language/expressions/bitwise-xor/bigint-toprimitive.js >index 139c6990dae3eb7bd9a951c3413ccb135aac7743..e777196ff03ada45013c016c9a2f23db343ad1a9 100644 >--- a/JSTests/test262/test/language/expressions/bitwise-xor/bigint-toprimitive.js >+++ b/JSTests/test262/test/language/expressions/bitwise-xor/bigint-toprimitive.js >@@ -5,304 +5,368 @@ > esid: sec-binary-bitwise-operators-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >- > function err() { > throw new Test262Error(); > } > > function MyError() {} > >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}) ^ 3n, 1n, "ToPrimitive: @@toPrimitive takes precedence"); >+} ^ 3n, 1n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) ^ 3n) is 1n'); >+ > assert.sameValue(3n ^ { > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}, 1n, "ToPrimitive: @@toPrimitive takes precedence"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n ^ {[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > }, >+ > toString: err >-}) ^ 3n, 1n, "ToPrimitive: valueOf takes precedence over toString"); >+} ^ 3n, 1n, 'The result of (({valueOf: function() {return 2n;}, toString: err}) ^ 3n) is 1n'); >+ > assert.sameValue(3n ^ { > valueOf: function() { > return 2n; > }, >+ > toString: err >-}, 1n, "ToPrimitive: valueOf takes precedence over toString"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n ^ {valueOf: function() {return 2n;}, toString: err}) is 1n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) ^ 3n, 1n, "ToPrimitive: toString with no valueOf"); >+} ^ 3n, 1n, 'The result of (({toString: function() {return 2n;}}) ^ 3n) is 1n'); >+ > assert.sameValue(3n ^ { > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: toString with no valueOf"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n ^ {toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}) ^ 3n, 1n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >+} ^ 3n, 1n, 'The result of (({[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) ^ 3n) is 1n'); >+ > assert.sameValue(3n ^ { > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n ^ {[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}) ^ 3n, 1n, "ToPrimitive: skip @@toPrimitive when it's null"); >+} ^ 3n, 1n, 'The result of (({[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) ^ 3n) is 1n'); >+ > assert.sameValue(3n ^ { > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip @@toPrimitive when it's null"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n ^ {[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: null, >+ > toString: function() { > return 2n; > } >-}) ^ 3n, 1n, "ToPrimitive: skip valueOf when it's not callable"); >+} ^ 3n, 1n, 'The result of (({valueOf: null, toString: function() {return 2n;}}) ^ 3n) is 1n'); >+ > assert.sameValue(3n ^ { > valueOf: null, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n ^ {valueOf: null, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}) ^ 3n, 1n, "ToPrimitive: skip valueOf when it's not callable"); >+} ^ 3n, 1n, 'The result of (({valueOf: 1, toString: function() {return 2n;}}) ^ 3n) is 1n'); >+ > assert.sameValue(3n ^ { > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n ^ {valueOf: 1, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}) ^ 3n, 1n, "ToPrimitive: skip valueOf when it's not callable"); >+} ^ 3n, 1n, 'The result of (({valueOf: {}, toString: function() {return 2n;}}) ^ 3n) is 1n'); >+ > assert.sameValue(3n ^ { > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n ^ {valueOf: {}, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}) ^ 3n, 1n, "ToPrimitive: skip valueOf when it returns an object"); >+} ^ 3n, 1n, 'The result of (({valueOf: function() {return {};}, toString: function() {return 2n;}}) ^ 3n) is 1n'); >+ > assert.sameValue(3n ^ { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it returns an object"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n ^ {valueOf: function() {return {};}, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}) ^ 3n, 1n, "ToPrimitive: skip valueOf when it returns an object"); >+} ^ 3n, 1n, 'The result of (({valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) ^ 3n) is 1n'); >+ > assert.sameValue(3n ^ { > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it returns an object"); >+}, 1n, 'The result of (3n ^ {valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) is 1n'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: 1 > }) ^ 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: 1}) ^ 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ^ { > [Symbol.toPrimitive]: 1 > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n ^ {[Symbol.toPrimitive]: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: {} > }) ^ 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: {}}) ^ 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ^ { > [Symbol.toPrimitive]: {} > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n ^ {[Symbol.toPrimitive]: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return Object(1); > } > }) ^ 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return Object(1);}}) ^ 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ^ { > [Symbol.toPrimitive]: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n ^ {[Symbol.toPrimitive]: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return {}; > } > }) ^ 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return {};}}) ^ 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ^ { > [Symbol.toPrimitive]: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n ^ {[Symbol.toPrimitive]: function() {return {};}} throws TypeError'); >+ > assert.throws(MyError, function() { > ({ > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }) ^ 0n; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '({[Symbol.toPrimitive]: function() {throw new MyError();}}) ^ 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n ^ { > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '0n ^ {[Symbol.toPrimitive]: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > valueOf: function() { > throw new MyError(); > } > }) ^ 0n; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '({valueOf: function() {throw new MyError();}}) ^ 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n ^ { > valueOf: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '0n ^ {valueOf: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > toString: function() { > throw new MyError(); > } > }) ^ 0n; >-}, "ToPrimitive: propagate errors from toString"); >+}, '({toString: function() {throw new MyError();}}) ^ 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n ^ { > toString: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from toString"); >+}, '0n ^ {toString: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: null, > toString: null > }) ^ 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: null, toString: null}) ^ 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ^ { > valueOf: null, > toString: null > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n ^ {valueOf: null, toString: null} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: 1, > toString: 1 > }) ^ 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: 1, toString: 1}) ^ 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ^ { > valueOf: 1, > toString: 1 > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n ^ {valueOf: 1, toString: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: {}, > toString: {} > }) ^ 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: {}, toString: {}}) ^ 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ^ { > valueOf: {}, > toString: {} > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n ^ {valueOf: {}, toString: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }) ^ 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return Object(1);}, toString: function() {return Object(1);}}) ^ 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ^ { > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n ^ {valueOf: function() {return Object(1);}, toString: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }) ^ 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return {};}, toString: function() {return {};}}) ^ 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ^ { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n ^ {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/bitwise-xor/bigint-wrapped-values.js b/JSTests/test262/test/language/expressions/bitwise-xor/bigint-wrapped-values.js >index 4970575032661ce5b3d299a4081613a636068c84..36d61d6405715c2a53e3565df15f974beaa926f0 100644 >--- a/JSTests/test262/test/language/expressions/bitwise-xor/bigint-wrapped-values.js >+++ b/JSTests/test262/test/language/expressions/bitwise-xor/bigint-wrapped-values.js >@@ -5,36 +5,41 @@ > esid: sec-binary-bitwise-operators-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >+assert.sameValue(Object(2n) ^ 3n, 1n, 'The result of (Object(2n) ^ 3n) is 1n'); >+assert.sameValue(3n ^ Object(2n), 1n, 'The result of (3n ^ Object(2n)) is 1n'); > >-assert.sameValue(Object(2n) ^ 3n, 1n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(3n ^ Object(2n), 1n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > } >-}) ^ 3n, 1n, "ToPrimitive: @@toPrimitive"); >+} ^ 3n, 1n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}}) ^ 3n) is 1n'); >+ > assert.sameValue(3n ^ { > [Symbol.toPrimitive]: function() { > return 2n; > } >-}, 1n, "ToPrimitive: @@toPrimitive"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n ^ {[Symbol.toPrimitive]: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > } >-}) ^ 3n, 1n, "ToPrimitive: valueOf"); >+} ^ 3n, 1n, 'The result of (({valueOf: function() {return 2n;}}) ^ 3n) is 1n'); >+ > assert.sameValue(3n ^ { > valueOf: function() { > return 2n; > } >-}, 1n, "ToPrimitive: valueOf"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n ^ {valueOf: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) ^ 3n, 1n, "ToPrimitive: toString"); >+} ^ 3n, 1n, 'The result of (({toString: function() {return 2n;}}) ^ 3n) is 1n'); >+ > assert.sameValue(3n ^ { > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: toString"); >+}, 1n, 'The result of (3n ^ {toString: function() {return 2n;}}) is 1n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/division/bigint-and-number.js b/JSTests/test262/test/language/expressions/division/bigint-and-number.js >index fd7a6d0613a98b18909ece3f2c60d5a133d0261b..22d1ef4c247ce29c05473613681047a37c2c65e9 100644 >--- a/JSTests/test262/test/language/expressions/division/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/division/bigint-and-number.js >@@ -9,24 +9,82 @@ > Let rnum be ? ToNumeric(rightValue). > If Type(lnum) does not equal Type(rnum), throw a TypeError exception. > ---*/ >+assert.throws(TypeError, function() { >+ 1n / 1; >+}, '1n / 1 throws TypeError'); > >-assert.throws(TypeError, function() { 1n / 1; }, "1n / 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 / 1n; }, "1 / 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) / 1; }, "Object(1n) / 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 / Object(1n); }, "1 / Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n / Object(1); }, "1n / Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) / 1n; }, "Object(1) / 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) / Object(1); }, "Object(1n) / Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) / Object(1n); }, "Object(1) / Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n / NaN; }, "1n / NaN throws TypeError"); >-assert.throws(TypeError, function() { NaN / 1n; }, "NaN / 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n / Infinity; }, "1n / Infinity throws TypeError"); >-assert.throws(TypeError, function() { Infinity / 1n; }, "Infinity / 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n / true; }, "1n / true throws TypeError"); >-assert.throws(TypeError, function() { true / 1n; }, "true / 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n / "1"; }, '1n / "1" throws TypeError'); >-assert.throws(TypeError, function() { "1" / 1n; }, '"1" / 1n throws TypeError'); >-assert.throws(TypeError, function() { 1n / null; }, "1n / null throws TypeError"); >-assert.throws(TypeError, function() { null / 1n; }, "null / 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n / undefined; }, "1n / undefined throws TypeError"); >-assert.throws(TypeError, function() { undefined / 1n; }, "undefined / 1n throws TypeError"); >+assert.throws(TypeError, function() { >+ 1 / 1n; >+}, '1 / 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) / 1; >+}, 'Object(1n) / 1 throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1 / Object(1n); >+}, '1 / Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n / Object(1); >+}, '1n / Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) / 1n; >+}, 'Object(1) / 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) / Object(1); >+}, 'Object(1n) / Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) / Object(1n); >+}, 'Object(1) / Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n / NaN; >+}, '1n / NaN throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ NaN / 1n; >+}, 'NaN / 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n / Infinity; >+}, '1n / Infinity throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Infinity / 1n; >+}, 'Infinity / 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n / true; >+}, '1n / true throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ true / 1n; >+}, 'true / 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n / '1'; >+}, '1n / "1" throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ '1' / 1n; >+}, '"1" / 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n / null; >+}, '1n / null throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ null / 1n; >+}, 'null / 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n / undefined; >+}, '1n / undefined throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ undefined / 1n; >+}, 'undefined / 1n throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/division/bigint-arithmetic.js b/JSTests/test262/test/language/expressions/division/bigint-arithmetic.js >index 9cfcd8cd83ce330d1ca60b0136e66edb08869823..2a44f892fd1f8ecaac00e189f6e6aff5995a1e7d 100644 >--- a/JSTests/test262/test/language/expressions/division/bigint-arithmetic.js >+++ b/JSTests/test262/test/language/expressions/division/bigint-arithmetic.js >@@ -1,269 +1,1070 @@ > // Copyright (C) 2017 Robin Templeton. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > esid: sec-multiplicative-operators-runtime-semantics-evaluation > description: BigInt division arithmetic > features: [BigInt] > ---*/ >+assert.sameValue( >+ 0xFEDCBA9876543210n / 0xFEDCBA9876543210n, >+ 0x1n, >+ 'The result of (0xFEDCBA9876543210n / 0xFEDCBA9876543210n) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n / 0xFEDCBA987654320Fn, >+ 0x1n, >+ 'The result of (0xFEDCBA9876543210n / 0xFEDCBA987654320Fn) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n / 0xFEDCBA98n, >+ 0x100000000n, >+ 'The result of (0xFEDCBA9876543210n / 0xFEDCBA98n) is 0x100000000n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n / 0xFEDCBA97n, >+ 0x100000001n, >+ 'The result of (0xFEDCBA9876543210n / 0xFEDCBA97n) is 0x100000001n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n / 0x1234n, >+ 0xE0042813BE5DCn, >+ 'The result of (0xFEDCBA9876543210n / 0x1234n) is 0xE0042813BE5DCn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n / 0x3n, >+ 0x54F43E32D21C10B0n, >+ 'The result of (0xFEDCBA9876543210n / 0x3n) is 0x54F43E32D21C10B0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n / 0x2n, >+ 0x7F6E5D4C3B2A1908n, >+ 'The result of (0xFEDCBA9876543210n / 0x2n) is 0x7F6E5D4C3B2A1908n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n / 0x1n, >+ 0xFEDCBA9876543210n, >+ 'The result of (0xFEDCBA9876543210n / 0x1n) is 0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n / -0x1n, >+ -0xFEDCBA9876543210n, >+ 'The result of (0xFEDCBA9876543210n / -0x1n) is -0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n / -0x2n, >+ -0x7F6E5D4C3B2A1908n, >+ 'The result of (0xFEDCBA9876543210n / -0x2n) is -0x7F6E5D4C3B2A1908n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n / -0x3n, >+ -0x54F43E32D21C10B0n, >+ 'The result of (0xFEDCBA9876543210n / -0x3n) is -0x54F43E32D21C10B0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n / -0x1234n, >+ -0xE0042813BE5DCn, >+ 'The result of (0xFEDCBA9876543210n / -0x1234n) is -0xE0042813BE5DCn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n / -0xFEDCBA97n, >+ -0x100000001n, >+ 'The result of (0xFEDCBA9876543210n / -0xFEDCBA97n) is -0x100000001n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n / -0xFEDCBA98n, >+ -0x100000000n, >+ 'The result of (0xFEDCBA9876543210n / -0xFEDCBA98n) is -0x100000000n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n / -0xFEDCBA987654320Fn, >+ -0x1n, >+ 'The result of (0xFEDCBA9876543210n / -0xFEDCBA987654320Fn) is -0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n / -0xFEDCBA9876543210n, >+ -0x1n, >+ 'The result of (0xFEDCBA9876543210n / -0xFEDCBA9876543210n) is -0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn / 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0xFEDCBA987654320Fn / 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn / 0xFEDCBA987654320Fn, >+ 0x1n, >+ 'The result of (0xFEDCBA987654320Fn / 0xFEDCBA987654320Fn) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn / 0xFEDCBA98n, >+ 0x100000000n, >+ 'The result of (0xFEDCBA987654320Fn / 0xFEDCBA98n) is 0x100000000n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn / 0xFEDCBA97n, >+ 0x100000001n, >+ 'The result of (0xFEDCBA987654320Fn / 0xFEDCBA97n) is 0x100000001n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn / 0x1234n, >+ 0xE0042813BE5DCn, >+ 'The result of (0xFEDCBA987654320Fn / 0x1234n) is 0xE0042813BE5DCn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn / 0x3n, >+ 0x54F43E32D21C10AFn, >+ 'The result of (0xFEDCBA987654320Fn / 0x3n) is 0x54F43E32D21C10AFn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn / 0x2n, >+ 0x7F6E5D4C3B2A1907n, >+ 'The result of (0xFEDCBA987654320Fn / 0x2n) is 0x7F6E5D4C3B2A1907n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn / 0x1n, >+ 0xFEDCBA987654320Fn, >+ 'The result of (0xFEDCBA987654320Fn / 0x1n) is 0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn / -0x1n, >+ -0xFEDCBA987654320Fn, >+ 'The result of (0xFEDCBA987654320Fn / -0x1n) is -0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn / -0x2n, >+ -0x7F6E5D4C3B2A1907n, >+ 'The result of (0xFEDCBA987654320Fn / -0x2n) is -0x7F6E5D4C3B2A1907n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn / -0x3n, >+ -0x54F43E32D21C10AFn, >+ 'The result of (0xFEDCBA987654320Fn / -0x3n) is -0x54F43E32D21C10AFn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn / -0x1234n, >+ -0xE0042813BE5DCn, >+ 'The result of (0xFEDCBA987654320Fn / -0x1234n) is -0xE0042813BE5DCn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn / -0xFEDCBA97n, >+ -0x100000001n, >+ 'The result of (0xFEDCBA987654320Fn / -0xFEDCBA97n) is -0x100000001n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn / -0xFEDCBA98n, >+ -0x100000000n, >+ 'The result of (0xFEDCBA987654320Fn / -0xFEDCBA98n) is -0x100000000n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn / -0xFEDCBA987654320Fn, >+ -0x1n, >+ 'The result of (0xFEDCBA987654320Fn / -0xFEDCBA987654320Fn) is -0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn / -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0xFEDCBA987654320Fn / -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n / 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0xFEDCBA98n / 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n / 0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0xFEDCBA98n / 0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n / 0xFEDCBA98n, >+ 0x1n, >+ 'The result of (0xFEDCBA98n / 0xFEDCBA98n) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n / 0xFEDCBA97n, >+ 0x1n, >+ 'The result of (0xFEDCBA98n / 0xFEDCBA97n) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n / 0x1234n, >+ 0xE0042n, >+ 'The result of (0xFEDCBA98n / 0x1234n) is 0xE0042n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n / 0x3n, >+ 0x54F43E32n, >+ 'The result of (0xFEDCBA98n / 0x3n) is 0x54F43E32n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n / 0x2n, >+ 0x7F6E5D4Cn, >+ 'The result of (0xFEDCBA98n / 0x2n) is 0x7F6E5D4Cn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n / 0x1n, >+ 0xFEDCBA98n, >+ 'The result of (0xFEDCBA98n / 0x1n) is 0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n / -0x1n, >+ -0xFEDCBA98n, >+ 'The result of (0xFEDCBA98n / -0x1n) is -0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n / -0x2n, >+ -0x7F6E5D4Cn, >+ 'The result of (0xFEDCBA98n / -0x2n) is -0x7F6E5D4Cn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n / -0x3n, >+ -0x54F43E32n, >+ 'The result of (0xFEDCBA98n / -0x3n) is -0x54F43E32n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n / -0x1234n, >+ -0xE0042n, >+ 'The result of (0xFEDCBA98n / -0x1234n) is -0xE0042n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n / -0xFEDCBA97n, >+ -0x1n, >+ 'The result of (0xFEDCBA98n / -0xFEDCBA97n) is -0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n / -0xFEDCBA98n, >+ -0x1n, >+ 'The result of (0xFEDCBA98n / -0xFEDCBA98n) is -0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n / -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0xFEDCBA98n / -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n / -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0xFEDCBA98n / -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n / 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0xFEDCBA97n / 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n / 0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0xFEDCBA97n / 0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n / 0xFEDCBA98n, >+ 0x0n, >+ 'The result of (0xFEDCBA97n / 0xFEDCBA98n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n / 0xFEDCBA97n, >+ 0x1n, >+ 'The result of (0xFEDCBA97n / 0xFEDCBA97n) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n / 0x1234n, >+ 0xE0042n, >+ 'The result of (0xFEDCBA97n / 0x1234n) is 0xE0042n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n / 0x3n, >+ 0x54F43E32n, >+ 'The result of (0xFEDCBA97n / 0x3n) is 0x54F43E32n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n / 0x2n, >+ 0x7F6E5D4Bn, >+ 'The result of (0xFEDCBA97n / 0x2n) is 0x7F6E5D4Bn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n / 0x1n, >+ 0xFEDCBA97n, >+ 'The result of (0xFEDCBA97n / 0x1n) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n / -0x1n, >+ -0xFEDCBA97n, >+ 'The result of (0xFEDCBA97n / -0x1n) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n / -0x2n, >+ -0x7F6E5D4Bn, >+ 'The result of (0xFEDCBA97n / -0x2n) is -0x7F6E5D4Bn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n / -0x3n, >+ -0x54F43E32n, >+ 'The result of (0xFEDCBA97n / -0x3n) is -0x54F43E32n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n / -0x1234n, >+ -0xE0042n, >+ 'The result of (0xFEDCBA97n / -0x1234n) is -0xE0042n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n / -0xFEDCBA97n, >+ -0x1n, >+ 'The result of (0xFEDCBA97n / -0xFEDCBA97n) is -0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n / -0xFEDCBA98n, >+ 0x0n, >+ 'The result of (0xFEDCBA97n / -0xFEDCBA98n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n / -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0xFEDCBA97n / -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n / -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0xFEDCBA97n / -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0x1234n / 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0x1234n / 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0x1234n / 0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0x1234n / 0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue(0x1234n / 0xFEDCBA98n, 0x0n, 'The result of (0x1234n / 0xFEDCBA98n) is 0x0n'); >+assert.sameValue(0x1234n / 0xFEDCBA97n, 0x0n, 'The result of (0x1234n / 0xFEDCBA97n) is 0x0n'); >+assert.sameValue(0x1234n / 0x1234n, 0x1n, 'The result of (0x1234n / 0x1234n) is 0x1n'); >+assert.sameValue(0x1234n / 0x3n, 0x611n, 'The result of (0x1234n / 0x3n) is 0x611n'); >+assert.sameValue(0x1234n / 0x2n, 0x91An, 'The result of (0x1234n / 0x2n) is 0x91An'); >+assert.sameValue(0x1234n / 0x1n, 0x1234n, 'The result of (0x1234n / 0x1n) is 0x1234n'); >+assert.sameValue(0x1234n / -0x1n, -0x1234n, 'The result of (0x1234n / -0x1n) is -0x1234n'); >+assert.sameValue(0x1234n / -0x2n, -0x91An, 'The result of (0x1234n / -0x2n) is -0x91An'); >+assert.sameValue(0x1234n / -0x3n, -0x611n, 'The result of (0x1234n / -0x3n) is -0x611n'); >+assert.sameValue(0x1234n / -0x1234n, -0x1n, 'The result of (0x1234n / -0x1234n) is -0x1n'); >+assert.sameValue(0x1234n / -0xFEDCBA97n, 0x0n, 'The result of (0x1234n / -0xFEDCBA97n) is 0x0n'); >+assert.sameValue(0x1234n / -0xFEDCBA98n, 0x0n, 'The result of (0x1234n / -0xFEDCBA98n) is 0x0n'); >+ >+assert.sameValue( >+ 0x1234n / -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0x1234n / -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ 0x1234n / -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0x1234n / -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0x3n / 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0x3n / 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0x3n / 0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0x3n / 0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue(0x3n / 0xFEDCBA98n, 0x0n, 'The result of (0x3n / 0xFEDCBA98n) is 0x0n'); >+assert.sameValue(0x3n / 0xFEDCBA97n, 0x0n, 'The result of (0x3n / 0xFEDCBA97n) is 0x0n'); >+assert.sameValue(0x3n / 0x1234n, 0x0n, 'The result of (0x3n / 0x1234n) is 0x0n'); >+assert.sameValue(0x3n / 0x3n, 0x1n, 'The result of (0x3n / 0x3n) is 0x1n'); >+assert.sameValue(0x3n / 0x2n, 0x1n, 'The result of (0x3n / 0x2n) is 0x1n'); >+assert.sameValue(0x3n / 0x1n, 0x3n, 'The result of (0x3n / 0x1n) is 0x3n'); >+assert.sameValue(0x3n / -0x1n, -0x3n, 'The result of (0x3n / -0x1n) is -0x3n'); >+assert.sameValue(0x3n / -0x2n, -0x1n, 'The result of (0x3n / -0x2n) is -0x1n'); >+assert.sameValue(0x3n / -0x3n, -0x1n, 'The result of (0x3n / -0x3n) is -0x1n'); >+assert.sameValue(0x3n / -0x1234n, 0x0n, 'The result of (0x3n / -0x1234n) is 0x0n'); >+assert.sameValue(0x3n / -0xFEDCBA97n, 0x0n, 'The result of (0x3n / -0xFEDCBA97n) is 0x0n'); >+assert.sameValue(0x3n / -0xFEDCBA98n, 0x0n, 'The result of (0x3n / -0xFEDCBA98n) is 0x0n'); >+ >+assert.sameValue( >+ 0x3n / -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0x3n / -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ 0x3n / -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0x3n / -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0x2n / 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0x2n / 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0x2n / 0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0x2n / 0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue(0x2n / 0xFEDCBA98n, 0x0n, 'The result of (0x2n / 0xFEDCBA98n) is 0x0n'); >+assert.sameValue(0x2n / 0xFEDCBA97n, 0x0n, 'The result of (0x2n / 0xFEDCBA97n) is 0x0n'); >+assert.sameValue(0x2n / 0x1234n, 0x0n, 'The result of (0x2n / 0x1234n) is 0x0n'); >+assert.sameValue(0x2n / 0x3n, 0x0n, 'The result of (0x2n / 0x3n) is 0x0n'); >+assert.sameValue(0x2n / 0x2n, 0x1n, 'The result of (0x2n / 0x2n) is 0x1n'); >+assert.sameValue(0x2n / 0x1n, 0x2n, 'The result of (0x2n / 0x1n) is 0x2n'); >+assert.sameValue(0x2n / -0x1n, -0x2n, 'The result of (0x2n / -0x1n) is -0x2n'); >+assert.sameValue(0x2n / -0x2n, -0x1n, 'The result of (0x2n / -0x2n) is -0x1n'); >+assert.sameValue(0x2n / -0x3n, 0x0n, 'The result of (0x2n / -0x3n) is 0x0n'); >+assert.sameValue(0x2n / -0x1234n, 0x0n, 'The result of (0x2n / -0x1234n) is 0x0n'); >+assert.sameValue(0x2n / -0xFEDCBA97n, 0x0n, 'The result of (0x2n / -0xFEDCBA97n) is 0x0n'); >+assert.sameValue(0x2n / -0xFEDCBA98n, 0x0n, 'The result of (0x2n / -0xFEDCBA98n) is 0x0n'); >+ >+assert.sameValue( >+ 0x2n / -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0x2n / -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ 0x2n / -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0x2n / -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0x1n / 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0x1n / 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0x1n / 0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0x1n / 0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue(0x1n / 0xFEDCBA98n, 0x0n, 'The result of (0x1n / 0xFEDCBA98n) is 0x0n'); >+assert.sameValue(0x1n / 0xFEDCBA97n, 0x0n, 'The result of (0x1n / 0xFEDCBA97n) is 0x0n'); >+assert.sameValue(0x1n / 0x1234n, 0x0n, 'The result of (0x1n / 0x1234n) is 0x0n'); >+assert.sameValue(0x1n / 0x3n, 0x0n, 'The result of (0x1n / 0x3n) is 0x0n'); >+assert.sameValue(0x1n / 0x2n, 0x0n, 'The result of (0x1n / 0x2n) is 0x0n'); >+assert.sameValue(0x1n / 0x1n, 0x1n, 'The result of (0x1n / 0x1n) is 0x1n'); >+assert.sameValue(0x1n / -0x1n, -0x1n, 'The result of (0x1n / -0x1n) is -0x1n'); >+assert.sameValue(0x1n / -0x2n, 0x0n, 'The result of (0x1n / -0x2n) is 0x0n'); >+assert.sameValue(0x1n / -0x3n, 0x0n, 'The result of (0x1n / -0x3n) is 0x0n'); >+assert.sameValue(0x1n / -0x1234n, 0x0n, 'The result of (0x1n / -0x1234n) is 0x0n'); >+assert.sameValue(0x1n / -0xFEDCBA97n, 0x0n, 'The result of (0x1n / -0xFEDCBA97n) is 0x0n'); >+assert.sameValue(0x1n / -0xFEDCBA98n, 0x0n, 'The result of (0x1n / -0xFEDCBA98n) is 0x0n'); >+ >+assert.sameValue( >+ 0x1n / -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0x1n / -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ 0x1n / -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0x1n / -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0x1n / 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0x1n / 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0x1n / 0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (-0x1n / 0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue(-0x1n / 0xFEDCBA98n, 0x0n, 'The result of (-0x1n / 0xFEDCBA98n) is 0x0n'); >+assert.sameValue(-0x1n / 0xFEDCBA97n, 0x0n, 'The result of (-0x1n / 0xFEDCBA97n) is 0x0n'); >+assert.sameValue(-0x1n / 0x1234n, 0x0n, 'The result of (-0x1n / 0x1234n) is 0x0n'); >+assert.sameValue(-0x1n / 0x3n, 0x0n, 'The result of (-0x1n / 0x3n) is 0x0n'); >+assert.sameValue(-0x1n / 0x2n, 0x0n, 'The result of (-0x1n / 0x2n) is 0x0n'); >+assert.sameValue(-0x1n / 0x1n, -0x1n, 'The result of (-0x1n / 0x1n) is -0x1n'); >+assert.sameValue(-0x1n / -0x1n, 0x1n, 'The result of (-0x1n / -0x1n) is 0x1n'); >+assert.sameValue(-0x1n / -0x2n, 0x0n, 'The result of (-0x1n / -0x2n) is 0x0n'); >+assert.sameValue(-0x1n / -0x3n, 0x0n, 'The result of (-0x1n / -0x3n) is 0x0n'); >+assert.sameValue(-0x1n / -0x1234n, 0x0n, 'The result of (-0x1n / -0x1234n) is 0x0n'); >+assert.sameValue(-0x1n / -0xFEDCBA97n, 0x0n, 'The result of (-0x1n / -0xFEDCBA97n) is 0x0n'); >+assert.sameValue(-0x1n / -0xFEDCBA98n, 0x0n, 'The result of (-0x1n / -0xFEDCBA98n) is 0x0n'); >+ >+assert.sameValue( >+ -0x1n / -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (-0x1n / -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ -0x1n / -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0x1n / -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0x2n / 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0x2n / 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0x2n / 0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (-0x2n / 0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue(-0x2n / 0xFEDCBA98n, 0x0n, 'The result of (-0x2n / 0xFEDCBA98n) is 0x0n'); >+assert.sameValue(-0x2n / 0xFEDCBA97n, 0x0n, 'The result of (-0x2n / 0xFEDCBA97n) is 0x0n'); >+assert.sameValue(-0x2n / 0x1234n, 0x0n, 'The result of (-0x2n / 0x1234n) is 0x0n'); >+assert.sameValue(-0x2n / 0x3n, 0x0n, 'The result of (-0x2n / 0x3n) is 0x0n'); >+assert.sameValue(-0x2n / 0x2n, -0x1n, 'The result of (-0x2n / 0x2n) is -0x1n'); >+assert.sameValue(-0x2n / 0x1n, -0x2n, 'The result of (-0x2n / 0x1n) is -0x2n'); >+assert.sameValue(-0x2n / -0x1n, 0x2n, 'The result of (-0x2n / -0x1n) is 0x2n'); >+assert.sameValue(-0x2n / -0x2n, 0x1n, 'The result of (-0x2n / -0x2n) is 0x1n'); >+assert.sameValue(-0x2n / -0x3n, 0x0n, 'The result of (-0x2n / -0x3n) is 0x0n'); >+assert.sameValue(-0x2n / -0x1234n, 0x0n, 'The result of (-0x2n / -0x1234n) is 0x0n'); >+assert.sameValue(-0x2n / -0xFEDCBA97n, 0x0n, 'The result of (-0x2n / -0xFEDCBA97n) is 0x0n'); >+assert.sameValue(-0x2n / -0xFEDCBA98n, 0x0n, 'The result of (-0x2n / -0xFEDCBA98n) is 0x0n'); >+ >+assert.sameValue( >+ -0x2n / -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (-0x2n / -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ -0x2n / -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0x2n / -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0x3n / 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0x3n / 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0x3n / 0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (-0x3n / 0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue(-0x3n / 0xFEDCBA98n, 0x0n, 'The result of (-0x3n / 0xFEDCBA98n) is 0x0n'); >+assert.sameValue(-0x3n / 0xFEDCBA97n, 0x0n, 'The result of (-0x3n / 0xFEDCBA97n) is 0x0n'); >+assert.sameValue(-0x3n / 0x1234n, 0x0n, 'The result of (-0x3n / 0x1234n) is 0x0n'); >+assert.sameValue(-0x3n / 0x3n, -0x1n, 'The result of (-0x3n / 0x3n) is -0x1n'); >+assert.sameValue(-0x3n / 0x2n, -0x1n, 'The result of (-0x3n / 0x2n) is -0x1n'); >+assert.sameValue(-0x3n / 0x1n, -0x3n, 'The result of (-0x3n / 0x1n) is -0x3n'); >+assert.sameValue(-0x3n / -0x1n, 0x3n, 'The result of (-0x3n / -0x1n) is 0x3n'); >+assert.sameValue(-0x3n / -0x2n, 0x1n, 'The result of (-0x3n / -0x2n) is 0x1n'); >+assert.sameValue(-0x3n / -0x3n, 0x1n, 'The result of (-0x3n / -0x3n) is 0x1n'); >+assert.sameValue(-0x3n / -0x1234n, 0x0n, 'The result of (-0x3n / -0x1234n) is 0x0n'); >+assert.sameValue(-0x3n / -0xFEDCBA97n, 0x0n, 'The result of (-0x3n / -0xFEDCBA97n) is 0x0n'); >+assert.sameValue(-0x3n / -0xFEDCBA98n, 0x0n, 'The result of (-0x3n / -0xFEDCBA98n) is 0x0n'); >+ >+assert.sameValue( >+ -0x3n / -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (-0x3n / -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ -0x3n / -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0x3n / -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0x1234n / 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0x1234n / 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0x1234n / 0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (-0x1234n / 0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue(-0x1234n / 0xFEDCBA98n, 0x0n, 'The result of (-0x1234n / 0xFEDCBA98n) is 0x0n'); >+assert.sameValue(-0x1234n / 0xFEDCBA97n, 0x0n, 'The result of (-0x1234n / 0xFEDCBA97n) is 0x0n'); >+assert.sameValue(-0x1234n / 0x1234n, -0x1n, 'The result of (-0x1234n / 0x1234n) is -0x1n'); >+assert.sameValue(-0x1234n / 0x3n, -0x611n, 'The result of (-0x1234n / 0x3n) is -0x611n'); >+assert.sameValue(-0x1234n / 0x2n, -0x91An, 'The result of (-0x1234n / 0x2n) is -0x91An'); >+assert.sameValue(-0x1234n / 0x1n, -0x1234n, 'The result of (-0x1234n / 0x1n) is -0x1234n'); >+assert.sameValue(-0x1234n / -0x1n, 0x1234n, 'The result of (-0x1234n / -0x1n) is 0x1234n'); >+assert.sameValue(-0x1234n / -0x2n, 0x91An, 'The result of (-0x1234n / -0x2n) is 0x91An'); >+assert.sameValue(-0x1234n / -0x3n, 0x611n, 'The result of (-0x1234n / -0x3n) is 0x611n'); >+assert.sameValue(-0x1234n / -0x1234n, 0x1n, 'The result of (-0x1234n / -0x1234n) is 0x1n'); >+assert.sameValue(-0x1234n / -0xFEDCBA97n, 0x0n, 'The result of (-0x1234n / -0xFEDCBA97n) is 0x0n'); >+assert.sameValue(-0x1234n / -0xFEDCBA98n, 0x0n, 'The result of (-0x1234n / -0xFEDCBA98n) is 0x0n'); >+ >+assert.sameValue( >+ -0x1234n / -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (-0x1234n / -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ -0x1234n / -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0x1234n / -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n / 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0xFEDCBA97n / 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n / 0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (-0xFEDCBA97n / 0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n / 0xFEDCBA98n, >+ 0x0n, >+ 'The result of (-0xFEDCBA97n / 0xFEDCBA98n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n / 0xFEDCBA97n, >+ -0x1n, >+ 'The result of (-0xFEDCBA97n / 0xFEDCBA97n) is -0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n / 0x1234n, >+ -0xE0042n, >+ 'The result of (-0xFEDCBA97n / 0x1234n) is -0xE0042n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n / 0x3n, >+ -0x54F43E32n, >+ 'The result of (-0xFEDCBA97n / 0x3n) is -0x54F43E32n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n / 0x2n, >+ -0x7F6E5D4Bn, >+ 'The result of (-0xFEDCBA97n / 0x2n) is -0x7F6E5D4Bn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n / 0x1n, >+ -0xFEDCBA97n, >+ 'The result of (-0xFEDCBA97n / 0x1n) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n / -0x1n, >+ 0xFEDCBA97n, >+ 'The result of (-0xFEDCBA97n / -0x1n) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n / -0x2n, >+ 0x7F6E5D4Bn, >+ 'The result of (-0xFEDCBA97n / -0x2n) is 0x7F6E5D4Bn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n / -0x3n, >+ 0x54F43E32n, >+ 'The result of (-0xFEDCBA97n / -0x3n) is 0x54F43E32n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n / -0x1234n, >+ 0xE0042n, >+ 'The result of (-0xFEDCBA97n / -0x1234n) is 0xE0042n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n / -0xFEDCBA97n, >+ 0x1n, >+ 'The result of (-0xFEDCBA97n / -0xFEDCBA97n) is 0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n / -0xFEDCBA98n, >+ 0x0n, >+ 'The result of (-0xFEDCBA97n / -0xFEDCBA98n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n / -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (-0xFEDCBA97n / -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n / -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0xFEDCBA97n / -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n / 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0xFEDCBA98n / 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n / 0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (-0xFEDCBA98n / 0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n / 0xFEDCBA98n, >+ -0x1n, >+ 'The result of (-0xFEDCBA98n / 0xFEDCBA98n) is -0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n / 0xFEDCBA97n, >+ -0x1n, >+ 'The result of (-0xFEDCBA98n / 0xFEDCBA97n) is -0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n / 0x1234n, >+ -0xE0042n, >+ 'The result of (-0xFEDCBA98n / 0x1234n) is -0xE0042n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n / 0x3n, >+ -0x54F43E32n, >+ 'The result of (-0xFEDCBA98n / 0x3n) is -0x54F43E32n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n / 0x2n, >+ -0x7F6E5D4Cn, >+ 'The result of (-0xFEDCBA98n / 0x2n) is -0x7F6E5D4Cn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n / 0x1n, >+ -0xFEDCBA98n, >+ 'The result of (-0xFEDCBA98n / 0x1n) is -0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n / -0x1n, >+ 0xFEDCBA98n, >+ 'The result of (-0xFEDCBA98n / -0x1n) is 0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n / -0x2n, >+ 0x7F6E5D4Cn, >+ 'The result of (-0xFEDCBA98n / -0x2n) is 0x7F6E5D4Cn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n / -0x3n, >+ 0x54F43E32n, >+ 'The result of (-0xFEDCBA98n / -0x3n) is 0x54F43E32n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n / -0x1234n, >+ 0xE0042n, >+ 'The result of (-0xFEDCBA98n / -0x1234n) is 0xE0042n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n / -0xFEDCBA97n, >+ 0x1n, >+ 'The result of (-0xFEDCBA98n / -0xFEDCBA97n) is 0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n / -0xFEDCBA98n, >+ 0x1n, >+ 'The result of (-0xFEDCBA98n / -0xFEDCBA98n) is 0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n / -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (-0xFEDCBA98n / -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n / -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0xFEDCBA98n / -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn / 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0xFEDCBA987654320Fn / 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn / 0xFEDCBA987654320Fn, >+ -0x1n, >+ 'The result of (-0xFEDCBA987654320Fn / 0xFEDCBA987654320Fn) is -0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn / 0xFEDCBA98n, >+ -0x100000000n, >+ 'The result of (-0xFEDCBA987654320Fn / 0xFEDCBA98n) is -0x100000000n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn / 0xFEDCBA97n, >+ -0x100000001n, >+ 'The result of (-0xFEDCBA987654320Fn / 0xFEDCBA97n) is -0x100000001n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn / 0x1234n, >+ -0xE0042813BE5DCn, >+ 'The result of (-0xFEDCBA987654320Fn / 0x1234n) is -0xE0042813BE5DCn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn / 0x3n, >+ -0x54F43E32D21C10AFn, >+ 'The result of (-0xFEDCBA987654320Fn / 0x3n) is -0x54F43E32D21C10AFn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn / 0x2n, >+ -0x7F6E5D4C3B2A1907n, >+ 'The result of (-0xFEDCBA987654320Fn / 0x2n) is -0x7F6E5D4C3B2A1907n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn / 0x1n, >+ -0xFEDCBA987654320Fn, >+ 'The result of (-0xFEDCBA987654320Fn / 0x1n) is -0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn / -0x1n, >+ 0xFEDCBA987654320Fn, >+ 'The result of (-0xFEDCBA987654320Fn / -0x1n) is 0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn / -0x2n, >+ 0x7F6E5D4C3B2A1907n, >+ 'The result of (-0xFEDCBA987654320Fn / -0x2n) is 0x7F6E5D4C3B2A1907n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn / -0x3n, >+ 0x54F43E32D21C10AFn, >+ 'The result of (-0xFEDCBA987654320Fn / -0x3n) is 0x54F43E32D21C10AFn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn / -0x1234n, >+ 0xE0042813BE5DCn, >+ 'The result of (-0xFEDCBA987654320Fn / -0x1234n) is 0xE0042813BE5DCn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn / -0xFEDCBA97n, >+ 0x100000001n, >+ 'The result of (-0xFEDCBA987654320Fn / -0xFEDCBA97n) is 0x100000001n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn / -0xFEDCBA98n, >+ 0x100000000n, >+ 'The result of (-0xFEDCBA987654320Fn / -0xFEDCBA98n) is 0x100000000n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn / -0xFEDCBA987654320Fn, >+ 0x1n, >+ 'The result of (-0xFEDCBA987654320Fn / -0xFEDCBA987654320Fn) is 0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn / -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0xFEDCBA987654320Fn / -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n / 0xFEDCBA9876543210n, >+ -0x1n, >+ 'The result of (-0xFEDCBA9876543210n / 0xFEDCBA9876543210n) is -0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n / 0xFEDCBA987654320Fn, >+ -0x1n, >+ 'The result of (-0xFEDCBA9876543210n / 0xFEDCBA987654320Fn) is -0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n / 0xFEDCBA98n, >+ -0x100000000n, >+ 'The result of (-0xFEDCBA9876543210n / 0xFEDCBA98n) is -0x100000000n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n / 0xFEDCBA97n, >+ -0x100000001n, >+ 'The result of (-0xFEDCBA9876543210n / 0xFEDCBA97n) is -0x100000001n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n / 0x1234n, >+ -0xE0042813BE5DCn, >+ 'The result of (-0xFEDCBA9876543210n / 0x1234n) is -0xE0042813BE5DCn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n / 0x3n, >+ -0x54F43E32D21C10B0n, >+ 'The result of (-0xFEDCBA9876543210n / 0x3n) is -0x54F43E32D21C10B0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n / 0x2n, >+ -0x7F6E5D4C3B2A1908n, >+ 'The result of (-0xFEDCBA9876543210n / 0x2n) is -0x7F6E5D4C3B2A1908n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n / 0x1n, >+ -0xFEDCBA9876543210n, >+ 'The result of (-0xFEDCBA9876543210n / 0x1n) is -0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n / -0x1n, >+ 0xFEDCBA9876543210n, >+ 'The result of (-0xFEDCBA9876543210n / -0x1n) is 0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n / -0x2n, >+ 0x7F6E5D4C3B2A1908n, >+ 'The result of (-0xFEDCBA9876543210n / -0x2n) is 0x7F6E5D4C3B2A1908n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n / -0x3n, >+ 0x54F43E32D21C10B0n, >+ 'The result of (-0xFEDCBA9876543210n / -0x3n) is 0x54F43E32D21C10B0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n / -0x1234n, >+ 0xE0042813BE5DCn, >+ 'The result of (-0xFEDCBA9876543210n / -0x1234n) is 0xE0042813BE5DCn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n / -0xFEDCBA97n, >+ 0x100000001n, >+ 'The result of (-0xFEDCBA9876543210n / -0xFEDCBA97n) is 0x100000001n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n / -0xFEDCBA98n, >+ 0x100000000n, >+ 'The result of (-0xFEDCBA9876543210n / -0xFEDCBA98n) is 0x100000000n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n / -0xFEDCBA987654320Fn, >+ 0x1n, >+ 'The result of (-0xFEDCBA9876543210n / -0xFEDCBA987654320Fn) is 0x1n' >+); > >-function testDiv(x, y, z) { >- assert.sameValue(x / y, z, x + " / " + y + " = " + z); >-} >- >-testDiv(0xFEDCBA9876543210n, 0xFEDCBA9876543210n, 0x1n); >-testDiv(0xFEDCBA9876543210n, 0xFEDCBA987654320Fn, 0x1n); >-testDiv(0xFEDCBA9876543210n, 0xFEDCBA98n, 0x100000000n); >-testDiv(0xFEDCBA9876543210n, 0xFEDCBA97n, 0x100000001n); >-testDiv(0xFEDCBA9876543210n, 0x1234n, 0xE0042813BE5DCn); >-testDiv(0xFEDCBA9876543210n, 0x3n, 0x54F43E32D21C10B0n); >-testDiv(0xFEDCBA9876543210n, 0x2n, 0x7F6E5D4C3B2A1908n); >-testDiv(0xFEDCBA9876543210n, 0x1n, 0xFEDCBA9876543210n); >-testDiv(0xFEDCBA9876543210n, -0x1n, -0xFEDCBA9876543210n); >-testDiv(0xFEDCBA9876543210n, -0x2n, -0x7F6E5D4C3B2A1908n); >-testDiv(0xFEDCBA9876543210n, -0x3n, -0x54F43E32D21C10B0n); >-testDiv(0xFEDCBA9876543210n, -0x1234n, -0xE0042813BE5DCn); >-testDiv(0xFEDCBA9876543210n, -0xFEDCBA97n, -0x100000001n); >-testDiv(0xFEDCBA9876543210n, -0xFEDCBA98n, -0x100000000n); >-testDiv(0xFEDCBA9876543210n, -0xFEDCBA987654320Fn, -0x1n); >-testDiv(0xFEDCBA9876543210n, -0xFEDCBA9876543210n, -0x1n); >-testDiv(0xFEDCBA987654320Fn, 0xFEDCBA9876543210n, 0x0n); >-testDiv(0xFEDCBA987654320Fn, 0xFEDCBA987654320Fn, 0x1n); >-testDiv(0xFEDCBA987654320Fn, 0xFEDCBA98n, 0x100000000n); >-testDiv(0xFEDCBA987654320Fn, 0xFEDCBA97n, 0x100000001n); >-testDiv(0xFEDCBA987654320Fn, 0x1234n, 0xE0042813BE5DCn); >-testDiv(0xFEDCBA987654320Fn, 0x3n, 0x54F43E32D21C10AFn); >-testDiv(0xFEDCBA987654320Fn, 0x2n, 0x7F6E5D4C3B2A1907n); >-testDiv(0xFEDCBA987654320Fn, 0x1n, 0xFEDCBA987654320Fn); >-testDiv(0xFEDCBA987654320Fn, -0x1n, -0xFEDCBA987654320Fn); >-testDiv(0xFEDCBA987654320Fn, -0x2n, -0x7F6E5D4C3B2A1907n); >-testDiv(0xFEDCBA987654320Fn, -0x3n, -0x54F43E32D21C10AFn); >-testDiv(0xFEDCBA987654320Fn, -0x1234n, -0xE0042813BE5DCn); >-testDiv(0xFEDCBA987654320Fn, -0xFEDCBA97n, -0x100000001n); >-testDiv(0xFEDCBA987654320Fn, -0xFEDCBA98n, -0x100000000n); >-testDiv(0xFEDCBA987654320Fn, -0xFEDCBA987654320Fn, -0x1n); >-testDiv(0xFEDCBA987654320Fn, -0xFEDCBA9876543210n, 0x0n); >-testDiv(0xFEDCBA98n, 0xFEDCBA9876543210n, 0x0n); >-testDiv(0xFEDCBA98n, 0xFEDCBA987654320Fn, 0x0n); >-testDiv(0xFEDCBA98n, 0xFEDCBA98n, 0x1n); >-testDiv(0xFEDCBA98n, 0xFEDCBA97n, 0x1n); >-testDiv(0xFEDCBA98n, 0x1234n, 0xE0042n); >-testDiv(0xFEDCBA98n, 0x3n, 0x54F43E32n); >-testDiv(0xFEDCBA98n, 0x2n, 0x7F6E5D4Cn); >-testDiv(0xFEDCBA98n, 0x1n, 0xFEDCBA98n); >-testDiv(0xFEDCBA98n, -0x1n, -0xFEDCBA98n); >-testDiv(0xFEDCBA98n, -0x2n, -0x7F6E5D4Cn); >-testDiv(0xFEDCBA98n, -0x3n, -0x54F43E32n); >-testDiv(0xFEDCBA98n, -0x1234n, -0xE0042n); >-testDiv(0xFEDCBA98n, -0xFEDCBA97n, -0x1n); >-testDiv(0xFEDCBA98n, -0xFEDCBA98n, -0x1n); >-testDiv(0xFEDCBA98n, -0xFEDCBA987654320Fn, 0x0n); >-testDiv(0xFEDCBA98n, -0xFEDCBA9876543210n, 0x0n); >-testDiv(0xFEDCBA97n, 0xFEDCBA9876543210n, 0x0n); >-testDiv(0xFEDCBA97n, 0xFEDCBA987654320Fn, 0x0n); >-testDiv(0xFEDCBA97n, 0xFEDCBA98n, 0x0n); >-testDiv(0xFEDCBA97n, 0xFEDCBA97n, 0x1n); >-testDiv(0xFEDCBA97n, 0x1234n, 0xE0042n); >-testDiv(0xFEDCBA97n, 0x3n, 0x54F43E32n); >-testDiv(0xFEDCBA97n, 0x2n, 0x7F6E5D4Bn); >-testDiv(0xFEDCBA97n, 0x1n, 0xFEDCBA97n); >-testDiv(0xFEDCBA97n, -0x1n, -0xFEDCBA97n); >-testDiv(0xFEDCBA97n, -0x2n, -0x7F6E5D4Bn); >-testDiv(0xFEDCBA97n, -0x3n, -0x54F43E32n); >-testDiv(0xFEDCBA97n, -0x1234n, -0xE0042n); >-testDiv(0xFEDCBA97n, -0xFEDCBA97n, -0x1n); >-testDiv(0xFEDCBA97n, -0xFEDCBA98n, 0x0n); >-testDiv(0xFEDCBA97n, -0xFEDCBA987654320Fn, 0x0n); >-testDiv(0xFEDCBA97n, -0xFEDCBA9876543210n, 0x0n); >-testDiv(0x1234n, 0xFEDCBA9876543210n, 0x0n); >-testDiv(0x1234n, 0xFEDCBA987654320Fn, 0x0n); >-testDiv(0x1234n, 0xFEDCBA98n, 0x0n); >-testDiv(0x1234n, 0xFEDCBA97n, 0x0n); >-testDiv(0x1234n, 0x1234n, 0x1n); >-testDiv(0x1234n, 0x3n, 0x611n); >-testDiv(0x1234n, 0x2n, 0x91An); >-testDiv(0x1234n, 0x1n, 0x1234n); >-testDiv(0x1234n, -0x1n, -0x1234n); >-testDiv(0x1234n, -0x2n, -0x91An); >-testDiv(0x1234n, -0x3n, -0x611n); >-testDiv(0x1234n, -0x1234n, -0x1n); >-testDiv(0x1234n, -0xFEDCBA97n, 0x0n); >-testDiv(0x1234n, -0xFEDCBA98n, 0x0n); >-testDiv(0x1234n, -0xFEDCBA987654320Fn, 0x0n); >-testDiv(0x1234n, -0xFEDCBA9876543210n, 0x0n); >-testDiv(0x3n, 0xFEDCBA9876543210n, 0x0n); >-testDiv(0x3n, 0xFEDCBA987654320Fn, 0x0n); >-testDiv(0x3n, 0xFEDCBA98n, 0x0n); >-testDiv(0x3n, 0xFEDCBA97n, 0x0n); >-testDiv(0x3n, 0x1234n, 0x0n); >-testDiv(0x3n, 0x3n, 0x1n); >-testDiv(0x3n, 0x2n, 0x1n); >-testDiv(0x3n, 0x1n, 0x3n); >-testDiv(0x3n, -0x1n, -0x3n); >-testDiv(0x3n, -0x2n, -0x1n); >-testDiv(0x3n, -0x3n, -0x1n); >-testDiv(0x3n, -0x1234n, 0x0n); >-testDiv(0x3n, -0xFEDCBA97n, 0x0n); >-testDiv(0x3n, -0xFEDCBA98n, 0x0n); >-testDiv(0x3n, -0xFEDCBA987654320Fn, 0x0n); >-testDiv(0x3n, -0xFEDCBA9876543210n, 0x0n); >-testDiv(0x2n, 0xFEDCBA9876543210n, 0x0n); >-testDiv(0x2n, 0xFEDCBA987654320Fn, 0x0n); >-testDiv(0x2n, 0xFEDCBA98n, 0x0n); >-testDiv(0x2n, 0xFEDCBA97n, 0x0n); >-testDiv(0x2n, 0x1234n, 0x0n); >-testDiv(0x2n, 0x3n, 0x0n); >-testDiv(0x2n, 0x2n, 0x1n); >-testDiv(0x2n, 0x1n, 0x2n); >-testDiv(0x2n, -0x1n, -0x2n); >-testDiv(0x2n, -0x2n, -0x1n); >-testDiv(0x2n, -0x3n, 0x0n); >-testDiv(0x2n, -0x1234n, 0x0n); >-testDiv(0x2n, -0xFEDCBA97n, 0x0n); >-testDiv(0x2n, -0xFEDCBA98n, 0x0n); >-testDiv(0x2n, -0xFEDCBA987654320Fn, 0x0n); >-testDiv(0x2n, -0xFEDCBA9876543210n, 0x0n); >-testDiv(0x1n, 0xFEDCBA9876543210n, 0x0n); >-testDiv(0x1n, 0xFEDCBA987654320Fn, 0x0n); >-testDiv(0x1n, 0xFEDCBA98n, 0x0n); >-testDiv(0x1n, 0xFEDCBA97n, 0x0n); >-testDiv(0x1n, 0x1234n, 0x0n); >-testDiv(0x1n, 0x3n, 0x0n); >-testDiv(0x1n, 0x2n, 0x0n); >-testDiv(0x1n, 0x1n, 0x1n); >-testDiv(0x1n, -0x1n, -0x1n); >-testDiv(0x1n, -0x2n, 0x0n); >-testDiv(0x1n, -0x3n, 0x0n); >-testDiv(0x1n, -0x1234n, 0x0n); >-testDiv(0x1n, -0xFEDCBA97n, 0x0n); >-testDiv(0x1n, -0xFEDCBA98n, 0x0n); >-testDiv(0x1n, -0xFEDCBA987654320Fn, 0x0n); >-testDiv(0x1n, -0xFEDCBA9876543210n, 0x0n); >-testDiv(-0x1n, 0xFEDCBA9876543210n, 0x0n); >-testDiv(-0x1n, 0xFEDCBA987654320Fn, 0x0n); >-testDiv(-0x1n, 0xFEDCBA98n, 0x0n); >-testDiv(-0x1n, 0xFEDCBA97n, 0x0n); >-testDiv(-0x1n, 0x1234n, 0x0n); >-testDiv(-0x1n, 0x3n, 0x0n); >-testDiv(-0x1n, 0x2n, 0x0n); >-testDiv(-0x1n, 0x1n, -0x1n); >-testDiv(-0x1n, -0x1n, 0x1n); >-testDiv(-0x1n, -0x2n, 0x0n); >-testDiv(-0x1n, -0x3n, 0x0n); >-testDiv(-0x1n, -0x1234n, 0x0n); >-testDiv(-0x1n, -0xFEDCBA97n, 0x0n); >-testDiv(-0x1n, -0xFEDCBA98n, 0x0n); >-testDiv(-0x1n, -0xFEDCBA987654320Fn, 0x0n); >-testDiv(-0x1n, -0xFEDCBA9876543210n, 0x0n); >-testDiv(-0x2n, 0xFEDCBA9876543210n, 0x0n); >-testDiv(-0x2n, 0xFEDCBA987654320Fn, 0x0n); >-testDiv(-0x2n, 0xFEDCBA98n, 0x0n); >-testDiv(-0x2n, 0xFEDCBA97n, 0x0n); >-testDiv(-0x2n, 0x1234n, 0x0n); >-testDiv(-0x2n, 0x3n, 0x0n); >-testDiv(-0x2n, 0x2n, -0x1n); >-testDiv(-0x2n, 0x1n, -0x2n); >-testDiv(-0x2n, -0x1n, 0x2n); >-testDiv(-0x2n, -0x2n, 0x1n); >-testDiv(-0x2n, -0x3n, 0x0n); >-testDiv(-0x2n, -0x1234n, 0x0n); >-testDiv(-0x2n, -0xFEDCBA97n, 0x0n); >-testDiv(-0x2n, -0xFEDCBA98n, 0x0n); >-testDiv(-0x2n, -0xFEDCBA987654320Fn, 0x0n); >-testDiv(-0x2n, -0xFEDCBA9876543210n, 0x0n); >-testDiv(-0x3n, 0xFEDCBA9876543210n, 0x0n); >-testDiv(-0x3n, 0xFEDCBA987654320Fn, 0x0n); >-testDiv(-0x3n, 0xFEDCBA98n, 0x0n); >-testDiv(-0x3n, 0xFEDCBA97n, 0x0n); >-testDiv(-0x3n, 0x1234n, 0x0n); >-testDiv(-0x3n, 0x3n, -0x1n); >-testDiv(-0x3n, 0x2n, -0x1n); >-testDiv(-0x3n, 0x1n, -0x3n); >-testDiv(-0x3n, -0x1n, 0x3n); >-testDiv(-0x3n, -0x2n, 0x1n); >-testDiv(-0x3n, -0x3n, 0x1n); >-testDiv(-0x3n, -0x1234n, 0x0n); >-testDiv(-0x3n, -0xFEDCBA97n, 0x0n); >-testDiv(-0x3n, -0xFEDCBA98n, 0x0n); >-testDiv(-0x3n, -0xFEDCBA987654320Fn, 0x0n); >-testDiv(-0x3n, -0xFEDCBA9876543210n, 0x0n); >-testDiv(-0x1234n, 0xFEDCBA9876543210n, 0x0n); >-testDiv(-0x1234n, 0xFEDCBA987654320Fn, 0x0n); >-testDiv(-0x1234n, 0xFEDCBA98n, 0x0n); >-testDiv(-0x1234n, 0xFEDCBA97n, 0x0n); >-testDiv(-0x1234n, 0x1234n, -0x1n); >-testDiv(-0x1234n, 0x3n, -0x611n); >-testDiv(-0x1234n, 0x2n, -0x91An); >-testDiv(-0x1234n, 0x1n, -0x1234n); >-testDiv(-0x1234n, -0x1n, 0x1234n); >-testDiv(-0x1234n, -0x2n, 0x91An); >-testDiv(-0x1234n, -0x3n, 0x611n); >-testDiv(-0x1234n, -0x1234n, 0x1n); >-testDiv(-0x1234n, -0xFEDCBA97n, 0x0n); >-testDiv(-0x1234n, -0xFEDCBA98n, 0x0n); >-testDiv(-0x1234n, -0xFEDCBA987654320Fn, 0x0n); >-testDiv(-0x1234n, -0xFEDCBA9876543210n, 0x0n); >-testDiv(-0xFEDCBA97n, 0xFEDCBA9876543210n, 0x0n); >-testDiv(-0xFEDCBA97n, 0xFEDCBA987654320Fn, 0x0n); >-testDiv(-0xFEDCBA97n, 0xFEDCBA98n, 0x0n); >-testDiv(-0xFEDCBA97n, 0xFEDCBA97n, -0x1n); >-testDiv(-0xFEDCBA97n, 0x1234n, -0xE0042n); >-testDiv(-0xFEDCBA97n, 0x3n, -0x54F43E32n); >-testDiv(-0xFEDCBA97n, 0x2n, -0x7F6E5D4Bn); >-testDiv(-0xFEDCBA97n, 0x1n, -0xFEDCBA97n); >-testDiv(-0xFEDCBA97n, -0x1n, 0xFEDCBA97n); >-testDiv(-0xFEDCBA97n, -0x2n, 0x7F6E5D4Bn); >-testDiv(-0xFEDCBA97n, -0x3n, 0x54F43E32n); >-testDiv(-0xFEDCBA97n, -0x1234n, 0xE0042n); >-testDiv(-0xFEDCBA97n, -0xFEDCBA97n, 0x1n); >-testDiv(-0xFEDCBA97n, -0xFEDCBA98n, 0x0n); >-testDiv(-0xFEDCBA97n, -0xFEDCBA987654320Fn, 0x0n); >-testDiv(-0xFEDCBA97n, -0xFEDCBA9876543210n, 0x0n); >-testDiv(-0xFEDCBA98n, 0xFEDCBA9876543210n, 0x0n); >-testDiv(-0xFEDCBA98n, 0xFEDCBA987654320Fn, 0x0n); >-testDiv(-0xFEDCBA98n, 0xFEDCBA98n, -0x1n); >-testDiv(-0xFEDCBA98n, 0xFEDCBA97n, -0x1n); >-testDiv(-0xFEDCBA98n, 0x1234n, -0xE0042n); >-testDiv(-0xFEDCBA98n, 0x3n, -0x54F43E32n); >-testDiv(-0xFEDCBA98n, 0x2n, -0x7F6E5D4Cn); >-testDiv(-0xFEDCBA98n, 0x1n, -0xFEDCBA98n); >-testDiv(-0xFEDCBA98n, -0x1n, 0xFEDCBA98n); >-testDiv(-0xFEDCBA98n, -0x2n, 0x7F6E5D4Cn); >-testDiv(-0xFEDCBA98n, -0x3n, 0x54F43E32n); >-testDiv(-0xFEDCBA98n, -0x1234n, 0xE0042n); >-testDiv(-0xFEDCBA98n, -0xFEDCBA97n, 0x1n); >-testDiv(-0xFEDCBA98n, -0xFEDCBA98n, 0x1n); >-testDiv(-0xFEDCBA98n, -0xFEDCBA987654320Fn, 0x0n); >-testDiv(-0xFEDCBA98n, -0xFEDCBA9876543210n, 0x0n); >-testDiv(-0xFEDCBA987654320Fn, 0xFEDCBA9876543210n, 0x0n); >-testDiv(-0xFEDCBA987654320Fn, 0xFEDCBA987654320Fn, -0x1n); >-testDiv(-0xFEDCBA987654320Fn, 0xFEDCBA98n, -0x100000000n); >-testDiv(-0xFEDCBA987654320Fn, 0xFEDCBA97n, -0x100000001n); >-testDiv(-0xFEDCBA987654320Fn, 0x1234n, -0xE0042813BE5DCn); >-testDiv(-0xFEDCBA987654320Fn, 0x3n, -0x54F43E32D21C10AFn); >-testDiv(-0xFEDCBA987654320Fn, 0x2n, -0x7F6E5D4C3B2A1907n); >-testDiv(-0xFEDCBA987654320Fn, 0x1n, -0xFEDCBA987654320Fn); >-testDiv(-0xFEDCBA987654320Fn, -0x1n, 0xFEDCBA987654320Fn); >-testDiv(-0xFEDCBA987654320Fn, -0x2n, 0x7F6E5D4C3B2A1907n); >-testDiv(-0xFEDCBA987654320Fn, -0x3n, 0x54F43E32D21C10AFn); >-testDiv(-0xFEDCBA987654320Fn, -0x1234n, 0xE0042813BE5DCn); >-testDiv(-0xFEDCBA987654320Fn, -0xFEDCBA97n, 0x100000001n); >-testDiv(-0xFEDCBA987654320Fn, -0xFEDCBA98n, 0x100000000n); >-testDiv(-0xFEDCBA987654320Fn, -0xFEDCBA987654320Fn, 0x1n); >-testDiv(-0xFEDCBA987654320Fn, -0xFEDCBA9876543210n, 0x0n); >-testDiv(-0xFEDCBA9876543210n, 0xFEDCBA9876543210n, -0x1n); >-testDiv(-0xFEDCBA9876543210n, 0xFEDCBA987654320Fn, -0x1n); >-testDiv(-0xFEDCBA9876543210n, 0xFEDCBA98n, -0x100000000n); >-testDiv(-0xFEDCBA9876543210n, 0xFEDCBA97n, -0x100000001n); >-testDiv(-0xFEDCBA9876543210n, 0x1234n, -0xE0042813BE5DCn); >-testDiv(-0xFEDCBA9876543210n, 0x3n, -0x54F43E32D21C10B0n); >-testDiv(-0xFEDCBA9876543210n, 0x2n, -0x7F6E5D4C3B2A1908n); >-testDiv(-0xFEDCBA9876543210n, 0x1n, -0xFEDCBA9876543210n); >-testDiv(-0xFEDCBA9876543210n, -0x1n, 0xFEDCBA9876543210n); >-testDiv(-0xFEDCBA9876543210n, -0x2n, 0x7F6E5D4C3B2A1908n); >-testDiv(-0xFEDCBA9876543210n, -0x3n, 0x54F43E32D21C10B0n); >-testDiv(-0xFEDCBA9876543210n, -0x1234n, 0xE0042813BE5DCn); >-testDiv(-0xFEDCBA9876543210n, -0xFEDCBA97n, 0x100000001n); >-testDiv(-0xFEDCBA9876543210n, -0xFEDCBA98n, 0x100000000n); >-testDiv(-0xFEDCBA9876543210n, -0xFEDCBA987654320Fn, 0x1n); >-testDiv(-0xFEDCBA9876543210n, -0xFEDCBA9876543210n, 0x1n); >+assert.sameValue( >+ -0xFEDCBA9876543210n / -0xFEDCBA9876543210n, >+ 0x1n, >+ 'The result of (-0xFEDCBA9876543210n / -0xFEDCBA9876543210n) is 0x1n' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/division/bigint-complex-infinity.js b/JSTests/test262/test/language/expressions/division/bigint-complex-infinity.js >index 636b28b65baffff132eaa73c7ec24cd702c626b6..508a580e4094dd3d0e3997920fcd90896e6c557d 100644 >--- a/JSTests/test262/test/language/expressions/division/bigint-complex-infinity.js >+++ b/JSTests/test262/test/language/expressions/division/bigint-complex-infinity.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Robin Templeton. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: BigInt division of complex infinity (1/0) > esid: sec-multiplicative-operators-runtime-semantics-evaluation >@@ -19,19 +18,18 @@ > ... > features: [BigInt] > ---*/ >- > assert.throws(RangeError, function() { >- 1n / 0n >-}); >+ 1n / 0n; >+}, '1n / 0n throws RangeError'); > > assert.throws(RangeError, function() { >- 10n / 0n >-}); >+ 10n / 0n; >+}, '10n / 0n throws RangeError'); > > assert.throws(RangeError, function() { >- 0n / 0n >-}); >+ 0n / 0n; >+}, '0n / 0n throws RangeError'); > > assert.throws(RangeError, function() { >- 1000000000000000000n / 0n >-}); >+ 1000000000000000000n / 0n; >+}, '1000000000000000000n / 0n throws RangeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/division/bigint-errors.js b/JSTests/test262/test/language/expressions/division/bigint-errors.js >index 78981b44e88d9560c226f2fe2207b381c11775a8..cfc554cd75ce5aa554d642fee9307bd63bc2aba0 100644 >--- a/JSTests/test262/test/language/expressions/division/bigint-errors.js >+++ b/JSTests/test262/test/language/expressions/division/bigint-errors.js >@@ -5,58 +5,66 @@ > esid: sec-multiplicative-operators-runtime-semantics-evaluation > features: [BigInt, Symbol, Symbol.toPrimitive, computed-property-names] > ---*/ >- > assert.throws(TypeError, function() { >- Symbol("1") / 1n; >-}, "ToBigInt: Symbol => TypeError"); >+ Symbol('1') / 1n; >+}, 'Symbol("1") / 1n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n / Symbol("1"); >-}, "ToBigInt: Symbol => TypeError"); >+ 0n / Symbol('1'); >+}, '0n / Symbol("1") throws TypeError'); >+ > assert.throws(TypeError, function() { >- Object(Symbol("1")) / 1n; >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ Object(Symbol('1')) / 1n; >+}, 'Object(Symbol("1")) / 1n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n / Object(Symbol("1")); >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ 0n / Object(Symbol('1')); >+}, '0n / Object(Symbol("1")) throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) / 1n; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '({[Symbol.toPrimitive]: function() {return Symbol("1");}}) / 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n / { > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '0n / {[Symbol.toPrimitive]: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) / 1n; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '({valueOf: function() {return Symbol("1");}}) / 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n / { > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '0n / {valueOf: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) / 1n; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '({toString: function() {return Symbol("1");}}) / 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n / { > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '0n / {toString: function() {return Symbol("1");}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/division/bigint-toprimitive.js b/JSTests/test262/test/language/expressions/division/bigint-toprimitive.js >index d50ec872f89cb3fec3a6cb20b00dd553deed3b0c..d525e1e7949179732b8f15c9910654eed03b7e92 100644 >--- a/JSTests/test262/test/language/expressions/division/bigint-toprimitive.js >+++ b/JSTests/test262/test/language/expressions/division/bigint-toprimitive.js >@@ -5,304 +5,368 @@ > esid: sec-multiplicative-operators-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >- > function err() { > throw new Test262Error(); > } > > function MyError() {} > >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}) / 2n, 1n, "ToPrimitive: @@toPrimitive takes precedence"); >+} / 2n, 1n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) / 2n) is 1n'); >+ > assert.sameValue(2n / { > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}, 1n, "ToPrimitive: @@toPrimitive takes precedence"); >-assert.sameValue(({ >+}, 1n, 'The result of (2n / {[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > }, >+ > toString: err >-}) / 2n, 1n, "ToPrimitive: valueOf takes precedence over toString"); >+} / 2n, 1n, 'The result of (({valueOf: function() {return 2n;}, toString: err}) / 2n) is 1n'); >+ > assert.sameValue(2n / { > valueOf: function() { > return 2n; > }, >+ > toString: err >-}, 1n, "ToPrimitive: valueOf takes precedence over toString"); >-assert.sameValue(({ >+}, 1n, 'The result of (2n / {valueOf: function() {return 2n;}, toString: err}) is 1n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) / 2n, 1n, "ToPrimitive: toString with no valueOf"); >+} / 2n, 1n, 'The result of (({toString: function() {return 2n;}}) / 2n) is 1n'); >+ > assert.sameValue(2n / { > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: toString with no valueOf"); >-assert.sameValue(({ >+}, 1n, 'The result of (2n / {toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}) / 2n, 1n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >+} / 2n, 1n, 'The result of (({[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) / 2n) is 1n'); >+ > assert.sameValue(2n / { > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >-assert.sameValue(({ >+}, 1n, 'The result of (2n / {[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}) / 2n, 1n, "ToPrimitive: skip @@toPrimitive when it's null"); >+} / 2n, 1n, 'The result of (({[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) / 2n) is 1n'); >+ > assert.sameValue(2n / { > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip @@toPrimitive when it's null"); >-assert.sameValue(({ >+}, 1n, 'The result of (2n / {[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: null, >+ > toString: function() { > return 2n; > } >-}) / 2n, 1n, "ToPrimitive: skip valueOf when it's not callable"); >+} / 2n, 1n, 'The result of (({valueOf: null, toString: function() {return 2n;}}) / 2n) is 1n'); >+ > assert.sameValue(2n / { > valueOf: null, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 1n, 'The result of (2n / {valueOf: null, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}) / 2n, 1n, "ToPrimitive: skip valueOf when it's not callable"); >+} / 2n, 1n, 'The result of (({valueOf: 1, toString: function() {return 2n;}}) / 2n) is 1n'); >+ > assert.sameValue(2n / { > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 1n, 'The result of (2n / {valueOf: 1, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}) / 2n, 1n, "ToPrimitive: skip valueOf when it's not callable"); >+} / 2n, 1n, 'The result of (({valueOf: {}, toString: function() {return 2n;}}) / 2n) is 1n'); >+ > assert.sameValue(2n / { > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 1n, 'The result of (2n / {valueOf: {}, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}) / 2n, 1n, "ToPrimitive: skip valueOf when it returns an object"); >+} / 2n, 1n, 'The result of (({valueOf: function() {return {};}, toString: function() {return 2n;}}) / 2n) is 1n'); >+ > assert.sameValue(2n / { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it returns an object"); >-assert.sameValue(({ >+}, 1n, 'The result of (2n / {valueOf: function() {return {};}, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}) / 2n, 1n, "ToPrimitive: skip valueOf when it returns an object"); >+} / 2n, 1n, 'The result of (({valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) / 2n) is 1n'); >+ > assert.sameValue(2n / { > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it returns an object"); >+}, 1n, 'The result of (2n / {valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) is 1n'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: 1 > }) / 1n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: 1}) / 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n / { > [Symbol.toPrimitive]: 1 > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n / {[Symbol.toPrimitive]: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: {} > }) / 1n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: {}}) / 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n / { > [Symbol.toPrimitive]: {} > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n / {[Symbol.toPrimitive]: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return Object(1); > } > }) / 1n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return Object(1);}}) / 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n / { > [Symbol.toPrimitive]: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n / {[Symbol.toPrimitive]: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return {}; > } > }) / 1n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return {};}}) / 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n / { > [Symbol.toPrimitive]: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n / {[Symbol.toPrimitive]: function() {return {};}} throws TypeError'); >+ > assert.throws(MyError, function() { > ({ > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }) / 1n; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '({[Symbol.toPrimitive]: function() {throw new MyError();}}) / 1n throws MyError'); >+ > assert.throws(MyError, function() { > 0n / { > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '0n / {[Symbol.toPrimitive]: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > valueOf: function() { > throw new MyError(); > } > }) / 1n; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '({valueOf: function() {throw new MyError();}}) / 1n throws MyError'); >+ > assert.throws(MyError, function() { > 0n / { > valueOf: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '0n / {valueOf: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > toString: function() { > throw new MyError(); > } > }) / 1n; >-}, "ToPrimitive: propagate errors from toString"); >+}, '({toString: function() {throw new MyError();}}) / 1n throws MyError'); >+ > assert.throws(MyError, function() { > 0n / { > toString: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from toString"); >+}, '0n / {toString: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: null, > toString: null > }) / 1n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: null, toString: null}) / 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n / { > valueOf: null, > toString: null > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n / {valueOf: null, toString: null} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: 1, > toString: 1 > }) / 1n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: 1, toString: 1}) / 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n / { > valueOf: 1, > toString: 1 > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n / {valueOf: 1, toString: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: {}, > toString: {} > }) / 1n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: {}, toString: {}}) / 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n / { > valueOf: {}, > toString: {} > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n / {valueOf: {}, toString: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }) / 1n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return Object(1);}, toString: function() {return Object(1);}}) / 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n / { > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n / {valueOf: function() {return Object(1);}, toString: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }) / 1n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return {};}, toString: function() {return {};}}) / 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n / { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n / {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/division/bigint-wrapped-values.js b/JSTests/test262/test/language/expressions/division/bigint-wrapped-values.js >index d25f79b57e71099268e4cc72ad1c10de70a9daa9..16fe89ae7a3bfd28bd69c25482433e454e0cef0a 100644 >--- a/JSTests/test262/test/language/expressions/division/bigint-wrapped-values.js >+++ b/JSTests/test262/test/language/expressions/division/bigint-wrapped-values.js >@@ -5,36 +5,41 @@ > esid: sec-multiplicative-operators-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >+assert.sameValue(Object(2n) / 2n, 1n, 'The result of (Object(2n) / 2n) is 1n'); >+assert.sameValue(2n / Object(2n), 1n, 'The result of (2n / Object(2n)) is 1n'); > >-assert.sameValue(Object(2n) / 2n, 1n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(2n / Object(2n), 1n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > } >-}) / 2n, 1n, "ToPrimitive: @@toPrimitive"); >+} / 2n, 1n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}}) / 2n) is 1n'); >+ > assert.sameValue(2n / { > [Symbol.toPrimitive]: function() { > return 2n; > } >-}, 1n, "ToPrimitive: @@toPrimitive"); >-assert.sameValue(({ >+}, 1n, 'The result of (2n / {[Symbol.toPrimitive]: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > } >-}) / 2n, 1n, "ToPrimitive: valueOf"); >+} / 2n, 1n, 'The result of (({valueOf: function() {return 2n;}}) / 2n) is 1n'); >+ > assert.sameValue(2n / { > valueOf: function() { > return 2n; > } >-}, 1n, "ToPrimitive: valueOf"); >-assert.sameValue(({ >+}, 1n, 'The result of (2n / {valueOf: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) / 2n, 1n, "ToPrimitive: toString"); >+} / 2n, 1n, 'The result of (({toString: function() {return 2n;}}) / 2n) is 1n'); >+ > assert.sameValue(2n / { > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: toString"); >+}, 1n, 'The result of (2n / {toString: function() {return 2n;}}) is 1n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-bigint.js b/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-bigint.js >index fbed259fb70183b3ec3731864df980d9213da961..ed49cad23eabcf0afd7d00f3c73fefee54827ad5 100644 >--- a/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-bigint.js >+++ b/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-bigint.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Non-strict inequality comparison of BigInt values > esid: sec-abstract-equality-comparison >@@ -15,39 +14,158 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n != 0n, false, 'The result of (0n != 0n) is false'); >+assert.sameValue(1n != 1n, false, 'The result of (1n != 1n) is false'); >+assert.sameValue(-1n != -1n, false, 'The result of (-1n != -1n) is false'); >+assert.sameValue(0n != -0n, false, 'The result of (0n != -0n) is false'); >+assert.sameValue(-0n != 0n, false, 'The result of (-0n != 0n) is false'); >+assert.sameValue(0n != 1n, true, 'The result of (0n != 1n) is true'); >+assert.sameValue(1n != 0n, true, 'The result of (1n != 0n) is true'); >+assert.sameValue(0n != -1n, true, 'The result of (0n != -1n) is true'); >+assert.sameValue(-1n != 0n, true, 'The result of (-1n != 0n) is true'); >+assert.sameValue(1n != -1n, true, 'The result of (1n != -1n) is true'); >+assert.sameValue(-1n != 1n, true, 'The result of (-1n != 1n) is true'); >+ >+assert.sameValue( >+ 0x1fffffffffffff01n != 0x1fffffffffffff01n, >+ false, >+ 'The result of (0x1fffffffffffff01n != 0x1fffffffffffff01n) is false' >+); >+ >+assert.sameValue( >+ 0x1fffffffffffff01n != 0x1fffffffffffff02n, >+ true, >+ 'The result of (0x1fffffffffffff01n != 0x1fffffffffffff02n) is true' >+); >+ >+assert.sameValue( >+ 0x1fffffffffffff02n != 0x1fffffffffffff01n, >+ true, >+ 'The result of (0x1fffffffffffff02n != 0x1fffffffffffff01n) is true' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff01n != -0x1fffffffffffff01n, >+ false, >+ 'The result of (-0x1fffffffffffff01n != -0x1fffffffffffff01n) is false' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff01n != -0x1fffffffffffff02n, >+ true, >+ 'The result of (-0x1fffffffffffff01n != -0x1fffffffffffff02n) is true' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff02n != -0x1fffffffffffff01n, >+ true, >+ 'The result of (-0x1fffffffffffff02n != -0x1fffffffffffff01n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n != 0n, >+ true, >+ 'The result of (0x10000000000000000n != 0n) is true' >+); >+ >+assert.sameValue( >+ 0n != 0x10000000000000000n, >+ true, >+ 'The result of (0n != 0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n != 1n, >+ true, >+ 'The result of (0x10000000000000000n != 1n) is true' >+); >+ >+assert.sameValue( >+ 1n != 0x10000000000000000n, >+ true, >+ 'The result of (1n != 0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n != -1n, >+ true, >+ 'The result of (0x10000000000000000n != -1n) is true' >+); >+ >+assert.sameValue( >+ -1n != 0x10000000000000000n, >+ true, >+ 'The result of (-1n != 0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000001n != 0n, >+ true, >+ 'The result of (0x10000000000000001n != 0n) is true' >+); >+ >+assert.sameValue( >+ 0n != 0x10000000000000001n, >+ true, >+ 'The result of (0n != 0x10000000000000001n) is true' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n != 0n, >+ true, >+ 'The result of (-0x10000000000000000n != 0n) is true' >+); >+ >+assert.sameValue( >+ 0n != -0x10000000000000000n, >+ true, >+ 'The result of (0n != -0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n != 1n, >+ true, >+ 'The result of (-0x10000000000000000n != 1n) is true' >+); >+ >+assert.sameValue( >+ 1n != -0x10000000000000000n, >+ true, >+ 'The result of (1n != -0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n != -1n, >+ true, >+ 'The result of (-0x10000000000000000n != -1n) is true' >+); >+ >+assert.sameValue( >+ -1n != -0x10000000000000000n, >+ true, >+ 'The result of (-1n != -0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ -0x10000000000000001n != 0n, >+ true, >+ 'The result of (-0x10000000000000001n != 0n) is true' >+); >+ >+assert.sameValue( >+ 0n != -0x10000000000000001n, >+ true, >+ 'The result of (0n != -0x10000000000000001n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n != 0x100000000n, >+ true, >+ 'The result of (0x10000000000000000n != 0x100000000n) is true' >+); > >-assert.sameValue(0n != 0n, false, "0n != 0n"); >-assert.sameValue(1n != 1n, false, "1n != 1n"); >-assert.sameValue(-1n != -1n, false, "-1n != -1n"); >-assert.sameValue(0n != -0n, false, "0n != -0n"); >-assert.sameValue(-0n != 0n, false, "-0n != 0n"); >-assert.sameValue(0n != 1n, true, "0n != 1n"); >-assert.sameValue(1n != 0n, true, "1n != 0n"); >-assert.sameValue(0n != -1n, true, "0n != -1n"); >-assert.sameValue(-1n != 0n, true, "-1n != 0n"); >-assert.sameValue(1n != -1n, true, "1n != -1n"); >-assert.sameValue(-1n != 1n, true, "-1n != 1n"); >-assert.sameValue(0x1fffffffffffff01n != 0x1fffffffffffff01n, false, "0x1fffffffffffff01n != 0x1fffffffffffff01n"); >-assert.sameValue(0x1fffffffffffff01n != 0x1fffffffffffff02n, true, "0x1fffffffffffff01n != 0x1fffffffffffff02n"); >-assert.sameValue(0x1fffffffffffff02n != 0x1fffffffffffff01n, true, "0x1fffffffffffff02n != 0x1fffffffffffff01n"); >-assert.sameValue(-0x1fffffffffffff01n != -0x1fffffffffffff01n, false, "-0x1fffffffffffff01n != -0x1fffffffffffff01n"); >-assert.sameValue(-0x1fffffffffffff01n != -0x1fffffffffffff02n, true, "-0x1fffffffffffff01n != -0x1fffffffffffff02n"); >-assert.sameValue(-0x1fffffffffffff02n != -0x1fffffffffffff01n, true, "-0x1fffffffffffff02n != -0x1fffffffffffff01n"); >-assert.sameValue(0x10000000000000000n != 0n, true, "0x10000000000000000n != 0n"); >-assert.sameValue(0n != 0x10000000000000000n, true, "0n != 0x10000000000000000n"); >-assert.sameValue(0x10000000000000000n != 1n, true, "0x10000000000000000n != 1n"); >-assert.sameValue(1n != 0x10000000000000000n, true, "1n != 0x10000000000000000n"); >-assert.sameValue(0x10000000000000000n != -1n, true, "0x10000000000000000n != -1n"); >-assert.sameValue(-1n != 0x10000000000000000n, true, "-1n != 0x10000000000000000n"); >-assert.sameValue(0x10000000000000001n != 0n, true, "0x10000000000000001n != 0n"); >-assert.sameValue(0n != 0x10000000000000001n, true, "0n != 0x10000000000000001n"); >-assert.sameValue(-0x10000000000000000n != 0n, true, "-0x10000000000000000n != 0n"); >-assert.sameValue(0n != -0x10000000000000000n, true, "0n != -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000000n != 1n, true, "-0x10000000000000000n != 1n"); >-assert.sameValue(1n != -0x10000000000000000n, true, "1n != -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000000n != -1n, true, "-0x10000000000000000n != -1n"); >-assert.sameValue(-1n != -0x10000000000000000n, true, "-1n != -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000001n != 0n, true, "-0x10000000000000001n != 0n"); >-assert.sameValue(0n != -0x10000000000000001n, true, "0n != -0x10000000000000001n"); >-assert.sameValue(0x10000000000000000n != 0x100000000n, true, "0x10000000000000000n != 0x100000000n"); >-assert.sameValue(0x100000000n != 0x10000000000000000n, true, "0x100000000n != 0x10000000000000000n"); >+assert.sameValue( >+ 0x100000000n != 0x10000000000000000n, >+ true, >+ 'The result of (0x100000000n != 0x10000000000000000n) is true' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-boolean.js b/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-boolean.js >index 498dd1b77cfc1158b3fb3ec2de90383984d04abd..c8c6bf3d9bc2f37391d597b81f23ff528f016e08 100644 >--- a/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-boolean.js >+++ b/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-boolean.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Non-strict inequality comparison of BigInt and Boolean values > esid: sec-abstract-equality-comparison >@@ -14,20 +13,19 @@ > > features: [BigInt] > ---*/ >- >-assert.sameValue(-1n != false, true, "-1n != false"); >-assert.sameValue(false != -1n, true, "false != -1n"); >-assert.sameValue(-1n != true, true, "-1n != true"); >-assert.sameValue(true != -1n, true, "true != -1n"); >-assert.sameValue(0n != false, false, "0n != false"); >-assert.sameValue(false != 0n, false, "false != 0n"); >-assert.sameValue(0n != true, true, "0n != true"); >-assert.sameValue(true != 0n, true, "true != 0n"); >-assert.sameValue(1n != false, true, "1n != false"); >-assert.sameValue(false != 1n, true, "false != 1n"); >-assert.sameValue(1n != true, false, "1n != true"); >-assert.sameValue(true != 1n, false, "true != 1n"); >-assert.sameValue(2n != false, true, "2n != false"); >-assert.sameValue(false != 2n, true, "false != 2n"); >-assert.sameValue(2n != true, true, "2n != true"); >-assert.sameValue(true != 2n, true, "true != 2n"); >+assert.sameValue(-1n != false, true, 'The result of (-1n != false) is true'); >+assert.sameValue(false != -1n, true, 'The result of (false != -1n) is true'); >+assert.sameValue(-1n != true, true, 'The result of (-1n != true) is true'); >+assert.sameValue(true != -1n, true, 'The result of (true != -1n) is true'); >+assert.sameValue(0n != false, false, 'The result of (0n != false) is false'); >+assert.sameValue(false != 0n, false, 'The result of (false != 0n) is false'); >+assert.sameValue(0n != true, true, 'The result of (0n != true) is true'); >+assert.sameValue(true != 0n, true, 'The result of (true != 0n) is true'); >+assert.sameValue(1n != false, true, 'The result of (1n != false) is true'); >+assert.sameValue(false != 1n, true, 'The result of (false != 1n) is true'); >+assert.sameValue(1n != true, false, 'The result of (1n != true) is false'); >+assert.sameValue(true != 1n, false, 'The result of (true != 1n) is false'); >+assert.sameValue(2n != false, true, 'The result of (2n != false) is true'); >+assert.sameValue(false != 2n, true, 'The result of (false != 2n) is true'); >+assert.sameValue(2n != true, true, 'The result of (2n != true) is true'); >+assert.sameValue(true != 2n, true, 'The result of (true != 2n) is true'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-incomparable-primitive.js b/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-incomparable-primitive.js >index 6366dc3730c217fa1e6883f33c6fa992b2040b25..07bd83bdaeae91026c40afbf69823e39668600e3 100644 >--- a/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-incomparable-primitive.js >+++ b/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-incomparable-primitive.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Non-strict inequality comparison of BigInt and miscellaneous primitive values > esid: sec-equality-operators-runtime-semantics-evaluation >@@ -12,16 +11,15 @@ > > features: [BigInt, Symbol] > ---*/ >- >-assert.sameValue(0n != undefined, true, "0n != undefined"); >-assert.sameValue(undefined != 0n, true, "undefined != 0n"); >-assert.sameValue(1n != undefined, true, "1n != undefined"); >-assert.sameValue(undefined != 1n, true, "undefined != 1n"); >-assert.sameValue(0n != null, true, "0n != null"); >-assert.sameValue(null != 0n, true, "null != 0n"); >-assert.sameValue(1n != null, true, "1n != null"); >-assert.sameValue(null != 1n, true, "null != 1n"); >-assert.sameValue(0n != Symbol("1"), true, '0n != Symbol("1")'); >-assert.sameValue(Symbol("1") != 0n, true, 'Symbol("1") != 0n'); >-assert.sameValue(1n != Symbol("1"), true, '1n != Symbol("1")'); >-assert.sameValue(Symbol("1") != 1n, true, 'Symbol("1") != 1n'); >+assert.sameValue(0n != undefined, true, 'The result of (0n != undefined) is true'); >+assert.sameValue(undefined != 0n, true, 'The result of (undefined != 0n) is true'); >+assert.sameValue(1n != undefined, true, 'The result of (1n != undefined) is true'); >+assert.sameValue(undefined != 1n, true, 'The result of (undefined != 1n) is true'); >+assert.sameValue(0n != null, true, 'The result of (0n != null) is true'); >+assert.sameValue(null != 0n, true, 'The result of (null != 0n) is true'); >+assert.sameValue(1n != null, true, 'The result of (1n != null) is true'); >+assert.sameValue(null != 1n, true, 'The result of (null != 1n) is true'); >+assert.sameValue(0n != Symbol('1'), true, 'The result of (0n != Symbol("1")) is true'); >+assert.sameValue(Symbol('1') != 0n, true, 'The result of (Symbol("1") != 0n) is true'); >+assert.sameValue(1n != Symbol('1'), true, 'The result of (1n != Symbol("1")) is true'); >+assert.sameValue(Symbol('1') != 1n, true, 'The result of (Symbol("1") != 1n) is true'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-non-finite.js b/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-non-finite.js >index 2118e014f6b4049642007828fb57a708ca6c55c2..0093074ae8765dd8ab4d64c4c046464140cf23dc 100644 >--- a/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-non-finite.js >+++ b/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-non-finite.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Non-strict inequality comparison of BigInt and non-finite Number values > esid: sec-abstract-equality-comparison >@@ -10,22 +9,21 @@ > > features: [BigInt] > ---*/ >- >-assert.sameValue(0n != Infinity, true, "0n != Infinity"); >-assert.sameValue(Infinity != 0n, true, "Infinity != 0n"); >-assert.sameValue(1n != Infinity, true, "1n != Infinity"); >-assert.sameValue(Infinity != 1n, true, "Infinity != 1n"); >-assert.sameValue(-1n != Infinity, true, "-1n != Infinity"); >-assert.sameValue(Infinity != -1n, true, "Infinity != -1n"); >-assert.sameValue(0n != -Infinity, true, "0n != -Infinity"); >-assert.sameValue(-Infinity != 0n, true, "-Infinity != 0n"); >-assert.sameValue(1n != -Infinity, true, "1n != -Infinity"); >-assert.sameValue(-Infinity != 1n, true, "-Infinity != 1n"); >-assert.sameValue(-1n != -Infinity, true, "-1n != -Infinity"); >-assert.sameValue(-Infinity != -1n, true, "-Infinity != -1n"); >-assert.sameValue(0n != NaN, true, "0n != NaN"); >-assert.sameValue(NaN != 0n, true, "NaN != 0n"); >-assert.sameValue(1n != NaN, true, "1n != NaN"); >-assert.sameValue(NaN != 1n, true, "NaN != 1n"); >-assert.sameValue(-1n != NaN, true, "-1n != NaN"); >-assert.sameValue(NaN != -1n, true, "NaN != -1n"); >+assert.sameValue(0n != Infinity, true, 'The result of (0n != Infinity) is true'); >+assert.sameValue(Infinity != 0n, true, 'The result of (Infinity != 0n) is true'); >+assert.sameValue(1n != Infinity, true, 'The result of (1n != Infinity) is true'); >+assert.sameValue(Infinity != 1n, true, 'The result of (Infinity != 1n) is true'); >+assert.sameValue(-1n != Infinity, true, 'The result of (-1n != Infinity) is true'); >+assert.sameValue(Infinity != -1n, true, 'The result of (Infinity != -1n) is true'); >+assert.sameValue(0n != -Infinity, true, 'The result of (0n != -Infinity) is true'); >+assert.sameValue(-Infinity != 0n, true, 'The result of (-Infinity != 0n) is true'); >+assert.sameValue(1n != -Infinity, true, 'The result of (1n != -Infinity) is true'); >+assert.sameValue(-Infinity != 1n, true, 'The result of (-Infinity != 1n) is true'); >+assert.sameValue(-1n != -Infinity, true, 'The result of (-1n != -Infinity) is true'); >+assert.sameValue(-Infinity != -1n, true, 'The result of (-Infinity != -1n) is true'); >+assert.sameValue(0n != NaN, true, 'The result of (0n != NaN) is true'); >+assert.sameValue(NaN != 0n, true, 'The result of (NaN != 0n) is true'); >+assert.sameValue(1n != NaN, true, 'The result of (1n != NaN) is true'); >+assert.sameValue(NaN != 1n, true, 'The result of (NaN != 1n) is true'); >+assert.sameValue(-1n != NaN, true, 'The result of (-1n != NaN) is true'); >+assert.sameValue(NaN != -1n, true, 'The result of (NaN != -1n) is true'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-number-extremes.js b/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-number-extremes.js >index dfb2c7ea2cc80430e18ec426ebfc219803f955b6..63eee522421af3209872eb4209146ca1ece34520 100644 >--- a/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-number-extremes.js >+++ b/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-number-extremes.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Non-strict inequality comparison of BigInt and large Number values > esid: sec-abstract-equality-comparison >@@ -10,32 +9,43 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(1n != Number.MAX_VALUE, true, 'The result of (1n != Number.MAX_VALUE) is true'); >+assert.sameValue(Number.MAX_VALUE != 1n, true, 'The result of (Number.MAX_VALUE != 1n) is true'); >+assert.sameValue(1n != -Number.MAX_VALUE, true, 'The result of (1n != -Number.MAX_VALUE) is true'); >+assert.sameValue(-Number.MAX_VALUE != 1n, true, 'The result of (-Number.MAX_VALUE != 1n) is true'); > >-assert.sameValue(1n != Number.MAX_VALUE, true, "1n != Number.MAX_VALUE"); >-assert.sameValue(Number.MAX_VALUE != 1n, true, "Number.MAX_VALUE != 1n"); >-assert.sameValue(1n != -Number.MAX_VALUE, true, "1n != -Number.MAX_VALUE"); >-assert.sameValue(-Number.MAX_VALUE != 1n, true, "-Number.MAX_VALUE != 1n"); > assert.sameValue( > 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn != Number.MAX_VALUE, > true, >- "0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn != Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn != Number.MAX_VALUE) is true' >+); >+ > assert.sameValue( > Number.MAX_VALUE != 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn, > true, >- "Number.MAX_VALUE != 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn"); >+ 'The result of (Number.MAX_VALUE != 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn) is true' >+); >+ > assert.sameValue( > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n != Number.MAX_VALUE, > false, >- "0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n != Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n != Number.MAX_VALUE) is false' >+); >+ > assert.sameValue( > Number.MAX_VALUE != 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n, > false, >- "Number.MAX_VALUE != 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n"); >+ 'The result of (Number.MAX_VALUE != 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n) is false' >+); >+ > assert.sameValue( > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n != Number.MAX_VALUE, > true, >- "0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n != Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n != Number.MAX_VALUE) is true' >+); >+ > assert.sameValue( > Number.MAX_VALUE != 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n, > true, >- "Number.MAX_VALUE != 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n"); >+ 'The result of (Number.MAX_VALUE != 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n) is true' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-number.js b/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-number.js >index d0d76c6c2f044884ec718448b237a229e8118253..a5ddbc9dd3793a3b8dd0f032caded936c0c1c957 100644 >--- a/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-number.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Non-strict inequality comparison of BigInt and Number values > esid: sec-abstract-equality-comparison >@@ -10,24 +9,33 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n != 0, false, 'The result of (0n != 0) is false'); >+assert.sameValue(0 != 0n, false, 'The result of (0 != 0n) is false'); >+assert.sameValue(0n != -0, false, 'The result of (0n != -0) is false'); >+assert.sameValue(-0 != 0n, false, 'The result of (-0 != 0n) is false'); >+assert.sameValue(0n != 0.000000000001, true, 'The result of (0n != 0.000000000001) is true'); >+assert.sameValue(0.000000000001 != 0n, true, 'The result of (0.000000000001 != 0n) is true'); >+assert.sameValue(0n != 1, true, 'The result of (0n != 1) is true'); >+assert.sameValue(1 != 0n, true, 'The result of (1 != 0n) is true'); >+assert.sameValue(1n != 0, true, 'The result of (1n != 0) is true'); >+assert.sameValue(0 != 1n, true, 'The result of (0 != 1n) is true'); >+assert.sameValue(1n != 0.999999999999, true, 'The result of (1n != 0.999999999999) is true'); >+assert.sameValue(0.999999999999 != 1n, true, 'The result of (0.999999999999 != 1n) is true'); >+assert.sameValue(1n != 1, false, 'The result of (1n != 1) is false'); >+assert.sameValue(1 != 1n, false, 'The result of (1 != 1n) is false'); >+assert.sameValue(0n != Number.MIN_VALUE, true, 'The result of (0n != Number.MIN_VALUE) is true'); >+assert.sameValue(Number.MIN_VALUE != 0n, true, 'The result of (Number.MIN_VALUE != 0n) is true'); >+assert.sameValue(0n != -Number.MIN_VALUE, true, 'The result of (0n != -Number.MIN_VALUE) is true'); >+assert.sameValue(-Number.MIN_VALUE != 0n, true, 'The result of (-Number.MIN_VALUE != 0n) is true'); >+ >+assert.sameValue( >+ -10n != Number.MIN_VALUE, >+ true, >+ 'The result of (-10n != Number.MIN_VALUE) is true' >+); > >-assert.sameValue(0n != 0, false, "0n != 0"); >-assert.sameValue(0 != 0n, false, "0 != 0n"); >-assert.sameValue(0n != -0, false, "0n != -0"); >-assert.sameValue(-0 != 0n, false, "-0 != 0n"); >-assert.sameValue(0n != 0.000000000001, true, "0n != 0.000000000001"); >-assert.sameValue(0.000000000001 != 0n, true, "0.000000000001 != 0n"); >-assert.sameValue(0n != 1, true, "0n != 1"); >-assert.sameValue(1 != 0n, true, "1 != 0n"); >-assert.sameValue(1n != 0, true, "1n != 0"); >-assert.sameValue(0 != 1n, true, "0 != 1n"); >-assert.sameValue(1n != 0.999999999999, true, "1n != 0.999999999999"); >-assert.sameValue(0.999999999999 != 1n, true, "0.999999999999 != 1n"); >-assert.sameValue(1n != 1, false, "1n != 1"); >-assert.sameValue(1 != 1n, false, "1 != 1n"); >-assert.sameValue(0n != Number.MIN_VALUE, true, "0n != Number.MIN_VALUE"); >-assert.sameValue(Number.MIN_VALUE != 0n, true, "Number.MIN_VALUE != 0n"); >-assert.sameValue(0n != -Number.MIN_VALUE, true, "0n != -Number.MIN_VALUE"); >-assert.sameValue(-Number.MIN_VALUE != 0n, true, "-Number.MIN_VALUE != 0n"); >-assert.sameValue(-10n != Number.MIN_VALUE, true, "-10n != Number.MIN_VALUE"); >-assert.sameValue(Number.MIN_VALUE != -10n, true, "Number.MIN_VALUE != -10n"); >+assert.sameValue( >+ Number.MIN_VALUE != -10n, >+ true, >+ 'The result of (Number.MIN_VALUE != -10n) is true' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-object.js b/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-object.js >index 33d67b03483b9933926c1c856e65c4985beb6e63..a53cddf5ad21be4fc17ec0849dc016507a45e32e 100644 >--- a/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-object.js >+++ b/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-object.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Non-strict inequality comparison of BigInt values and non-primitive objects > esid: sec-abstract-equality-comparison >@@ -21,36 +20,115 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n != Object(0n), false, 'The result of (0n != Object(0n)) is false'); >+assert.sameValue(Object(0n) != 0n, false, 'The result of (Object(0n) != 0n) is false'); >+assert.sameValue(0n != Object(1n), true, 'The result of (0n != Object(1n)) is true'); >+assert.sameValue(Object(1n) != 0n, true, 'The result of (Object(1n) != 0n) is true'); >+assert.sameValue(1n != Object(0n), true, 'The result of (1n != Object(0n)) is true'); >+assert.sameValue(Object(0n) != 1n, true, 'The result of (Object(0n) != 1n) is true'); >+assert.sameValue(1n != Object(1n), false, 'The result of (1n != Object(1n)) is false'); >+assert.sameValue(Object(1n) != 1n, false, 'The result of (Object(1n) != 1n) is false'); >+assert.sameValue(2n != Object(0n), true, 'The result of (2n != Object(0n)) is true'); >+assert.sameValue(Object(0n) != 2n, true, 'The result of (Object(0n) != 2n) is true'); >+assert.sameValue(2n != Object(1n), true, 'The result of (2n != Object(1n)) is true'); >+assert.sameValue(Object(1n) != 2n, true, 'The result of (Object(1n) != 2n) is true'); >+assert.sameValue(2n != Object(2n), false, 'The result of (2n != Object(2n)) is false'); >+assert.sameValue(Object(2n) != 2n, false, 'The result of (Object(2n) != 2n) is false'); >+assert.sameValue(0n != {}, true, 'The result of (0n != {}) is true'); >+assert.sameValue({} != 0n, true, 'The result of (({}) != 0n) is true'); >+ >+assert.sameValue(0n != { >+ valueOf: function() { >+ return 0n; >+ } >+}, false, 'The result of (0n != {valueOf: function() {return 0n;}}) is false'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 0n; >+ } >+} != 0n, false, 'The result of (({valueOf: function() {return 0n;}}) != 0n) is false'); >+ >+assert.sameValue(0n != { >+ valueOf: function() { >+ return 1n; >+ } >+}, true, 'The result of (0n != {valueOf: function() {return 1n;}}) is true'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 1n; >+ } >+} != 0n, true, 'The result of (({valueOf: function() {return 1n;}}) != 0n) is true'); >+ >+assert.sameValue(0n != { >+ toString: function() { >+ return '0'; >+ } >+}, false, 'The result of (0n != {toString: function() {return "0";}}) is false'); >+ >+assert.sameValue({ >+ toString: function() { >+ return '0'; >+ } >+} != 0n, false, 'The result of (({toString: function() {return "0";}}) != 0n) is false'); >+ >+assert.sameValue(0n != { >+ toString: function() { >+ return '1'; >+ } >+}, true, 'The result of (0n != {toString: function() {return "1";}}) is true'); >+ >+assert.sameValue({ >+ toString: function() { >+ return '1'; >+ } >+} != 0n, true, 'The result of (({toString: function() {return "1";}}) != 0n) is true'); >+ >+assert.sameValue(900719925474099101n != { >+ valueOf: function() { >+ return 900719925474099101n; >+ } >+}, false, 'The result of (900719925474099101n != {valueOf: function() {return 900719925474099101n;}}) is false'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 900719925474099101n; >+ } >+} != 900719925474099101n, false, 'The result of (({valueOf: function() {return 900719925474099101n;}}) != 900719925474099101n) is false'); >+ >+assert.sameValue(900719925474099101n != { >+ valueOf: function() { >+ return 900719925474099102n; >+ } >+}, true, 'The result of (900719925474099101n != {valueOf: function() {return 900719925474099102n;}}) is true'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 900719925474099102n; >+ } >+} != 900719925474099101n, true, 'The result of (({valueOf: function() {return 900719925474099102n;}}) != 900719925474099101n) is true'); >+ >+assert.sameValue(900719925474099101n != { >+ toString: function() { >+ return '900719925474099101'; >+ } >+}, false, 'The result of (900719925474099101n != {toString: function() {return "900719925474099101";}}) is false'); >+ >+assert.sameValue({ >+ toString: function() { >+ return '900719925474099101'; >+ } >+} != 900719925474099101n, false, 'The result of (({toString: function() {return "900719925474099101";}}) != 900719925474099101n) is false'); >+ >+assert.sameValue(900719925474099101n != { >+ toString: function() { >+ return '900719925474099102'; >+ } >+}, true, 'The result of (900719925474099101n != {toString: function() {return "900719925474099102";}}) is true'); > >-assert.sameValue(0n != Object(0n), false, "0n != Object(0n)"); >-assert.sameValue(Object(0n) != 0n, false, "Object(0n) != 0n"); >-assert.sameValue(0n != Object(1n), true, "0n != Object(1n)"); >-assert.sameValue(Object(1n) != 0n, true, "Object(1n) != 0n"); >-assert.sameValue(1n != Object(0n), true, "1n != Object(0n)"); >-assert.sameValue(Object(0n) != 1n, true, "Object(0n) != 1n"); >-assert.sameValue(1n != Object(1n), false, "1n != Object(1n)"); >-assert.sameValue(Object(1n) != 1n, false, "Object(1n) != 1n"); >-assert.sameValue(2n != Object(0n), true, "2n != Object(0n)"); >-assert.sameValue(Object(0n) != 2n, true, "Object(0n) != 2n"); >-assert.sameValue(2n != Object(1n), true, "2n != Object(1n)"); >-assert.sameValue(Object(1n) != 2n, true, "Object(1n) != 2n"); >-assert.sameValue(2n != Object(2n), false, "2n != Object(2n)"); >-assert.sameValue(Object(2n) != 2n, false, "Object(2n) != 2n"); >-assert.sameValue(0n != {}, true, "0n != {}"); >-assert.sameValue({} != 0n, true, "{} != 0n"); >-assert.sameValue(0n != {valueOf: function() { return 0n; }}, false, "0n != {valueOf: function() { return 0n; }}"); >-assert.sameValue({valueOf: function() { return 0n; }} != 0n, false, "{valueOf: function() { return 0n; }} != 0n"); >-assert.sameValue(0n != {valueOf: function() { return 1n; }}, true, "0n != {valueOf: function() { return 1n; }}"); >-assert.sameValue({valueOf: function() { return 1n; }} != 0n, true, "{valueOf: function() { return 1n; }} != 0n"); >-assert.sameValue(0n != {toString: function() { return "0"; }}, false, '0n != {toString: function() { return "0"; }}'); >-assert.sameValue({toString: function() { return "0"; }} != 0n, false, '{toString: function() { return "0"; }} != 0n'); >-assert.sameValue(0n != {toString: function() { return "1"; }}, true, '0n != {toString: function() { return "1"; }}'); >-assert.sameValue({toString: function() { return "1"; }} != 0n, true, '{toString: function() { return "1"; }} != 0n'); >-assert.sameValue(900719925474099101n != {valueOf: function() { return 900719925474099101n; }}, false, "900719925474099101n != {valueOf: function() { return 900719925474099101n; }}"); >-assert.sameValue({valueOf: function() { return 900719925474099101n; }} != 900719925474099101n, false, "{valueOf: function() { return 900719925474099101n; }} != 900719925474099101n"); >-assert.sameValue(900719925474099101n != {valueOf: function() { return 900719925474099102n; }}, true, "900719925474099101n != {valueOf: function() { return 900719925474099102n; }}"); >-assert.sameValue({valueOf: function() { return 900719925474099102n; }} != 900719925474099101n, true, "{valueOf: function() { return 900719925474099102n; }} != 900719925474099101n"); >-assert.sameValue(900719925474099101n != {toString: function() { return "900719925474099101"; }}, false, '900719925474099101n != {toString: function() { return "900719925474099101"; }}'); >-assert.sameValue({toString: function() { return "900719925474099101"; }} != 900719925474099101n, false, '{toString: function() { return "900719925474099101"; }} != 900719925474099101n'); >-assert.sameValue(900719925474099101n != {toString: function() { return "900719925474099102"; }}, true, '900719925474099101n != {toString: function() { return "900719925474099102"; }}'); >-assert.sameValue({toString: function() { return "900719925474099102"; }} != 900719925474099101n, true, '{toString: function() { return "900719925474099102"; }} != 900719925474099101n'); >+assert.sameValue({ >+ toString: function() { >+ return '900719925474099102'; >+ } >+} != 900719925474099101n, true, 'The result of (({toString: function() {return "900719925474099102";}}) != 900719925474099101n) is true'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-string.js b/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-string.js >index 4bea156a74e60fb026914ad8450bf22cb7a16dfc..56e1bec5ee48288ffb561974c071b94860514f88 100644 >--- a/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-string.js >+++ b/JSTests/test262/test/language/expressions/does-not-equals/bigint-and-string.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Non-strict inequality comparison of BigInt and String values > esid: sec-abstract-equality-comparison >@@ -9,40 +8,59 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n != '', false, 'The result of (0n != "") is false'); >+assert.sameValue('' != 0n, false, 'The result of ("" != 0n) is false'); >+assert.sameValue(0n != '-0', false, 'The result of (0n != "-0") is false'); >+assert.sameValue('-0' != 0n, false, 'The result of ("-0" != 0n) is false'); >+assert.sameValue(0n != '0', false, 'The result of (0n != "0") is false'); >+assert.sameValue('0' != 0n, false, 'The result of ("0" != 0n) is false'); >+assert.sameValue(0n != '-1', true, 'The result of (0n != "-1") is true'); >+assert.sameValue('-1' != 0n, true, 'The result of ("-1" != 0n) is true'); >+assert.sameValue(0n != '1', true, 'The result of (0n != "1") is true'); >+assert.sameValue('1' != 0n, true, 'The result of ("1" != 0n) is true'); >+assert.sameValue(0n != 'foo', true, 'The result of (0n != "foo") is true'); >+assert.sameValue('foo' != 0n, true, 'The result of ("foo" != 0n) is true'); >+assert.sameValue(1n != '', true, 'The result of (1n != "") is true'); >+assert.sameValue('' != 1n, true, 'The result of ("" != 1n) is true'); >+assert.sameValue(1n != '-0', true, 'The result of (1n != "-0") is true'); >+assert.sameValue('-0' != 1n, true, 'The result of ("-0" != 1n) is true'); >+assert.sameValue(1n != '0', true, 'The result of (1n != "0") is true'); >+assert.sameValue('0' != 1n, true, 'The result of ("0" != 1n) is true'); >+assert.sameValue(1n != '-1', true, 'The result of (1n != "-1") is true'); >+assert.sameValue('-1' != 1n, true, 'The result of ("-1" != 1n) is true'); >+assert.sameValue(1n != '1', false, 'The result of (1n != "1") is false'); >+assert.sameValue('1' != 1n, false, 'The result of ("1" != 1n) is false'); >+assert.sameValue(1n != 'foo', true, 'The result of (1n != "foo") is true'); >+assert.sameValue('foo' != 1n, true, 'The result of ("foo" != 1n) is true'); >+assert.sameValue(-1n != '-', true, 'The result of (-1n != "-") is true'); >+assert.sameValue('-' != -1n, true, 'The result of ("-" != -1n) is true'); >+assert.sameValue(-1n != '-0', true, 'The result of (-1n != "-0") is true'); >+assert.sameValue('-0' != -1n, true, 'The result of ("-0" != -1n) is true'); >+assert.sameValue(-1n != '-1', false, 'The result of (-1n != "-1") is false'); >+assert.sameValue('-1' != -1n, false, 'The result of ("-1" != -1n) is false'); >+assert.sameValue(-1n != '-foo', true, 'The result of (-1n != "-foo") is true'); >+assert.sameValue('-foo' != -1n, true, 'The result of ("-foo" != -1n) is true'); >+ >+assert.sameValue( >+ 900719925474099101n != '900719925474099101', >+ false, >+ 'The result of (900719925474099101n != "900719925474099101") is false' >+); >+ >+assert.sameValue( >+ '900719925474099101' != 900719925474099101n, >+ false, >+ 'The result of ("900719925474099101" != 900719925474099101n) is false' >+); >+ >+assert.sameValue( >+ 900719925474099102n != '900719925474099101', >+ true, >+ 'The result of (900719925474099102n != "900719925474099101") is true' >+); > >-assert.sameValue(0n != "", false, '0n != ""'); >-assert.sameValue("" != 0n, false, '"" != 0n'); >-assert.sameValue(0n != "-0", false, '0n != "-0"'); >-assert.sameValue("-0" != 0n, false, '"-0" != 0n'); >-assert.sameValue(0n != "0", false, '0n != "0"'); >-assert.sameValue("0" != 0n, false, '"0" != 0n'); >-assert.sameValue(0n != "-1", true, '0n != "-1"'); >-assert.sameValue("-1" != 0n, true, '"-1" != 0n'); >-assert.sameValue(0n != "1", true, '0n != "1"'); >-assert.sameValue("1" != 0n, true, '"1" != 0n'); >-assert.sameValue(0n != "foo", true, '0n != "foo"'); >-assert.sameValue("foo" != 0n, true, '"foo" != 0n'); >-assert.sameValue(1n != "", true, '1n != ""'); >-assert.sameValue("" != 1n, true, '"" != 1n'); >-assert.sameValue(1n != "-0", true, '1n != "-0"'); >-assert.sameValue("-0" != 1n, true, '"-0" != 1n'); >-assert.sameValue(1n != "0", true, '1n != "0"'); >-assert.sameValue("0" != 1n, true, '"0" != 1n'); >-assert.sameValue(1n != "-1", true, '1n != "-1"'); >-assert.sameValue("-1" != 1n, true, '"-1" != 1n'); >-assert.sameValue(1n != "1", false, '1n != "1"'); >-assert.sameValue("1" != 1n, false, '"1" != 1n'); >-assert.sameValue(1n != "foo", true, '1n != "foo"'); >-assert.sameValue("foo" != 1n, true, '"foo" != 1n'); >-assert.sameValue(-1n != "-", true, '-1n != "-"'); >-assert.sameValue("-" != -1n, true, '"-" != -1n'); >-assert.sameValue(-1n != "-0", true, '-1n != "-0"'); >-assert.sameValue("-0" != -1n, true, '"-0" != -1n'); >-assert.sameValue(-1n != "-1", false, '-1n != "-1"'); >-assert.sameValue("-1" != -1n, false, '"-1" != -1n'); >-assert.sameValue(-1n != "-foo", true, '-1n != "-foo"'); >-assert.sameValue("-foo" != -1n, true, '"-foo" != -1n'); >-assert.sameValue(900719925474099101n != "900719925474099101", false, '900719925474099101n != "900719925474099101"'); >-assert.sameValue("900719925474099101" != 900719925474099101n, false, '"900719925474099101" != 900719925474099101n'); >-assert.sameValue(900719925474099102n != "900719925474099101", true, '900719925474099102n != "900719925474099101"'); >-assert.sameValue("900719925474099101" != 900719925474099102n, true, '"900719925474099101" != 900719925474099102n'); >+assert.sameValue( >+ '900719925474099101' != 900719925474099102n, >+ true, >+ 'The result of ("900719925474099101" != 900719925474099102n) is true' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/equals/bigint-and-bigint.js b/JSTests/test262/test/language/expressions/equals/bigint-and-bigint.js >index 7241abd531eddd87d751c66b04061e03c879f127..e7c888abf5e2b8c34cf56dd4aba6c29522501ffa 100644 >--- a/JSTests/test262/test/language/expressions/equals/bigint-and-bigint.js >+++ b/JSTests/test262/test/language/expressions/equals/bigint-and-bigint.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Non-strict equality comparison of BigInt values > esid: sec-abstract-equality-comparison >@@ -15,39 +14,158 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n == 0n, true, 'The result of (0n == 0n) is true'); >+assert.sameValue(1n == 1n, true, 'The result of (1n == 1n) is true'); >+assert.sameValue(-1n == -1n, true, 'The result of (-1n == -1n) is true'); >+assert.sameValue(0n == -0n, true, 'The result of (0n == -0n) is true'); >+assert.sameValue(-0n == 0n, true, 'The result of (-0n == 0n) is true'); >+assert.sameValue(0n == 1n, false, 'The result of (0n == 1n) is false'); >+assert.sameValue(1n == 0n, false, 'The result of (1n == 0n) is false'); >+assert.sameValue(0n == -1n, false, 'The result of (0n == -1n) is false'); >+assert.sameValue(-1n == 0n, false, 'The result of (-1n == 0n) is false'); >+assert.sameValue(1n == -1n, false, 'The result of (1n == -1n) is false'); >+assert.sameValue(-1n == 1n, false, 'The result of (-1n == 1n) is false'); >+ >+assert.sameValue( >+ 0x1fffffffffffff01n == 0x1fffffffffffff01n, >+ true, >+ 'The result of (0x1fffffffffffff01n == 0x1fffffffffffff01n) is true' >+); >+ >+assert.sameValue( >+ 0x1fffffffffffff01n == 0x1fffffffffffff02n, >+ false, >+ 'The result of (0x1fffffffffffff01n == 0x1fffffffffffff02n) is false' >+); >+ >+assert.sameValue( >+ 0x1fffffffffffff02n == 0x1fffffffffffff01n, >+ false, >+ 'The result of (0x1fffffffffffff02n == 0x1fffffffffffff01n) is false' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff01n == -0x1fffffffffffff01n, >+ true, >+ 'The result of (-0x1fffffffffffff01n == -0x1fffffffffffff01n) is true' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff01n == -0x1fffffffffffff02n, >+ false, >+ 'The result of (-0x1fffffffffffff01n == -0x1fffffffffffff02n) is false' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff02n == -0x1fffffffffffff01n, >+ false, >+ 'The result of (-0x1fffffffffffff02n == -0x1fffffffffffff01n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n == 0n, >+ false, >+ 'The result of (0x10000000000000000n == 0n) is false' >+); >+ >+assert.sameValue( >+ 0n == 0x10000000000000000n, >+ false, >+ 'The result of (0n == 0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n == 1n, >+ false, >+ 'The result of (0x10000000000000000n == 1n) is false' >+); >+ >+assert.sameValue( >+ 1n == 0x10000000000000000n, >+ false, >+ 'The result of (1n == 0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n == -1n, >+ false, >+ 'The result of (0x10000000000000000n == -1n) is false' >+); >+ >+assert.sameValue( >+ -1n == 0x10000000000000000n, >+ false, >+ 'The result of (-1n == 0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000001n == 0n, >+ false, >+ 'The result of (0x10000000000000001n == 0n) is false' >+); >+ >+assert.sameValue( >+ 0n == 0x10000000000000001n, >+ false, >+ 'The result of (0n == 0x10000000000000001n) is false' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n == 0n, >+ false, >+ 'The result of (-0x10000000000000000n == 0n) is false' >+); >+ >+assert.sameValue( >+ 0n == -0x10000000000000000n, >+ false, >+ 'The result of (0n == -0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n == 1n, >+ false, >+ 'The result of (-0x10000000000000000n == 1n) is false' >+); >+ >+assert.sameValue( >+ 1n == -0x10000000000000000n, >+ false, >+ 'The result of (1n == -0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n == -1n, >+ false, >+ 'The result of (-0x10000000000000000n == -1n) is false' >+); >+ >+assert.sameValue( >+ -1n == -0x10000000000000000n, >+ false, >+ 'The result of (-1n == -0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ -0x10000000000000001n == 0n, >+ false, >+ 'The result of (-0x10000000000000001n == 0n) is false' >+); >+ >+assert.sameValue( >+ 0n == -0x10000000000000001n, >+ false, >+ 'The result of (0n == -0x10000000000000001n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n == 0x100000000n, >+ false, >+ 'The result of (0x10000000000000000n == 0x100000000n) is false' >+); > >-assert.sameValue(0n == 0n, true, "0n == 0n"); >-assert.sameValue(1n == 1n, true, "1n == 1n"); >-assert.sameValue(-1n == -1n, true, "-1n == -1n"); >-assert.sameValue(0n == -0n, true, "0n == -0n"); >-assert.sameValue(-0n == 0n, true, "-0n == 0n"); >-assert.sameValue(0n == 1n, false, "0n == 1n"); >-assert.sameValue(1n == 0n, false, "1n == 0n"); >-assert.sameValue(0n == -1n, false, "0n == -1n"); >-assert.sameValue(-1n == 0n, false, "-1n == 0n"); >-assert.sameValue(1n == -1n, false, "1n == -1n"); >-assert.sameValue(-1n == 1n, false, "-1n == 1n"); >-assert.sameValue(0x1fffffffffffff01n == 0x1fffffffffffff01n, true, "0x1fffffffffffff01n == 0x1fffffffffffff01n"); >-assert.sameValue(0x1fffffffffffff01n == 0x1fffffffffffff02n, false, "0x1fffffffffffff01n == 0x1fffffffffffff02n"); >-assert.sameValue(0x1fffffffffffff02n == 0x1fffffffffffff01n, false, "0x1fffffffffffff02n == 0x1fffffffffffff01n"); >-assert.sameValue(-0x1fffffffffffff01n == -0x1fffffffffffff01n, true, "-0x1fffffffffffff01n == -0x1fffffffffffff01n"); >-assert.sameValue(-0x1fffffffffffff01n == -0x1fffffffffffff02n, false, "-0x1fffffffffffff01n == -0x1fffffffffffff02n"); >-assert.sameValue(-0x1fffffffffffff02n == -0x1fffffffffffff01n, false, "-0x1fffffffffffff02n == -0x1fffffffffffff01n"); >-assert.sameValue(0x10000000000000000n == 0n, false, "0x10000000000000000n == 0n"); >-assert.sameValue(0n == 0x10000000000000000n, false, "0n == 0x10000000000000000n"); >-assert.sameValue(0x10000000000000000n == 1n, false, "0x10000000000000000n == 1n"); >-assert.sameValue(1n == 0x10000000000000000n, false, "1n == 0x10000000000000000n"); >-assert.sameValue(0x10000000000000000n == -1n, false, "0x10000000000000000n == -1n"); >-assert.sameValue(-1n == 0x10000000000000000n, false, "-1n == 0x10000000000000000n"); >-assert.sameValue(0x10000000000000001n == 0n, false, "0x10000000000000001n == 0n"); >-assert.sameValue(0n == 0x10000000000000001n, false, "0n == 0x10000000000000001n"); >-assert.sameValue(-0x10000000000000000n == 0n, false, "-0x10000000000000000n == 0n"); >-assert.sameValue(0n == -0x10000000000000000n, false, "0n == -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000000n == 1n, false, "-0x10000000000000000n == 1n"); >-assert.sameValue(1n == -0x10000000000000000n, false, "1n == -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000000n == -1n, false, "-0x10000000000000000n == -1n"); >-assert.sameValue(-1n == -0x10000000000000000n, false, "-1n == -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000001n == 0n, false, "-0x10000000000000001n == 0n"); >-assert.sameValue(0n == -0x10000000000000001n, false, "0n == -0x10000000000000001n"); >-assert.sameValue(0x10000000000000000n == 0x100000000n, false, "0x10000000000000000n == 0x100000000n"); >-assert.sameValue(0x100000000n == 0x10000000000000000n, false, "0x100000000n == 0x10000000000000000n"); >+assert.sameValue( >+ 0x100000000n == 0x10000000000000000n, >+ false, >+ 'The result of (0x100000000n == 0x10000000000000000n) is false' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/equals/bigint-and-boolean.js b/JSTests/test262/test/language/expressions/equals/bigint-and-boolean.js >index c40ab3adfb0164d74e275448bcc40c42239c71fa..74cec0f374327152c03542e0532a2484856eb793 100644 >--- a/JSTests/test262/test/language/expressions/equals/bigint-and-boolean.js >+++ b/JSTests/test262/test/language/expressions/equals/bigint-and-boolean.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Non-strict equality comparison of BigInt and Boolean values > esid: sec-abstract-equality-comparison >@@ -14,20 +13,19 @@ > > features: [BigInt] > ---*/ >- >-assert.sameValue(-1n == false, false, "-1n == false"); >-assert.sameValue(false == -1n, false, "false == -1n"); >-assert.sameValue(-1n == true, false, "-1n == true"); >-assert.sameValue(true == -1n, false, "true == -1n"); >-assert.sameValue(0n == false, true, "0n == false"); >-assert.sameValue(false == 0n, true, "false == 0n"); >-assert.sameValue(0n == true, false, "0n == true"); >-assert.sameValue(true == 0n, false, "true == 0n"); >-assert.sameValue(1n == false, false, "1n == false"); >-assert.sameValue(false == 1n, false, "false == 1n"); >-assert.sameValue(1n == true, true, "1n == true"); >-assert.sameValue(true == 1n, true, "true == 1n"); >-assert.sameValue(2n == false, false, "2n == false"); >-assert.sameValue(false == 2n, false, "false == 2n"); >-assert.sameValue(2n == true, false, "2n == true"); >-assert.sameValue(true == 2n, false, "true == 2n"); >+assert.sameValue(-1n == false, false, 'The result of (-1n == false) is false'); >+assert.sameValue(false == -1n, false, 'The result of (false == -1n) is false'); >+assert.sameValue(-1n == true, false, 'The result of (-1n == true) is false'); >+assert.sameValue(true == -1n, false, 'The result of (true == -1n) is false'); >+assert.sameValue(0n == false, true, 'The result of (0n == false) is true'); >+assert.sameValue(false == 0n, true, 'The result of (false == 0n) is true'); >+assert.sameValue(0n == true, false, 'The result of (0n == true) is false'); >+assert.sameValue(true == 0n, false, 'The result of (true == 0n) is false'); >+assert.sameValue(1n == false, false, 'The result of (1n == false) is false'); >+assert.sameValue(false == 1n, false, 'The result of (false == 1n) is false'); >+assert.sameValue(1n == true, true, 'The result of (1n == true) is true'); >+assert.sameValue(true == 1n, true, 'The result of (true == 1n) is true'); >+assert.sameValue(2n == false, false, 'The result of (2n == false) is false'); >+assert.sameValue(false == 2n, false, 'The result of (false == 2n) is false'); >+assert.sameValue(2n == true, false, 'The result of (2n == true) is false'); >+assert.sameValue(true == 2n, false, 'The result of (true == 2n) is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/equals/bigint-and-incomparable-primitive.js b/JSTests/test262/test/language/expressions/equals/bigint-and-incomparable-primitive.js >index 06df0c7329fbbf5986fe2f8155c4680d9eee558d..231232190f6a0a5c3acd51c2becb9f28d25e64f4 100644 >--- a/JSTests/test262/test/language/expressions/equals/bigint-and-incomparable-primitive.js >+++ b/JSTests/test262/test/language/expressions/equals/bigint-and-incomparable-primitive.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Non-strict equality comparison of BigInt and miscellaneous primitive values > esid: sec-equality-operators-runtime-semantics-evaluation >@@ -11,16 +10,15 @@ > > features: [BigInt, Symbol] > ---*/ >- >-assert.sameValue(0n == undefined, false, "0n == undefined"); >-assert.sameValue(undefined == 0n, false, "undefined == 0n"); >-assert.sameValue(1n == undefined, false, "1n == undefined"); >-assert.sameValue(undefined == 1n, false, "undefined == 1n"); >-assert.sameValue(0n == null, false, "0n == null"); >-assert.sameValue(null == 0n, false, "null == 0n"); >-assert.sameValue(1n == null, false, "1n == null"); >-assert.sameValue(null == 1n, false, "null == 1n"); >-assert.sameValue(0n == Symbol("1"), false, '0n == Symbol("1")'); >-assert.sameValue(Symbol("1") == 0n, false, 'Symbol("1") == 0n'); >-assert.sameValue(1n == Symbol("1"), false, '1n == Symbol("1")'); >-assert.sameValue(Symbol("1") == 1n, false, 'Symbol("1") == 1n'); >+assert.sameValue(0n == undefined, false, 'The result of (0n == undefined) is false'); >+assert.sameValue(undefined == 0n, false, 'The result of (undefined == 0n) is false'); >+assert.sameValue(1n == undefined, false, 'The result of (1n == undefined) is false'); >+assert.sameValue(undefined == 1n, false, 'The result of (undefined == 1n) is false'); >+assert.sameValue(0n == null, false, 'The result of (0n == null) is false'); >+assert.sameValue(null == 0n, false, 'The result of (null == 0n) is false'); >+assert.sameValue(1n == null, false, 'The result of (1n == null) is false'); >+assert.sameValue(null == 1n, false, 'The result of (null == 1n) is false'); >+assert.sameValue(0n == Symbol('1'), false, 'The result of (0n == Symbol("1")) is false'); >+assert.sameValue(Symbol('1') == 0n, false, 'The result of (Symbol("1") == 0n) is false'); >+assert.sameValue(1n == Symbol('1'), false, 'The result of (1n == Symbol("1")) is false'); >+assert.sameValue(Symbol('1') == 1n, false, 'The result of (Symbol("1") == 1n) is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/equals/bigint-and-non-finite.js b/JSTests/test262/test/language/expressions/equals/bigint-and-non-finite.js >index 763233f87f1f441f655693c2bb673cf1b905cf7b..51827da711a905a6af41f41050c595b56da9420d 100644 >--- a/JSTests/test262/test/language/expressions/equals/bigint-and-non-finite.js >+++ b/JSTests/test262/test/language/expressions/equals/bigint-and-non-finite.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Non-strict equality comparison of BigInt and non-finite Number values > esid: sec-abstract-equality-comparison >@@ -10,22 +9,21 @@ > > features: [BigInt] > ---*/ >- >-assert.sameValue(0n == Infinity, false, "0n == Infinity"); >-assert.sameValue(Infinity == 0n, false, "Infinity == 0n"); >-assert.sameValue(1n == Infinity, false, "1n == Infinity"); >-assert.sameValue(Infinity == 1n, false, "Infinity == 1n"); >-assert.sameValue(-1n == Infinity, false, "-1n == Infinity"); >-assert.sameValue(Infinity == -1n, false, "Infinity == -1n"); >-assert.sameValue(0n == -Infinity, false, "0n == -Infinity"); >-assert.sameValue(-Infinity == 0n, false, "-Infinity == 0n"); >-assert.sameValue(1n == -Infinity, false, "1n == -Infinity"); >-assert.sameValue(-Infinity == 1n, false, "-Infinity == 1n"); >-assert.sameValue(-1n == -Infinity, false, "-1n == -Infinity"); >-assert.sameValue(-Infinity == -1n, false, "-Infinity == -1n"); >-assert.sameValue(0n == NaN, false, "0n == NaN"); >-assert.sameValue(NaN == 0n, false, "NaN == 0n"); >-assert.sameValue(1n == NaN, false, "1n == NaN"); >-assert.sameValue(NaN == 1n, false, "NaN == 1n"); >-assert.sameValue(-1n == NaN, false, "-1n == NaN"); >-assert.sameValue(NaN == -1n, false, "NaN == -1n"); >+assert.sameValue(0n == Infinity, false, 'The result of (0n == Infinity) is false'); >+assert.sameValue(Infinity == 0n, false, 'The result of (Infinity == 0n) is false'); >+assert.sameValue(1n == Infinity, false, 'The result of (1n == Infinity) is false'); >+assert.sameValue(Infinity == 1n, false, 'The result of (Infinity == 1n) is false'); >+assert.sameValue(-1n == Infinity, false, 'The result of (-1n == Infinity) is false'); >+assert.sameValue(Infinity == -1n, false, 'The result of (Infinity == -1n) is false'); >+assert.sameValue(0n == -Infinity, false, 'The result of (0n == -Infinity) is false'); >+assert.sameValue(-Infinity == 0n, false, 'The result of (-Infinity == 0n) is false'); >+assert.sameValue(1n == -Infinity, false, 'The result of (1n == -Infinity) is false'); >+assert.sameValue(-Infinity == 1n, false, 'The result of (-Infinity == 1n) is false'); >+assert.sameValue(-1n == -Infinity, false, 'The result of (-1n == -Infinity) is false'); >+assert.sameValue(-Infinity == -1n, false, 'The result of (-Infinity == -1n) is false'); >+assert.sameValue(0n == NaN, false, 'The result of (0n == NaN) is false'); >+assert.sameValue(NaN == 0n, false, 'The result of (NaN == 0n) is false'); >+assert.sameValue(1n == NaN, false, 'The result of (1n == NaN) is false'); >+assert.sameValue(NaN == 1n, false, 'The result of (NaN == 1n) is false'); >+assert.sameValue(-1n == NaN, false, 'The result of (-1n == NaN) is false'); >+assert.sameValue(NaN == -1n, false, 'The result of (NaN == -1n) is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/equals/bigint-and-number-extremes.js b/JSTests/test262/test/language/expressions/equals/bigint-and-number-extremes.js >index bd49a2b54a788c9fc61ec08b55aba8ad816692db..62265413dda6d370d0ab8f858f3d9602594723c8 100644 >--- a/JSTests/test262/test/language/expressions/equals/bigint-and-number-extremes.js >+++ b/JSTests/test262/test/language/expressions/equals/bigint-and-number-extremes.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Non-strict equality comparison of BigInt and large Number values > esid: sec-abstract-equality-comparison >@@ -10,32 +9,53 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(1n == Number.MAX_VALUE, false, 'The result of (1n == Number.MAX_VALUE) is false'); >+assert.sameValue(Number.MAX_VALUE == 1n, false, 'The result of (Number.MAX_VALUE == 1n) is false'); >+ >+assert.sameValue( >+ 1n == -Number.MAX_VALUE, >+ false, >+ 'The result of (1n == -Number.MAX_VALUE) is false' >+); >+ >+assert.sameValue( >+ -Number.MAX_VALUE == 1n, >+ false, >+ 'The result of (-Number.MAX_VALUE == 1n) is false' >+); > >-assert.sameValue(1n == Number.MAX_VALUE, false, "1n == Number.MAX_VALUE"); >-assert.sameValue(Number.MAX_VALUE == 1n, false, "Number.MAX_VALUE == 1n"); >-assert.sameValue(1n == -Number.MAX_VALUE, false, "1n == -Number.MAX_VALUE"); >-assert.sameValue(-Number.MAX_VALUE == 1n, false, "-Number.MAX_VALUE == 1n"); > assert.sameValue( > 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn == Number.MAX_VALUE, > false, >- "0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn == Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn == Number.MAX_VALUE) is false' >+); >+ > assert.sameValue( > Number.MAX_VALUE == 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn, > false, >- "Number.MAX_VALUE == 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn"); >+ 'The result of (Number.MAX_VALUE == 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn) is false' >+); >+ > assert.sameValue( > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n == Number.MAX_VALUE, > true, >- "0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n == Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n == Number.MAX_VALUE) is true' >+); >+ > assert.sameValue( > Number.MAX_VALUE == 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n, > true, >- "Number.MAX_VALUE == 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n"); >+ 'The result of (Number.MAX_VALUE == 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n) is true' >+); >+ > assert.sameValue( > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n == Number.MAX_VALUE, > false, >- "0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n == Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n == Number.MAX_VALUE) is false' >+); >+ > assert.sameValue( > Number.MAX_VALUE == 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n, > false, >- "Number.MAX_VALUE == 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n"); >+ 'The result of (Number.MAX_VALUE == 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n) is false' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/equals/bigint-and-number.js b/JSTests/test262/test/language/expressions/equals/bigint-and-number.js >index 1b7bceaa1dc71b59a3cf5d85db98d573ec72731e..a771d2101a82908f617172a824af64ee58c38fbb 100644 >--- a/JSTests/test262/test/language/expressions/equals/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/equals/bigint-and-number.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Non-strict equality comparison of BigInt and Number values > esid: sec-abstract-equality-comparison >@@ -10,24 +9,43 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n == 0, true, 'The result of (0n == 0) is true'); >+assert.sameValue(0 == 0n, true, 'The result of (0 == 0n) is true'); >+assert.sameValue(0n == -0, true, 'The result of (0n == -0) is true'); >+assert.sameValue(-0 == 0n, true, 'The result of (-0 == 0n) is true'); >+assert.sameValue(0n == 0.000000000001, false, 'The result of (0n == 0.000000000001) is false'); >+assert.sameValue(0.000000000001 == 0n, false, 'The result of (0.000000000001 == 0n) is false'); >+assert.sameValue(0n == 1, false, 'The result of (0n == 1) is false'); >+assert.sameValue(1 == 0n, false, 'The result of (1 == 0n) is false'); >+assert.sameValue(1n == 0, false, 'The result of (1n == 0) is false'); >+assert.sameValue(0 == 1n, false, 'The result of (0 == 1n) is false'); >+assert.sameValue(1n == 0.999999999999, false, 'The result of (1n == 0.999999999999) is false'); >+assert.sameValue(0.999999999999 == 1n, false, 'The result of (0.999999999999 == 1n) is false'); >+assert.sameValue(1n == 1, true, 'The result of (1n == 1) is true'); >+assert.sameValue(1 == 1n, true, 'The result of (1 == 1n) is true'); >+assert.sameValue(0n == Number.MIN_VALUE, false, 'The result of (0n == Number.MIN_VALUE) is false'); >+assert.sameValue(Number.MIN_VALUE == 0n, false, 'The result of (Number.MIN_VALUE == 0n) is false'); >+ >+assert.sameValue( >+ 0n == -Number.MIN_VALUE, >+ false, >+ 'The result of (0n == -Number.MIN_VALUE) is false' >+); >+ >+assert.sameValue( >+ -Number.MIN_VALUE == 0n, >+ false, >+ 'The result of (-Number.MIN_VALUE == 0n) is false' >+); >+ >+assert.sameValue( >+ -10n == Number.MIN_VALUE, >+ false, >+ 'The result of (-10n == Number.MIN_VALUE) is false' >+); > >-assert.sameValue(0n == 0, true, "0n == 0"); >-assert.sameValue(0 == 0n, true, "0 == 0n"); >-assert.sameValue(0n == -0, true, "0n == -0"); >-assert.sameValue(-0 == 0n, true, "-0 == 0n"); >-assert.sameValue(0n == 0.000000000001, false, "0n == 0.000000000001"); >-assert.sameValue(0.000000000001 == 0n, false, "0.000000000001 == 0n"); >-assert.sameValue(0n == 1, false, "0n == 1"); >-assert.sameValue(1 == 0n, false, "1 == 0n"); >-assert.sameValue(1n == 0, false, "1n == 0"); >-assert.sameValue(0 == 1n, false, "0 == 1n"); >-assert.sameValue(1n == 0.999999999999, false, "1n == 0.999999999999"); >-assert.sameValue(0.999999999999 == 1n, false, "0.999999999999 == 1n"); >-assert.sameValue(1n == 1, true, "1n == 1"); >-assert.sameValue(1 == 1n, true, "1 == 1n"); >-assert.sameValue(0n == Number.MIN_VALUE, false, "0n == Number.MIN_VALUE"); >-assert.sameValue(Number.MIN_VALUE == 0n, false, "Number.MIN_VALUE == 0n"); >-assert.sameValue(0n == -Number.MIN_VALUE, false, "0n == -Number.MIN_VALUE"); >-assert.sameValue(-Number.MIN_VALUE == 0n, false, "-Number.MIN_VALUE == 0n"); >-assert.sameValue(-10n == Number.MIN_VALUE, false, "-10n == Number.MIN_VALUE"); >-assert.sameValue(Number.MIN_VALUE == -10n, false, "Number.MIN_VALUE == -10n"); >+assert.sameValue( >+ Number.MIN_VALUE == -10n, >+ false, >+ 'The result of (Number.MIN_VALUE == -10n) is false' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/equals/bigint-and-object.js b/JSTests/test262/test/language/expressions/equals/bigint-and-object.js >index fe3438bb5356dde8b9c71d8d889afa64b55b1dc6..6f5dd056ca0de6c6472e8fec6dd8f62272f3ae41 100644 >--- a/JSTests/test262/test/language/expressions/equals/bigint-and-object.js >+++ b/JSTests/test262/test/language/expressions/equals/bigint-and-object.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Non-strict equality comparison of BigInt values and non-primitive objects > esid: sec-abstract-equality-comparison >@@ -21,36 +20,115 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n == Object(0n), true, 'The result of (0n == Object(0n)) is true'); >+assert.sameValue(Object(0n) == 0n, true, 'The result of (Object(0n) == 0n) is true'); >+assert.sameValue(0n == Object(1n), false, 'The result of (0n == Object(1n)) is false'); >+assert.sameValue(Object(1n) == 0n, false, 'The result of (Object(1n) == 0n) is false'); >+assert.sameValue(1n == Object(0n), false, 'The result of (1n == Object(0n)) is false'); >+assert.sameValue(Object(0n) == 1n, false, 'The result of (Object(0n) == 1n) is false'); >+assert.sameValue(1n == Object(1n), true, 'The result of (1n == Object(1n)) is true'); >+assert.sameValue(Object(1n) == 1n, true, 'The result of (Object(1n) == 1n) is true'); >+assert.sameValue(2n == Object(0n), false, 'The result of (2n == Object(0n)) is false'); >+assert.sameValue(Object(0n) == 2n, false, 'The result of (Object(0n) == 2n) is false'); >+assert.sameValue(2n == Object(1n), false, 'The result of (2n == Object(1n)) is false'); >+assert.sameValue(Object(1n) == 2n, false, 'The result of (Object(1n) == 2n) is false'); >+assert.sameValue(2n == Object(2n), true, 'The result of (2n == Object(2n)) is true'); >+assert.sameValue(Object(2n) == 2n, true, 'The result of (Object(2n) == 2n) is true'); >+assert.sameValue(0n == {}, false, 'The result of (0n == {}) is false'); >+assert.sameValue({} == 0n, false, 'The result of (({}) == 0n) is false'); >+ >+assert.sameValue(0n == { >+ valueOf: function() { >+ return 0n; >+ } >+}, true, 'The result of (0n == {valueOf: function() {return 0n;}}) is true'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 0n; >+ } >+} == 0n, true, 'The result of (({valueOf: function() {return 0n;}}) == 0n) is true'); >+ >+assert.sameValue(0n == { >+ valueOf: function() { >+ return 1n; >+ } >+}, false, 'The result of (0n == {valueOf: function() {return 1n;}}) is false'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 1n; >+ } >+} == 0n, false, 'The result of (({valueOf: function() {return 1n;}}) == 0n) is false'); >+ >+assert.sameValue(0n == { >+ toString: function() { >+ return '0'; >+ } >+}, true, 'The result of (0n == {toString: function() {return "0";}}) is true'); >+ >+assert.sameValue({ >+ toString: function() { >+ return '0'; >+ } >+} == 0n, true, 'The result of (({toString: function() {return "0";}}) == 0n) is true'); >+ >+assert.sameValue(0n == { >+ toString: function() { >+ return '1'; >+ } >+}, false, 'The result of (0n == {toString: function() {return "1";}}) is false'); >+ >+assert.sameValue({ >+ toString: function() { >+ return '1'; >+ } >+} == 0n, false, 'The result of (({toString: function() {return "1";}}) == 0n) is false'); >+ >+assert.sameValue(900719925474099101n == { >+ valueOf: function() { >+ return 900719925474099101n; >+ } >+}, true, 'The result of (900719925474099101n == {valueOf: function() {return 900719925474099101n;}}) is true'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 900719925474099101n; >+ } >+} == 900719925474099101n, true, 'The result of (({valueOf: function() {return 900719925474099101n;}}) == 900719925474099101n) is true'); >+ >+assert.sameValue(900719925474099101n == { >+ valueOf: function() { >+ return 900719925474099102n; >+ } >+}, false, 'The result of (900719925474099101n == {valueOf: function() {return 900719925474099102n;}}) is false'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 900719925474099102n; >+ } >+} == 900719925474099101n, false, 'The result of (({valueOf: function() {return 900719925474099102n;}}) == 900719925474099101n) is false'); >+ >+assert.sameValue(900719925474099101n == { >+ toString: function() { >+ return '900719925474099101'; >+ } >+}, true, 'The result of (900719925474099101n == {toString: function() {return "900719925474099101";}}) is true'); >+ >+assert.sameValue({ >+ toString: function() { >+ return '900719925474099101'; >+ } >+} == 900719925474099101n, true, 'The result of (({toString: function() {return "900719925474099101";}}) == 900719925474099101n) is true'); >+ >+assert.sameValue(900719925474099101n == { >+ toString: function() { >+ return '900719925474099102'; >+ } >+}, false, 'The result of (900719925474099101n == {toString: function() {return "900719925474099102";}}) is false'); > >-assert.sameValue(0n == Object(0n), true, "0n == Object(0n)"); >-assert.sameValue(Object(0n) == 0n, true, "Object(0n) == 0n"); >-assert.sameValue(0n == Object(1n), false, "0n == Object(1n)"); >-assert.sameValue(Object(1n) == 0n, false, "Object(1n) == 0n"); >-assert.sameValue(1n == Object(0n), false, "1n == Object(0n)"); >-assert.sameValue(Object(0n) == 1n, false, "Object(0n) == 1n"); >-assert.sameValue(1n == Object(1n), true, "1n == Object(1n)"); >-assert.sameValue(Object(1n) == 1n, true, "Object(1n) == 1n"); >-assert.sameValue(2n == Object(0n), false, "2n == Object(0n)"); >-assert.sameValue(Object(0n) == 2n, false, "Object(0n) == 2n"); >-assert.sameValue(2n == Object(1n), false, "2n == Object(1n)"); >-assert.sameValue(Object(1n) == 2n, false, "Object(1n) == 2n"); >-assert.sameValue(2n == Object(2n), true, "2n == Object(2n)"); >-assert.sameValue(Object(2n) == 2n, true, "Object(2n) == 2n"); >-assert.sameValue(0n == {}, false, "0n == {}"); >-assert.sameValue({} == 0n, false, "{} == 0n"); >-assert.sameValue(0n == {valueOf: function() { return 0n; }}, true, "0n == {valueOf: function() { return 0n; }}"); >-assert.sameValue({valueOf: function() { return 0n; }} == 0n, true, "{valueOf: function() { return 0n; }} == 0n"); >-assert.sameValue(0n == {valueOf: function() { return 1n; }}, false, "0n == {valueOf: function() { return 1n; }}"); >-assert.sameValue({valueOf: function() { return 1n; }} == 0n, false, "{valueOf: function() { return 1n; }} == 0n"); >-assert.sameValue(0n == {toString: function() { return "0"; }}, true, '0n == {toString: function() { return "0"; }}'); >-assert.sameValue({toString: function() { return "0"; }} == 0n, true, '{toString: function() { return "0"; }} == 0n'); >-assert.sameValue(0n == {toString: function() { return "1"; }}, false, '0n == {toString: function() { return "1"; }}'); >-assert.sameValue({toString: function() { return "1"; }} == 0n, false, '{toString: function() { return "1"; }} == 0n'); >-assert.sameValue(900719925474099101n == {valueOf: function() { return 900719925474099101n; }}, true, "900719925474099101n == {valueOf: function() { return 900719925474099101n; }}"); >-assert.sameValue({valueOf: function() { return 900719925474099101n; }} == 900719925474099101n, true, "{valueOf: function() { return 900719925474099101n; }} == 900719925474099101n"); >-assert.sameValue(900719925474099101n == {valueOf: function() { return 900719925474099102n; }}, false, "900719925474099101n == {valueOf: function() { return 900719925474099102n; }}"); >-assert.sameValue({valueOf: function() { return 900719925474099102n; }} == 900719925474099101n, false, "{valueOf: function() { return 900719925474099102n; }} == 900719925474099101n"); >-assert.sameValue(900719925474099101n == {toString: function() { return "900719925474099101"; }}, true, '900719925474099101n == {toString: function() { return "900719925474099101"; }}'); >-assert.sameValue({toString: function() { return "900719925474099101"; }} == 900719925474099101n, true, '{toString: function() { return "900719925474099101"; }} == 900719925474099101n'); >-assert.sameValue(900719925474099101n == {toString: function() { return "900719925474099102"; }}, false, '900719925474099101n == {toString: function() { return "900719925474099102"; }}'); >-assert.sameValue({toString: function() { return "900719925474099102"; }} == 900719925474099101n, false, '{toString: function() { return "900719925474099102"; }} == 900719925474099101n'); >+assert.sameValue({ >+ toString: function() { >+ return '900719925474099102'; >+ } >+} == 900719925474099101n, false, 'The result of (({toString: function() {return "900719925474099102";}}) == 900719925474099101n) is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/equals/bigint-and-string.js b/JSTests/test262/test/language/expressions/equals/bigint-and-string.js >index e72d615d2cfa54591e1ab7097cf23efbcd3a8c77..92c3fa8990a76c21760b71fad9c28a250c4c9d8f 100644 >--- a/JSTests/test262/test/language/expressions/equals/bigint-and-string.js >+++ b/JSTests/test262/test/language/expressions/equals/bigint-and-string.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Non-strict equality comparison of BigInt and String values > esid: sec-abstract-equality-comparison >@@ -9,40 +8,59 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n == '', true, 'The result of (0n == "") is true'); >+assert.sameValue('' == 0n, true, 'The result of ("" == 0n) is true'); >+assert.sameValue(0n == '-0', true, 'The result of (0n == "-0") is true'); >+assert.sameValue('-0' == 0n, true, 'The result of ("-0" == 0n) is true'); >+assert.sameValue(0n == '0', true, 'The result of (0n == "0") is true'); >+assert.sameValue('0' == 0n, true, 'The result of ("0" == 0n) is true'); >+assert.sameValue(0n == '-1', false, 'The result of (0n == "-1") is false'); >+assert.sameValue('-1' == 0n, false, 'The result of ("-1" == 0n) is false'); >+assert.sameValue(0n == '1', false, 'The result of (0n == "1") is false'); >+assert.sameValue('1' == 0n, false, 'The result of ("1" == 0n) is false'); >+assert.sameValue(0n == 'foo', false, 'The result of (0n == "foo") is false'); >+assert.sameValue('foo' == 0n, false, 'The result of ("foo" == 0n) is false'); >+assert.sameValue(1n == '', false, 'The result of (1n == "") is false'); >+assert.sameValue('' == 1n, false, 'The result of ("" == 1n) is false'); >+assert.sameValue(1n == '-0', false, 'The result of (1n == "-0") is false'); >+assert.sameValue('-0' == 1n, false, 'The result of ("-0" == 1n) is false'); >+assert.sameValue(1n == '0', false, 'The result of (1n == "0") is false'); >+assert.sameValue('0' == 1n, false, 'The result of ("0" == 1n) is false'); >+assert.sameValue(1n == '-1', false, 'The result of (1n == "-1") is false'); >+assert.sameValue('-1' == 1n, false, 'The result of ("-1" == 1n) is false'); >+assert.sameValue(1n == '1', true, 'The result of (1n == "1") is true'); >+assert.sameValue('1' == 1n, true, 'The result of ("1" == 1n) is true'); >+assert.sameValue(1n == 'foo', false, 'The result of (1n == "foo") is false'); >+assert.sameValue('foo' == 1n, false, 'The result of ("foo" == 1n) is false'); >+assert.sameValue(-1n == '-', false, 'The result of (-1n == "-") is false'); >+assert.sameValue('-' == -1n, false, 'The result of ("-" == -1n) is false'); >+assert.sameValue(-1n == '-0', false, 'The result of (-1n == "-0") is false'); >+assert.sameValue('-0' == -1n, false, 'The result of ("-0" == -1n) is false'); >+assert.sameValue(-1n == '-1', true, 'The result of (-1n == "-1") is true'); >+assert.sameValue('-1' == -1n, true, 'The result of ("-1" == -1n) is true'); >+assert.sameValue(-1n == '-foo', false, 'The result of (-1n == "-foo") is false'); >+assert.sameValue('-foo' == -1n, false, 'The result of ("-foo" == -1n) is false'); >+ >+assert.sameValue( >+ 900719925474099101n == '900719925474099101', >+ true, >+ 'The result of (900719925474099101n == "900719925474099101") is true' >+); >+ >+assert.sameValue( >+ '900719925474099101' == 900719925474099101n, >+ true, >+ 'The result of ("900719925474099101" == 900719925474099101n) is true' >+); >+ >+assert.sameValue( >+ 900719925474099102n == '900719925474099101', >+ false, >+ 'The result of (900719925474099102n == "900719925474099101") is false' >+); > >-assert.sameValue(0n == "", true, '0n == ""'); >-assert.sameValue("" == 0n, true, '"" == 0n'); >-assert.sameValue(0n == "-0", true, '0n == "-0"'); >-assert.sameValue("-0" == 0n, true, '"-0" == 0n'); >-assert.sameValue(0n == "0", true, '0n == "0"'); >-assert.sameValue("0" == 0n, true, '"0" == 0n'); >-assert.sameValue(0n == "-1", false, '0n == "-1"'); >-assert.sameValue("-1" == 0n, false, '"-1" == 0n'); >-assert.sameValue(0n == "1", false, '0n == "1"'); >-assert.sameValue("1" == 0n, false, '"1" == 0n'); >-assert.sameValue(0n == "foo", false, '0n == "foo"'); >-assert.sameValue("foo" == 0n, false, '"foo" == 0n'); >-assert.sameValue(1n == "", false, '1n == ""'); >-assert.sameValue("" == 1n, false, '"" == 1n'); >-assert.sameValue(1n == "-0", false, '1n == "-0"'); >-assert.sameValue("-0" == 1n, false, '"-0" == 1n'); >-assert.sameValue(1n == "0", false, '1n == "0"'); >-assert.sameValue("0" == 1n, false, '"0" == 1n'); >-assert.sameValue(1n == "-1", false, '1n == "-1"'); >-assert.sameValue("-1" == 1n, false, '"-1" == 1n'); >-assert.sameValue(1n == "1", true, '1n == "1"'); >-assert.sameValue("1" == 1n, true, '"1" == 1n'); >-assert.sameValue(1n == "foo", false, '1n == "foo"'); >-assert.sameValue("foo" == 1n, false, '"foo" == 1n'); >-assert.sameValue(-1n == "-", false, '-1n == "-"'); >-assert.sameValue("-" == -1n, false, '"-" == -1n'); >-assert.sameValue(-1n == "-0", false, '-1n == "-0"'); >-assert.sameValue("-0" == -1n, false, '"-0" == -1n'); >-assert.sameValue(-1n == "-1", true, '-1n == "-1"'); >-assert.sameValue("-1" == -1n, true, '"-1" == -1n'); >-assert.sameValue(-1n == "-foo", false, '-1n == "-foo"'); >-assert.sameValue("-foo" == -1n, false, '"-foo" == -1n'); >-assert.sameValue(900719925474099101n == "900719925474099101", true, '900719925474099101n == "900719925474099101"'); >-assert.sameValue("900719925474099101" == 900719925474099101n, true, '"900719925474099101" == 900719925474099101n'); >-assert.sameValue(900719925474099102n == "900719925474099101", false, '900719925474099102n == "900719925474099101"'); >-assert.sameValue("900719925474099101" == 900719925474099102n, false, '"900719925474099101" == 900719925474099102n'); >+assert.sameValue( >+ '900719925474099101' == 900719925474099102n, >+ false, >+ 'The result of ("900719925474099101" == 900719925474099102n) is false' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/exponentiation/bigint-and-number.js b/JSTests/test262/test/language/expressions/exponentiation/bigint-and-number.js >index f8b96cac6a22420f2adc075eae17bcaae91c75b2..8a0416622a5095fb50464d729a71caf7ed540b10 100644 >--- a/JSTests/test262/test/language/expressions/exponentiation/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/exponentiation/bigint-and-number.js >@@ -9,24 +9,82 @@ > Let exponent be ? ToNumeric(rightValue). > If Type(base) does not equal Type(exponent), throw a TypeError exception. > ---*/ >+assert.throws(TypeError, function() { >+ 1n ** 1; >+}, '1n ** 1 throws TypeError'); > >-assert.throws(TypeError, function() { 1n ** 1; }, "1n ** 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 ** 1n; }, "1 ** 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) ** 1; }, "Object(1n) ** 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 ** Object(1n); }, "1 ** Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n ** Object(1); }, "1n ** Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) ** 1n; }, "Object(1) ** 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) ** Object(1); }, "Object(1n) ** Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) ** Object(1n); }, "Object(1) ** Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n ** NaN; }, "1n ** NaN throws TypeError"); >-assert.throws(TypeError, function() { NaN ** 1n; }, "NaN ** 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n ** Infinity; }, "1n ** Infinity throws TypeError"); >-assert.throws(TypeError, function() { Infinity ** 1n; }, "Infinity ** 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n ** true; }, "1n ** true throws TypeError"); >-assert.throws(TypeError, function() { true ** 1n; }, "true ** 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n ** "1"; }, '1n ** "1" throws TypeError'); >-assert.throws(TypeError, function() { "1" ** 1n; }, '"1" ** 1n throws TypeError'); >-assert.throws(TypeError, function() { 1n ** null; }, "1n ** null throws TypeError"); >-assert.throws(TypeError, function() { null ** 1n; }, "null ** 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n ** undefined; }, "1n ** undefined throws TypeError"); >-assert.throws(TypeError, function() { undefined ** 1n; }, "undefined ** 1n throws TypeError"); >+assert.throws(TypeError, function() { >+ 1 ** 1n; >+}, '1 ** 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) ** 1; >+}, 'Object(1n) ** 1 throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1 ** Object(1n); >+}, '1 ** Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n ** Object(1); >+}, '1n ** Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) ** 1n; >+}, 'Object(1) ** 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) ** Object(1); >+}, 'Object(1n) ** Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) ** Object(1n); >+}, 'Object(1) ** Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n ** NaN; >+}, '1n ** NaN throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ NaN ** 1n; >+}, 'NaN ** 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n ** Infinity; >+}, '1n ** Infinity throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Infinity ** 1n; >+}, 'Infinity ** 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n ** true; >+}, '1n ** true throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ true ** 1n; >+}, 'true ** 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n ** '1'; >+}, '1n ** "1" throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ '1' ** 1n; >+}, '"1" ** 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n ** null; >+}, '1n ** null throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ null ** 1n; >+}, 'null ** 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n ** undefined; >+}, '1n ** undefined throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ undefined ** 1n; >+}, 'undefined ** 1n throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/exponentiation/bigint-arithmetic.js b/JSTests/test262/test/language/expressions/exponentiation/bigint-arithmetic.js >index 0ff0e0c01943c19632cf3508311f82e6b7a4fa7a..cd7267ffe38ad0b9859714487d28779bfd8b10bb 100644 >--- a/JSTests/test262/test/language/expressions/exponentiation/bigint-arithmetic.js >+++ b/JSTests/test262/test/language/expressions/exponentiation/bigint-arithmetic.js >@@ -1,38 +1,75 @@ > // Copyright (C) 2017 Robin Templeton. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > esid: sec-exp-operator-runtime-semantics-evaluation > description: BigInt exponentiation arithmetic > features: [BigInt] > ---*/ >+assert.sameValue( >+ 0x123n ** 0x123n, >+ 0x37AA7FAA38F2F6026AABEFE979EA730BA9EA4CB99E2E3F645D515D3BBE2D84BCD89F8A034BADF3E3DC0CF417258371B31F4555DC0883DA96760AB157DB7DFFF5E3E97A3EAAB8328B2B178060B5A5E4C4DD8BC8D66B7F4D9F0E0B1AC3A566FDE0A15EBF8DBDBD0565C5FBDB7C123CF250E271DF5C38BC6746A1327F09C7FB4B96E0EDA45C429799CA80B1DB039692C70DFFE4E66F1D9CAB4270863B09A7918F774D686F685F560FEDC6B7B85CB45DE5EEEF6A5FE2FC8B5037FB421204641909347C91F2DC252F49B8F310E867E56D1CA2E81EE9A3AA568682C7B8B41D709A2E7F8D9A8D8C56D6BE78B6CA8365E362B81A64974C315FB8FA50CED4F7944F28FA3ECA77B8BCB56DC69814328F891E6065D108EEE7B8E695038090CCA10C0E68DD7A36CFAA1C26CDFEC369FBn, >+ 'The result of (0x123n ** 0x123n) is 0x37AA7FAA38F2F6026AABEFE979EA730BA9EA4CB99E2E3F645D515D3BBE2D84BCD89F8A034BADF3E3DC0CF417258371B31F4555DC0883DA96760AB157DB7DFFF5E3E97A3EAAB8328B2B178060B5A5E4C4DD8BC8D66B7F4D9F0E0B1AC3A566FDE0A15EBF8DBDBD0565C5FBDB7C123CF250E271DF5C38BC6746A1327F09C7FB4B96E0EDA45C429799CA80B1DB039692C70DFFE4E66F1D9CAB4270863B09A7918F774D686F685F560FEDC6B7B85CB45DE5EEEF6A5FE2FC8B5037FB421204641909347C91F2DC252F49B8F310E867E56D1CA2E81EE9A3AA568682C7B8B41D709A2E7F8D9A8D8C56D6BE78B6CA8365E362B81A64974C315FB8FA50CED4F7944F28FA3ECA77B8BCB56DC69814328F891E6065D108EEE7B8E695038090CCA10C0E68DD7A36CFAA1C26CDFEC369FBn' >+); >+ >+assert.sameValue( >+ 0x123n ** 0xFFn, >+ 0x8D5BB75861377EC967BF78FDF39CE51696FBD34722999943F8865938772B517167CD5ED775A78987F5106831F4978E0709032B26ED8F13F814699DB8AB3ACD5CF631F2D8B8B706FCF5EF441AAEE745A795EC5CB86A5E8D87D09F648EFC557B98F73E750FEC9AED061D47806F269CCCDFB6D513912A82AE79B171D76AF6D926BC4F4C4DA43A6EFB4D9D1672E356CC1F74A29AF80D53A8F27592F6191AB9B3D57FA2C435CB2CE8F18A3B3448F88F4BAD3606A9878DA9528B569BADAC0C1EC0B1A2B06CD4C64DEEC940807DFD05C56E3E17ADB1A88EDAF0D67C87C1F871BFB5C47CAE8365FE33538317EE2DF4EE52636CE1BDA9E41C7DA72826E4C097A53BD73D8D697E10D28Bn, >+ 'The result of (0x123n ** 0xFFn) is 0x8D5BB75861377EC967BF78FDF39CE51696FBD34722999943F8865938772B517167CD5ED775A78987F5106831F4978E0709032B26ED8F13F814699DB8AB3ACD5CF631F2D8B8B706FCF5EF441AAEE745A795EC5CB86A5E8D87D09F648EFC557B98F73E750FEC9AED061D47806F269CCCDFB6D513912A82AE79B171D76AF6D926BC4F4C4DA43A6EFB4D9D1672E356CC1F74A29AF80D53A8F27592F6191AB9B3D57FA2C435CB2CE8F18A3B3448F88F4BAD3606A9878DA9528B569BADAC0C1EC0B1A2B06CD4C64DEEC940807DFD05C56E3E17ADB1A88EDAF0D67C87C1F871BFB5C47CAE8365FE33538317EE2DF4EE52636CE1BDA9E41C7DA72826E4C097A53BD73D8D697E10D28Bn' >+); >+ >+assert.sameValue(0x123n ** 0x3n, 0x178027Bn, 'The result of (0x123n ** 0x3n) is 0x178027Bn'); >+assert.sameValue(0x123n ** 0x2n, 0x14AC9n, 'The result of (0x123n ** 0x2n) is 0x14AC9n'); >+assert.sameValue(0x123n ** 0x1n, 0x123n, 'The result of (0x123n ** 0x1n) is 0x123n'); >+ >+assert.sameValue( >+ 0xFFn ** 0x123n, >+ 0x51F5CA2E1A36F5FF1ED3D393D76FBC3612B38EB64E00EDAC5E95ADE0D16D0B044C8E9F2B77B3F31AF9159F482205541E9D3BE9D248FF39CE6524874EBCA60E06302E8B505D11EEEEE869C7F801A82B9739C197E6D63A1EB2D29B5AD5EED4773C762106E9F66BFCB6C11450218973C69DED3FE51FF881AD0430675BF54320513EA766117C50C554E86E22A5ACFD8047D5470B4FCBCB9EFC86196CA77C58F1BEB09F76160D641B82E2481BEDAE089207D49FE0FB7DE14B6C4BC82E9C58140746AC8E74C3353AAF5F9CF47ED1F87C52F463C053DB63CD08CC9866EBA274D39B6B357ADADAD4D210167EF7363453D42BC225D90070336861F2D259489D78B7F04B05FE65E29151ADD2B8F4D318011988550CE590DBA4C868AC65AA325051DF613D6C2E22FFn, >+ 'The result of (0xFFn ** 0x123n) is 0x51F5CA2E1A36F5FF1ED3D393D76FBC3612B38EB64E00EDAC5E95ADE0D16D0B044C8E9F2B77B3F31AF9159F482205541E9D3BE9D248FF39CE6524874EBCA60E06302E8B505D11EEEEE869C7F801A82B9739C197E6D63A1EB2D29B5AD5EED4773C762106E9F66BFCB6C11450218973C69DED3FE51FF881AD0430675BF54320513EA766117C50C554E86E22A5ACFD8047D5470B4FCBCB9EFC86196CA77C58F1BEB09F76160D641B82E2481BEDAE089207D49FE0FB7DE14B6C4BC82E9C58140746AC8E74C3353AAF5F9CF47ED1F87C52F463C053DB63CD08CC9866EBA274D39B6B357ADADAD4D210167EF7363453D42BC225D90070336861F2D259489D78B7F04B05FE65E29151ADD2B8F4D318011988550CE590DBA4C868AC65AA325051DF613D6C2E22FFn' >+); >+ >+assert.sameValue( >+ 0xFFn ** 0xFFn, >+ 0x5E5C8B0EB95AB08F9D37EF127FC01BD0E33DE52647528396D78D5F8DA31989E67814F6BBA1FB0F0207010FF5F2347B19D5F6598FC91BF5A88F77DAA3D7B382FEC484F3D205C06A34445384C0E7AB0D883788C68C012CB433055EDDA746A48409444EA91147273B79FC3EABB70ECA552AF650C234BB01ED404427F17CDDDD71D08E39EF9C3982E3CE44E670456AA8154C1FDBD9C35947F494636A425C69BF89E9C75AD3B7A0A559AF0F5DA9947C8DEBA64417310713B23E7EF4DE50BB2A3E90BC2AC3DA5201CCA8D6E5DFEA887C4F7A4E92175D9F88BD2779B57F9EB35BE7528F965A06DA0AC41DCB3A34F1D8AB7D8FEE620A94FAA42C395997756B007FFEFFn, >+ 'The result of (0xFFn ** 0xFFn) is 0x5E5C8B0EB95AB08F9D37EF127FC01BD0E33DE52647528396D78D5F8DA31989E67814F6BBA1FB0F0207010FF5F2347B19D5F6598FC91BF5A88F77DAA3D7B382FEC484F3D205C06A34445384C0E7AB0D883788C68C012CB433055EDDA746A48409444EA91147273B79FC3EABB70ECA552AF650C234BB01ED404427F17CDDDD71D08E39EF9C3982E3CE44E670456AA8154C1FDBD9C35947F494636A425C69BF89E9C75AD3B7A0A559AF0F5DA9947C8DEBA64417310713B23E7EF4DE50BB2A3E90BC2AC3DA5201CCA8D6E5DFEA887C4F7A4E92175D9F88BD2779B57F9EB35BE7528F965A06DA0AC41DCB3A34F1D8AB7D8FEE620A94FAA42C395997756B007FFEFFn' >+); >+ >+assert.sameValue(0xFFn ** 0x3n, 0xFD02FFn, 'The result of (0xFFn ** 0x3n) is 0xFD02FFn'); >+assert.sameValue(0xFFn ** 0x2n, 0xFE01n, 'The result of (0xFFn ** 0x2n) is 0xFE01n'); >+assert.sameValue(0xFFn ** 0x1n, 0xFFn, 'The result of (0xFFn ** 0x1n) is 0xFFn'); >+ >+assert.sameValue( >+ 0x3n ** 0x123n, >+ 0x25609213623D7D6219085CF49D306450BF6519835586C19D3A4F3A2C5F35B44A300C8A76E11708B5495B9C3EE756BBF19E3FD15CE625D3C0539Bn, >+ 'The result of (0x3n ** 0x123n) is 0x25609213623D7D6219085CF49D306450BF6519835586C19D3A4F3A2C5F35B44A300C8A76E11708B5495B9C3EE756BBF19E3FD15CE625D3C0539Bn' >+); >+ >+assert.sameValue( >+ 0x3n ** 0xFFn, >+ 0x11F1B08E87EC42C5D83C3218FC83C41DCFD9F4428F4F92AF1AAA80AA46162B1F71E981273601F4AD1DD4709B5ACA650265A6ABn, >+ 'The result of (0x3n ** 0xFFn) is 0x11F1B08E87EC42C5D83C3218FC83C41DCFD9F4428F4F92AF1AAA80AA46162B1F71E981273601F4AD1DD4709B5ACA650265A6ABn' >+); >+ >+assert.sameValue(0x3n ** 0x3n, 0x1Bn, 'The result of (0x3n ** 0x3n) is 0x1Bn'); >+assert.sameValue(0x3n ** 0x2n, 0x9n, 'The result of (0x3n ** 0x2n) is 0x9n'); >+assert.sameValue(0x3n ** 0x1n, 0x3n, 'The result of (0x3n ** 0x1n) is 0x3n'); >+ >+assert.sameValue( >+ 0x2n ** 0x123n, >+ 0x8000000000000000000000000000000000000000000000000000000000000000000000000n, >+ 'The result of (0x2n ** 0x123n) is 0x8000000000000000000000000000000000000000000000000000000000000000000000000n' >+); >+ >+assert.sameValue( >+ 0x2n ** 0xFFn, >+ 0x8000000000000000000000000000000000000000000000000000000000000000n, >+ 'The result of (0x2n ** 0xFFn) is 0x8000000000000000000000000000000000000000000000000000000000000000n' >+); > >-function testExpt(x, y, z) { >- assert.sameValue(x ** y, z, x + " ** " + y + " = " + z); >-} >- >-testExpt(0x123n, 0x123n, 0x37AA7FAA38F2F6026AABEFE979EA730BA9EA4CB99E2E3F645D515D3BBE2D84BCD89F8A034BADF3E3DC0CF417258371B31F4555DC0883DA96760AB157DB7DFFF5E3E97A3EAAB8328B2B178060B5A5E4C4DD8BC8D66B7F4D9F0E0B1AC3A566FDE0A15EBF8DBDBD0565C5FBDB7C123CF250E271DF5C38BC6746A1327F09C7FB4B96E0EDA45C429799CA80B1DB039692C70DFFE4E66F1D9CAB4270863B09A7918F774D686F685F560FEDC6B7B85CB45DE5EEEF6A5FE2FC8B5037FB421204641909347C91F2DC252F49B8F310E867E56D1CA2E81EE9A3AA568682C7B8B41D709A2E7F8D9A8D8C56D6BE78B6CA8365E362B81A64974C315FB8FA50CED4F7944F28FA3ECA77B8BCB56DC69814328F891E6065D108EEE7B8E695038090CCA10C0E68DD7A36CFAA1C26CDFEC369FBn); >-testExpt(0x123n, 0xFFn, 0x8D5BB75861377EC967BF78FDF39CE51696FBD34722999943F8865938772B517167CD5ED775A78987F5106831F4978E0709032B26ED8F13F814699DB8AB3ACD5CF631F2D8B8B706FCF5EF441AAEE745A795EC5CB86A5E8D87D09F648EFC557B98F73E750FEC9AED061D47806F269CCCDFB6D513912A82AE79B171D76AF6D926BC4F4C4DA43A6EFB4D9D1672E356CC1F74A29AF80D53A8F27592F6191AB9B3D57FA2C435CB2CE8F18A3B3448F88F4BAD3606A9878DA9528B569BADAC0C1EC0B1A2B06CD4C64DEEC940807DFD05C56E3E17ADB1A88EDAF0D67C87C1F871BFB5C47CAE8365FE33538317EE2DF4EE52636CE1BDA9E41C7DA72826E4C097A53BD73D8D697E10D28Bn); >-testExpt(0x123n, 0x3n, 0x178027Bn); >-testExpt(0x123n, 0x2n, 0x14AC9n); >-testExpt(0x123n, 0x1n, 0x123n); >-testExpt(0xFFn, 0x123n, 0x51F5CA2E1A36F5FF1ED3D393D76FBC3612B38EB64E00EDAC5E95ADE0D16D0B044C8E9F2B77B3F31AF9159F482205541E9D3BE9D248FF39CE6524874EBCA60E06302E8B505D11EEEEE869C7F801A82B9739C197E6D63A1EB2D29B5AD5EED4773C762106E9F66BFCB6C11450218973C69DED3FE51FF881AD0430675BF54320513EA766117C50C554E86E22A5ACFD8047D5470B4FCBCB9EFC86196CA77C58F1BEB09F76160D641B82E2481BEDAE089207D49FE0FB7DE14B6C4BC82E9C58140746AC8E74C3353AAF5F9CF47ED1F87C52F463C053DB63CD08CC9866EBA274D39B6B357ADADAD4D210167EF7363453D42BC225D90070336861F2D259489D78B7F04B05FE65E29151ADD2B8F4D318011988550CE590DBA4C868AC65AA325051DF613D6C2E22FFn); >-testExpt(0xFFn, 0xFFn, 0x5E5C8B0EB95AB08F9D37EF127FC01BD0E33DE52647528396D78D5F8DA31989E67814F6BBA1FB0F0207010FF5F2347B19D5F6598FC91BF5A88F77DAA3D7B382FEC484F3D205C06A34445384C0E7AB0D883788C68C012CB433055EDDA746A48409444EA91147273B79FC3EABB70ECA552AF650C234BB01ED404427F17CDDDD71D08E39EF9C3982E3CE44E670456AA8154C1FDBD9C35947F494636A425C69BF89E9C75AD3B7A0A559AF0F5DA9947C8DEBA64417310713B23E7EF4DE50BB2A3E90BC2AC3DA5201CCA8D6E5DFEA887C4F7A4E92175D9F88BD2779B57F9EB35BE7528F965A06DA0AC41DCB3A34F1D8AB7D8FEE620A94FAA42C395997756B007FFEFFn); >-testExpt(0xFFn, 0x3n, 0xFD02FFn); >-testExpt(0xFFn, 0x2n, 0xFE01n); >-testExpt(0xFFn, 0x1n, 0xFFn); >-testExpt(0x3n, 0x123n, 0x25609213623D7D6219085CF49D306450BF6519835586C19D3A4F3A2C5F35B44A300C8A76E11708B5495B9C3EE756BBF19E3FD15CE625D3C0539Bn); >-testExpt(0x3n, 0xFFn, 0x11F1B08E87EC42C5D83C3218FC83C41DCFD9F4428F4F92AF1AAA80AA46162B1F71E981273601F4AD1DD4709B5ACA650265A6ABn); >-testExpt(0x3n, 0x3n, 0x1Bn); >-testExpt(0x3n, 0x2n, 0x9n); >-testExpt(0x3n, 0x1n, 0x3n); >-testExpt(0x2n, 0x123n, 0x8000000000000000000000000000000000000000000000000000000000000000000000000n); >-testExpt(0x2n, 0xFFn, 0x8000000000000000000000000000000000000000000000000000000000000000n); >-testExpt(0x2n, 0x3n, 0x8n); >-testExpt(0x2n, 0x2n, 0x4n); >-testExpt(0x2n, 0x1n, 0x2n); >-testExpt(0x1n, 0x123n, 0x1n); >-testExpt(0x1n, 0xFFn, 0x1n); >-testExpt(0x1n, 0x3n, 0x1n); >-testExpt(0x1n, 0x2n, 0x1n); >-testExpt(0x1n, 0x1n, 0x1n); >+assert.sameValue(0x2n ** 0x3n, 0x8n, 'The result of (0x2n ** 0x3n) is 0x8n'); >+assert.sameValue(0x2n ** 0x2n, 0x4n, 'The result of (0x2n ** 0x2n) is 0x4n'); >+assert.sameValue(0x2n ** 0x1n, 0x2n, 'The result of (0x2n ** 0x1n) is 0x2n'); >+assert.sameValue(0x1n ** 0x123n, 0x1n, 'The result of (0x1n ** 0x123n) is 0x1n'); >+assert.sameValue(0x1n ** 0xFFn, 0x1n, 'The result of (0x1n ** 0xFFn) is 0x1n'); >+assert.sameValue(0x1n ** 0x3n, 0x1n, 'The result of (0x1n ** 0x3n) is 0x1n'); >+assert.sameValue(0x1n ** 0x2n, 0x1n, 'The result of (0x1n ** 0x2n) is 0x1n'); >+assert.sameValue(0x1n ** 0x1n, 0x1n, 'The result of (0x1n ** 0x1n) is 0x1n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/exponentiation/bigint-errors.js b/JSTests/test262/test/language/expressions/exponentiation/bigint-errors.js >index 61b2a8192279c280ac50155c204ff8cb096a677c..72a2cc65e3126e3d6e70a173db378c338cfb9180 100644 >--- a/JSTests/test262/test/language/expressions/exponentiation/bigint-errors.js >+++ b/JSTests/test262/test/language/expressions/exponentiation/bigint-errors.js >@@ -5,58 +5,66 @@ > esid: sec-exp-operator-runtime-semantics-evaluation > features: [BigInt, Symbol, Symbol.toPrimitive, computed-property-names] > ---*/ >- > assert.throws(TypeError, function() { >- Symbol("1") ** 0n; >-}, "ToBigInt: Symbol => TypeError"); >+ Symbol('1') ** 0n; >+}, 'Symbol("1") ** 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n ** Symbol("1"); >-}, "ToBigInt: Symbol => TypeError"); >+ 0n ** Symbol('1'); >+}, '0n ** Symbol("1") throws TypeError'); >+ > assert.throws(TypeError, function() { >- Object(Symbol("1")) ** 0n; >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ Object(Symbol('1')) ** 0n; >+}, 'Object(Symbol("1")) ** 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n ** Object(Symbol("1")); >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ 0n ** Object(Symbol('1')); >+}, '0n ** Object(Symbol("1")) throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) ** 0n; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '({[Symbol.toPrimitive]: function() {return Symbol("1");}}) ** 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ** { > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '0n ** {[Symbol.toPrimitive]: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) ** 0n; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '({valueOf: function() {return Symbol("1");}}) ** 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ** { > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '0n ** {valueOf: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) ** 0n; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '({toString: function() {return Symbol("1");}}) ** 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ** { > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '0n ** {toString: function() {return Symbol("1");}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/exponentiation/bigint-exp-operator-negative-throws.js b/JSTests/test262/test/language/expressions/exponentiation/bigint-exp-operator-negative-throws.js >deleted file mode 100644 >index f46a9beac57d0f2137d64123cbc48b28e15bf0df..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/language/expressions/exponentiation/bigint-exp-operator-negative-throws.js >+++ /dev/null >@@ -1,36 +0,0 @@ >-// Copyright (C) 2017 Robin Templeton. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >- >-/*--- >-description: If the BigInt exponent is < 0, throw a RangeError exception >-esid: sec-exp-operator-runtime-semantics-evaluation >-info: | >- ExponentiationExpression: UpdateExpression ** ExponentiationExpression >- >- ... >- 9. Return ? Type(base)::exponentiate(base, exponent). >- >- BigInt::exponentiate (base, exponent) >- >- 1. If exponent < 0, throw a RangeError exception. >- 2. If base is 0n and exponent is 0n, return 1n. >- 3. Return a BigInt representing the mathematical value of base raised to the power exponent. >- ... >-features: [BigInt] >----*/ >- >-assert.throws(RangeError, function() { >- 1n ** -1n >-}); >- >-assert.throws(RangeError, function() { >- 0n ** -1n >-}); >- >-assert.throws(RangeError, function() { >- (-1n) ** -1n >-}); >- >-assert.throws(RangeError, function() { >- 1n ** -100000000000000000n >-}); >diff --git a/JSTests/test262/test/language/expressions/exponentiation/bigint-negative-exponent-throws.js b/JSTests/test262/test/language/expressions/exponentiation/bigint-negative-exponent-throws.js >new file mode 100644 >index 0000000000000000000000000000000000000000..d3dffb701d33e4d216057a0730cbf2ab21704054 >--- /dev/null >+++ b/JSTests/test262/test/language/expressions/exponentiation/bigint-negative-exponent-throws.js >@@ -0,0 +1,32 @@ >+// Copyright (C) 2017 Robin Templeton. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+description: If the BigInt exponent is < 0, throw a RangeError exception >+esid: sec-exp-operator-runtime-semantics-evaluation >+info: | >+ ExponentiationExpression: UpdateExpression ** ExponentiationExpression >+ >+ ... >+ 9. Return ? Type(base)::exponentiate(base, exponent). >+ >+ BigInt::exponentiate (base, exponent) >+ >+ 1. If exponent < 0, throw a RangeError exception. >+ ... >+features: [BigInt] >+---*/ >+assert.throws(RangeError, function() { >+ 1n ** -1n; >+}, '1n ** -1n throws RangeError'); >+ >+assert.throws(RangeError, function() { >+ 0n ** -1n; >+}, '0n ** -1n throws RangeError'); >+ >+assert.throws(RangeError, function() { >+ (-1n) ** -1n; >+}, '(-1n) ** -1n throws RangeError'); >+ >+assert.throws(RangeError, function() { >+ 1n ** -100000000000000000n; >+}, '1n ** -100000000000000000n throws RangeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/exponentiation/bigint-toprimitive.js b/JSTests/test262/test/language/expressions/exponentiation/bigint-toprimitive.js >index 8e8277df366d7e4d9a206fe5808a0d90848d6b18..b63120ac333dc90d8fd06b2329f7fe3dba369323 100644 >--- a/JSTests/test262/test/language/expressions/exponentiation/bigint-toprimitive.js >+++ b/JSTests/test262/test/language/expressions/exponentiation/bigint-toprimitive.js >@@ -5,304 +5,368 @@ > esid: sec-exp-operator-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >- > function err() { > throw new Test262Error(); > } > > function MyError() {} > >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}) ** 1n, 2n, "ToPrimitive: @@toPrimitive takes precedence"); >+} ** 1n, 2n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) ** 1n) is 2n'); >+ > assert.sameValue(1n ** { > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}, 1n, "ToPrimitive: @@toPrimitive takes precedence"); >-assert.sameValue(({ >+}, 1n, 'The result of (1n ** {[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > }, >+ > toString: err >-}) ** 1n, 2n, "ToPrimitive: valueOf takes precedence over toString"); >+} ** 1n, 2n, 'The result of (({valueOf: function() {return 2n;}, toString: err}) ** 1n) is 2n'); >+ > assert.sameValue(1n ** { > valueOf: function() { > return 2n; > }, >+ > toString: err >-}, 1n, "ToPrimitive: valueOf takes precedence over toString"); >-assert.sameValue(({ >+}, 1n, 'The result of (1n ** {valueOf: function() {return 2n;}, toString: err}) is 1n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) ** 1n, 2n, "ToPrimitive: toString with no valueOf"); >+} ** 1n, 2n, 'The result of (({toString: function() {return 2n;}}) ** 1n) is 2n'); >+ > assert.sameValue(1n ** { > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: toString with no valueOf"); >-assert.sameValue(({ >+}, 1n, 'The result of (1n ** {toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}) ** 1n, 2n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >+} ** 1n, 2n, 'The result of (({[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) ** 1n) is 2n'); >+ > assert.sameValue(1n ** { > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >-assert.sameValue(({ >+}, 1n, 'The result of (1n ** {[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}) ** 1n, 2n, "ToPrimitive: skip @@toPrimitive when it's null"); >+} ** 1n, 2n, 'The result of (({[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) ** 1n) is 2n'); >+ > assert.sameValue(1n ** { > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip @@toPrimitive when it's null"); >-assert.sameValue(({ >+}, 1n, 'The result of (1n ** {[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: null, >+ > toString: function() { > return 2n; > } >-}) ** 1n, 2n, "ToPrimitive: skip valueOf when it's not callable"); >+} ** 1n, 2n, 'The result of (({valueOf: null, toString: function() {return 2n;}}) ** 1n) is 2n'); >+ > assert.sameValue(1n ** { > valueOf: null, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 1n, 'The result of (1n ** {valueOf: null, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}) ** 1n, 2n, "ToPrimitive: skip valueOf when it's not callable"); >+} ** 1n, 2n, 'The result of (({valueOf: 1, toString: function() {return 2n;}}) ** 1n) is 2n'); >+ > assert.sameValue(1n ** { > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 1n, 'The result of (1n ** {valueOf: 1, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}) ** 1n, 2n, "ToPrimitive: skip valueOf when it's not callable"); >+} ** 1n, 2n, 'The result of (({valueOf: {}, toString: function() {return 2n;}}) ** 1n) is 2n'); >+ > assert.sameValue(1n ** { > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 1n, 'The result of (1n ** {valueOf: {}, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}) ** 1n, 2n, "ToPrimitive: skip valueOf when it returns an object"); >+} ** 1n, 2n, 'The result of (({valueOf: function() {return {};}, toString: function() {return 2n;}}) ** 1n) is 2n'); >+ > assert.sameValue(1n ** { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it returns an object"); >-assert.sameValue(({ >+}, 1n, 'The result of (1n ** {valueOf: function() {return {};}, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}) ** 1n, 2n, "ToPrimitive: skip valueOf when it returns an object"); >+} ** 1n, 2n, 'The result of (({valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) ** 1n) is 2n'); >+ > assert.sameValue(1n ** { > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it returns an object"); >+}, 1n, 'The result of (1n ** {valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) is 1n'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: 1 > }) ** 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: 1}) ** 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ** { > [Symbol.toPrimitive]: 1 > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n ** {[Symbol.toPrimitive]: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: {} > }) ** 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: {}}) ** 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ** { > [Symbol.toPrimitive]: {} > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n ** {[Symbol.toPrimitive]: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return Object(1); > } > }) ** 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return Object(1);}}) ** 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ** { > [Symbol.toPrimitive]: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n ** {[Symbol.toPrimitive]: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return {}; > } > }) ** 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return {};}}) ** 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ** { > [Symbol.toPrimitive]: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n ** {[Symbol.toPrimitive]: function() {return {};}} throws TypeError'); >+ > assert.throws(MyError, function() { > ({ > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }) ** 0n; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '({[Symbol.toPrimitive]: function() {throw new MyError();}}) ** 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n ** { > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '0n ** {[Symbol.toPrimitive]: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > valueOf: function() { > throw new MyError(); > } > }) ** 0n; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '({valueOf: function() {throw new MyError();}}) ** 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n ** { > valueOf: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '0n ** {valueOf: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > toString: function() { > throw new MyError(); > } > }) ** 0n; >-}, "ToPrimitive: propagate errors from toString"); >+}, '({toString: function() {throw new MyError();}}) ** 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n ** { > toString: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from toString"); >+}, '0n ** {toString: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: null, > toString: null > }) ** 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: null, toString: null}) ** 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ** { > valueOf: null, > toString: null > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n ** {valueOf: null, toString: null} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: 1, > toString: 1 > }) ** 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: 1, toString: 1}) ** 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ** { > valueOf: 1, > toString: 1 > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n ** {valueOf: 1, toString: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: {}, > toString: {} > }) ** 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: {}, toString: {}}) ** 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ** { > valueOf: {}, > toString: {} > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n ** {valueOf: {}, toString: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }) ** 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return Object(1);}, toString: function() {return Object(1);}}) ** 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ** { > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n ** {valueOf: function() {return Object(1);}, toString: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }) ** 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return {};}, toString: function() {return {};}}) ** 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n ** { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n ** {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/exponentiation/bigint-wrapped-values.js b/JSTests/test262/test/language/expressions/exponentiation/bigint-wrapped-values.js >index bc93102f4f2e8a76f3870cd6bb078ba243e52f36..fa0906102e081258dc79145d6524a51456d6567d 100644 >--- a/JSTests/test262/test/language/expressions/exponentiation/bigint-wrapped-values.js >+++ b/JSTests/test262/test/language/expressions/exponentiation/bigint-wrapped-values.js >@@ -5,36 +5,41 @@ > esid: sec-exp-operator-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >+assert.sameValue(Object(2n) ** 1n, 2n, 'The result of (Object(2n) ** 1n) is 2n'); >+assert.sameValue(1n ** Object(2n), 1n, 'The result of (1n ** Object(2n)) is 1n'); > >-assert.sameValue(Object(2n) ** 1n, 2n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(1n ** Object(2n), 1n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > } >-}) ** 1n, 2n, "ToPrimitive: @@toPrimitive"); >+} ** 1n, 2n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}}) ** 1n) is 2n'); >+ > assert.sameValue(1n ** { > [Symbol.toPrimitive]: function() { > return 2n; > } >-}, 1n, "ToPrimitive: @@toPrimitive"); >-assert.sameValue(({ >+}, 1n, 'The result of (1n ** {[Symbol.toPrimitive]: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > } >-}) ** 1n, 2n, "ToPrimitive: valueOf"); >+} ** 1n, 2n, 'The result of (({valueOf: function() {return 2n;}}) ** 1n) is 2n'); >+ > assert.sameValue(1n ** { > valueOf: function() { > return 2n; > } >-}, 1n, "ToPrimitive: valueOf"); >-assert.sameValue(({ >+}, 1n, 'The result of (1n ** {valueOf: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) ** 1n, 2n, "ToPrimitive: toString"); >+} ** 1n, 2n, 'The result of (({toString: function() {return 2n;}}) ** 1n) is 2n'); >+ > assert.sameValue(1n ** { > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: toString"); >+}, 1n, 'The result of (1n ** {toString: function() {return 2n;}}) is 1n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/exponentiation/bigint-zero-base-zero-exponent.js b/JSTests/test262/test/language/expressions/exponentiation/bigint-zero-base-zero-exponent.js >index a1080f465b1aee478fb86c393df54dab85fdc504..55ffbf231a6091636580e2799dd91628c8ec39d8 100644 >--- a/JSTests/test262/test/language/expressions/exponentiation/bigint-zero-base-zero-exponent.js >+++ b/JSTests/test262/test/language/expressions/exponentiation/bigint-zero-base-zero-exponent.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Robin Templeton. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: If the BigInt base and exponent are both 0n, return 1n > esid: sec-exp-operator-runtime-semantics-evaluation >@@ -18,5 +17,4 @@ > ... > features: [BigInt] > ---*/ >- >-assert.sameValue(0n ** 0n, 1n); >+assert.sameValue(0n ** 0n, 1n, 'The result of (0n ** 0n) is 1n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-bigint.js b/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-bigint.js >index 6ce429669a1906d8017a817e165642751ffdc246..4c1c7670a26e4f206f88a2da9b7119db478bc13c 100644 >--- a/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-bigint.js >+++ b/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-bigint.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Comparisons of BigInt and BigInt values > esid: sec-abstract-relational-comparison >@@ -20,37 +19,146 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n >= 0n, true, 'The result of (0n >= 0n) is true'); >+assert.sameValue(1n >= 1n, true, 'The result of (1n >= 1n) is true'); >+assert.sameValue(-1n >= -1n, true, 'The result of (-1n >= -1n) is true'); >+assert.sameValue(0n >= -0n, true, 'The result of (0n >= -0n) is true'); >+assert.sameValue(-0n >= 0n, true, 'The result of (-0n >= 0n) is true'); >+assert.sameValue(0n >= 1n, false, 'The result of (0n >= 1n) is false'); >+assert.sameValue(1n >= 0n, true, 'The result of (1n >= 0n) is true'); >+assert.sameValue(0n >= -1n, true, 'The result of (0n >= -1n) is true'); >+assert.sameValue(-1n >= 0n, false, 'The result of (-1n >= 0n) is false'); >+assert.sameValue(1n >= -1n, true, 'The result of (1n >= -1n) is true'); >+assert.sameValue(-1n >= 1n, false, 'The result of (-1n >= 1n) is false'); >+ >+assert.sameValue( >+ 0x1fffffffffffff01n >= 0x1fffffffffffff02n, >+ false, >+ 'The result of (0x1fffffffffffff01n >= 0x1fffffffffffff02n) is false' >+); >+ >+assert.sameValue( >+ 0x1fffffffffffff02n >= 0x1fffffffffffff01n, >+ true, >+ 'The result of (0x1fffffffffffff02n >= 0x1fffffffffffff01n) is true' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff01n >= -0x1fffffffffffff02n, >+ true, >+ 'The result of (-0x1fffffffffffff01n >= -0x1fffffffffffff02n) is true' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff02n >= -0x1fffffffffffff01n, >+ false, >+ 'The result of (-0x1fffffffffffff02n >= -0x1fffffffffffff01n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n >= 0n, >+ true, >+ 'The result of (0x10000000000000000n >= 0n) is true' >+); >+ >+assert.sameValue( >+ 0n >= 0x10000000000000000n, >+ false, >+ 'The result of (0n >= 0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n >= 1n, >+ true, >+ 'The result of (0x10000000000000000n >= 1n) is true' >+); >+ >+assert.sameValue( >+ 1n >= 0x10000000000000000n, >+ false, >+ 'The result of (1n >= 0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n >= -1n, >+ true, >+ 'The result of (0x10000000000000000n >= -1n) is true' >+); >+ >+assert.sameValue( >+ -1n >= 0x10000000000000000n, >+ false, >+ 'The result of (-1n >= 0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000001n >= 0n, >+ true, >+ 'The result of (0x10000000000000001n >= 0n) is true' >+); >+ >+assert.sameValue( >+ 0n >= 0x10000000000000001n, >+ false, >+ 'The result of (0n >= 0x10000000000000001n) is false' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n >= 0n, >+ false, >+ 'The result of (-0x10000000000000000n >= 0n) is false' >+); >+ >+assert.sameValue( >+ 0n >= -0x10000000000000000n, >+ true, >+ 'The result of (0n >= -0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n >= 1n, >+ false, >+ 'The result of (-0x10000000000000000n >= 1n) is false' >+); >+ >+assert.sameValue( >+ 1n >= -0x10000000000000000n, >+ true, >+ 'The result of (1n >= -0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n >= -1n, >+ false, >+ 'The result of (-0x10000000000000000n >= -1n) is false' >+); >+ >+assert.sameValue( >+ -1n >= -0x10000000000000000n, >+ true, >+ 'The result of (-1n >= -0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ -0x10000000000000001n >= 0n, >+ false, >+ 'The result of (-0x10000000000000001n >= 0n) is false' >+); >+ >+assert.sameValue( >+ 0n >= -0x10000000000000001n, >+ true, >+ 'The result of (0n >= -0x10000000000000001n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n >= 0x100000000n, >+ true, >+ 'The result of (0x10000000000000000n >= 0x100000000n) is true' >+); > >-assert.sameValue(0n >= 0n, true, "0n >= 0n"); >-assert.sameValue(1n >= 1n, true, "1n >= 1n"); >-assert.sameValue(-1n >= -1n, true, "-1n >= -1n"); >-assert.sameValue(0n >= -0n, true, "0n >= -0n"); >-assert.sameValue(-0n >= 0n, true, "-0n >= 0n"); >-assert.sameValue(0n >= 1n, false, "0n >= 1n"); >-assert.sameValue(1n >= 0n, true, "1n >= 0n"); >-assert.sameValue(0n >= -1n, true, "0n >= -1n"); >-assert.sameValue(-1n >= 0n, false, "-1n >= 0n"); >-assert.sameValue(1n >= -1n, true, "1n >= -1n"); >-assert.sameValue(-1n >= 1n, false, "-1n >= 1n"); >-assert.sameValue(0x1fffffffffffff01n >= 0x1fffffffffffff02n, false, "0x1fffffffffffff01n >= 0x1fffffffffffff02n"); >-assert.sameValue(0x1fffffffffffff02n >= 0x1fffffffffffff01n, true, "0x1fffffffffffff02n >= 0x1fffffffffffff01n"); >-assert.sameValue(-0x1fffffffffffff01n >= -0x1fffffffffffff02n, true, "-0x1fffffffffffff01n >= -0x1fffffffffffff02n"); >-assert.sameValue(-0x1fffffffffffff02n >= -0x1fffffffffffff01n, false, "-0x1fffffffffffff02n >= -0x1fffffffffffff01n"); >-assert.sameValue(0x10000000000000000n >= 0n, true, "0x10000000000000000n >= 0n"); >-assert.sameValue(0n >= 0x10000000000000000n, false, "0n >= 0x10000000000000000n"); >-assert.sameValue(0x10000000000000000n >= 1n, true, "0x10000000000000000n >= 1n"); >-assert.sameValue(1n >= 0x10000000000000000n, false, "1n >= 0x10000000000000000n"); >-assert.sameValue(0x10000000000000000n >= -1n, true, "0x10000000000000000n >= -1n"); >-assert.sameValue(-1n >= 0x10000000000000000n, false, "-1n >= 0x10000000000000000n"); >-assert.sameValue(0x10000000000000001n >= 0n, true, "0x10000000000000001n >= 0n"); >-assert.sameValue(0n >= 0x10000000000000001n, false, "0n >= 0x10000000000000001n"); >-assert.sameValue(-0x10000000000000000n >= 0n, false, "-0x10000000000000000n >= 0n"); >-assert.sameValue(0n >= -0x10000000000000000n, true, "0n >= -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000000n >= 1n, false, "-0x10000000000000000n >= 1n"); >-assert.sameValue(1n >= -0x10000000000000000n, true, "1n >= -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000000n >= -1n, false, "-0x10000000000000000n >= -1n"); >-assert.sameValue(-1n >= -0x10000000000000000n, true, "-1n >= -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000001n >= 0n, false, "-0x10000000000000001n >= 0n"); >-assert.sameValue(0n >= -0x10000000000000001n, true, "0n >= -0x10000000000000001n"); >-assert.sameValue(0x10000000000000000n >= 0x100000000n, true, "0x10000000000000000n >= 0x100000000n"); >-assert.sameValue(0x100000000n >= 0x10000000000000000n, false, "0x100000000n >= 0x10000000000000000n"); >+assert.sameValue( >+ 0x100000000n >= 0x10000000000000000n, >+ false, >+ 'The result of (0x100000000n >= 0x10000000000000000n) is false' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-incomparable-string.js b/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-incomparable-string.js >index 0a0303814f1b7c6a9cb068aadb03d8194914ef45..abd0bdf453cb6b70b3fb05f6e51e4e4eb55ca450 100644 >--- a/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-incomparable-string.js >+++ b/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-incomparable-string.js >@@ -1,30 +1,27 @@ > // Copyright (C) 2018 Igalia, S.L. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Relational comparison of BigInt and string values > esid: sec-abstract-relational-comparison > features: [BigInt] > ---*/ >- >-assert.sameValue(1n >= "0n", false, "1n >= '0n'"); >-assert.sameValue(1n >= "0.", false, "1n >= '0.'"); >-assert.sameValue(1n >= ".0", false, "1n >= '.0'"); >-assert.sameValue(1n >= "0/1", false, "1n >= '0/1'"); >-assert.sameValue(1n >= "z0", false, "1n >= 'z0'"); >-assert.sameValue(1n >= "0z", false, "1n >= '0z'"); >-assert.sameValue(1n >= "++0", false, "1n >= '++0'"); >-assert.sameValue(1n >= "--0", false, "1n >= '--0'"); >-assert.sameValue(1n >= "0e0", false, "1n >= '0e0'"); >-assert.sameValue(1n >= "Infinity", false, "1n >= 'Infinity'"); >- >-assert.sameValue("1n" >= 0n, false, "'1n' >= 0n"); >-assert.sameValue("1." >= 0n, false, "'1.' >= 0n"); >-assert.sameValue(".1" >= 0n, false, "'.1' >= 0n"); >-assert.sameValue("1/1" >= 0n, false, "'1/1' >= 0n"); >-assert.sameValue("z1" >= 0n, false, "'z1' >= 0n"); >-assert.sameValue("1z" >= 0n, false, "'1z' >= 0n"); >-assert.sameValue("++1" >= 0n, false, "'++1' >= 0n"); >-assert.sameValue("--1" >= 0n, false, "'--1' >= 0n"); >-assert.sameValue("1e0" >= 0n, false, "'1e0' >= 0n"); >-assert.sameValue("Infinity" >= 0n, false, "'Infinity' >= 0n"); >+assert.sameValue(1n >= '0n', false, 'The result of (1n >= "0n") is false'); >+assert.sameValue(1n >= '0.', false, 'The result of (1n >= "0.") is false'); >+assert.sameValue(1n >= '.0', false, 'The result of (1n >= ".0") is false'); >+assert.sameValue(1n >= '0/1', false, 'The result of (1n >= "0/1") is false'); >+assert.sameValue(1n >= 'z0', false, 'The result of (1n >= "z0") is false'); >+assert.sameValue(1n >= '0z', false, 'The result of (1n >= "0z") is false'); >+assert.sameValue(1n >= '++0', false, 'The result of (1n >= "++0") is false'); >+assert.sameValue(1n >= '--0', false, 'The result of (1n >= "--0") is false'); >+assert.sameValue(1n >= '0e0', false, 'The result of (1n >= "0e0") is false'); >+assert.sameValue(1n >= 'Infinity', false, 'The result of (1n >= "Infinity") is false'); >+assert.sameValue('1n' >= 0n, false, 'The result of ("1n" >= 0n) is false'); >+assert.sameValue('1.' >= 0n, false, 'The result of ("1." >= 0n) is false'); >+assert.sameValue('.1' >= 0n, false, 'The result of (".1" >= 0n) is false'); >+assert.sameValue('1/1' >= 0n, false, 'The result of ("1/1" >= 0n) is false'); >+assert.sameValue('z1' >= 0n, false, 'The result of ("z1" >= 0n) is false'); >+assert.sameValue('1z' >= 0n, false, 'The result of ("1z" >= 0n) is false'); >+assert.sameValue('++1' >= 0n, false, 'The result of ("++1" >= 0n) is false'); >+assert.sameValue('--1' >= 0n, false, 'The result of ("--1" >= 0n) is false'); >+assert.sameValue('1e0' >= 0n, false, 'The result of ("1e0" >= 0n) is false'); >+assert.sameValue('Infinity' >= 0n, false, 'The result of ("Infinity" >= 0n) is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-non-finite.js b/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-non-finite.js >index f3af1b04ecbd6d6bf39cbdd00da436f40016c834..8c2b4d0bf7cb20ef6427799d215c6c9863787cf0 100644 >--- a/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-non-finite.js >+++ b/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-non-finite.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Comparisons of BigInt and non-finite Number values > esid: sec-abstract-relational-comparison >@@ -18,14 +17,13 @@ > g. If x is +â, or y is -â, return false. > features: [BigInt] > ---*/ >- >-assert.sameValue(1n >= Infinity, false, "1n >= Infinity"); >-assert.sameValue(Infinity >= 1n, true, "Infinity >= 1n"); >-assert.sameValue(-1n >= Infinity, false, "-1n >= Infinity"); >-assert.sameValue(Infinity >= -1n, true, "Infinity >= -1n"); >-assert.sameValue(1n >= -Infinity, true, "1n >= -Infinity"); >-assert.sameValue(-Infinity >= 1n, false, "-Infinity >= 1n"); >-assert.sameValue(-1n >= -Infinity, true, "-1n >= -Infinity"); >-assert.sameValue(-Infinity >= -1n, false, "-Infinity >= -1n"); >-assert.sameValue(0n >= NaN, false, "0n >= NaN"); >-assert.sameValue(NaN >= 0n, false, "NaN >= 0n"); >+assert.sameValue(1n >= Infinity, false, 'The result of (1n >= Infinity) is false'); >+assert.sameValue(Infinity >= 1n, true, 'The result of (Infinity >= 1n) is true'); >+assert.sameValue(-1n >= Infinity, false, 'The result of (-1n >= Infinity) is false'); >+assert.sameValue(Infinity >= -1n, true, 'The result of (Infinity >= -1n) is true'); >+assert.sameValue(1n >= -Infinity, true, 'The result of (1n >= -Infinity) is true'); >+assert.sameValue(-Infinity >= 1n, false, 'The result of (-Infinity >= 1n) is false'); >+assert.sameValue(-1n >= -Infinity, true, 'The result of (-1n >= -Infinity) is true'); >+assert.sameValue(-Infinity >= -1n, false, 'The result of (-Infinity >= -1n) is false'); >+assert.sameValue(0n >= NaN, false, 'The result of (0n >= NaN) is false'); >+assert.sameValue(NaN >= 0n, false, 'The result of (NaN >= 0n) is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-number-extremes.js b/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-number-extremes.js >index 64657ac9e036ea51fd0593c0ef75f0282c2418ce..7c2b2be5cf8b2b744a4f79c5166fb0a055ca6de2 100644 >--- a/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-number-extremes.js >+++ b/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-number-extremes.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Comparisons of large BigInt and Number values > esid: sec-abstract-relational-comparison >@@ -19,24 +18,36 @@ > h. If the mathematical value of nx is less than the mathematical value of ny, return true, otherwise return false. > features: [BigInt] > ---*/ >+assert.sameValue(1n >= Number.MAX_VALUE, false, 'The result of (1n >= Number.MAX_VALUE) is false'); >+assert.sameValue(Number.MAX_VALUE >= 1n, true, 'The result of (Number.MAX_VALUE >= 1n) is true'); >+assert.sameValue(1n >= -Number.MAX_VALUE, true, 'The result of (1n >= -Number.MAX_VALUE) is true'); >+ >+assert.sameValue( >+ -Number.MAX_VALUE >= 1n, >+ false, >+ 'The result of (-Number.MAX_VALUE >= 1n) is false' >+); > >-assert.sameValue(1n >= Number.MAX_VALUE, false, "1n >= Number.MAX_VALUE"); >-assert.sameValue(Number.MAX_VALUE >= 1n, true, "Number.MAX_VALUE >= 1n"); >-assert.sameValue(1n >= -Number.MAX_VALUE, true, "1n >= -Number.MAX_VALUE"); >-assert.sameValue(-Number.MAX_VALUE >= 1n, false, "-Number.MAX_VALUE >= 1n"); > assert.sameValue( > 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn >= Number.MAX_VALUE, > false, >- "0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn >= Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn >= Number.MAX_VALUE) is false' >+); >+ > assert.sameValue( > Number.MAX_VALUE >= 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn, > true, >- "Number.MAX_VALUE >= 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn"); >+ 'The result of (Number.MAX_VALUE >= 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn) is true' >+); >+ > assert.sameValue( > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n >= Number.MAX_VALUE, > true, >- "0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n >= Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n >= Number.MAX_VALUE) is true' >+); >+ > assert.sameValue( > Number.MAX_VALUE >= 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n, > false, >- "Number.MAX_VALUE >= 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n"); >+ 'The result of (Number.MAX_VALUE >= 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n) is false' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-number.js b/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-number.js >index c2cd2949a6beeb8a325e646b52c7c23ccc3e6ce7..55120ea3fc64ca49c853ea53460e4c4a9552c7fd 100644 >--- a/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-number.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Robin Templeton. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Comparisons of BigInt and Number values > esid: sec-abstract-relational-comparison >@@ -19,24 +18,38 @@ > h. If the mathematical value of nx is less than the mathematical value of ny, return true, otherwise return false. > features: [BigInt] > ---*/ >+assert.sameValue(0n >= 0, true, 'The result of (0n >= 0) is true'); >+assert.sameValue(0 >= 0n, true, 'The result of (0 >= 0n) is true'); >+assert.sameValue(0n >= -0, true, 'The result of (0n >= -0) is true'); >+assert.sameValue(-0 >= 0n, true, 'The result of (-0 >= 0n) is true'); >+assert.sameValue(0n >= 0.000000000001, false, 'The result of (0n >= 0.000000000001) is false'); >+assert.sameValue(0.000000000001 >= 0n, true, 'The result of (0.000000000001 >= 0n) is true'); >+assert.sameValue(0n >= 1, false, 'The result of (0n >= 1) is false'); >+assert.sameValue(1 >= 0n, true, 'The result of (1 >= 0n) is true'); >+assert.sameValue(1n >= 0, true, 'The result of (1n >= 0) is true'); >+assert.sameValue(0 >= 1n, false, 'The result of (0 >= 1n) is false'); >+assert.sameValue(1n >= 0.999999999999, true, 'The result of (1n >= 0.999999999999) is true'); >+assert.sameValue(0.999999999999 >= 1n, false, 'The result of (0.999999999999 >= 1n) is false'); >+assert.sameValue(1n >= 1, true, 'The result of (1n >= 1) is true'); >+assert.sameValue(1 >= 1n, true, 'The result of (1 >= 1n) is true'); >+assert.sameValue(0n >= Number.MIN_VALUE, false, 'The result of (0n >= Number.MIN_VALUE) is false'); >+assert.sameValue(Number.MIN_VALUE >= 0n, true, 'The result of (Number.MIN_VALUE >= 0n) is true'); >+assert.sameValue(0n >= -Number.MIN_VALUE, true, 'The result of (0n >= -Number.MIN_VALUE) is true'); >+ >+assert.sameValue( >+ -Number.MIN_VALUE >= 0n, >+ false, >+ 'The result of (-Number.MIN_VALUE >= 0n) is false' >+); >+ >+assert.sameValue( >+ -10n >= Number.MIN_VALUE, >+ false, >+ 'The result of (-10n >= Number.MIN_VALUE) is false' >+); > >-assert.sameValue(0n >= 0, true, "0n >= 0"); >-assert.sameValue(0 >= 0n, true, "0 >= 0n"); >-assert.sameValue(0n >= -0, true, "0n >= -0"); >-assert.sameValue(-0 >= 0n, true, "-0 >= 0n"); >-assert.sameValue(0n >= 0.000000000001, false, "0n >= 0.000000000001"); >-assert.sameValue(0.000000000001 >= 0n, true, "0.000000000001 >= 0n"); >-assert.sameValue(0n >= 1, false, "0n >= 1"); >-assert.sameValue(1 >= 0n, true, "1 >= 0n"); >-assert.sameValue(1n >= 0, true, "1n >= 0"); >-assert.sameValue(0 >= 1n, false, "0 >= 1n"); >-assert.sameValue(1n >= 0.999999999999, true, "1n >= 0.999999999999"); >-assert.sameValue(0.999999999999 >= 1n, false, "0.999999999999 >= 1n"); >-assert.sameValue(1n >= 1, true, "1n >= 1"); >-assert.sameValue(1 >= 1n, true, "1 >= 1n"); >-assert.sameValue(0n >= Number.MIN_VALUE, false, "0n >= Number.MIN_VALUE"); >-assert.sameValue(Number.MIN_VALUE >= 0n, true, "Number.MIN_VALUE >= 0n"); >-assert.sameValue(0n >= -Number.MIN_VALUE, true, "0n >= -Number.MIN_VALUE"); >-assert.sameValue(-Number.MIN_VALUE >= 0n, false, "-Number.MIN_VALUE >= 0n"); >-assert.sameValue(-10n >= Number.MIN_VALUE, false, "-10n >= Number.MIN_VALUE"); >-assert.sameValue(Number.MIN_VALUE >= -10n, true, "Number.MIN_VALUE >= -10n"); >+assert.sameValue( >+ Number.MIN_VALUE >= -10n, >+ true, >+ 'The result of (Number.MIN_VALUE >= -10n) is true' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-string.js b/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-string.js >index 37aecb3ef949cba308c356d69e6a62ede7d851c2..15abbaaa6f6c12baf2531dbd1891dfdaa98b45c8 100644 >--- a/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-string.js >+++ b/JSTests/test262/test/language/expressions/greater-than-or-equal/bigint-and-string.js >@@ -1,48 +1,51 @@ > // Copyright (C) 2018 Igalia, S.L. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Relational comparison of BigInt and string values > esid: sec-abstract-relational-comparison > features: [BigInt] > ---*/ >- >-assert.sameValue(0n >= "0", true, "0n >= '0'"); >-assert.sameValue("0" >= 0n, true, "'0' >= 0n"); >- >-assert.sameValue(0n >= "1", false, "0n >= '1'"); >-assert.sameValue("0" >= 1n, false, "'0' >= 1n"); >- >-assert.sameValue(1n >= "0", true, "1n >= '0'"); >-assert.sameValue("1" >= 0n, true, "'1' >= 0n"); >- >-assert.sameValue(0n >= "", true, "0n >= ''"); >-assert.sameValue("" >= 0n, true, "'' >= 0n"); >- >-assert.sameValue(0n >= "1", false, "0n >= '1'"); >-assert.sameValue("" >= 1n, false, "'' >= 1n"); >- >-assert.sameValue(1n >= "", true, "1n >= ''"); >-assert.sameValue("1" >= 0n, true, "'1' >= 0n"); >- >-assert.sameValue(1n >= "1", true, "1n >= '1'"); >-assert.sameValue("1" >= 1n, true, "'1' >= 1n"); >- >-assert.sameValue(1n >= "-1", true, "1n >= '-1'"); >-assert.sameValue("1" >= -1n, true, "'1' >= -1n"); >- >-assert.sameValue(-1n >= "1", false, "-1n >= '1'"); >-assert.sameValue("-1" >= 1n, false, "'-1' >= 1n"); >- >-assert.sameValue(-1n >= "-1", true, "-1n >= '-1'"); >-assert.sameValue("-1" >= -1n, true, "'-1' >= -1n"); >- >-assert.sameValue(9007199254740993n >= "9007199254740992", true, >- "9007199254740993n >= '9007199254740992'"); >-assert.sameValue("9007199254740993" >= 9007199254740992n, true, >- "'9007199254740993' >= 9007199254740992n"); >- >-assert.sameValue(-9007199254740992n >= "-9007199254740993", true, >- "-9007199254740992n >= '-9007199254740993'"); >-assert.sameValue("-9007199254740992" >= -9007199254740993n, true, >- "'-9007199254740992' >= -9007199254740993n"); >+assert.sameValue(0n >= '0', true, 'The result of (0n >= "0") is true'); >+assert.sameValue('0' >= 0n, true, 'The result of ("0" >= 0n) is true'); >+assert.sameValue(0n >= '1', false, 'The result of (0n >= "1") is false'); >+assert.sameValue('0' >= 1n, false, 'The result of ("0" >= 1n) is false'); >+assert.sameValue(1n >= '0', true, 'The result of (1n >= "0") is true'); >+assert.sameValue('1' >= 0n, true, 'The result of ("1" >= 0n) is true'); >+assert.sameValue(0n >= '', true, 'The result of (0n >= "") is true'); >+assert.sameValue('' >= 0n, true, 'The result of ("" >= 0n) is true'); >+assert.sameValue(0n >= '1', false, 'The result of (0n >= "1") is false'); >+assert.sameValue('' >= 1n, false, 'The result of ("" >= 1n) is false'); >+assert.sameValue(1n >= '', true, 'The result of (1n >= "") is true'); >+assert.sameValue('1' >= 0n, true, 'The result of ("1" >= 0n) is true'); >+assert.sameValue(1n >= '1', true, 'The result of (1n >= "1") is true'); >+assert.sameValue('1' >= 1n, true, 'The result of ("1" >= 1n) is true'); >+assert.sameValue(1n >= '-1', true, 'The result of (1n >= "-1") is true'); >+assert.sameValue('1' >= -1n, true, 'The result of ("1" >= -1n) is true'); >+assert.sameValue(-1n >= '1', false, 'The result of (-1n >= "1") is false'); >+assert.sameValue('-1' >= 1n, false, 'The result of ("-1" >= 1n) is false'); >+assert.sameValue(-1n >= '-1', true, 'The result of (-1n >= "-1") is true'); >+assert.sameValue('-1' >= -1n, true, 'The result of ("-1" >= -1n) is true'); >+ >+assert.sameValue( >+ 9007199254740993n >= '9007199254740992', >+ true, >+ 'The result of (9007199254740993n >= "9007199254740992") is true' >+); >+ >+assert.sameValue( >+ '9007199254740993' >= 9007199254740992n, >+ true, >+ 'The result of ("9007199254740993" >= 9007199254740992n) is true' >+); >+ >+assert.sameValue( >+ -9007199254740992n >= '-9007199254740993', >+ true, >+ 'The result of (-9007199254740992n >= "-9007199254740993") is true' >+); >+ >+assert.sameValue( >+ '-9007199254740992' >= -9007199254740993n, >+ true, >+ 'The result of ("-9007199254740992" >= -9007199254740993n) is true' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/greater-than/11.8.2-1.js b/JSTests/test262/test/language/expressions/greater-than/11.8.2-1.js >index a8699ab00c61208c835f391688d9bf029b7ce70a..0337ce6ca353bd465fc17c905a38885b7ddf4edd 100644 >--- a/JSTests/test262/test/language/expressions/greater-than/11.8.2-1.js >+++ b/JSTests/test262/test/language/expressions/greater-than/11.8.2-1.js >@@ -4,25 +4,22 @@ > /*--- > es5id: 11.8.2-1 > description: > >- 11.8.2 Greater-than Operator - Partial left to right order >- enforced when using Greater-than operator: valueOf > valueOf >+ 11.8.2 Greater-than Operator - Partial left to right order >+ enforced when using Greater-than operator: valueOf > valueOf > ---*/ > >- var accessed = false; >- var obj1 = { >- valueOf: function () { >- accessed = true; >- return 3; >- } >- }; >- var obj2 = { >- valueOf: function () { >- if (accessed === true) { >- return 4; >- } else { >- return 2; >- } >- } >- }; >+var accessed = false; >+var obj1 = { >+ valueOf: function () { >+ accessed = true; >+ return 3; >+ } >+}; >+var obj2 = { >+ valueOf: function () { >+ return 4; >+ } >+}; > >-assert(!(obj1 > obj2), '!(obj1 > obj2) !== true'); >+assert.sameValue(obj1 > obj2, false, 'The result of (obj1 > obj2) is false'); >+assert.sameValue(accessed, true, 'The value of accessed is true'); >diff --git a/JSTests/test262/test/language/expressions/greater-than/11.8.2-2.js b/JSTests/test262/test/language/expressions/greater-than/11.8.2-2.js >index 3597625bb45af87bdab067c5df47483b356c4de6..fe0565c91dc6ba123f3275ffe3b17d429fbe1444 100644 >--- a/JSTests/test262/test/language/expressions/greater-than/11.8.2-2.js >+++ b/JSTests/test262/test/language/expressions/greater-than/11.8.2-2.js >@@ -4,25 +4,22 @@ > /*--- > es5id: 11.8.2-2 > description: > >- 11.8.2 Greater-than Operator - Partial left to right order >- enforced when using Greater-than operator: valueOf > toString >+ 11.8.2 Greater-than Operator - Partial left to right order >+ enforced when using Greater-than operator: valueOf > toString > ---*/ > >- var accessed = false; >- var obj1 = { >- valueOf: function () { >- accessed = true; >- return 3; >- } >- }; >- var obj2 = { >- toString: function () { >- if (accessed === true) { >- return 4; >- } else { >- return 2; >- } >- } >- }; >+var accessed = false; >+var obj1 = { >+ valueOf: function () { >+ accessed = true; >+ return 3; >+ } >+}; >+var obj2 = { >+ toString: function () { >+ return 4; >+ } >+}; > >-assert(!(obj1 > obj2), '!(obj1 > obj2) !== true'); >+assert.sameValue(obj1 > obj2, false, 'The result of (obj1 > obj2) is false'); >+assert.sameValue(accessed, true, 'The value of accessed is true'); >diff --git a/JSTests/test262/test/language/expressions/greater-than/11.8.2-3.js b/JSTests/test262/test/language/expressions/greater-than/11.8.2-3.js >index 672dbc6a27a9efa28a00044b12bd648759724cb8..cf287f5b9ddbd9648818aee4d08fe8998a8d5a77 100644 >--- a/JSTests/test262/test/language/expressions/greater-than/11.8.2-3.js >+++ b/JSTests/test262/test/language/expressions/greater-than/11.8.2-3.js >@@ -8,21 +8,18 @@ > enforced when using Greater-than operator: toString > valueOf > ---*/ > >- var accessed = false; >- var obj1 = { >- toString: function () { >- accessed = true; >- return 3; >- } >- }; >- var obj2 = { >- valueOf: function () { >- if (accessed === true) { >- return 4; >- } else { >- return 2; >- } >- } >- }; >+var accessed = false; >+var obj1 = { >+ toString: function () { >+ accessed = true; >+ return 3; >+ } >+}; >+var obj2 = { >+ valueOf: function () { >+ return 4; >+ } >+}; > >-assert(!(obj1 > obj2), '!(obj1 > obj2) !== true'); >+assert.sameValue(obj1 > obj2, false, 'The result of (obj1 > obj2) is false'); >+assert.sameValue(accessed, true, 'The value of accessed is true'); >diff --git a/JSTests/test262/test/language/expressions/greater-than/11.8.2-4.js b/JSTests/test262/test/language/expressions/greater-than/11.8.2-4.js >index c11836e52299840e0a3a94043f0e99ea97aa2919..66b02a888e40176ec30d4d2a47fc40c3a2d8084b 100644 >--- a/JSTests/test262/test/language/expressions/greater-than/11.8.2-4.js >+++ b/JSTests/test262/test/language/expressions/greater-than/11.8.2-4.js >@@ -8,21 +8,18 @@ > enforced when using Greater-than operator: toString > toString > ---*/ > >- var accessed = false; >- var obj1 = { >- toString: function () { >- accessed = true; >- return 3; >- } >- }; >- var obj2 = { >- toString: function () { >- if (accessed === true) { >- return 4; >- } else { >- return 2; >- } >- } >- }; >+var accessed = false; >+var obj1 = { >+ toString: function () { >+ accessed = true; >+ return 3; >+ } >+}; >+var obj2 = { >+ toString: function () { >+ return 4; >+ } >+}; > >-assert(!(obj1 > obj2), '!(obj1 > obj2) !== true'); >+assert.sameValue(obj1 > obj2, false, 'The result of (obj1 > obj2) is false'); >+assert.sameValue(accessed, true, 'The value of accessed is true'); >diff --git a/JSTests/test262/test/language/expressions/greater-than/bigint-and-bigint.js b/JSTests/test262/test/language/expressions/greater-than/bigint-and-bigint.js >index c9f06fb44d784dc7beb0677a1acf8163a63525a0..71f57fd8e0af9b11fc95cc8ac0d751919f7c1104 100644 >--- a/JSTests/test262/test/language/expressions/greater-than/bigint-and-bigint.js >+++ b/JSTests/test262/test/language/expressions/greater-than/bigint-and-bigint.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Comparisons of BigInt and BigInt values > esid: sec-abstract-relational-comparison >@@ -20,37 +19,146 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n > 0n, false, 'The result of (0n > 0n) is false'); >+assert.sameValue(1n > 1n, false, 'The result of (1n > 1n) is false'); >+assert.sameValue(-1n > -1n, false, 'The result of (-1n > -1n) is false'); >+assert.sameValue(0n > -0n, false, 'The result of (0n > -0n) is false'); >+assert.sameValue(-0n > 0n, false, 'The result of (-0n > 0n) is false'); >+assert.sameValue(0n > 1n, false, 'The result of (0n > 1n) is false'); >+assert.sameValue(1n > 0n, true, 'The result of (1n > 0n) is true'); >+assert.sameValue(0n > -1n, true, 'The result of (0n > -1n) is true'); >+assert.sameValue(-1n > 0n, false, 'The result of (-1n > 0n) is false'); >+assert.sameValue(1n > -1n, true, 'The result of (1n > -1n) is true'); >+assert.sameValue(-1n > 1n, false, 'The result of (-1n > 1n) is false'); >+ >+assert.sameValue( >+ 0x1fffffffffffff01n > 0x1fffffffffffff02n, >+ false, >+ 'The result of (0x1fffffffffffff01n > 0x1fffffffffffff02n) is false' >+); >+ >+assert.sameValue( >+ 0x1fffffffffffff02n > 0x1fffffffffffff01n, >+ true, >+ 'The result of (0x1fffffffffffff02n > 0x1fffffffffffff01n) is true' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff01n > -0x1fffffffffffff02n, >+ true, >+ 'The result of (-0x1fffffffffffff01n > -0x1fffffffffffff02n) is true' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff02n > -0x1fffffffffffff01n, >+ false, >+ 'The result of (-0x1fffffffffffff02n > -0x1fffffffffffff01n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n > 0n, >+ true, >+ 'The result of (0x10000000000000000n > 0n) is true' >+); >+ >+assert.sameValue( >+ 0n > 0x10000000000000000n, >+ false, >+ 'The result of (0n > 0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n > 1n, >+ true, >+ 'The result of (0x10000000000000000n > 1n) is true' >+); >+ >+assert.sameValue( >+ 1n > 0x10000000000000000n, >+ false, >+ 'The result of (1n > 0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n > -1n, >+ true, >+ 'The result of (0x10000000000000000n > -1n) is true' >+); >+ >+assert.sameValue( >+ -1n > 0x10000000000000000n, >+ false, >+ 'The result of (-1n > 0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000001n > 0n, >+ true, >+ 'The result of (0x10000000000000001n > 0n) is true' >+); >+ >+assert.sameValue( >+ 0n > 0x10000000000000001n, >+ false, >+ 'The result of (0n > 0x10000000000000001n) is false' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n > 0n, >+ false, >+ 'The result of (-0x10000000000000000n > 0n) is false' >+); >+ >+assert.sameValue( >+ 0n > -0x10000000000000000n, >+ true, >+ 'The result of (0n > -0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n > 1n, >+ false, >+ 'The result of (-0x10000000000000000n > 1n) is false' >+); >+ >+assert.sameValue( >+ 1n > -0x10000000000000000n, >+ true, >+ 'The result of (1n > -0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n > -1n, >+ false, >+ 'The result of (-0x10000000000000000n > -1n) is false' >+); >+ >+assert.sameValue( >+ -1n > -0x10000000000000000n, >+ true, >+ 'The result of (-1n > -0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ -0x10000000000000001n > 0n, >+ false, >+ 'The result of (-0x10000000000000001n > 0n) is false' >+); >+ >+assert.sameValue( >+ 0n > -0x10000000000000001n, >+ true, >+ 'The result of (0n > -0x10000000000000001n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n > 0x100000000n, >+ true, >+ 'The result of (0x10000000000000000n > 0x100000000n) is true' >+); > >-assert.sameValue(0n > 0n, false, "0n > 0n"); >-assert.sameValue(1n > 1n, false, "1n > 1n"); >-assert.sameValue(-1n > -1n, false, "-1n > -1n"); >-assert.sameValue(0n > -0n, false, "0n > -0n"); >-assert.sameValue(-0n > 0n, false, "-0n > 0n"); >-assert.sameValue(0n > 1n, false, "0n > 1n"); >-assert.sameValue(1n > 0n, true, "1n > 0n"); >-assert.sameValue(0n > -1n, true, "0n > -1n"); >-assert.sameValue(-1n > 0n, false, "-1n > 0n"); >-assert.sameValue(1n > -1n, true, "1n > -1n"); >-assert.sameValue(-1n > 1n, false, "-1n > 1n"); >-assert.sameValue(0x1fffffffffffff01n > 0x1fffffffffffff02n, false, "0x1fffffffffffff01n > 0x1fffffffffffff02n"); >-assert.sameValue(0x1fffffffffffff02n > 0x1fffffffffffff01n, true, "0x1fffffffffffff02n > 0x1fffffffffffff01n"); >-assert.sameValue(-0x1fffffffffffff01n > -0x1fffffffffffff02n, true, "-0x1fffffffffffff01n > -0x1fffffffffffff02n"); >-assert.sameValue(-0x1fffffffffffff02n > -0x1fffffffffffff01n, false, "-0x1fffffffffffff02n > -0x1fffffffffffff01n"); >-assert.sameValue(0x10000000000000000n > 0n, true, "0x10000000000000000n > 0n"); >-assert.sameValue(0n > 0x10000000000000000n, false, "0n > 0x10000000000000000n"); >-assert.sameValue(0x10000000000000000n > 1n, true, "0x10000000000000000n > 1n"); >-assert.sameValue(1n > 0x10000000000000000n, false, "1n > 0x10000000000000000n"); >-assert.sameValue(0x10000000000000000n > -1n, true, "0x10000000000000000n > -1n"); >-assert.sameValue(-1n > 0x10000000000000000n, false, "-1n > 0x10000000000000000n"); >-assert.sameValue(0x10000000000000001n > 0n, true, "0x10000000000000001n > 0n"); >-assert.sameValue(0n > 0x10000000000000001n, false, "0n > 0x10000000000000001n"); >-assert.sameValue(-0x10000000000000000n > 0n, false, "-0x10000000000000000n > 0n"); >-assert.sameValue(0n > -0x10000000000000000n, true, "0n > -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000000n > 1n, false, "-0x10000000000000000n > 1n"); >-assert.sameValue(1n > -0x10000000000000000n, true, "1n > -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000000n > -1n, false, "-0x10000000000000000n > -1n"); >-assert.sameValue(-1n > -0x10000000000000000n, true, "-1n > -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000001n > 0n, false, "-0x10000000000000001n > 0n"); >-assert.sameValue(0n > -0x10000000000000001n, true, "0n > -0x10000000000000001n"); >-assert.sameValue(0x10000000000000000n > 0x100000000n, true, "0x10000000000000000n > 0x100000000n"); >-assert.sameValue(0x100000000n > 0x10000000000000000n, false, "0x100000000n > 0x10000000000000000n"); >+assert.sameValue( >+ 0x100000000n > 0x10000000000000000n, >+ false, >+ 'The result of (0x100000000n > 0x10000000000000000n) is false' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/greater-than/bigint-and-boolean.js b/JSTests/test262/test/language/expressions/greater-than/bigint-and-boolean.js >index e7131154b0695049bd83e71cc53d61b2e8ec1ea7..da43b44adc69f73671805e3b6a2f2030114356fc 100644 >--- a/JSTests/test262/test/language/expressions/greater-than/bigint-and-boolean.js >+++ b/JSTests/test262/test/language/expressions/greater-than/bigint-and-boolean.js >@@ -1,30 +1,21 @@ > // Copyright (C) 2018 Caio Lima. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Relational comparison of BigInt and boolean values > esid: sec-abstract-relational-comparison > features: [BigInt] > ---*/ >- >-assert.sameValue(0n > false, false, "0n > false"); >-assert.sameValue(false > 0n, false, "false > 0n"); >- >-assert.sameValue(0n > true, false, "0n > true"); >-assert.sameValue(true > 0n, true, "true > 0n"); >- >-assert.sameValue(1n > false, true, "1n > false"); >-assert.sameValue(false > 1n, false, "false > 1n"); >- >-assert.sameValue(1n > true, false, "1n > true"); >-assert.sameValue(true > 1n, false, "true > 1n"); >- >-assert.sameValue(31n > true, true, "31n > true"); >-assert.sameValue(true > 31n, false, "true > 31n"); >- >-assert.sameValue(-3n > true, false, "-3n > true"); >-assert.sameValue(true > -3n, true, "true > -3n"); >- >-assert.sameValue(-3n > false, false, "-3n > false"); >-assert.sameValue(false > -3n, true, "false > -3n"); >- >+assert.sameValue(0n > false, false, 'The result of (0n > false) is false'); >+assert.sameValue(false > 0n, false, 'The result of (false > 0n) is false'); >+assert.sameValue(0n > true, false, 'The result of (0n > true) is false'); >+assert.sameValue(true > 0n, true, 'The result of (true > 0n) is true'); >+assert.sameValue(1n > false, true, 'The result of (1n > false) is true'); >+assert.sameValue(false > 1n, false, 'The result of (false > 1n) is false'); >+assert.sameValue(1n > true, false, 'The result of (1n > true) is false'); >+assert.sameValue(true > 1n, false, 'The result of (true > 1n) is false'); >+assert.sameValue(31n > true, true, 'The result of (31n > true) is true'); >+assert.sameValue(true > 31n, false, 'The result of (true > 31n) is false'); >+assert.sameValue(-3n > true, false, 'The result of (-3n > true) is false'); >+assert.sameValue(true > -3n, true, 'The result of (true > -3n) is true'); >+assert.sameValue(-3n > false, false, 'The result of (-3n > false) is false'); >+assert.sameValue(false > -3n, true, 'The result of (false > -3n) is true'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/greater-than/bigint-and-incomparable-string.js b/JSTests/test262/test/language/expressions/greater-than/bigint-and-incomparable-string.js >index 57b0334c945a47e3f5b942e5f6f5789817e9296b..68453be59a5dfb8bcbb1b46cc0aa2a4dde615707 100644 >--- a/JSTests/test262/test/language/expressions/greater-than/bigint-and-incomparable-string.js >+++ b/JSTests/test262/test/language/expressions/greater-than/bigint-and-incomparable-string.js >@@ -1,30 +1,27 @@ > // Copyright (C) 2018 Igalia, S.L. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Relational comparison of BigInt and string values > esid: sec-abstract-relational-comparison > features: [BigInt] > ---*/ >- >-assert.sameValue(1n > "0n", false, "1n > '0n'"); >-assert.sameValue(1n > "0.", false, "1n > '0.'"); >-assert.sameValue(1n > ".0", false, "1n > '.0'"); >-assert.sameValue(1n > "0/1", false, "1n > '0/1'"); >-assert.sameValue(1n > "z0", false, "1n > 'z0'"); >-assert.sameValue(1n > "0z", false, "1n > '0z'"); >-assert.sameValue(1n > "++0", false, "1n > '++0'"); >-assert.sameValue(1n > "--0", false, "1n > '--0'"); >-assert.sameValue(1n > "0e0", false, "1n > '0e0'"); >-assert.sameValue(1n > "Infinity", false, "1n > 'Infinity'"); >- >-assert.sameValue("1n" > 0n, false, "'1n' > 0n"); >-assert.sameValue("1." > 0n, false, "'1.' > 0n"); >-assert.sameValue(".1" > 0n, false, "'.1' > 0n"); >-assert.sameValue("1/1" > 0n, false, "'1/1' > 0n"); >-assert.sameValue("z1" > 0n, false, "'z1' > 0n"); >-assert.sameValue("1z" > 0n, false, "'1z' > 0n"); >-assert.sameValue("++1" > 0n, false, "'++1' > 0n"); >-assert.sameValue("--1" > 0n, false, "'--1' > 0n"); >-assert.sameValue("1e0" > 0n, false, "'1e0' > 0n"); >-assert.sameValue("Infinity" > 0n, false, "'Infinity' > 0n"); >+assert.sameValue(1n > '0n', false, 'The result of (1n > "0n") is false'); >+assert.sameValue(1n > '0.', false, 'The result of (1n > "0.") is false'); >+assert.sameValue(1n > '.0', false, 'The result of (1n > ".0") is false'); >+assert.sameValue(1n > '0/1', false, 'The result of (1n > "0/1") is false'); >+assert.sameValue(1n > 'z0', false, 'The result of (1n > "z0") is false'); >+assert.sameValue(1n > '0z', false, 'The result of (1n > "0z") is false'); >+assert.sameValue(1n > '++0', false, 'The result of (1n > "++0") is false'); >+assert.sameValue(1n > '--0', false, 'The result of (1n > "--0") is false'); >+assert.sameValue(1n > '0e0', false, 'The result of (1n > "0e0") is false'); >+assert.sameValue(1n > 'Infinity', false, 'The result of (1n > "Infinity") is false'); >+assert.sameValue('1n' > 0n, false, 'The result of ("1n" > 0n) is false'); >+assert.sameValue('1.' > 0n, false, 'The result of ("1." > 0n) is false'); >+assert.sameValue('.1' > 0n, false, 'The result of (".1" > 0n) is false'); >+assert.sameValue('1/1' > 0n, false, 'The result of ("1/1" > 0n) is false'); >+assert.sameValue('z1' > 0n, false, 'The result of ("z1" > 0n) is false'); >+assert.sameValue('1z' > 0n, false, 'The result of ("1z" > 0n) is false'); >+assert.sameValue('++1' > 0n, false, 'The result of ("++1" > 0n) is false'); >+assert.sameValue('--1' > 0n, false, 'The result of ("--1" > 0n) is false'); >+assert.sameValue('1e0' > 0n, false, 'The result of ("1e0" > 0n) is false'); >+assert.sameValue('Infinity' > 0n, false, 'The result of ("Infinity" > 0n) is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/greater-than/bigint-and-non-finite.js b/JSTests/test262/test/language/expressions/greater-than/bigint-and-non-finite.js >index 71b88c6647ac91e583e637b64a1ff3ee0c5578e1..3457ee2c2f084d274d1093f88faeff2749ae8d00 100644 >--- a/JSTests/test262/test/language/expressions/greater-than/bigint-and-non-finite.js >+++ b/JSTests/test262/test/language/expressions/greater-than/bigint-and-non-finite.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Comparisons of BigInt and non-finite Number values > esid: sec-abstract-relational-comparison >@@ -18,14 +17,13 @@ > g. If x is +â, or y is -â, return false. > features: [BigInt] > ---*/ >- >-assert.sameValue(1n > Infinity, false, "1n > Infinity"); >-assert.sameValue(Infinity > 1n, true, "Infinity > 1n"); >-assert.sameValue(-1n > Infinity, false, "-1n > Infinity"); >-assert.sameValue(Infinity > -1n, true, "Infinity > -1n"); >-assert.sameValue(1n > -Infinity, true, "1n > -Infinity"); >-assert.sameValue(-Infinity > 1n, false, "-Infinity > 1n"); >-assert.sameValue(-1n > -Infinity, true, "-1n > -Infinity"); >-assert.sameValue(-Infinity > -1n, false, "-Infinity > -1n"); >-assert.sameValue(0n > NaN, false, "0n > NaN"); >-assert.sameValue(NaN > 0n, false, "NaN > 0n"); >+assert.sameValue(1n > Infinity, false, 'The result of (1n > Infinity) is false'); >+assert.sameValue(Infinity > 1n, true, 'The result of (Infinity > 1n) is true'); >+assert.sameValue(-1n > Infinity, false, 'The result of (-1n > Infinity) is false'); >+assert.sameValue(Infinity > -1n, true, 'The result of (Infinity > -1n) is true'); >+assert.sameValue(1n > -Infinity, true, 'The result of (1n > -Infinity) is true'); >+assert.sameValue(-Infinity > 1n, false, 'The result of (-Infinity > 1n) is false'); >+assert.sameValue(-1n > -Infinity, true, 'The result of (-1n > -Infinity) is true'); >+assert.sameValue(-Infinity > -1n, false, 'The result of (-Infinity > -1n) is false'); >+assert.sameValue(0n > NaN, false, 'The result of (0n > NaN) is false'); >+assert.sameValue(NaN > 0n, false, 'The result of (NaN > 0n) is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/greater-than/bigint-and-number-extremes.js b/JSTests/test262/test/language/expressions/greater-than/bigint-and-number-extremes.js >index 1d1107d3324dc6ba4cf5b236b8e339b70f8a2857..6fde9fe0e462f95736bb01a9cee4693cad8d5ce0 100644 >--- a/JSTests/test262/test/language/expressions/greater-than/bigint-and-number-extremes.js >+++ b/JSTests/test262/test/language/expressions/greater-than/bigint-and-number-extremes.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Comparisons of BigInt and Number values > esid: sec-abstract-relational-comparison >@@ -19,24 +18,31 @@ > h. If the mathematical value of nx is less than the mathematical value of ny, return true, otherwise return false. > features: [BigInt] > ---*/ >+assert.sameValue(1n > Number.MAX_VALUE, false, 'The result of (1n > Number.MAX_VALUE) is false'); >+assert.sameValue(Number.MAX_VALUE > 1n, true, 'The result of (Number.MAX_VALUE > 1n) is true'); >+assert.sameValue(1n > -Number.MAX_VALUE, true, 'The result of (1n > -Number.MAX_VALUE) is true'); >+assert.sameValue(-Number.MAX_VALUE > 1n, false, 'The result of (-Number.MAX_VALUE > 1n) is false'); > >-assert.sameValue(1n > Number.MAX_VALUE, false, "1n > Number.MAX_VALUE"); >-assert.sameValue(Number.MAX_VALUE > 1n, true, "Number.MAX_VALUE > 1n"); >-assert.sameValue(1n > -Number.MAX_VALUE, true, "1n > -Number.MAX_VALUE"); >-assert.sameValue(-Number.MAX_VALUE > 1n, false, "-Number.MAX_VALUE > 1n"); > assert.sameValue( > 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn > Number.MAX_VALUE, > false, >- "0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn > Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn > Number.MAX_VALUE) is false' >+); >+ > assert.sameValue( > Number.MAX_VALUE > 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn, > true, >- "Number.MAX_VALUE > 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn"); >+ 'The result of (Number.MAX_VALUE > 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn) is true' >+); >+ > assert.sameValue( > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n > Number.MAX_VALUE, > true, >- "0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n > Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n > Number.MAX_VALUE) is true' >+); >+ > assert.sameValue( > Number.MAX_VALUE > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n, > false, >- "Number.MAX_VALUE > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n"); >+ 'The result of (Number.MAX_VALUE > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n) is false' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/greater-than/bigint-and-number.js b/JSTests/test262/test/language/expressions/greater-than/bigint-and-number.js >index 0d02c4923247bb45972c7e77001e9c19732931b8..670edd1a43d17dae3d3a1fb8011038a0ec43dcc7 100644 >--- a/JSTests/test262/test/language/expressions/greater-than/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/greater-than/bigint-and-number.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Robin Templeton. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Comparisons of BigInt and Number values > esid: sec-abstract-relational-comparison >@@ -19,24 +18,29 @@ > h. If the mathematical value of nx is less than the mathematical value of ny, return true, otherwise return false. > features: [BigInt] > ---*/ >+assert.sameValue(0n > 0, false, 'The result of (0n > 0) is false'); >+assert.sameValue(0 > 0n, false, 'The result of (0 > 0n) is false'); >+assert.sameValue(0n > -0, false, 'The result of (0n > -0) is false'); >+assert.sameValue(-0 > 0n, false, 'The result of (-0 > 0n) is false'); >+assert.sameValue(0n > 0.000000000001, false, 'The result of (0n > 0.000000000001) is false'); >+assert.sameValue(0.000000000001 > 0n, true, 'The result of (0.000000000001 > 0n) is true'); >+assert.sameValue(0n > 1, false, 'The result of (0n > 1) is false'); >+assert.sameValue(1 > 0n, true, 'The result of (1 > 0n) is true'); >+assert.sameValue(1n > 0, true, 'The result of (1n > 0) is true'); >+assert.sameValue(0 > 1n, false, 'The result of (0 > 1n) is false'); >+assert.sameValue(1n > 0.999999999999, true, 'The result of (1n > 0.999999999999) is true'); >+assert.sameValue(0.999999999999 > 1n, false, 'The result of (0.999999999999 > 1n) is false'); >+assert.sameValue(1n > 1, false, 'The result of (1n > 1) is false'); >+assert.sameValue(1 > 1n, false, 'The result of (1 > 1n) is false'); >+assert.sameValue(0n > Number.MIN_VALUE, false, 'The result of (0n > Number.MIN_VALUE) is false'); >+assert.sameValue(Number.MIN_VALUE > 0n, true, 'The result of (Number.MIN_VALUE > 0n) is true'); >+assert.sameValue(0n > -Number.MIN_VALUE, true, 'The result of (0n > -Number.MIN_VALUE) is true'); >+assert.sameValue(-Number.MIN_VALUE > 0n, false, 'The result of (-Number.MIN_VALUE > 0n) is false'); >+ >+assert.sameValue( >+ -10n > Number.MIN_VALUE, >+ false, >+ 'The result of (-10n > Number.MIN_VALUE) is false' >+); > >-assert.sameValue(0n > 0, false, "0n > 0"); >-assert.sameValue(0 > 0n, false, "0 > 0n"); >-assert.sameValue(0n > -0, false, "0n > -0"); >-assert.sameValue(-0 > 0n, false, "-0 > 0n"); >-assert.sameValue(0n > 0.000000000001, false, "0n > 0.000000000001"); >-assert.sameValue(0.000000000001 > 0n, true, "0.000000000001 > 0n"); >-assert.sameValue(0n > 1, false, "0n > 1"); >-assert.sameValue(1 > 0n, true, "1 > 0n"); >-assert.sameValue(1n > 0, true, "1n > 0"); >-assert.sameValue(0 > 1n, false, "0 > 1n"); >-assert.sameValue(1n > 0.999999999999, true, "1n > 0.999999999999"); >-assert.sameValue(0.999999999999 > 1n, false, "0.999999999999 > 1n"); >-assert.sameValue(1n > 1, false, "1n > 1"); >-assert.sameValue(1 > 1n, false, "1 > 1n"); >-assert.sameValue(0n > Number.MIN_VALUE, false, "0n > Number.MIN_VALUE"); >-assert.sameValue(Number.MIN_VALUE > 0n, true, "Number.MIN_VALUE > 0n"); >-assert.sameValue(0n > -Number.MIN_VALUE, true, "0n > -Number.MIN_VALUE"); >-assert.sameValue(-Number.MIN_VALUE > 0n, false, "-Number.MIN_VALUE > 0n"); >-assert.sameValue(-10n > Number.MIN_VALUE, false, "-10n > Number.MIN_VALUE"); >-assert.sameValue(Number.MIN_VALUE > -10n, true, "Number.MIN_VALUE > -10n"); >+assert.sameValue(Number.MIN_VALUE > -10n, true, 'The result of (Number.MIN_VALUE > -10n) is true'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/greater-than/bigint-and-string.js b/JSTests/test262/test/language/expressions/greater-than/bigint-and-string.js >index 36649fdac9cc7f5f13fc1fbdff1740d21fcaf23c..42d2228e1d8b9e730331b8ad32ab4f7a3f740c20 100644 >--- a/JSTests/test262/test/language/expressions/greater-than/bigint-and-string.js >+++ b/JSTests/test262/test/language/expressions/greater-than/bigint-and-string.js >@@ -1,48 +1,60 @@ > // Copyright (C) 2018 Igalia, S.L. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Relational comparison of BigInt and string values > esid: sec-abstract-relational-comparison > features: [BigInt] > ---*/ >- >-assert.sameValue(0n > "0", false, "0n > '0'"); >-assert.sameValue("0" > 0n, false, "'0' > 0n"); >- >-assert.sameValue(0n > "1", false, "0n > '1'"); >-assert.sameValue("0" > 1n, false, "'0' > 1n"); >- >-assert.sameValue(1n > "0", true, "1n > '0'"); >-assert.sameValue("1" > 0n, true, "'1' > 0n"); >- >-assert.sameValue(0n > "", false, "0n > ''"); >-assert.sameValue("" > 0n, false, "'' > 0n"); >- >-assert.sameValue(0n > "1", false, "0n > '1'"); >-assert.sameValue("" > 1n, false, "'' > 1n"); >- >-assert.sameValue(1n > "", true, "1n > ''"); >-assert.sameValue("1" > 0n, true, "'1' > 0n"); >- >-assert.sameValue(1n > "1", false, "1n > '1'"); >-assert.sameValue("1" > 1n, false, "'1' > 1n"); >- >-assert.sameValue(1n > "-1", true, "1n > '-1'"); >-assert.sameValue("1" > -1n, true, "'1' > -1n"); >- >-assert.sameValue(-1n > "1", false, "-1n > '1'"); >-assert.sameValue("-1" > 1n, false, "'-1' > 1n"); >- >-assert.sameValue(-1n > "-1", false, "-1n > '-1'"); >-assert.sameValue("-1" > -1n, false, "'-1' > -1n"); >- >-assert.sameValue(9007199254740993n > "9007199254740992", true, >- "9007199254740993n > '9007199254740992'"); >-assert.sameValue("9007199254740993" > 9007199254740992n, true, >- "'9007199254740993' > 9007199254740992n"); >- >-assert.sameValue(-9007199254740992n > "-9007199254740993", true, >- "-9007199254740992n > '-9007199254740993'"); >-assert.sameValue("-9007199254740992" > -9007199254740993n, true, >- "'-9007199254740992' > -9007199254740993n"); >+assert.sameValue(0n > '0', false, 'The result of (0n > "0") is false'); >+assert.sameValue('0' > 0n, false, 'The result of ("0" > 0n) is false'); >+assert.sameValue(0n > '1', false, 'The result of (0n > "1") is false'); >+assert.sameValue('0' > 1n, false, 'The result of ("0" > 1n) is false'); >+assert.sameValue(1n > '0', true, 'The result of (1n > "0") is true'); >+assert.sameValue('1' > 0n, true, 'The result of ("1" > 0n) is true'); >+assert.sameValue(0n > '', false, 'The result of (0n > "") is false'); >+assert.sameValue('' > 0n, false, 'The result of ("" > 0n) is false'); >+assert.sameValue(0n > '1', false, 'The result of (0n > "1") is false'); >+assert.sameValue('' > 1n, false, 'The result of ("" > 1n) is false'); >+assert.sameValue(1n > '', true, 'The result of (1n > "") is true'); >+assert.sameValue('1' > 0n, true, 'The result of ("1" > 0n) is true'); >+assert.sameValue(1n > '1', false, 'The result of (1n > "1") is false'); >+assert.sameValue('1' > 1n, false, 'The result of ("1" > 1n) is false'); >+assert.sameValue(1n > '-1', true, 'The result of (1n > "-1") is true'); >+assert.sameValue('1' > -1n, true, 'The result of ("1" > -1n) is true'); >+assert.sameValue(-1n > '1', false, 'The result of (-1n > "1") is false'); >+assert.sameValue('-1' > 1n, false, 'The result of ("-1" > 1n) is false'); >+assert.sameValue(-1n > '-1', false, 'The result of (-1n > "-1") is false'); >+assert.sameValue('-1' > -1n, false, 'The result of ("-1" > -1n) is false'); >+assert.sameValue('0x10' > 15n, true, 'The result of ("0x10" > 15n) is true'); >+assert.sameValue('0x10' > 16n, false, 'The result of ("0x10" > 16n) is false'); >+assert.sameValue('0x10' > 17n, false, 'The result of ("0x10" > 17n) is false'); >+assert.sameValue('0o10' > 7n, true, 'The result of ("0o10" > 7n) is true'); >+assert.sameValue('0o10' > 8n, false, 'The result of ("0o10" > 8n) is false'); >+assert.sameValue('0o10' > 9n, false, 'The result of ("0o10" > 9n) is false'); >+assert.sameValue('0b10' > 1n, true, 'The result of ("0b10" > 1n) is true'); >+assert.sameValue('0b10' > 2n, false, 'The result of ("0b10" > 2n) is false'); >+assert.sameValue('0b10' > 3n, false, 'The result of ("0b10" > 3n) is false'); >+ >+assert.sameValue( >+ 9007199254740993n > '9007199254740992', >+ true, >+ 'The result of (9007199254740993n > "9007199254740992") is true' >+); >+ >+assert.sameValue( >+ '9007199254740993' > 9007199254740992n, >+ true, >+ 'The result of ("9007199254740993" > 9007199254740992n) is true' >+); >+ >+assert.sameValue( >+ -9007199254740992n > '-9007199254740993', >+ true, >+ 'The result of (-9007199254740992n > "-9007199254740993") is true' >+); >+ >+assert.sameValue( >+ '-9007199254740992' > -9007199254740993n, >+ true, >+ 'The result of ("-9007199254740992" > -9007199254740993n) is true' >+); >diff --git a/JSTests/test262/test/language/expressions/greater-than/bigint-and-symbol.js b/JSTests/test262/test/language/expressions/greater-than/bigint-and-symbol.js >new file mode 100644 >index 0000000000000000000000000000000000000000..2cc873f66405f42dfcfac4ca485f80fb98d2aaea >--- /dev/null >+++ b/JSTests/test262/test/language/expressions/greater-than/bigint-and-symbol.js >@@ -0,0 +1,14 @@ >+// Copyright (C) 2018 Caio Lima. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+description: Relational comparison of BigInt and Symbol values >+esid: sec-abstract-relational-comparison >+features: [BigInt, Symbol] >+---*/ >+assert.throws(TypeError, function() { >+ 3n > Symbol('2'); >+}, '3n > Symbol("2") throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Symbol('2') > 3n; >+}, 'Symbol("2") > 3n throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/left-shift/bigint-and-number.js b/JSTests/test262/test/language/expressions/left-shift/bigint-and-number.js >index 585fc56418d5dc1aeff5503a7558cf7226ddbfb0..65e3afbbf6c49e539ecb0699c9e3f6d7cc7aaa4f 100644 >--- a/JSTests/test262/test/language/expressions/left-shift/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/left-shift/bigint-and-number.js >@@ -9,24 +9,82 @@ > Let rnum be ? ToNumeric(rightValue). > If Type(lnum) does not equal Type(rnum), throw a TypeError exception. > ---*/ >+assert.throws(TypeError, function() { >+ 1n << 1; >+}, '1n << 1 throws TypeError'); > >-assert.throws(TypeError, function() { 1n << 1; }, "1n << 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 << 1n; }, "1 << 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) << 1; }, "Object(1n) << 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 << Object(1n); }, "1 << Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n << Object(1); }, "1n << Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) << 1n; }, "Object(1) << 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) << Object(1); }, "Object(1n) << Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) << Object(1n); }, "Object(1) << Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n << NaN; }, "1n << NaN throws TypeError"); >-assert.throws(TypeError, function() { NaN << 1n; }, "NaN << 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n << Infinity; }, "1n << Infinity throws TypeError"); >-assert.throws(TypeError, function() { Infinity << 1n; }, "Infinity << 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n << true; }, "1n << true throws TypeError"); >-assert.throws(TypeError, function() { true << 1n; }, "true << 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n << "1"; }, '1n << "1" throws TypeError'); >-assert.throws(TypeError, function() { "1" << 1n; }, '"1" << 1n throws TypeError'); >-assert.throws(TypeError, function() { 1n << null; }, "1n << null throws TypeError"); >-assert.throws(TypeError, function() { null << 1n; }, "null << 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n << undefined; }, "1n << undefined throws TypeError"); >-assert.throws(TypeError, function() { undefined << 1n; }, "undefined << 1n throws TypeError"); >+assert.throws(TypeError, function() { >+ 1 << 1n; >+}, '1 << 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) << 1; >+}, 'Object(1n) << 1 throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1 << Object(1n); >+}, '1 << Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n << Object(1); >+}, '1n << Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) << 1n; >+}, 'Object(1) << 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) << Object(1); >+}, 'Object(1n) << Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) << Object(1n); >+}, 'Object(1) << Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n << NaN; >+}, '1n << NaN throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ NaN << 1n; >+}, 'NaN << 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n << Infinity; >+}, '1n << Infinity throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Infinity << 1n; >+}, 'Infinity << 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n << true; >+}, '1n << true throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ true << 1n; >+}, 'true << 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n << '1'; >+}, '1n << "1" throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ '1' << 1n; >+}, '"1" << 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n << null; >+}, '1n << null throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ null << 1n; >+}, 'null << 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n << undefined; >+}, '1n << undefined throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ undefined << 1n; >+}, 'undefined << 1n throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/left-shift/bigint-errors.js b/JSTests/test262/test/language/expressions/left-shift/bigint-errors.js >index 5e076e22f6f9d40f5550f359e36071c280b4a7bc..716d38ce32600ce8ed7cf26046a0785d4e4a063a 100644 >--- a/JSTests/test262/test/language/expressions/left-shift/bigint-errors.js >+++ b/JSTests/test262/test/language/expressions/left-shift/bigint-errors.js >@@ -5,58 +5,66 @@ > esid: sec-left-shift-operator-runtime-semantics-evaluation > features: [BigInt, Symbol, Symbol.toPrimitive, computed-property-names] > ---*/ >- > assert.throws(TypeError, function() { >- Symbol("1") << 0n; >-}, "ToBigInt: Symbol => TypeError"); >+ Symbol('1') << 0n; >+}, 'Symbol("1") << 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n << Symbol("1"); >-}, "ToBigInt: Symbol => TypeError"); >+ 0n << Symbol('1'); >+}, '0n << Symbol("1") throws TypeError'); >+ > assert.throws(TypeError, function() { >- Object(Symbol("1")) << 0n; >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ Object(Symbol('1')) << 0n; >+}, 'Object(Symbol("1")) << 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n << Object(Symbol("1")); >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ 0n << Object(Symbol('1')); >+}, '0n << Object(Symbol("1")) throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) << 0n; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '({[Symbol.toPrimitive]: function() {return Symbol("1");}}) << 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n << { > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '0n << {[Symbol.toPrimitive]: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) << 0n; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '({valueOf: function() {return Symbol("1");}}) << 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n << { > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '0n << {valueOf: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) << 0n; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '({toString: function() {return Symbol("1");}}) << 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n << { > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '0n << {toString: function() {return Symbol("1");}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/left-shift/bigint-non-primitive.js b/JSTests/test262/test/language/expressions/left-shift/bigint-non-primitive.js >index ffa3405a964e43a5e5b3cb999ff84e0c3410af16..b2001b99ae468035d60076bd817d223d70f293f3 100644 >--- a/JSTests/test262/test/language/expressions/left-shift/bigint-non-primitive.js >+++ b/JSTests/test262/test/language/expressions/left-shift/bigint-non-primitive.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Left shift for non-primitive BigInt values > esid: sec-left-shift-operator-runtime-semantics-evaluation >@@ -19,32 +18,70 @@ > > features: [BigInt, Symbol.toPrimitive] > ---*/ >+assert.sameValue(Object(0b101n) << 1n, 0b1010n, 'The result of (Object(0b101n) << 1n) is 0b1010n'); > >-assert.sameValue(Object(0b101n) << 1n, 0b1010n, "Object(0b101n) << 1n === 0b1010n"); >-assert.sameValue(Object(0b101n) << Object(1n), 0b1010n, "Object(0b101n) << Object(1n) === 0b1010n"); >+assert.sameValue( >+ Object(0b101n) << Object(1n), >+ 0b1010n, >+ 'The result of (Object(0b101n) << Object(1n)) is 0b1010n' >+); > > function err() { > throw new Test262Error(); > } > >-assert.sameValue( >- {[Symbol.toPrimitive]: function() { return 0b101n; }, valueOf: err, toString: err} << 1n, 0b1010n, >- "primitive from @@toPrimitive"); >-assert.sameValue( >- {valueOf: function() { return 0b101n; }, toString: err} << 1n, 0b1010n, >- "primitive from {}.valueOf"); >-assert.sameValue( >- {toString: function() { return 0b101n; }} << 1n, 0b1010n, >- "primitive from {}.toString"); >-assert.sameValue( >- 0b101n << {[Symbol.toPrimitive]: function() { return 1n; }, valueOf: err, toString: err}, 0b1010n, >- "primitive from @@toPrimitive"); >-assert.sameValue( >- 0b101n << {valueOf: function() { return 1n; }, toString: err}, 0b1010n, >- "primitive from {}.valueOf"); >-assert.sameValue( >- 0b101n << {toString: function() { return 1n; }}, 0b1010n, >- "primitive from {}.toString"); >-assert.sameValue( >- {valueOf: function() { return 0b101n; }} << {valueOf: function() { return 1n; }}, 0b1010n, >- "primitive from {}.valueOf"); >+assert.sameValue({ >+ [Symbol.toPrimitive]: function() { >+ return 0b101n; >+ }, >+ >+ valueOf: err, >+ toString: err >+} << 1n, 0b1010n, 'The result of (({[Symbol.toPrimitive]: function() {return 0b101n;}, valueOf: err, toString: err}) << 1n) is 0b1010n'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 0b101n; >+ }, >+ >+ toString: err >+} << 1n, 0b1010n, 'The result of (({valueOf: function() {return 0b101n;}, toString: err}) << 1n) is 0b1010n'); >+ >+assert.sameValue({ >+ toString: function() { >+ return 0b101n; >+ } >+} << 1n, 0b1010n, 'The result of (({toString: function() {return 0b101n;}}) << 1n) is 0b1010n'); >+ >+assert.sameValue(0b101n << { >+ [Symbol.toPrimitive]: function() { >+ return 1n; >+ }, >+ >+ valueOf: err, >+ toString: err >+}, 0b1010n, 'The result of (0b101n << {[Symbol.toPrimitive]: function() {return 1n;}, valueOf: err, toString: err}) is 0b1010n'); >+ >+assert.sameValue(0b101n << { >+ valueOf: function() { >+ return 1n; >+ }, >+ >+ toString: err >+}, 0b1010n, 'The result of (0b101n << {valueOf: function() {return 1n;}, toString: err}) is 0b1010n'); >+ >+assert.sameValue(0b101n << { >+ toString: function() { >+ return 1n; >+ } >+}, 0b1010n, 'The result of (0b101n << {toString: function() {return 1n;}}) is 0b1010n'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 0b101n; >+ } >+} << { >+ valueOf: function() { >+ return 1n; >+ } >+}, 0b1010n, 'The result of (({valueOf: function() {return 0b101n;}}) << {valueOf: function() {return 1n;}}) is 0b1010n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/left-shift/bigint-toprimitive.js b/JSTests/test262/test/language/expressions/left-shift/bigint-toprimitive.js >index 752d0e8ad51e687cfb274bc7ff72f1174342ba6a..1788d8b62e548bdd1b57bb52ba5dc6849634d1a3 100644 >--- a/JSTests/test262/test/language/expressions/left-shift/bigint-toprimitive.js >+++ b/JSTests/test262/test/language/expressions/left-shift/bigint-toprimitive.js >@@ -5,304 +5,368 @@ > esid: sec-left-shift-operator-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >- > function err() { > throw new Test262Error(); > } > > function MyError() {} > >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}) << 1n, 4n, "ToPrimitive: @@toPrimitive takes precedence"); >+} << 1n, 4n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) << 1n) is 4n'); >+ > assert.sameValue(1n << { > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}, 4n, "ToPrimitive: @@toPrimitive takes precedence"); >-assert.sameValue(({ >+}, 4n, 'The result of (1n << {[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) is 4n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > }, >+ > toString: err >-}) << 1n, 4n, "ToPrimitive: valueOf takes precedence over toString"); >+} << 1n, 4n, 'The result of (({valueOf: function() {return 2n;}, toString: err}) << 1n) is 4n'); >+ > assert.sameValue(1n << { > valueOf: function() { > return 2n; > }, >+ > toString: err >-}, 4n, "ToPrimitive: valueOf takes precedence over toString"); >-assert.sameValue(({ >+}, 4n, 'The result of (1n << {valueOf: function() {return 2n;}, toString: err}) is 4n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) << 1n, 4n, "ToPrimitive: toString with no valueOf"); >+} << 1n, 4n, 'The result of (({toString: function() {return 2n;}}) << 1n) is 4n'); >+ > assert.sameValue(1n << { > toString: function() { > return 2n; > } >-}, 4n, "ToPrimitive: toString with no valueOf"); >-assert.sameValue(({ >+}, 4n, 'The result of (1n << {toString: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}) << 1n, 4n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >+} << 1n, 4n, 'The result of (({[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) << 1n) is 4n'); >+ > assert.sameValue(1n << { > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}, 4n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >-assert.sameValue(({ >+}, 4n, 'The result of (1n << {[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}) << 1n, 4n, "ToPrimitive: skip @@toPrimitive when it's null"); >+} << 1n, 4n, 'The result of (({[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) << 1n) is 4n'); >+ > assert.sameValue(1n << { > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}, 4n, "ToPrimitive: skip @@toPrimitive when it's null"); >-assert.sameValue(({ >+}, 4n, 'The result of (1n << {[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > valueOf: null, >+ > toString: function() { > return 2n; > } >-}) << 1n, 4n, "ToPrimitive: skip valueOf when it's not callable"); >+} << 1n, 4n, 'The result of (({valueOf: null, toString: function() {return 2n;}}) << 1n) is 4n'); >+ > assert.sameValue(1n << { > valueOf: null, >+ > toString: function() { > return 2n; > } >-}, 4n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 4n, 'The result of (1n << {valueOf: null, toString: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}) << 1n, 4n, "ToPrimitive: skip valueOf when it's not callable"); >+} << 1n, 4n, 'The result of (({valueOf: 1, toString: function() {return 2n;}}) << 1n) is 4n'); >+ > assert.sameValue(1n << { > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}, 4n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 4n, 'The result of (1n << {valueOf: 1, toString: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}) << 1n, 4n, "ToPrimitive: skip valueOf when it's not callable"); >+} << 1n, 4n, 'The result of (({valueOf: {}, toString: function() {return 2n;}}) << 1n) is 4n'); >+ > assert.sameValue(1n << { > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}, 4n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 4n, 'The result of (1n << {valueOf: {}, toString: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}) << 1n, 4n, "ToPrimitive: skip valueOf when it returns an object"); >+} << 1n, 4n, 'The result of (({valueOf: function() {return {};}, toString: function() {return 2n;}}) << 1n) is 4n'); >+ > assert.sameValue(1n << { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}, 4n, "ToPrimitive: skip valueOf when it returns an object"); >-assert.sameValue(({ >+}, 4n, 'The result of (1n << {valueOf: function() {return {};}, toString: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}) << 1n, 4n, "ToPrimitive: skip valueOf when it returns an object"); >+} << 1n, 4n, 'The result of (({valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) << 1n) is 4n'); >+ > assert.sameValue(1n << { > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}, 4n, "ToPrimitive: skip valueOf when it returns an object"); >+}, 4n, 'The result of (1n << {valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) is 4n'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: 1 > }) << 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: 1}) << 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n << { > [Symbol.toPrimitive]: 1 > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n << {[Symbol.toPrimitive]: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: {} > }) << 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: {}}) << 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n << { > [Symbol.toPrimitive]: {} > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n << {[Symbol.toPrimitive]: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return Object(1); > } > }) << 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return Object(1);}}) << 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n << { > [Symbol.toPrimitive]: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n << {[Symbol.toPrimitive]: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return {}; > } > }) << 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return {};}}) << 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n << { > [Symbol.toPrimitive]: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n << {[Symbol.toPrimitive]: function() {return {};}} throws TypeError'); >+ > assert.throws(MyError, function() { > ({ > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }) << 0n; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '({[Symbol.toPrimitive]: function() {throw new MyError();}}) << 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n << { > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '0n << {[Symbol.toPrimitive]: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > valueOf: function() { > throw new MyError(); > } > }) << 0n; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '({valueOf: function() {throw new MyError();}}) << 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n << { > valueOf: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '0n << {valueOf: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > toString: function() { > throw new MyError(); > } > }) << 0n; >-}, "ToPrimitive: propagate errors from toString"); >+}, '({toString: function() {throw new MyError();}}) << 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n << { > toString: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from toString"); >+}, '0n << {toString: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: null, > toString: null > }) << 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: null, toString: null}) << 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n << { > valueOf: null, > toString: null > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n << {valueOf: null, toString: null} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: 1, > toString: 1 > }) << 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: 1, toString: 1}) << 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n << { > valueOf: 1, > toString: 1 > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n << {valueOf: 1, toString: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: {}, > toString: {} > }) << 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: {}, toString: {}}) << 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n << { > valueOf: {}, > toString: {} > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n << {valueOf: {}, toString: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }) << 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return Object(1);}, toString: function() {return Object(1);}}) << 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n << { > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n << {valueOf: function() {return Object(1);}, toString: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }) << 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return {};}, toString: function() {return {};}}) << 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n << { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n << {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/left-shift/bigint-wrapped-values.js b/JSTests/test262/test/language/expressions/left-shift/bigint-wrapped-values.js >index 79422b11b99f9fbf2cf5ee416c6de3c242391c9a..2a0b71c1aacc45f5700c2b073626cb58688bad53 100644 >--- a/JSTests/test262/test/language/expressions/left-shift/bigint-wrapped-values.js >+++ b/JSTests/test262/test/language/expressions/left-shift/bigint-wrapped-values.js >@@ -5,36 +5,41 @@ > esid: sec-left-shift-operator-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >+assert.sameValue(Object(2n) << 1n, 4n, 'The result of (Object(2n) << 1n) is 4n'); >+assert.sameValue(1n << Object(2n), 4n, 'The result of (1n << Object(2n)) is 4n'); > >-assert.sameValue(Object(2n) << 1n, 4n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(1n << Object(2n), 4n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > } >-}) << 1n, 4n, "ToPrimitive: @@toPrimitive"); >+} << 1n, 4n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}}) << 1n) is 4n'); >+ > assert.sameValue(1n << { > [Symbol.toPrimitive]: function() { > return 2n; > } >-}, 4n, "ToPrimitive: @@toPrimitive"); >-assert.sameValue(({ >+}, 4n, 'The result of (1n << {[Symbol.toPrimitive]: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > } >-}) << 1n, 4n, "ToPrimitive: valueOf"); >+} << 1n, 4n, 'The result of (({valueOf: function() {return 2n;}}) << 1n) is 4n'); >+ > assert.sameValue(1n << { > valueOf: function() { > return 2n; > } >-}, 4n, "ToPrimitive: valueOf"); >-assert.sameValue(({ >+}, 4n, 'The result of (1n << {valueOf: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) << 1n, 4n, "ToPrimitive: toString"); >+} << 1n, 4n, 'The result of (({toString: function() {return 2n;}}) << 1n) is 4n'); >+ > assert.sameValue(1n << { > toString: function() { > return 2n; > } >-}, 4n, "ToPrimitive: toString"); >+}, 4n, 'The result of (1n << {toString: function() {return 2n;}}) is 4n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-1.js b/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-1.js >index 7992e5d44c5647e0b6e88c55b9f5e2ad067ecf09..3eb706b82bce5798b9da9e26da95decca385df27 100644 >--- a/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-1.js >+++ b/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-1.js >@@ -8,21 +8,18 @@ > enforced when using Less-than-or-equal operator: valueOf <= valueOf > ---*/ > >- var accessed = false; >- var obj1 = { >- valueOf: function () { >- accessed = true; >- return 3; >- } >- }; >- var obj2 = { >- valueOf: function () { >- if (accessed === true) { >- return 4; >- } else { >- return 2; >- } >- } >- }; >+var accessed = false; >+var obj1 = { >+ valueOf: function () { >+ accessed = true; >+ return 4; >+ } >+}; >+var obj2 = { >+ valueOf: function () { >+ return 2; >+ } >+}; > >-assert((obj1 <= obj2), '(obj1 <= obj2) !== true'); >+assert.sameValue(obj1 <= obj2, false, 'The result of (obj1 <= obj2) is false'); >+assert.sameValue(accessed, true, 'The value of accessed is true'); >diff --git a/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-2.js b/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-2.js >index 70bbbce76ad99a80c9f48371b54943203bef7467..affb1fb214a2b5080f6eede0b2794c2c9d146e9f 100644 >--- a/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-2.js >+++ b/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-2.js >@@ -9,21 +9,18 @@ > toString > ---*/ > >- var accessed = false; >- var obj1 = { >- valueOf: function () { >- accessed = true; >- return 3; >- } >- }; >- var obj2 = { >- toString: function () { >- if (accessed === true) { >- return 4; >- } else { >- return 2; >- } >- } >- }; >+var accessed = false; >+var obj1 = { >+ valueOf: function () { >+ accessed = true; >+ return 4; >+ } >+}; >+var obj2 = { >+ toString: function () { >+ return 2; >+ } >+}; > >-assert((obj1 <= obj2), '(obj1 <= obj2) !== true'); >+assert.sameValue(obj1 <= obj2, false, 'The result of (obj1 <= obj2) is false'); >+assert.sameValue(accessed, true, 'The value of accessed is true'); >diff --git a/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-3.js b/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-3.js >index a7aeed1cc0aa2c6955397dc12ce3ae499a523d8c..1beb0d5681e781f8c8805d8de427b44486375890 100644 >--- a/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-3.js >+++ b/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-3.js >@@ -9,21 +9,18 @@ > valueOf > ---*/ > >- var accessed = false; >- var obj1 = { >- toString: function () { >- accessed = true; >- return 3; >- } >- }; >- var obj2 = { >- valueOf: function () { >- if (accessed === true) { >- return 4; >- } else { >- return 2; >- } >- } >- }; >+var accessed = false; >+var obj1 = { >+ toString: function () { >+ accessed = true; >+ return 4; >+ } >+}; >+var obj2 = { >+ valueOf: function () { >+ return 2; >+ } >+}; > >-assert((obj1 <= obj2), '(obj1 <= obj2) !== true'); >+assert.sameValue(obj1 <= obj2, false, 'The result of (obj1 <= obj2) is false'); >+assert.sameValue(accessed, true, 'The value of accessed is true'); >diff --git a/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-4.js b/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-4.js >index 7c736cdcca6f1acbf675f6a5c0f4e8a726d42f59..6c276bdf2fd429105c64d91ce76a11264f00f0e6 100644 >--- a/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-4.js >+++ b/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-4.js >@@ -9,21 +9,18 @@ > toString > ---*/ > >- var accessed = false; >- var obj1 = { >- toString: function () { >- accessed = true; >- return 3; >- } >- }; >- var obj2 = { >- toString: function () { >- if (accessed === true) { >- return 4; >- } else { >- return 2; >- } >- } >- }; >+var accessed = false; >+var obj1 = { >+ toString: function () { >+ accessed = true; >+ return 4; >+ } >+}; >+var obj2 = { >+ toString: function () { >+ return 2; >+ } >+}; > >-assert((obj1 <= obj2), '(obj1 <= obj2) !== true'); >+assert.sameValue(obj1 <= obj2, false, 'The result of (obj1 <= obj2) is false'); >+assert.sameValue(accessed, true, 'The value of accessed is true'); >diff --git a/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-5.js b/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-5.js >deleted file mode 100644 >index 6177acc3815f9cd69431a80c8f371746ff97dc7d..0000000000000000000000000000000000000000 >--- a/JSTests/test262/test/language/expressions/less-than-or-equal/11.8.3-5.js >+++ /dev/null >@@ -1,28 +0,0 @@ >-// Copyright (c) 2012 Ecma International. All rights reserved. >-// This code is governed by the BSD license found in the LICENSE file. >- >-/*--- >-es5id: 11.8.3-5 >-description: > >- 11.8.3 Less-than-or-equal Operator - Partial left to right order >- enforced when using Less-than-or-equal operator: valueOf <= valueOf >----*/ >- >- var accessed = false; >- var obj1 = { >- valueOf: function () { >- accessed = true; >- return 3; >- } >- }; >- var obj2 = { >- valueOf: function () { >- if (accessed === true) { >- return 3; >- } else { >- return 2; >- } >- } >- }; >- >-assert((obj1 <= obj2), '(obj1 <= obj2) !== true'); >diff --git a/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-bigint.js b/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-bigint.js >index c667c60c644d0340f0cbd7ae10b3efb1c267c634..204bd5139f559724d1d57b04e69baa3c2b241144 100644 >--- a/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-bigint.js >+++ b/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-bigint.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Comparisons of BigInt and BigInt values > esid: sec-abstract-relational-comparison >@@ -20,37 +19,146 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n <= 0n, true, 'The result of (0n <= 0n) is true'); >+assert.sameValue(1n <= 1n, true, 'The result of (1n <= 1n) is true'); >+assert.sameValue(-1n <= -1n, true, 'The result of (-1n <= -1n) is true'); >+assert.sameValue(0n <= -0n, true, 'The result of (0n <= -0n) is true'); >+assert.sameValue(-0n <= 0n, true, 'The result of (-0n <= 0n) is true'); >+assert.sameValue(0n <= 1n, true, 'The result of (0n <= 1n) is true'); >+assert.sameValue(1n <= 0n, false, 'The result of (1n <= 0n) is false'); >+assert.sameValue(0n <= -1n, false, 'The result of (0n <= -1n) is false'); >+assert.sameValue(-1n <= 0n, true, 'The result of (-1n <= 0n) is true'); >+assert.sameValue(1n <= -1n, false, 'The result of (1n <= -1n) is false'); >+assert.sameValue(-1n <= 1n, true, 'The result of (-1n <= 1n) is true'); >+ >+assert.sameValue( >+ 0x1fffffffffffff01n <= 0x1fffffffffffff02n, >+ true, >+ 'The result of (0x1fffffffffffff01n <= 0x1fffffffffffff02n) is true' >+); >+ >+assert.sameValue( >+ 0x1fffffffffffff02n <= 0x1fffffffffffff01n, >+ false, >+ 'The result of (0x1fffffffffffff02n <= 0x1fffffffffffff01n) is false' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff01n <= -0x1fffffffffffff02n, >+ false, >+ 'The result of (-0x1fffffffffffff01n <= -0x1fffffffffffff02n) is false' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff02n <= -0x1fffffffffffff01n, >+ true, >+ 'The result of (-0x1fffffffffffff02n <= -0x1fffffffffffff01n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n <= 0n, >+ false, >+ 'The result of (0x10000000000000000n <= 0n) is false' >+); >+ >+assert.sameValue( >+ 0n <= 0x10000000000000000n, >+ true, >+ 'The result of (0n <= 0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n <= 1n, >+ false, >+ 'The result of (0x10000000000000000n <= 1n) is false' >+); >+ >+assert.sameValue( >+ 1n <= 0x10000000000000000n, >+ true, >+ 'The result of (1n <= 0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n <= -1n, >+ false, >+ 'The result of (0x10000000000000000n <= -1n) is false' >+); >+ >+assert.sameValue( >+ -1n <= 0x10000000000000000n, >+ true, >+ 'The result of (-1n <= 0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000001n <= 0n, >+ false, >+ 'The result of (0x10000000000000001n <= 0n) is false' >+); >+ >+assert.sameValue( >+ 0n <= 0x10000000000000001n, >+ true, >+ 'The result of (0n <= 0x10000000000000001n) is true' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n <= 0n, >+ true, >+ 'The result of (-0x10000000000000000n <= 0n) is true' >+); >+ >+assert.sameValue( >+ 0n <= -0x10000000000000000n, >+ false, >+ 'The result of (0n <= -0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n <= 1n, >+ true, >+ 'The result of (-0x10000000000000000n <= 1n) is true' >+); >+ >+assert.sameValue( >+ 1n <= -0x10000000000000000n, >+ false, >+ 'The result of (1n <= -0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n <= -1n, >+ true, >+ 'The result of (-0x10000000000000000n <= -1n) is true' >+); >+ >+assert.sameValue( >+ -1n <= -0x10000000000000000n, >+ false, >+ 'The result of (-1n <= -0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ -0x10000000000000001n <= 0n, >+ true, >+ 'The result of (-0x10000000000000001n <= 0n) is true' >+); >+ >+assert.sameValue( >+ 0n <= -0x10000000000000001n, >+ false, >+ 'The result of (0n <= -0x10000000000000001n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n <= 0x100000000n, >+ false, >+ 'The result of (0x10000000000000000n <= 0x100000000n) is false' >+); > >-assert.sameValue(0n <= 0n, true, "0n <= 0n"); >-assert.sameValue(1n <= 1n, true, "1n <= 1n"); >-assert.sameValue(-1n <= -1n, true, "-1n <= -1n"); >-assert.sameValue(0n <= -0n, true, "0n <= -0n"); >-assert.sameValue(-0n <= 0n, true, "-0n <= 0n"); >-assert.sameValue(0n <= 1n, true, "0n <= 1n"); >-assert.sameValue(1n <= 0n, false, "1n <= 0n"); >-assert.sameValue(0n <= -1n, false, "0n <= -1n"); >-assert.sameValue(-1n <= 0n, true, "-1n <= 0n"); >-assert.sameValue(1n <= -1n, false, "1n <= -1n"); >-assert.sameValue(-1n <= 1n, true, "-1n <= 1n"); >-assert.sameValue(0x1fffffffffffff01n <= 0x1fffffffffffff02n, true, "0x1fffffffffffff01n <= 0x1fffffffffffff02n"); >-assert.sameValue(0x1fffffffffffff02n <= 0x1fffffffffffff01n, false, "0x1fffffffffffff02n <= 0x1fffffffffffff01n"); >-assert.sameValue(-0x1fffffffffffff01n <= -0x1fffffffffffff02n, false, "-0x1fffffffffffff01n <= -0x1fffffffffffff02n"); >-assert.sameValue(-0x1fffffffffffff02n <= -0x1fffffffffffff01n, true, "-0x1fffffffffffff02n <= -0x1fffffffffffff01n"); >-assert.sameValue(0x10000000000000000n <= 0n, false, "0x10000000000000000n <= 0n"); >-assert.sameValue(0n <= 0x10000000000000000n, true, "0n <= 0x10000000000000000n"); >-assert.sameValue(0x10000000000000000n <= 1n, false, "0x10000000000000000n <= 1n"); >-assert.sameValue(1n <= 0x10000000000000000n, true, "1n <= 0x10000000000000000n"); >-assert.sameValue(0x10000000000000000n <= -1n, false, "0x10000000000000000n <= -1n"); >-assert.sameValue(-1n <= 0x10000000000000000n, true, "-1n <= 0x10000000000000000n"); >-assert.sameValue(0x10000000000000001n <= 0n, false, "0x10000000000000001n <= 0n"); >-assert.sameValue(0n <= 0x10000000000000001n, true, "0n <= 0x10000000000000001n"); >-assert.sameValue(-0x10000000000000000n <= 0n, true, "-0x10000000000000000n <= 0n"); >-assert.sameValue(0n <= -0x10000000000000000n, false, "0n <= -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000000n <= 1n, true, "-0x10000000000000000n <= 1n"); >-assert.sameValue(1n <= -0x10000000000000000n, false, "1n <= -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000000n <= -1n, true, "-0x10000000000000000n <= -1n"); >-assert.sameValue(-1n <= -0x10000000000000000n, false, "-1n <= -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000001n <= 0n, true, "-0x10000000000000001n <= 0n"); >-assert.sameValue(0n <= -0x10000000000000001n, false, "0n <= -0x10000000000000001n"); >-assert.sameValue(0x10000000000000000n <= 0x100000000n, false, "0x10000000000000000n <= 0x100000000n"); >-assert.sameValue(0x100000000n <= 0x10000000000000000n, true, "0x100000000n <= 0x10000000000000000n"); >+assert.sameValue( >+ 0x100000000n <= 0x10000000000000000n, >+ true, >+ 'The result of (0x100000000n <= 0x10000000000000000n) is true' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-incomparable-string.js b/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-incomparable-string.js >index f606992fc65887aebe3785e0581edd55de78db83..ac09ce0eee10f1ad277af083a9c4db064028f2f3 100644 >--- a/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-incomparable-string.js >+++ b/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-incomparable-string.js >@@ -1,30 +1,27 @@ > // Copyright (C) 2018 Igalia, S.L. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Relational comparison of BigInt and string values > esid: sec-abstract-relational-comparison > features: [BigInt] > ---*/ >- >-assert.sameValue("0n" <= 1n, false, "'0n' <= 1n"); >-assert.sameValue("0." <= 1n, false, "'0.' <= 1n"); >-assert.sameValue(".0" <= 1n, false, "'.0' <= 1n"); >-assert.sameValue("0/1" <= 1n, false, "'0/1' <= 1n"); >-assert.sameValue("z0" <= 1n, false, "'z0' <= 1n"); >-assert.sameValue("0z" <= 1n, false, "'0z' <= 1n"); >-assert.sameValue("++0" <= 1n, false, "'++0' <= 1n"); >-assert.sameValue("--0" <= 1n, false, "'--0' <= 1n"); >-assert.sameValue("0e0" <= 1n, false, "'0e0' <= 1n"); >-assert.sameValue("Infinity" <= 1n, false, "'Infinity' <= 1n"); >- >-assert.sameValue(0n <= "1n", false, "0n <= '1n'"); >-assert.sameValue(0n <= "1.", false, "0n <= '1.'"); >-assert.sameValue(0n <= ".1", false, "0n <= '.1'"); >-assert.sameValue(0n <= "1/1", false, "0n <= '1/1'"); >-assert.sameValue(0n <= "z1", false, "0n <= 'z1'"); >-assert.sameValue(0n <= "1z", false, "0n <= '1z'"); >-assert.sameValue(0n <= "++1", false, "0n <= '++1'"); >-assert.sameValue(0n <= "--1", false, "0n <= '--1'"); >-assert.sameValue(0n <= "1e0", false, "0n <= '1e0'"); >-assert.sameValue(0n <= "Infinity", false, "0n <= 'Infinity'"); >+assert.sameValue('0n' <= 1n, false, 'The result of ("0n" <= 1n) is false'); >+assert.sameValue('0.' <= 1n, false, 'The result of ("0." <= 1n) is false'); >+assert.sameValue('.0' <= 1n, false, 'The result of (".0" <= 1n) is false'); >+assert.sameValue('0/1' <= 1n, false, 'The result of ("0/1" <= 1n) is false'); >+assert.sameValue('z0' <= 1n, false, 'The result of ("z0" <= 1n) is false'); >+assert.sameValue('0z' <= 1n, false, 'The result of ("0z" <= 1n) is false'); >+assert.sameValue('++0' <= 1n, false, 'The result of ("++0" <= 1n) is false'); >+assert.sameValue('--0' <= 1n, false, 'The result of ("--0" <= 1n) is false'); >+assert.sameValue('0e0' <= 1n, false, 'The result of ("0e0" <= 1n) is false'); >+assert.sameValue('Infinity' <= 1n, false, 'The result of ("Infinity" <= 1n) is false'); >+assert.sameValue(0n <= '1n', false, 'The result of (0n <= "1n") is false'); >+assert.sameValue(0n <= '1.', false, 'The result of (0n <= "1.") is false'); >+assert.sameValue(0n <= '.1', false, 'The result of (0n <= ".1") is false'); >+assert.sameValue(0n <= '1/1', false, 'The result of (0n <= "1/1") is false'); >+assert.sameValue(0n <= 'z1', false, 'The result of (0n <= "z1") is false'); >+assert.sameValue(0n <= '1z', false, 'The result of (0n <= "1z") is false'); >+assert.sameValue(0n <= '++1', false, 'The result of (0n <= "++1") is false'); >+assert.sameValue(0n <= '--1', false, 'The result of (0n <= "--1") is false'); >+assert.sameValue(0n <= '1e0', false, 'The result of (0n <= "1e0") is false'); >+assert.sameValue(0n <= 'Infinity', false, 'The result of (0n <= "Infinity") is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-non-finite.js b/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-non-finite.js >index e7053f218c44afdbf434464c82e5fda71a5fd512..b5e3eae7952a1a6aef6546fa41afd524c75a70a5 100644 >--- a/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-non-finite.js >+++ b/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-non-finite.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Comparisons of BigInt and non-finite Number values > esid: sec-abstract-relational-comparison >@@ -18,14 +17,13 @@ > g. If x is +â, or y is -â, return false. > features: [BigInt] > ---*/ >- >-assert.sameValue(1n <= Infinity, true, "1n <= Infinity"); >-assert.sameValue(Infinity <= 1n, false, "Infinity <= 1n"); >-assert.sameValue(-1n <= Infinity, true, "-1n <= Infinity"); >-assert.sameValue(Infinity <= -1n, false, "Infinity <= -1n"); >-assert.sameValue(1n <= -Infinity, false, "1n <= -Infinity"); >-assert.sameValue(-Infinity <= 1n, true, "-Infinity <= 1n"); >-assert.sameValue(-1n <= -Infinity, false, "-1n <= -Infinity"); >-assert.sameValue(-Infinity <= -1n, true, "-Infinity <= -1n"); >-assert.sameValue(0n <= NaN, false, "0n <= NaN"); >-assert.sameValue(NaN <= 0n, false, "NaN <= 0n"); >+assert.sameValue(1n <= Infinity, true, 'The result of (1n <= Infinity) is true'); >+assert.sameValue(Infinity <= 1n, false, 'The result of (Infinity <= 1n) is false'); >+assert.sameValue(-1n <= Infinity, true, 'The result of (-1n <= Infinity) is true'); >+assert.sameValue(Infinity <= -1n, false, 'The result of (Infinity <= -1n) is false'); >+assert.sameValue(1n <= -Infinity, false, 'The result of (1n <= -Infinity) is false'); >+assert.sameValue(-Infinity <= 1n, true, 'The result of (-Infinity <= 1n) is true'); >+assert.sameValue(-1n <= -Infinity, false, 'The result of (-1n <= -Infinity) is false'); >+assert.sameValue(-Infinity <= -1n, true, 'The result of (-Infinity <= -1n) is true'); >+assert.sameValue(0n <= NaN, false, 'The result of (0n <= NaN) is false'); >+assert.sameValue(NaN <= 0n, false, 'The result of (NaN <= 0n) is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-number-extremes.js b/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-number-extremes.js >index 5b502b07c65a98ed6d6dfa66d187fca63555f6be..c900b8d2776c510f51b852239e85464c27281d03 100644 >--- a/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-number-extremes.js >+++ b/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-number-extremes.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Comparisons of BigInt and Number values > esid: sec-abstract-relational-comparison >@@ -19,24 +18,37 @@ > h. If the mathematical value of nx is less than the mathematical value of ny, return true, otherwise return false. > features: [BigInt] > ---*/ >+assert.sameValue(1n <= Number.MAX_VALUE, true, 'The result of (1n <= Number.MAX_VALUE) is true'); >+assert.sameValue(Number.MAX_VALUE <= 1n, false, 'The result of (Number.MAX_VALUE <= 1n) is false'); >+ >+assert.sameValue( >+ 1n <= -Number.MAX_VALUE, >+ false, >+ 'The result of (1n <= -Number.MAX_VALUE) is false' >+); >+ >+assert.sameValue(-Number.MAX_VALUE <= 1n, true, 'The result of (-Number.MAX_VALUE <= 1n) is true'); > >-assert.sameValue(1n <= Number.MAX_VALUE, true, "1n <= Number.MAX_VALUE"); >-assert.sameValue(Number.MAX_VALUE <= 1n, false, "Number.MAX_VALUE <= 1n"); >-assert.sameValue(1n <= -Number.MAX_VALUE, false, "1n <= -Number.MAX_VALUE"); >-assert.sameValue(-Number.MAX_VALUE <= 1n, true, "-Number.MAX_VALUE <= 1n"); > assert.sameValue( > 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn <= Number.MAX_VALUE, > true, >- "0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn <= Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn <= Number.MAX_VALUE) is true' >+); >+ > assert.sameValue( > Number.MAX_VALUE <= 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn, > false, >- "Number.MAX_VALUE <= 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn"); >+ 'The result of (Number.MAX_VALUE <= 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn) is false' >+); >+ > assert.sameValue( > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n <= Number.MAX_VALUE, > false, >- "0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n <= Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n <= Number.MAX_VALUE) is false' >+); >+ > assert.sameValue( > Number.MAX_VALUE <= 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n, > true, >- "Number.MAX_VALUE <= 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n"); >+ 'The result of (Number.MAX_VALUE <= 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n) is true' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-number.js b/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-number.js >index cef45145961dee5c76cf0b1edfdb24a59eb35235..06fe0675a962e93ed13920d612496bcda1208705 100644 >--- a/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-number.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Robin Templeton. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Comparisons of BigInt and Number values > esid: sec-abstract-relational-comparison >@@ -19,24 +18,39 @@ > h. If the mathematical value of nx is less than the mathematical value of ny, return true, otherwise return false. > features: [BigInt] > ---*/ >+assert.sameValue(0n <= 0, true, 'The result of (0n <= 0) is true'); >+assert.sameValue(0 <= 0n, true, 'The result of (0 <= 0n) is true'); >+assert.sameValue(0n <= -0, true, 'The result of (0n <= -0) is true'); >+assert.sameValue(-0 <= 0n, true, 'The result of (-0 <= 0n) is true'); >+assert.sameValue(0n <= 0.000000000001, true, 'The result of (0n <= 0.000000000001) is true'); >+assert.sameValue(0.000000000001 <= 0n, false, 'The result of (0.000000000001 <= 0n) is false'); >+assert.sameValue(0n <= 1, true, 'The result of (0n <= 1) is true'); >+assert.sameValue(1 <= 0n, false, 'The result of (1 <= 0n) is false'); >+assert.sameValue(1n <= 0, false, 'The result of (1n <= 0) is false'); >+assert.sameValue(0 <= 1n, true, 'The result of (0 <= 1n) is true'); >+assert.sameValue(1n <= 0.999999999999, false, 'The result of (1n <= 0.999999999999) is false'); >+assert.sameValue(0.999999999999 <= 1n, true, 'The result of (0.999999999999 <= 1n) is true'); >+assert.sameValue(1n <= 1, true, 'The result of (1n <= 1) is true'); >+assert.sameValue(1 <= 1n, true, 'The result of (1 <= 1n) is true'); >+assert.sameValue(0n <= Number.MIN_VALUE, true, 'The result of (0n <= Number.MIN_VALUE) is true'); >+assert.sameValue(Number.MIN_VALUE <= 0n, false, 'The result of (Number.MIN_VALUE <= 0n) is false'); >+ >+assert.sameValue( >+ 0n <= -Number.MIN_VALUE, >+ false, >+ 'The result of (0n <= -Number.MIN_VALUE) is false' >+); >+ >+assert.sameValue(-Number.MIN_VALUE <= 0n, true, 'The result of (-Number.MIN_VALUE <= 0n) is true'); >+ >+assert.sameValue( >+ -10n <= Number.MIN_VALUE, >+ true, >+ 'The result of (-10n <= Number.MIN_VALUE) is true' >+); > >-assert.sameValue(0n <= 0, true, "0n <= 0"); >-assert.sameValue(0 <= 0n, true, "0 <= 0n"); >-assert.sameValue(0n <= -0, true, "0n <= -0"); >-assert.sameValue(-0 <= 0n, true, "-0 <= 0n"); >-assert.sameValue(0n <= 0.000000000001, true, "0n <= 0.000000000001"); >-assert.sameValue(0.000000000001 <= 0n, false, "0.000000000001 <= 0n"); >-assert.sameValue(0n <= 1, true, "0n <= 1"); >-assert.sameValue(1 <= 0n, false, "1 <= 0n"); >-assert.sameValue(1n <= 0, false, "1n <= 0"); >-assert.sameValue(0 <= 1n, true, "0 <= 1n"); >-assert.sameValue(1n <= 0.999999999999, false, "1n <= 0.999999999999"); >-assert.sameValue(0.999999999999 <= 1n, true, "0.999999999999 <= 1n"); >-assert.sameValue(1n <= 1, true, "1n <= 1"); >-assert.sameValue(1 <= 1n, true, "1 <= 1n"); >-assert.sameValue(0n <= Number.MIN_VALUE, true, "0n <= Number.MIN_VALUE"); >-assert.sameValue(Number.MIN_VALUE <= 0n, false, "Number.MIN_VALUE <= 0n"); >-assert.sameValue(0n <= -Number.MIN_VALUE, false, "0n <= -Number.MIN_VALUE"); >-assert.sameValue(-Number.MIN_VALUE <= 0n, true, "-Number.MIN_VALUE <= 0n"); >-assert.sameValue(-10n <= Number.MIN_VALUE, true, "-10n <= Number.MIN_VALUE"); >-assert.sameValue(Number.MIN_VALUE <= -10n, false, "Number.MIN_VALUE <= -10n"); >+assert.sameValue( >+ Number.MIN_VALUE <= -10n, >+ false, >+ 'The result of (Number.MIN_VALUE <= -10n) is false' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-string.js b/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-string.js >index 3d0176cf6cadc561b495ad0369399e56dd418b10..a604d17a75b35abe3e64b397fb92bf92f8fa3131 100644 >--- a/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-string.js >+++ b/JSTests/test262/test/language/expressions/less-than-or-equal/bigint-and-string.js >@@ -1,48 +1,51 @@ > // Copyright (C) 2018 Igalia, S.L. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Relational comparison of BigInt and string values > esid: sec-abstract-relational-comparison > features: [BigInt] > ---*/ >- >-assert.sameValue(0n <= "0", true, "0n <= '0'"); >-assert.sameValue("0" <= 0n, true, "'0' <= 0n"); >- >-assert.sameValue(0n <= "1", true, "0n <= '1'"); >-assert.sameValue("0" <= 1n, true, "'0' <= 1n"); >- >-assert.sameValue(1n <= "0", false, "1n <= '0'"); >-assert.sameValue("1" <= 0n, false, "'1' <= 0n"); >- >-assert.sameValue(0n <= "", true, "0n <= ''"); >-assert.sameValue("" <= 0n, true, "'' <= 0n"); >- >-assert.sameValue(0n <= "1", true, "0n <= '1'"); >-assert.sameValue("" <= 1n, true, "'' <= 1n"); >- >-assert.sameValue(1n <= "", false, "1n <= ''"); >-assert.sameValue("1" <= 0n, false, "'1' <= 0n"); >- >-assert.sameValue(1n <= "1", true, "1n <= '1'"); >-assert.sameValue("1" <= 1n, true, "'1' <= 1n"); >- >-assert.sameValue(1n <= "-1", false, "1n <= '-1'"); >-assert.sameValue("1" <= -1n, false, "'1' <= -1n"); >- >-assert.sameValue(-1n <= "1", true, "-1n <= '1'"); >-assert.sameValue("-1" <= 1n, true, "'-1' <= 1n"); >- >-assert.sameValue(-1n <= "-1", true, "-1n <= '-1'"); >-assert.sameValue("-1" <= -1n, true, "'-1' <= -1n"); >- >-assert.sameValue(9007199254740993n <= "9007199254740992", false, >- "9007199254740993n <= '9007199254740992'"); >-assert.sameValue("9007199254740993" <= 9007199254740992n, false, >- "'9007199254740993' <= 9007199254740992n"); >- >-assert.sameValue(-9007199254740992n <= "-9007199254740993", false, >- "-9007199254740992n <= '-9007199254740993'"); >-assert.sameValue("-9007199254740992" <= -9007199254740993n, false, >- "'-9007199254740992' <= -9007199254740993n"); >+assert.sameValue(0n <= '0', true, 'The result of (0n <= "0") is true'); >+assert.sameValue('0' <= 0n, true, 'The result of ("0" <= 0n) is true'); >+assert.sameValue(0n <= '1', true, 'The result of (0n <= "1") is true'); >+assert.sameValue('0' <= 1n, true, 'The result of ("0" <= 1n) is true'); >+assert.sameValue(1n <= '0', false, 'The result of (1n <= "0") is false'); >+assert.sameValue('1' <= 0n, false, 'The result of ("1" <= 0n) is false'); >+assert.sameValue(0n <= '', true, 'The result of (0n <= "") is true'); >+assert.sameValue('' <= 0n, true, 'The result of ("" <= 0n) is true'); >+assert.sameValue(0n <= '1', true, 'The result of (0n <= "1") is true'); >+assert.sameValue('' <= 1n, true, 'The result of ("" <= 1n) is true'); >+assert.sameValue(1n <= '', false, 'The result of (1n <= "") is false'); >+assert.sameValue('1' <= 0n, false, 'The result of ("1" <= 0n) is false'); >+assert.sameValue(1n <= '1', true, 'The result of (1n <= "1") is true'); >+assert.sameValue('1' <= 1n, true, 'The result of ("1" <= 1n) is true'); >+assert.sameValue(1n <= '-1', false, 'The result of (1n <= "-1") is false'); >+assert.sameValue('1' <= -1n, false, 'The result of ("1" <= -1n) is false'); >+assert.sameValue(-1n <= '1', true, 'The result of (-1n <= "1") is true'); >+assert.sameValue('-1' <= 1n, true, 'The result of ("-1" <= 1n) is true'); >+assert.sameValue(-1n <= '-1', true, 'The result of (-1n <= "-1") is true'); >+assert.sameValue('-1' <= -1n, true, 'The result of ("-1" <= -1n) is true'); >+ >+assert.sameValue( >+ 9007199254740993n <= '9007199254740992', >+ false, >+ 'The result of (9007199254740993n <= "9007199254740992") is false' >+); >+ >+assert.sameValue( >+ '9007199254740993' <= 9007199254740992n, >+ false, >+ 'The result of ("9007199254740993" <= 9007199254740992n) is false' >+); >+ >+assert.sameValue( >+ -9007199254740992n <= '-9007199254740993', >+ false, >+ 'The result of (-9007199254740992n <= "-9007199254740993") is false' >+); >+ >+assert.sameValue( >+ '-9007199254740992' <= -9007199254740993n, >+ false, >+ 'The result of ("-9007199254740992" <= -9007199254740993n) is false' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/less-than/bigint-and-bigint.js b/JSTests/test262/test/language/expressions/less-than/bigint-and-bigint.js >index b3b37d76d79bcfcdc91901700ce6d7559810f53c..987496ffd01e5c3a3fcc6db0b1eefbf0ad230a4b 100644 >--- a/JSTests/test262/test/language/expressions/less-than/bigint-and-bigint.js >+++ b/JSTests/test262/test/language/expressions/less-than/bigint-and-bigint.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Comparisons of BigInt and BigInt values > esid: sec-abstract-relational-comparison >@@ -20,37 +19,146 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n < 0n, false, 'The result of (0n < 0n) is false'); >+assert.sameValue(1n < 1n, false, 'The result of (1n < 1n) is false'); >+assert.sameValue(-1n < -1n, false, 'The result of (-1n < -1n) is false'); >+assert.sameValue(0n < -0n, false, 'The result of (0n < -0n) is false'); >+assert.sameValue(-0n < 0n, false, 'The result of (-0n < 0n) is false'); >+assert.sameValue(0n < 1n, true, 'The result of (0n < 1n) is true'); >+assert.sameValue(1n < 0n, false, 'The result of (1n < 0n) is false'); >+assert.sameValue(0n < -1n, false, 'The result of (0n < -1n) is false'); >+assert.sameValue(-1n < 0n, true, 'The result of (-1n < 0n) is true'); >+assert.sameValue(1n < -1n, false, 'The result of (1n < -1n) is false'); >+assert.sameValue(-1n < 1n, true, 'The result of (-1n < 1n) is true'); >+ >+assert.sameValue( >+ 0x1fffffffffffff01n < 0x1fffffffffffff02n, >+ true, >+ 'The result of (0x1fffffffffffff01n < 0x1fffffffffffff02n) is true' >+); >+ >+assert.sameValue( >+ 0x1fffffffffffff02n < 0x1fffffffffffff01n, >+ false, >+ 'The result of (0x1fffffffffffff02n < 0x1fffffffffffff01n) is false' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff01n < -0x1fffffffffffff02n, >+ false, >+ 'The result of (-0x1fffffffffffff01n < -0x1fffffffffffff02n) is false' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff02n < -0x1fffffffffffff01n, >+ true, >+ 'The result of (-0x1fffffffffffff02n < -0x1fffffffffffff01n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n < 0n, >+ false, >+ 'The result of (0x10000000000000000n < 0n) is false' >+); >+ >+assert.sameValue( >+ 0n < 0x10000000000000000n, >+ true, >+ 'The result of (0n < 0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n < 1n, >+ false, >+ 'The result of (0x10000000000000000n < 1n) is false' >+); >+ >+assert.sameValue( >+ 1n < 0x10000000000000000n, >+ true, >+ 'The result of (1n < 0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n < -1n, >+ false, >+ 'The result of (0x10000000000000000n < -1n) is false' >+); >+ >+assert.sameValue( >+ -1n < 0x10000000000000000n, >+ true, >+ 'The result of (-1n < 0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000001n < 0n, >+ false, >+ 'The result of (0x10000000000000001n < 0n) is false' >+); >+ >+assert.sameValue( >+ 0n < 0x10000000000000001n, >+ true, >+ 'The result of (0n < 0x10000000000000001n) is true' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n < 0n, >+ true, >+ 'The result of (-0x10000000000000000n < 0n) is true' >+); >+ >+assert.sameValue( >+ 0n < -0x10000000000000000n, >+ false, >+ 'The result of (0n < -0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n < 1n, >+ true, >+ 'The result of (-0x10000000000000000n < 1n) is true' >+); >+ >+assert.sameValue( >+ 1n < -0x10000000000000000n, >+ false, >+ 'The result of (1n < -0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n < -1n, >+ true, >+ 'The result of (-0x10000000000000000n < -1n) is true' >+); >+ >+assert.sameValue( >+ -1n < -0x10000000000000000n, >+ false, >+ 'The result of (-1n < -0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ -0x10000000000000001n < 0n, >+ true, >+ 'The result of (-0x10000000000000001n < 0n) is true' >+); >+ >+assert.sameValue( >+ 0n < -0x10000000000000001n, >+ false, >+ 'The result of (0n < -0x10000000000000001n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n < 0x100000000n, >+ false, >+ 'The result of (0x10000000000000000n < 0x100000000n) is false' >+); > >-assert.sameValue(0n < 0n, false, "0n < 0n"); >-assert.sameValue(1n < 1n, false, "1n < 1n"); >-assert.sameValue(-1n < -1n, false, "-1n < -1n"); >-assert.sameValue(0n < -0n, false, "0n < -0n"); >-assert.sameValue(-0n < 0n, false, "-0n < 0n"); >-assert.sameValue(0n < 1n, true, "0n < 1n"); >-assert.sameValue(1n < 0n, false, "1n < 0n"); >-assert.sameValue(0n < -1n, false, "0n < -1n"); >-assert.sameValue(-1n < 0n, true, "-1n < 0n"); >-assert.sameValue(1n < -1n, false, "1n < -1n"); >-assert.sameValue(-1n < 1n, true, "-1n < 1n"); >-assert.sameValue(0x1fffffffffffff01n < 0x1fffffffffffff02n, true, "0x1fffffffffffff01n < 0x1fffffffffffff02n"); >-assert.sameValue(0x1fffffffffffff02n < 0x1fffffffffffff01n, false, "0x1fffffffffffff02n < 0x1fffffffffffff01n"); >-assert.sameValue(-0x1fffffffffffff01n < -0x1fffffffffffff02n, false, "-0x1fffffffffffff01n < -0x1fffffffffffff02n"); >-assert.sameValue(-0x1fffffffffffff02n < -0x1fffffffffffff01n, true, "-0x1fffffffffffff02n < -0x1fffffffffffff01n"); >-assert.sameValue(0x10000000000000000n < 0n, false, "0x10000000000000000n < 0n"); >-assert.sameValue(0n < 0x10000000000000000n, true, "0n < 0x10000000000000000n"); >-assert.sameValue(0x10000000000000000n < 1n, false, "0x10000000000000000n < 1n"); >-assert.sameValue(1n < 0x10000000000000000n, true, "1n < 0x10000000000000000n"); >-assert.sameValue(0x10000000000000000n < -1n, false, "0x10000000000000000n < -1n"); >-assert.sameValue(-1n < 0x10000000000000000n, true, "-1n < 0x10000000000000000n"); >-assert.sameValue(0x10000000000000001n < 0n, false, "0x10000000000000001n < 0n"); >-assert.sameValue(0n < 0x10000000000000001n, true, "0n < 0x10000000000000001n"); >-assert.sameValue(-0x10000000000000000n < 0n, true, "-0x10000000000000000n < 0n"); >-assert.sameValue(0n < -0x10000000000000000n, false, "0n < -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000000n < 1n, true, "-0x10000000000000000n < 1n"); >-assert.sameValue(1n < -0x10000000000000000n, false, "1n < -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000000n < -1n, true, "-0x10000000000000000n < -1n"); >-assert.sameValue(-1n < -0x10000000000000000n, false, "-1n < -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000001n < 0n, true, "-0x10000000000000001n < 0n"); >-assert.sameValue(0n < -0x10000000000000001n, false, "0n < -0x10000000000000001n"); >-assert.sameValue(0x10000000000000000n < 0x100000000n, false, "0x10000000000000000n < 0x100000000n"); >-assert.sameValue(0x100000000n < 0x10000000000000000n, true, "0x100000000n < 0x10000000000000000n"); >+assert.sameValue( >+ 0x100000000n < 0x10000000000000000n, >+ true, >+ 'The result of (0x100000000n < 0x10000000000000000n) is true' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/less-than/bigint-and-boolean.js b/JSTests/test262/test/language/expressions/less-than/bigint-and-boolean.js >index 1bead8de9b100109632d8513fced7bcc7669b43c..583bf24a088f2faed19c4733c9e88786d3b6f413 100644 >--- a/JSTests/test262/test/language/expressions/less-than/bigint-and-boolean.js >+++ b/JSTests/test262/test/language/expressions/less-than/bigint-and-boolean.js >@@ -1,30 +1,21 @@ > // Copyright (C) 2018 Caio Lima. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Relational comparison of BigInt and boolean values > esid: sec-abstract-relational-comparison > features: [BigInt] > ---*/ >- >-assert.sameValue(0n < false, false, "0n < false"); >-assert.sameValue(false < 0n, false, "false < 0n"); >- >-assert.sameValue(0n < true, true, "0n < true"); >-assert.sameValue(true < 0n, false, "true < 0n"); >- >-assert.sameValue(1n < false, false, "1n < false"); >-assert.sameValue(false < 1n, true, "false < 1n"); >- >-assert.sameValue(1n < true, false, "1n < true"); >-assert.sameValue(true < 1n, false, "true < 1n"); >- >-assert.sameValue(31n < true, false, "31n < true"); >-assert.sameValue(true < 31n, true, "true < 31n"); >- >-assert.sameValue(-3n < true, true, "-3n < true"); >-assert.sameValue(true < -3n, false, "true < -3n"); >- >-assert.sameValue(-3n < false, true, "-3n < false"); >-assert.sameValue(false < -3n, false, "false < -3n"); >- >+assert.sameValue(0n < false, false, 'The result of (0n < false) is false'); >+assert.sameValue(false < 0n, false, 'The result of (false < 0n) is false'); >+assert.sameValue(0n < true, true, 'The result of (0n < true) is true'); >+assert.sameValue(true < 0n, false, 'The result of (true < 0n) is false'); >+assert.sameValue(1n < false, false, 'The result of (1n < false) is false'); >+assert.sameValue(false < 1n, true, 'The result of (false < 1n) is true'); >+assert.sameValue(1n < true, false, 'The result of (1n < true) is false'); >+assert.sameValue(true < 1n, false, 'The result of (true < 1n) is false'); >+assert.sameValue(31n < true, false, 'The result of (31n < true) is false'); >+assert.sameValue(true < 31n, true, 'The result of (true < 31n) is true'); >+assert.sameValue(-3n < true, true, 'The result of (-3n < true) is true'); >+assert.sameValue(true < -3n, false, 'The result of (true < -3n) is false'); >+assert.sameValue(-3n < false, true, 'The result of (-3n < false) is true'); >+assert.sameValue(false < -3n, false, 'The result of (false < -3n) is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/less-than/bigint-and-incomparable-string.js b/JSTests/test262/test/language/expressions/less-than/bigint-and-incomparable-string.js >index c48e9fb5567e64fd988fb1d279ca205f46484c7b..878f412c4668bd36fcee65cf68b6c591613667a1 100644 >--- a/JSTests/test262/test/language/expressions/less-than/bigint-and-incomparable-string.js >+++ b/JSTests/test262/test/language/expressions/less-than/bigint-and-incomparable-string.js >@@ -1,30 +1,27 @@ > // Copyright (C) 2018 Igalia, S.L. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Relational comparison of BigInt and string values > esid: sec-abstract-relational-comparison > features: [BigInt] > ---*/ >- >-assert.sameValue("0n" < 1n, false, "'0n' < 1n"); >-assert.sameValue("0." < 1n, false, "'0.' < 1n"); >-assert.sameValue(".0" < 1n, false, "'.0' < 1n"); >-assert.sameValue("0/1" < 1n, false, "'0/1' < 1n"); >-assert.sameValue("z0" < 1n, false, "'z0' < 1n"); >-assert.sameValue("0z" < 1n, false, "'0z' < 1n"); >-assert.sameValue("++0" < 1n, false, "'++0' < 1n"); >-assert.sameValue("--0" < 1n, false, "'--0' < 1n"); >-assert.sameValue("0e0" < 1n, false, "'0e0' < 1n"); >-assert.sameValue("Infinity" < 1n, false, "'Infinity' < 1n"); >- >-assert.sameValue(0n < "1n", false, "0n < '1n'"); >-assert.sameValue(0n < "1.", false, "0n < '1.'"); >-assert.sameValue(0n < ".1", false, "0n < '.1'"); >-assert.sameValue(0n < "1/1", false, "0n < '1/1'"); >-assert.sameValue(0n < "z1", false, "0n < 'z1'"); >-assert.sameValue(0n < "1z", false, "0n < '1z'"); >-assert.sameValue(0n < "++1", false, "0n < '++1'"); >-assert.sameValue(0n < "--1", false, "0n < '--1'"); >-assert.sameValue(0n < "1e0", false, "0n < '1e0'"); >-assert.sameValue(0n < "Infinity", false, "0n < 'Infinity'"); >+assert.sameValue('0n' < 1n, false, 'The result of ("0n" < 1n) is false'); >+assert.sameValue('0.' < 1n, false, 'The result of ("0." < 1n) is false'); >+assert.sameValue('.0' < 1n, false, 'The result of (".0" < 1n) is false'); >+assert.sameValue('0/1' < 1n, false, 'The result of ("0/1" < 1n) is false'); >+assert.sameValue('z0' < 1n, false, 'The result of ("z0" < 1n) is false'); >+assert.sameValue('0z' < 1n, false, 'The result of ("0z" < 1n) is false'); >+assert.sameValue('++0' < 1n, false, 'The result of ("++0" < 1n) is false'); >+assert.sameValue('--0' < 1n, false, 'The result of ("--0" < 1n) is false'); >+assert.sameValue('0e0' < 1n, false, 'The result of ("0e0" < 1n) is false'); >+assert.sameValue('Infinity' < 1n, false, 'The result of ("Infinity" < 1n) is false'); >+assert.sameValue(0n < '1n', false, 'The result of (0n < "1n") is false'); >+assert.sameValue(0n < '1.', false, 'The result of (0n < "1.") is false'); >+assert.sameValue(0n < '.1', false, 'The result of (0n < ".1") is false'); >+assert.sameValue(0n < '1/1', false, 'The result of (0n < "1/1") is false'); >+assert.sameValue(0n < 'z1', false, 'The result of (0n < "z1") is false'); >+assert.sameValue(0n < '1z', false, 'The result of (0n < "1z") is false'); >+assert.sameValue(0n < '++1', false, 'The result of (0n < "++1") is false'); >+assert.sameValue(0n < '--1', false, 'The result of (0n < "--1") is false'); >+assert.sameValue(0n < '1e0', false, 'The result of (0n < "1e0") is false'); >+assert.sameValue(0n < 'Infinity', false, 'The result of (0n < "Infinity") is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/less-than/bigint-and-non-finite.js b/JSTests/test262/test/language/expressions/less-than/bigint-and-non-finite.js >index 7ad15a7c19d8ba83e25fa74928e881f858401bbd..594c446ed7767da4d516eb3ff21d5d43f268afc8 100644 >--- a/JSTests/test262/test/language/expressions/less-than/bigint-and-non-finite.js >+++ b/JSTests/test262/test/language/expressions/less-than/bigint-and-non-finite.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Comparisons of BigInt and non-finite Number values > esid: sec-abstract-relational-comparison >@@ -18,14 +17,13 @@ > g. If x is +â, or y is -â, return false. > features: [BigInt] > ---*/ >- >-assert.sameValue(1n < Infinity, true, "1n < Infinity"); >-assert.sameValue(Infinity < 1n, false, "Infinity < 1n"); >-assert.sameValue(-1n < Infinity, true, "-1n < Infinity"); >-assert.sameValue(Infinity < -1n, false, "Infinity < -1n"); >-assert.sameValue(1n < -Infinity, false, "1n < -Infinity"); >-assert.sameValue(-Infinity < 1n, true, "-Infinity < 1n"); >-assert.sameValue(-1n < -Infinity, false, "-1n < -Infinity"); >-assert.sameValue(-Infinity < -1n, true, "-Infinity < -1n"); >-assert.sameValue(0n < NaN, false, "0n < NaN"); >-assert.sameValue(NaN < 0n, false, "NaN < 0n"); >+assert.sameValue(1n < Infinity, true, 'The result of (1n < Infinity) is true'); >+assert.sameValue(Infinity < 1n, false, 'The result of (Infinity < 1n) is false'); >+assert.sameValue(-1n < Infinity, true, 'The result of (-1n < Infinity) is true'); >+assert.sameValue(Infinity < -1n, false, 'The result of (Infinity < -1n) is false'); >+assert.sameValue(1n < -Infinity, false, 'The result of (1n < -Infinity) is false'); >+assert.sameValue(-Infinity < 1n, true, 'The result of (-Infinity < 1n) is true'); >+assert.sameValue(-1n < -Infinity, false, 'The result of (-1n < -Infinity) is false'); >+assert.sameValue(-Infinity < -1n, true, 'The result of (-Infinity < -1n) is true'); >+assert.sameValue(0n < NaN, false, 'The result of (0n < NaN) is false'); >+assert.sameValue(NaN < 0n, false, 'The result of (NaN < 0n) is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/less-than/bigint-and-number-extremes.js b/JSTests/test262/test/language/expressions/less-than/bigint-and-number-extremes.js >index c367b02d2af6de776c68529b21fc0b7223cd7fc2..8ae15abc89c7f5dbd1ad29db96933789be620b59 100644 >--- a/JSTests/test262/test/language/expressions/less-than/bigint-and-number-extremes.js >+++ b/JSTests/test262/test/language/expressions/less-than/bigint-and-number-extremes.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Comparisons of large BigInt and Number values > esid: sec-abstract-relational-comparison >@@ -19,24 +18,31 @@ > h. If the mathematical value of nx is less than the mathematical value of ny, return true, otherwise return false. > features: [BigInt] > ---*/ >+assert.sameValue(1n < Number.MAX_VALUE, true, 'The result of (1n < Number.MAX_VALUE) is true'); >+assert.sameValue(Number.MAX_VALUE < 1n, false, 'The result of (Number.MAX_VALUE < 1n) is false'); >+assert.sameValue(1n < -Number.MAX_VALUE, false, 'The result of (1n < -Number.MAX_VALUE) is false'); >+assert.sameValue(-Number.MAX_VALUE < 1n, true, 'The result of (-Number.MAX_VALUE < 1n) is true'); > >-assert.sameValue(1n < Number.MAX_VALUE, true, "1n < Number.MAX_VALUE"); >-assert.sameValue(Number.MAX_VALUE < 1n, false, "Number.MAX_VALUE < 1n"); >-assert.sameValue(1n < -Number.MAX_VALUE, false, "1n < -Number.MAX_VALUE"); >-assert.sameValue(-Number.MAX_VALUE < 1n, true, "-Number.MAX_VALUE < 1n"); > assert.sameValue( > 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn < Number.MAX_VALUE, > true, >- "0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn < Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn < Number.MAX_VALUE) is true' >+); >+ > assert.sameValue( > Number.MAX_VALUE < 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn, > false, >- "Number.MAX_VALUE < 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn"); >+ 'The result of (Number.MAX_VALUE < 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn) is false' >+); >+ > assert.sameValue( > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n < Number.MAX_VALUE, > false, >- "0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n < Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n < Number.MAX_VALUE) is false' >+); >+ > assert.sameValue( > Number.MAX_VALUE < 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n, > true, >- "Number.MAX_VALUE < 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n"); >+ 'The result of (Number.MAX_VALUE < 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n) is true' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/less-than/bigint-and-number.js b/JSTests/test262/test/language/expressions/less-than/bigint-and-number.js >index 1478baf8c6a88951b8268d58626aff1164ab7d4c..4b95fa6f78928d890fbd0b2d93eceaf0d486cc05 100644 >--- a/JSTests/test262/test/language/expressions/less-than/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/less-than/bigint-and-number.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Robin Templeton. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Comparisons of BigInt and Number values > esid: sec-abstract-relational-comparison >@@ -19,24 +18,28 @@ > h. If the mathematical value of nx is less than the mathematical value of ny, return true, otherwise return false. > features: [BigInt] > ---*/ >+assert.sameValue(0n < 0, false, 'The result of (0n < 0) is false'); >+assert.sameValue(0 < 0n, false, 'The result of (0 < 0n) is false'); >+assert.sameValue(0n < -0, false, 'The result of (0n < -0) is false'); >+assert.sameValue(-0 < 0n, false, 'The result of (-0 < 0n) is false'); >+assert.sameValue(0n < 0.000000000001, true, 'The result of (0n < 0.000000000001) is true'); >+assert.sameValue(0.000000000001 < 0n, false, 'The result of (0.000000000001 < 0n) is false'); >+assert.sameValue(0n < 1, true, 'The result of (0n < 1) is true'); >+assert.sameValue(1 < 0n, false, 'The result of (1 < 0n) is false'); >+assert.sameValue(1n < 0, false, 'The result of (1n < 0) is false'); >+assert.sameValue(0 < 1n, true, 'The result of (0 < 1n) is true'); >+assert.sameValue(1n < 0.999999999999, false, 'The result of (1n < 0.999999999999) is false'); >+assert.sameValue(0.999999999999 < 1n, true, 'The result of (0.999999999999 < 1n) is true'); >+assert.sameValue(1n < 1, false, 'The result of (1n < 1) is false'); >+assert.sameValue(1 < 1n, false, 'The result of (1 < 1n) is false'); >+assert.sameValue(0n < Number.MIN_VALUE, true, 'The result of (0n < Number.MIN_VALUE) is true'); >+assert.sameValue(Number.MIN_VALUE < 0n, false, 'The result of (Number.MIN_VALUE < 0n) is false'); >+assert.sameValue(0n < -Number.MIN_VALUE, false, 'The result of (0n < -Number.MIN_VALUE) is false'); >+assert.sameValue(-Number.MIN_VALUE < 0n, true, 'The result of (-Number.MIN_VALUE < 0n) is true'); >+assert.sameValue(-10n < Number.MIN_VALUE, true, 'The result of (-10n < Number.MIN_VALUE) is true'); > >-assert.sameValue(0n < 0, false, "0n < 0"); >-assert.sameValue(0 < 0n, false, "0 < 0n"); >-assert.sameValue(0n < -0, false, "0n < -0"); >-assert.sameValue(-0 < 0n, false, "-0 < 0n"); >-assert.sameValue(0n < 0.000000000001, true, "0n < 0.000000000001"); >-assert.sameValue(0.000000000001 < 0n, false, "0.000000000001 < 0n"); >-assert.sameValue(0n < 1, true, "0n < 1"); >-assert.sameValue(1 < 0n, false, "1 < 0n"); >-assert.sameValue(1n < 0, false, "1n < 0"); >-assert.sameValue(0 < 1n, true, "0 < 1n"); >-assert.sameValue(1n < 0.999999999999, false, "1n < 0.999999999999"); >-assert.sameValue(0.999999999999 < 1n, true, "0.999999999999 < 1n"); >-assert.sameValue(1n < 1, false, "1n < 1"); >-assert.sameValue(1 < 1n, false, "1 < 1n"); >-assert.sameValue(0n < Number.MIN_VALUE, true, "0n < Number.MIN_VALUE"); >-assert.sameValue(Number.MIN_VALUE < 0n, false, "Number.MIN_VALUE < 0n"); >-assert.sameValue(0n < -Number.MIN_VALUE, false, "0n < -Number.MIN_VALUE"); >-assert.sameValue(-Number.MIN_VALUE < 0n, true, "-Number.MIN_VALUE < 0n"); >-assert.sameValue(-10n < Number.MIN_VALUE, true, "-10n < Number.MIN_VALUE"); >-assert.sameValue(Number.MIN_VALUE < -10n, false, "Number.MIN_VALUE < -10n"); >+assert.sameValue( >+ Number.MIN_VALUE < -10n, >+ false, >+ 'The result of (Number.MIN_VALUE < -10n) is false' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/less-than/bigint-and-string.js b/JSTests/test262/test/language/expressions/less-than/bigint-and-string.js >index 858466685382804a4d8d46762579219b371e921a..6a66eb75f5a5d680d033194f62cb43fdffaf2d63 100644 >--- a/JSTests/test262/test/language/expressions/less-than/bigint-and-string.js >+++ b/JSTests/test262/test/language/expressions/less-than/bigint-and-string.js >@@ -1,48 +1,60 @@ > // Copyright (C) 2018 Igalia, S.L. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Relational comparison of BigInt and string values > esid: sec-abstract-relational-comparison > features: [BigInt] > ---*/ >- >-assert.sameValue(0n < "0", false, "0n < '0'"); >-assert.sameValue("0" < 0n, false, "'0' < 0n"); >- >-assert.sameValue(0n < "1", true, "0n < '1'"); >-assert.sameValue("0" < 1n, true, "'0' < 1n"); >- >-assert.sameValue(1n < "0", false, "1n < '0'"); >-assert.sameValue("1" < 0n, false, "'1' < 0n"); >- >-assert.sameValue(0n < "", false, "0n < ''"); >-assert.sameValue("" < 0n, false, "'' < 0n"); >- >-assert.sameValue(0n < "1", true, "0n < '1'"); >-assert.sameValue("" < 1n, true, "'' < 1n"); >- >-assert.sameValue(1n < "", false, "1n < ''"); >-assert.sameValue("1" < 0n, false, "'1' < 0n"); >- >-assert.sameValue(1n < "1", false, "1n < '1'"); >-assert.sameValue("1" < 1n, false, "'1' < 1n"); >- >-assert.sameValue(1n < "-1", false, "1n < '-1'"); >-assert.sameValue("1" < -1n, false, "'1' < -1n"); >- >-assert.sameValue(-1n < "1", true, "-1n < '1'"); >-assert.sameValue("-1" < 1n, true, "'-1' < 1n"); >- >-assert.sameValue(-1n < "-1", false, "-1n < '-1'"); >-assert.sameValue("-1" < -1n, false, "'-1' < -1n"); >- >-assert.sameValue(9007199254740993n < "9007199254740992", false, >- "9007199254740993n < '9007199254740992'"); >-assert.sameValue("9007199254740993" < 9007199254740992n, false, >- "'9007199254740993' < 9007199254740992n"); >- >-assert.sameValue(-9007199254740992n < "-9007199254740993", false, >- "-9007199254740992n < '-9007199254740993'"); >-assert.sameValue("-9007199254740992" < -9007199254740993n, false, >- "'-9007199254740992' < -9007199254740993n"); >+assert.sameValue(0n < '0', false, 'The result of (0n < "0") is false'); >+assert.sameValue('0' < 0n, false, 'The result of ("0" < 0n) is false'); >+assert.sameValue(0n < '1', true, 'The result of (0n < "1") is true'); >+assert.sameValue('0' < 1n, true, 'The result of ("0" < 1n) is true'); >+assert.sameValue(1n < '0', false, 'The result of (1n < "0") is false'); >+assert.sameValue('1' < 0n, false, 'The result of ("1" < 0n) is false'); >+assert.sameValue(0n < '', false, 'The result of (0n < "") is false'); >+assert.sameValue('' < 0n, false, 'The result of ("" < 0n) is false'); >+assert.sameValue(0n < '1', true, 'The result of (0n < "1") is true'); >+assert.sameValue('' < 1n, true, 'The result of ("" < 1n) is true'); >+assert.sameValue(1n < '', false, 'The result of (1n < "") is false'); >+assert.sameValue('1' < 0n, false, 'The result of ("1" < 0n) is false'); >+assert.sameValue(1n < '1', false, 'The result of (1n < "1") is false'); >+assert.sameValue('1' < 1n, false, 'The result of ("1" < 1n) is false'); >+assert.sameValue(1n < '-1', false, 'The result of (1n < "-1") is false'); >+assert.sameValue('1' < -1n, false, 'The result of ("1" < -1n) is false'); >+assert.sameValue(-1n < '1', true, 'The result of (-1n < "1") is true'); >+assert.sameValue('-1' < 1n, true, 'The result of ("-1" < 1n) is true'); >+assert.sameValue(-1n < '-1', false, 'The result of (-1n < "-1") is false'); >+assert.sameValue('-1' < -1n, false, 'The result of ("-1" < -1n) is false'); >+assert.sameValue('0x10' < 15n, false, 'The result of ("0x10" < 15n) is false'); >+assert.sameValue('0x10' < 16n, false, 'The result of ("0x10" < 16n) is false'); >+assert.sameValue('0x10' < 17n, true, 'The result of ("0x10" < 17n) is true'); >+assert.sameValue('0o10' < 7n, false, 'The result of ("0o10" < 7n) is false'); >+assert.sameValue('0o10' < 8n, false, 'The result of ("0o10" < 8n) is false'); >+assert.sameValue('0o10' < 9n, true, 'The result of ("0o10" < 9n) is true'); >+assert.sameValue('0b10' < 1n, false, 'The result of ("0b10" < 1n) is false'); >+assert.sameValue('0b10' < 2n, false, 'The result of ("0b10" < 2n) is false'); >+assert.sameValue('0b10' < 3n, true, 'The result of ("0b10" < 3n) is true'); >+ >+assert.sameValue( >+ 9007199254740993n < '9007199254740992', >+ false, >+ 'The result of (9007199254740993n < "9007199254740992") is false' >+); >+ >+assert.sameValue( >+ '9007199254740993' < 9007199254740992n, >+ false, >+ 'The result of ("9007199254740993" < 9007199254740992n) is false' >+); >+ >+assert.sameValue( >+ -9007199254740992n < '-9007199254740993', >+ false, >+ 'The result of (-9007199254740992n < "-9007199254740993") is false' >+); >+ >+assert.sameValue( >+ '-9007199254740992' < -9007199254740993n, >+ false, >+ 'The result of ("-9007199254740992" < -9007199254740993n) is false' >+); >diff --git a/JSTests/test262/test/language/expressions/less-than/bigint-and-symbol.js b/JSTests/test262/test/language/expressions/less-than/bigint-and-symbol.js >new file mode 100644 >index 0000000000000000000000000000000000000000..2434d12cdab69b35da8ee53eae39db43ca2f080c >--- /dev/null >+++ b/JSTests/test262/test/language/expressions/less-than/bigint-and-symbol.js >@@ -0,0 +1,14 @@ >+// Copyright (C) 2018 Caio Lima. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+/*--- >+description: Relational comparison of BigInt and Symbol values >+esid: sec-abstract-relational-comparison >+features: [BigInt, Symbol] >+---*/ >+assert.throws(TypeError, function() { >+ 3n < Symbol('2'); >+}, '3n < Symbol("2") throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Symbol('2') < 3n; >+}, 'Symbol("2") < 3n throws TypeError'); >diff --git a/JSTests/test262/test/language/expressions/modulus/bigint-and-number.js b/JSTests/test262/test/language/expressions/modulus/bigint-and-number.js >index afdb0aa8708c930e65e44bb1d459208990c25941..60a4d76d488263efaf0acf82bf2b30d09fe4d306 100644 >--- a/JSTests/test262/test/language/expressions/modulus/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/modulus/bigint-and-number.js >@@ -9,24 +9,82 @@ > Let rnum be ? ToNumeric(rightValue). > If Type(lnum) does not equal Type(rnum), throw a TypeError exception. > ---*/ >+assert.throws(TypeError, function() { >+ 1n % 1; >+}, '1n % 1 throws TypeError'); > >-assert.throws(TypeError, function() { 1n % 1; }, "1n % 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 % 1n; }, "1 % 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) % 1; }, "Object(1n) % 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 % Object(1n); }, "1 % Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n % Object(1); }, "1n % Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) % 1n; }, "Object(1) % 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) % Object(1); }, "Object(1n) % Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) % Object(1n); }, "Object(1) % Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n % NaN; }, "1n % NaN throws TypeError"); >-assert.throws(TypeError, function() { NaN % 1n; }, "NaN % 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n % Infinity; }, "1n % Infinity throws TypeError"); >-assert.throws(TypeError, function() { Infinity % 1n; }, "Infinity % 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n % true; }, "1n % true throws TypeError"); >-assert.throws(TypeError, function() { true % 1n; }, "true % 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n % "1"; }, '1n % "1" throws TypeError'); >-assert.throws(TypeError, function() { "1" % 1n; }, '"1" % 1n throws TypeError'); >-assert.throws(TypeError, function() { 1n % null; }, "1n % null throws TypeError"); >-assert.throws(TypeError, function() { null % 1n; }, "null % 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n % undefined; }, "1n % undefined throws TypeError"); >-assert.throws(TypeError, function() { undefined % 1n; }, "undefined % 1n throws TypeError"); >+assert.throws(TypeError, function() { >+ 1 % 1n; >+}, '1 % 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) % 1; >+}, 'Object(1n) % 1 throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1 % Object(1n); >+}, '1 % Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n % Object(1); >+}, '1n % Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) % 1n; >+}, 'Object(1) % 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) % Object(1); >+}, 'Object(1n) % Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) % Object(1n); >+}, 'Object(1) % Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n % NaN; >+}, '1n % NaN throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ NaN % 1n; >+}, 'NaN % 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n % Infinity; >+}, '1n % Infinity throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Infinity % 1n; >+}, 'Infinity % 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n % true; >+}, '1n % true throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ true % 1n; >+}, 'true % 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n % '1'; >+}, '1n % "1" throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ '1' % 1n; >+}, '"1" % 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n % null; >+}, '1n % null throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ null % 1n; >+}, 'null % 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n % undefined; >+}, '1n % undefined throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ undefined % 1n; >+}, 'undefined % 1n throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/modulus/bigint-arithmetic.js b/JSTests/test262/test/language/expressions/modulus/bigint-arithmetic.js >index 79f7bc2083df1c5f7ebb7c9abbac4d5614b16ea3..9d7497b5986e4e4c0a6b4b2fddb94f1392e93a4f 100644 >--- a/JSTests/test262/test/language/expressions/modulus/bigint-arithmetic.js >+++ b/JSTests/test262/test/language/expressions/modulus/bigint-arithmetic.js >@@ -1,269 +1,984 @@ > // Copyright (C) 2017 Robin Templeton. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > esid: sec-multiplicative-operators-runtime-semantics-evaluation > description: BigInt remainder arithmetic > features: [BigInt] > ---*/ >+assert.sameValue( >+ 0xFEDCBA9876543210n % 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0xFEDCBA9876543210n % 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n % 0xFEDCBA987654320Fn, >+ 0x1n, >+ 'The result of (0xFEDCBA9876543210n % 0xFEDCBA987654320Fn) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n % 0xFEDCBA98n, >+ 0x76543210n, >+ 'The result of (0xFEDCBA9876543210n % 0xFEDCBA98n) is 0x76543210n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n % 0xFEDCBA97n, >+ 0x77777779n, >+ 'The result of (0xFEDCBA9876543210n % 0xFEDCBA97n) is 0x77777779n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n % 0x1234n, >+ 0x960n, >+ 'The result of (0xFEDCBA9876543210n % 0x1234n) is 0x960n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n % 0x3n, >+ 0x0n, >+ 'The result of (0xFEDCBA9876543210n % 0x3n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n % 0x2n, >+ 0x0n, >+ 'The result of (0xFEDCBA9876543210n % 0x2n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n % 0x1n, >+ 0x0n, >+ 'The result of (0xFEDCBA9876543210n % 0x1n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n % -0x1n, >+ 0x0n, >+ 'The result of (0xFEDCBA9876543210n % -0x1n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n % -0x2n, >+ 0x0n, >+ 'The result of (0xFEDCBA9876543210n % -0x2n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n % -0x3n, >+ 0x0n, >+ 'The result of (0xFEDCBA9876543210n % -0x3n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n % -0x1234n, >+ 0x960n, >+ 'The result of (0xFEDCBA9876543210n % -0x1234n) is 0x960n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n % -0xFEDCBA97n, >+ 0x77777779n, >+ 'The result of (0xFEDCBA9876543210n % -0xFEDCBA97n) is 0x77777779n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n % -0xFEDCBA98n, >+ 0x76543210n, >+ 'The result of (0xFEDCBA9876543210n % -0xFEDCBA98n) is 0x76543210n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n % -0xFEDCBA987654320Fn, >+ 0x1n, >+ 'The result of (0xFEDCBA9876543210n % -0xFEDCBA987654320Fn) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n % -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0xFEDCBA9876543210n % -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn % 0xFEDCBA9876543210n, >+ 0xFEDCBA987654320Fn, >+ 'The result of (0xFEDCBA987654320Fn % 0xFEDCBA9876543210n) is 0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn % 0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0xFEDCBA987654320Fn % 0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn % 0xFEDCBA98n, >+ 0x7654320Fn, >+ 'The result of (0xFEDCBA987654320Fn % 0xFEDCBA98n) is 0x7654320Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn % 0xFEDCBA97n, >+ 0x77777778n, >+ 'The result of (0xFEDCBA987654320Fn % 0xFEDCBA97n) is 0x77777778n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn % 0x1234n, >+ 0x95Fn, >+ 'The result of (0xFEDCBA987654320Fn % 0x1234n) is 0x95Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn % 0x3n, >+ 0x2n, >+ 'The result of (0xFEDCBA987654320Fn % 0x3n) is 0x2n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn % 0x2n, >+ 0x1n, >+ 'The result of (0xFEDCBA987654320Fn % 0x2n) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn % 0x1n, >+ 0x0n, >+ 'The result of (0xFEDCBA987654320Fn % 0x1n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn % -0x1n, >+ 0x0n, >+ 'The result of (0xFEDCBA987654320Fn % -0x1n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn % -0x2n, >+ 0x1n, >+ 'The result of (0xFEDCBA987654320Fn % -0x2n) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn % -0x3n, >+ 0x2n, >+ 'The result of (0xFEDCBA987654320Fn % -0x3n) is 0x2n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn % -0x1234n, >+ 0x95Fn, >+ 'The result of (0xFEDCBA987654320Fn % -0x1234n) is 0x95Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn % -0xFEDCBA97n, >+ 0x77777778n, >+ 'The result of (0xFEDCBA987654320Fn % -0xFEDCBA97n) is 0x77777778n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn % -0xFEDCBA98n, >+ 0x7654320Fn, >+ 'The result of (0xFEDCBA987654320Fn % -0xFEDCBA98n) is 0x7654320Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn % -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0xFEDCBA987654320Fn % -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn % -0xFEDCBA9876543210n, >+ 0xFEDCBA987654320Fn, >+ 'The result of (0xFEDCBA987654320Fn % -0xFEDCBA9876543210n) is 0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n % 0xFEDCBA9876543210n, >+ 0xFEDCBA98n, >+ 'The result of (0xFEDCBA98n % 0xFEDCBA9876543210n) is 0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n % 0xFEDCBA987654320Fn, >+ 0xFEDCBA98n, >+ 'The result of (0xFEDCBA98n % 0xFEDCBA987654320Fn) is 0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n % 0xFEDCBA98n, >+ 0x0n, >+ 'The result of (0xFEDCBA98n % 0xFEDCBA98n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n % 0xFEDCBA97n, >+ 0x1n, >+ 'The result of (0xFEDCBA98n % 0xFEDCBA97n) is 0x1n' >+); >+ >+assert.sameValue(0xFEDCBA98n % 0x1234n, 0x930n, 'The result of (0xFEDCBA98n % 0x1234n) is 0x930n'); >+assert.sameValue(0xFEDCBA98n % 0x3n, 0x2n, 'The result of (0xFEDCBA98n % 0x3n) is 0x2n'); >+assert.sameValue(0xFEDCBA98n % 0x2n, 0x0n, 'The result of (0xFEDCBA98n % 0x2n) is 0x0n'); >+assert.sameValue(0xFEDCBA98n % 0x1n, 0x0n, 'The result of (0xFEDCBA98n % 0x1n) is 0x0n'); >+assert.sameValue(0xFEDCBA98n % -0x1n, 0x0n, 'The result of (0xFEDCBA98n % -0x1n) is 0x0n'); >+assert.sameValue(0xFEDCBA98n % -0x2n, 0x0n, 'The result of (0xFEDCBA98n % -0x2n) is 0x0n'); >+assert.sameValue(0xFEDCBA98n % -0x3n, 0x2n, 'The result of (0xFEDCBA98n % -0x3n) is 0x2n'); >+ >+assert.sameValue( >+ 0xFEDCBA98n % -0x1234n, >+ 0x930n, >+ 'The result of (0xFEDCBA98n % -0x1234n) is 0x930n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n % -0xFEDCBA97n, >+ 0x1n, >+ 'The result of (0xFEDCBA98n % -0xFEDCBA97n) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n % -0xFEDCBA98n, >+ 0x0n, >+ 'The result of (0xFEDCBA98n % -0xFEDCBA98n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n % -0xFEDCBA987654320Fn, >+ 0xFEDCBA98n, >+ 'The result of (0xFEDCBA98n % -0xFEDCBA987654320Fn) is 0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n % -0xFEDCBA9876543210n, >+ 0xFEDCBA98n, >+ 'The result of (0xFEDCBA98n % -0xFEDCBA9876543210n) is 0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n % 0xFEDCBA9876543210n, >+ 0xFEDCBA97n, >+ 'The result of (0xFEDCBA97n % 0xFEDCBA9876543210n) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n % 0xFEDCBA987654320Fn, >+ 0xFEDCBA97n, >+ 'The result of (0xFEDCBA97n % 0xFEDCBA987654320Fn) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n % 0xFEDCBA98n, >+ 0xFEDCBA97n, >+ 'The result of (0xFEDCBA97n % 0xFEDCBA98n) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n % 0xFEDCBA97n, >+ 0x0n, >+ 'The result of (0xFEDCBA97n % 0xFEDCBA97n) is 0x0n' >+); >+ >+assert.sameValue(0xFEDCBA97n % 0x1234n, 0x92Fn, 'The result of (0xFEDCBA97n % 0x1234n) is 0x92Fn'); >+assert.sameValue(0xFEDCBA97n % 0x3n, 0x1n, 'The result of (0xFEDCBA97n % 0x3n) is 0x1n'); >+assert.sameValue(0xFEDCBA97n % 0x2n, 0x1n, 'The result of (0xFEDCBA97n % 0x2n) is 0x1n'); >+assert.sameValue(0xFEDCBA97n % 0x1n, 0x0n, 'The result of (0xFEDCBA97n % 0x1n) is 0x0n'); >+assert.sameValue(0xFEDCBA97n % -0x1n, 0x0n, 'The result of (0xFEDCBA97n % -0x1n) is 0x0n'); >+assert.sameValue(0xFEDCBA97n % -0x2n, 0x1n, 'The result of (0xFEDCBA97n % -0x2n) is 0x1n'); >+assert.sameValue(0xFEDCBA97n % -0x3n, 0x1n, 'The result of (0xFEDCBA97n % -0x3n) is 0x1n'); >+ >+assert.sameValue( >+ 0xFEDCBA97n % -0x1234n, >+ 0x92Fn, >+ 'The result of (0xFEDCBA97n % -0x1234n) is 0x92Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n % -0xFEDCBA97n, >+ 0x0n, >+ 'The result of (0xFEDCBA97n % -0xFEDCBA97n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n % -0xFEDCBA98n, >+ 0xFEDCBA97n, >+ 'The result of (0xFEDCBA97n % -0xFEDCBA98n) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n % -0xFEDCBA987654320Fn, >+ 0xFEDCBA97n, >+ 'The result of (0xFEDCBA97n % -0xFEDCBA987654320Fn) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n % -0xFEDCBA9876543210n, >+ 0xFEDCBA97n, >+ 'The result of (0xFEDCBA97n % -0xFEDCBA9876543210n) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0x1234n % 0xFEDCBA9876543210n, >+ 0x1234n, >+ 'The result of (0x1234n % 0xFEDCBA9876543210n) is 0x1234n' >+); >+ >+assert.sameValue( >+ 0x1234n % 0xFEDCBA987654320Fn, >+ 0x1234n, >+ 'The result of (0x1234n % 0xFEDCBA987654320Fn) is 0x1234n' >+); >+ >+assert.sameValue( >+ 0x1234n % 0xFEDCBA98n, >+ 0x1234n, >+ 'The result of (0x1234n % 0xFEDCBA98n) is 0x1234n' >+); >+ >+assert.sameValue( >+ 0x1234n % 0xFEDCBA97n, >+ 0x1234n, >+ 'The result of (0x1234n % 0xFEDCBA97n) is 0x1234n' >+); >+ >+assert.sameValue(0x1234n % 0x1234n, 0x0n, 'The result of (0x1234n % 0x1234n) is 0x0n'); >+assert.sameValue(0x1234n % 0x3n, 0x1n, 'The result of (0x1234n % 0x3n) is 0x1n'); >+assert.sameValue(0x1234n % 0x2n, 0x0n, 'The result of (0x1234n % 0x2n) is 0x0n'); >+assert.sameValue(0x1234n % 0x1n, 0x0n, 'The result of (0x1234n % 0x1n) is 0x0n'); >+assert.sameValue(0x1234n % -0x1n, 0x0n, 'The result of (0x1234n % -0x1n) is 0x0n'); >+assert.sameValue(0x1234n % -0x2n, 0x0n, 'The result of (0x1234n % -0x2n) is 0x0n'); >+assert.sameValue(0x1234n % -0x3n, 0x1n, 'The result of (0x1234n % -0x3n) is 0x1n'); >+assert.sameValue(0x1234n % -0x1234n, 0x0n, 'The result of (0x1234n % -0x1234n) is 0x0n'); >+ >+assert.sameValue( >+ 0x1234n % -0xFEDCBA97n, >+ 0x1234n, >+ 'The result of (0x1234n % -0xFEDCBA97n) is 0x1234n' >+); >+ >+assert.sameValue( >+ 0x1234n % -0xFEDCBA98n, >+ 0x1234n, >+ 'The result of (0x1234n % -0xFEDCBA98n) is 0x1234n' >+); >+ >+assert.sameValue( >+ 0x1234n % -0xFEDCBA987654320Fn, >+ 0x1234n, >+ 'The result of (0x1234n % -0xFEDCBA987654320Fn) is 0x1234n' >+); >+ >+assert.sameValue( >+ 0x1234n % -0xFEDCBA9876543210n, >+ 0x1234n, >+ 'The result of (0x1234n % -0xFEDCBA9876543210n) is 0x1234n' >+); >+ >+assert.sameValue( >+ 0x3n % 0xFEDCBA9876543210n, >+ 0x3n, >+ 'The result of (0x3n % 0xFEDCBA9876543210n) is 0x3n' >+); >+ >+assert.sameValue( >+ 0x3n % 0xFEDCBA987654320Fn, >+ 0x3n, >+ 'The result of (0x3n % 0xFEDCBA987654320Fn) is 0x3n' >+); >+ >+assert.sameValue(0x3n % 0xFEDCBA98n, 0x3n, 'The result of (0x3n % 0xFEDCBA98n) is 0x3n'); >+assert.sameValue(0x3n % 0xFEDCBA97n, 0x3n, 'The result of (0x3n % 0xFEDCBA97n) is 0x3n'); >+assert.sameValue(0x3n % 0x1234n, 0x3n, 'The result of (0x3n % 0x1234n) is 0x3n'); >+assert.sameValue(0x3n % 0x3n, 0x0n, 'The result of (0x3n % 0x3n) is 0x0n'); >+assert.sameValue(0x3n % 0x2n, 0x1n, 'The result of (0x3n % 0x2n) is 0x1n'); >+assert.sameValue(0x3n % 0x1n, 0x0n, 'The result of (0x3n % 0x1n) is 0x0n'); >+assert.sameValue(0x3n % -0x1n, 0x0n, 'The result of (0x3n % -0x1n) is 0x0n'); >+assert.sameValue(0x3n % -0x2n, 0x1n, 'The result of (0x3n % -0x2n) is 0x1n'); >+assert.sameValue(0x3n % -0x3n, 0x0n, 'The result of (0x3n % -0x3n) is 0x0n'); >+assert.sameValue(0x3n % -0x1234n, 0x3n, 'The result of (0x3n % -0x1234n) is 0x3n'); >+assert.sameValue(0x3n % -0xFEDCBA97n, 0x3n, 'The result of (0x3n % -0xFEDCBA97n) is 0x3n'); >+assert.sameValue(0x3n % -0xFEDCBA98n, 0x3n, 'The result of (0x3n % -0xFEDCBA98n) is 0x3n'); >+ >+assert.sameValue( >+ 0x3n % -0xFEDCBA987654320Fn, >+ 0x3n, >+ 'The result of (0x3n % -0xFEDCBA987654320Fn) is 0x3n' >+); >+ >+assert.sameValue( >+ 0x3n % -0xFEDCBA9876543210n, >+ 0x3n, >+ 'The result of (0x3n % -0xFEDCBA9876543210n) is 0x3n' >+); >+ >+assert.sameValue( >+ 0x2n % 0xFEDCBA9876543210n, >+ 0x2n, >+ 'The result of (0x2n % 0xFEDCBA9876543210n) is 0x2n' >+); >+ >+assert.sameValue( >+ 0x2n % 0xFEDCBA987654320Fn, >+ 0x2n, >+ 'The result of (0x2n % 0xFEDCBA987654320Fn) is 0x2n' >+); >+ >+assert.sameValue(0x2n % 0xFEDCBA98n, 0x2n, 'The result of (0x2n % 0xFEDCBA98n) is 0x2n'); >+assert.sameValue(0x2n % 0xFEDCBA97n, 0x2n, 'The result of (0x2n % 0xFEDCBA97n) is 0x2n'); >+assert.sameValue(0x2n % 0x1234n, 0x2n, 'The result of (0x2n % 0x1234n) is 0x2n'); >+assert.sameValue(0x2n % 0x3n, 0x2n, 'The result of (0x2n % 0x3n) is 0x2n'); >+assert.sameValue(0x2n % 0x2n, 0x0n, 'The result of (0x2n % 0x2n) is 0x0n'); >+assert.sameValue(0x2n % 0x1n, 0x0n, 'The result of (0x2n % 0x1n) is 0x0n'); >+assert.sameValue(0x2n % -0x1n, 0x0n, 'The result of (0x2n % -0x1n) is 0x0n'); >+assert.sameValue(0x2n % -0x2n, 0x0n, 'The result of (0x2n % -0x2n) is 0x0n'); >+assert.sameValue(0x2n % -0x3n, 0x2n, 'The result of (0x2n % -0x3n) is 0x2n'); >+assert.sameValue(0x2n % -0x1234n, 0x2n, 'The result of (0x2n % -0x1234n) is 0x2n'); >+assert.sameValue(0x2n % -0xFEDCBA97n, 0x2n, 'The result of (0x2n % -0xFEDCBA97n) is 0x2n'); >+assert.sameValue(0x2n % -0xFEDCBA98n, 0x2n, 'The result of (0x2n % -0xFEDCBA98n) is 0x2n'); >+ >+assert.sameValue( >+ 0x2n % -0xFEDCBA987654320Fn, >+ 0x2n, >+ 'The result of (0x2n % -0xFEDCBA987654320Fn) is 0x2n' >+); >+ >+assert.sameValue( >+ 0x2n % -0xFEDCBA9876543210n, >+ 0x2n, >+ 'The result of (0x2n % -0xFEDCBA9876543210n) is 0x2n' >+); >+ >+assert.sameValue( >+ 0x1n % 0xFEDCBA9876543210n, >+ 0x1n, >+ 'The result of (0x1n % 0xFEDCBA9876543210n) is 0x1n' >+); >+ >+assert.sameValue( >+ 0x1n % 0xFEDCBA987654320Fn, >+ 0x1n, >+ 'The result of (0x1n % 0xFEDCBA987654320Fn) is 0x1n' >+); >+ >+assert.sameValue(0x1n % 0xFEDCBA98n, 0x1n, 'The result of (0x1n % 0xFEDCBA98n) is 0x1n'); >+assert.sameValue(0x1n % 0xFEDCBA97n, 0x1n, 'The result of (0x1n % 0xFEDCBA97n) is 0x1n'); >+assert.sameValue(0x1n % 0x1234n, 0x1n, 'The result of (0x1n % 0x1234n) is 0x1n'); >+assert.sameValue(0x1n % 0x3n, 0x1n, 'The result of (0x1n % 0x3n) is 0x1n'); >+assert.sameValue(0x1n % 0x2n, 0x1n, 'The result of (0x1n % 0x2n) is 0x1n'); >+assert.sameValue(0x1n % 0x1n, 0x0n, 'The result of (0x1n % 0x1n) is 0x0n'); >+assert.sameValue(0x1n % -0x1n, 0x0n, 'The result of (0x1n % -0x1n) is 0x0n'); >+assert.sameValue(0x1n % -0x2n, 0x1n, 'The result of (0x1n % -0x2n) is 0x1n'); >+assert.sameValue(0x1n % -0x3n, 0x1n, 'The result of (0x1n % -0x3n) is 0x1n'); >+assert.sameValue(0x1n % -0x1234n, 0x1n, 'The result of (0x1n % -0x1234n) is 0x1n'); >+assert.sameValue(0x1n % -0xFEDCBA97n, 0x1n, 'The result of (0x1n % -0xFEDCBA97n) is 0x1n'); >+assert.sameValue(0x1n % -0xFEDCBA98n, 0x1n, 'The result of (0x1n % -0xFEDCBA98n) is 0x1n'); >+ >+assert.sameValue( >+ 0x1n % -0xFEDCBA987654320Fn, >+ 0x1n, >+ 'The result of (0x1n % -0xFEDCBA987654320Fn) is 0x1n' >+); >+ >+assert.sameValue( >+ 0x1n % -0xFEDCBA9876543210n, >+ 0x1n, >+ 'The result of (0x1n % -0xFEDCBA9876543210n) is 0x1n' >+); >+ >+assert.sameValue( >+ -0x1n % 0xFEDCBA9876543210n, >+ -0x1n, >+ 'The result of (-0x1n % 0xFEDCBA9876543210n) is -0x1n' >+); >+ >+assert.sameValue( >+ -0x1n % 0xFEDCBA987654320Fn, >+ -0x1n, >+ 'The result of (-0x1n % 0xFEDCBA987654320Fn) is -0x1n' >+); >+ >+assert.sameValue(-0x1n % 0xFEDCBA98n, -0x1n, 'The result of (-0x1n % 0xFEDCBA98n) is -0x1n'); >+assert.sameValue(-0x1n % 0xFEDCBA97n, -0x1n, 'The result of (-0x1n % 0xFEDCBA97n) is -0x1n'); >+assert.sameValue(-0x1n % 0x1234n, -0x1n, 'The result of (-0x1n % 0x1234n) is -0x1n'); >+assert.sameValue(-0x1n % 0x3n, -0x1n, 'The result of (-0x1n % 0x3n) is -0x1n'); >+assert.sameValue(-0x1n % 0x2n, -0x1n, 'The result of (-0x1n % 0x2n) is -0x1n'); >+assert.sameValue(-0x1n % 0x1n, 0x0n, 'The result of (-0x1n % 0x1n) is 0x0n'); >+assert.sameValue(-0x1n % -0x1n, 0x0n, 'The result of (-0x1n % -0x1n) is 0x0n'); >+assert.sameValue(-0x1n % -0x2n, -0x1n, 'The result of (-0x1n % -0x2n) is -0x1n'); >+assert.sameValue(-0x1n % -0x3n, -0x1n, 'The result of (-0x1n % -0x3n) is -0x1n'); >+assert.sameValue(-0x1n % -0x1234n, -0x1n, 'The result of (-0x1n % -0x1234n) is -0x1n'); >+assert.sameValue(-0x1n % -0xFEDCBA97n, -0x1n, 'The result of (-0x1n % -0xFEDCBA97n) is -0x1n'); >+assert.sameValue(-0x1n % -0xFEDCBA98n, -0x1n, 'The result of (-0x1n % -0xFEDCBA98n) is -0x1n'); >+ >+assert.sameValue( >+ -0x1n % -0xFEDCBA987654320Fn, >+ -0x1n, >+ 'The result of (-0x1n % -0xFEDCBA987654320Fn) is -0x1n' >+); >+ >+assert.sameValue( >+ -0x1n % -0xFEDCBA9876543210n, >+ -0x1n, >+ 'The result of (-0x1n % -0xFEDCBA9876543210n) is -0x1n' >+); >+ >+assert.sameValue( >+ -0x2n % 0xFEDCBA9876543210n, >+ -0x2n, >+ 'The result of (-0x2n % 0xFEDCBA9876543210n) is -0x2n' >+); >+ >+assert.sameValue( >+ -0x2n % 0xFEDCBA987654320Fn, >+ -0x2n, >+ 'The result of (-0x2n % 0xFEDCBA987654320Fn) is -0x2n' >+); >+ >+assert.sameValue(-0x2n % 0xFEDCBA98n, -0x2n, 'The result of (-0x2n % 0xFEDCBA98n) is -0x2n'); >+assert.sameValue(-0x2n % 0xFEDCBA97n, -0x2n, 'The result of (-0x2n % 0xFEDCBA97n) is -0x2n'); >+assert.sameValue(-0x2n % 0x1234n, -0x2n, 'The result of (-0x2n % 0x1234n) is -0x2n'); >+assert.sameValue(-0x2n % 0x3n, -0x2n, 'The result of (-0x2n % 0x3n) is -0x2n'); >+assert.sameValue(-0x2n % 0x2n, 0x0n, 'The result of (-0x2n % 0x2n) is 0x0n'); >+assert.sameValue(-0x2n % 0x1n, 0x0n, 'The result of (-0x2n % 0x1n) is 0x0n'); >+assert.sameValue(-0x2n % -0x1n, 0x0n, 'The result of (-0x2n % -0x1n) is 0x0n'); >+assert.sameValue(-0x2n % -0x2n, 0x0n, 'The result of (-0x2n % -0x2n) is 0x0n'); >+assert.sameValue(-0x2n % -0x3n, -0x2n, 'The result of (-0x2n % -0x3n) is -0x2n'); >+assert.sameValue(-0x2n % -0x1234n, -0x2n, 'The result of (-0x2n % -0x1234n) is -0x2n'); >+assert.sameValue(-0x2n % -0xFEDCBA97n, -0x2n, 'The result of (-0x2n % -0xFEDCBA97n) is -0x2n'); >+assert.sameValue(-0x2n % -0xFEDCBA98n, -0x2n, 'The result of (-0x2n % -0xFEDCBA98n) is -0x2n'); >+ >+assert.sameValue( >+ -0x2n % -0xFEDCBA987654320Fn, >+ -0x2n, >+ 'The result of (-0x2n % -0xFEDCBA987654320Fn) is -0x2n' >+); >+ >+assert.sameValue( >+ -0x2n % -0xFEDCBA9876543210n, >+ -0x2n, >+ 'The result of (-0x2n % -0xFEDCBA9876543210n) is -0x2n' >+); >+ >+assert.sameValue( >+ -0x3n % 0xFEDCBA9876543210n, >+ -0x3n, >+ 'The result of (-0x3n % 0xFEDCBA9876543210n) is -0x3n' >+); >+ >+assert.sameValue( >+ -0x3n % 0xFEDCBA987654320Fn, >+ -0x3n, >+ 'The result of (-0x3n % 0xFEDCBA987654320Fn) is -0x3n' >+); >+ >+assert.sameValue(-0x3n % 0xFEDCBA98n, -0x3n, 'The result of (-0x3n % 0xFEDCBA98n) is -0x3n'); >+assert.sameValue(-0x3n % 0xFEDCBA97n, -0x3n, 'The result of (-0x3n % 0xFEDCBA97n) is -0x3n'); >+assert.sameValue(-0x3n % 0x1234n, -0x3n, 'The result of (-0x3n % 0x1234n) is -0x3n'); >+assert.sameValue(-0x3n % 0x3n, 0x0n, 'The result of (-0x3n % 0x3n) is 0x0n'); >+assert.sameValue(-0x3n % 0x2n, -0x1n, 'The result of (-0x3n % 0x2n) is -0x1n'); >+assert.sameValue(-0x3n % 0x1n, 0x0n, 'The result of (-0x3n % 0x1n) is 0x0n'); >+assert.sameValue(-0x3n % -0x1n, 0x0n, 'The result of (-0x3n % -0x1n) is 0x0n'); >+assert.sameValue(-0x3n % -0x2n, -0x1n, 'The result of (-0x3n % -0x2n) is -0x1n'); >+assert.sameValue(-0x3n % -0x3n, 0x0n, 'The result of (-0x3n % -0x3n) is 0x0n'); >+assert.sameValue(-0x3n % -0x1234n, -0x3n, 'The result of (-0x3n % -0x1234n) is -0x3n'); >+assert.sameValue(-0x3n % -0xFEDCBA97n, -0x3n, 'The result of (-0x3n % -0xFEDCBA97n) is -0x3n'); >+assert.sameValue(-0x3n % -0xFEDCBA98n, -0x3n, 'The result of (-0x3n % -0xFEDCBA98n) is -0x3n'); >+ >+assert.sameValue( >+ -0x3n % -0xFEDCBA987654320Fn, >+ -0x3n, >+ 'The result of (-0x3n % -0xFEDCBA987654320Fn) is -0x3n' >+); >+ >+assert.sameValue( >+ -0x3n % -0xFEDCBA9876543210n, >+ -0x3n, >+ 'The result of (-0x3n % -0xFEDCBA9876543210n) is -0x3n' >+); >+ >+assert.sameValue( >+ -0x1234n % 0xFEDCBA9876543210n, >+ -0x1234n, >+ 'The result of (-0x1234n % 0xFEDCBA9876543210n) is -0x1234n' >+); >+ >+assert.sameValue( >+ -0x1234n % 0xFEDCBA987654320Fn, >+ -0x1234n, >+ 'The result of (-0x1234n % 0xFEDCBA987654320Fn) is -0x1234n' >+); >+ >+assert.sameValue( >+ -0x1234n % 0xFEDCBA98n, >+ -0x1234n, >+ 'The result of (-0x1234n % 0xFEDCBA98n) is -0x1234n' >+); >+ >+assert.sameValue( >+ -0x1234n % 0xFEDCBA97n, >+ -0x1234n, >+ 'The result of (-0x1234n % 0xFEDCBA97n) is -0x1234n' >+); >+ >+assert.sameValue(-0x1234n % 0x1234n, 0x0n, 'The result of (-0x1234n % 0x1234n) is 0x0n'); >+assert.sameValue(-0x1234n % 0x3n, -0x1n, 'The result of (-0x1234n % 0x3n) is -0x1n'); >+assert.sameValue(-0x1234n % 0x2n, 0x0n, 'The result of (-0x1234n % 0x2n) is 0x0n'); >+assert.sameValue(-0x1234n % 0x1n, 0x0n, 'The result of (-0x1234n % 0x1n) is 0x0n'); >+assert.sameValue(-0x1234n % -0x1n, 0x0n, 'The result of (-0x1234n % -0x1n) is 0x0n'); >+assert.sameValue(-0x1234n % -0x2n, 0x0n, 'The result of (-0x1234n % -0x2n) is 0x0n'); >+assert.sameValue(-0x1234n % -0x3n, -0x1n, 'The result of (-0x1234n % -0x3n) is -0x1n'); >+assert.sameValue(-0x1234n % -0x1234n, 0x0n, 'The result of (-0x1234n % -0x1234n) is 0x0n'); >+ >+assert.sameValue( >+ -0x1234n % -0xFEDCBA97n, >+ -0x1234n, >+ 'The result of (-0x1234n % -0xFEDCBA97n) is -0x1234n' >+); >+ >+assert.sameValue( >+ -0x1234n % -0xFEDCBA98n, >+ -0x1234n, >+ 'The result of (-0x1234n % -0xFEDCBA98n) is -0x1234n' >+); >+ >+assert.sameValue( >+ -0x1234n % -0xFEDCBA987654320Fn, >+ -0x1234n, >+ 'The result of (-0x1234n % -0xFEDCBA987654320Fn) is -0x1234n' >+); >+ >+assert.sameValue( >+ -0x1234n % -0xFEDCBA9876543210n, >+ -0x1234n, >+ 'The result of (-0x1234n % -0xFEDCBA9876543210n) is -0x1234n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n % 0xFEDCBA9876543210n, >+ -0xFEDCBA97n, >+ 'The result of (-0xFEDCBA97n % 0xFEDCBA9876543210n) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n % 0xFEDCBA987654320Fn, >+ -0xFEDCBA97n, >+ 'The result of (-0xFEDCBA97n % 0xFEDCBA987654320Fn) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n % 0xFEDCBA98n, >+ -0xFEDCBA97n, >+ 'The result of (-0xFEDCBA97n % 0xFEDCBA98n) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n % 0xFEDCBA97n, >+ 0x0n, >+ 'The result of (-0xFEDCBA97n % 0xFEDCBA97n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n % 0x1234n, >+ -0x92Fn, >+ 'The result of (-0xFEDCBA97n % 0x1234n) is -0x92Fn' >+); >+ >+assert.sameValue(-0xFEDCBA97n % 0x3n, -0x1n, 'The result of (-0xFEDCBA97n % 0x3n) is -0x1n'); >+assert.sameValue(-0xFEDCBA97n % 0x2n, -0x1n, 'The result of (-0xFEDCBA97n % 0x2n) is -0x1n'); >+assert.sameValue(-0xFEDCBA97n % 0x1n, 0x0n, 'The result of (-0xFEDCBA97n % 0x1n) is 0x0n'); >+assert.sameValue(-0xFEDCBA97n % -0x1n, 0x0n, 'The result of (-0xFEDCBA97n % -0x1n) is 0x0n'); >+assert.sameValue(-0xFEDCBA97n % -0x2n, -0x1n, 'The result of (-0xFEDCBA97n % -0x2n) is -0x1n'); >+assert.sameValue(-0xFEDCBA97n % -0x3n, -0x1n, 'The result of (-0xFEDCBA97n % -0x3n) is -0x1n'); >+ >+assert.sameValue( >+ -0xFEDCBA97n % -0x1234n, >+ -0x92Fn, >+ 'The result of (-0xFEDCBA97n % -0x1234n) is -0x92Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n % -0xFEDCBA97n, >+ 0x0n, >+ 'The result of (-0xFEDCBA97n % -0xFEDCBA97n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n % -0xFEDCBA98n, >+ -0xFEDCBA97n, >+ 'The result of (-0xFEDCBA97n % -0xFEDCBA98n) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n % -0xFEDCBA987654320Fn, >+ -0xFEDCBA97n, >+ 'The result of (-0xFEDCBA97n % -0xFEDCBA987654320Fn) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n % -0xFEDCBA9876543210n, >+ -0xFEDCBA97n, >+ 'The result of (-0xFEDCBA97n % -0xFEDCBA9876543210n) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n % 0xFEDCBA9876543210n, >+ -0xFEDCBA98n, >+ 'The result of (-0xFEDCBA98n % 0xFEDCBA9876543210n) is -0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n % 0xFEDCBA987654320Fn, >+ -0xFEDCBA98n, >+ 'The result of (-0xFEDCBA98n % 0xFEDCBA987654320Fn) is -0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n % 0xFEDCBA98n, >+ 0x0n, >+ 'The result of (-0xFEDCBA98n % 0xFEDCBA98n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n % 0xFEDCBA97n, >+ -0x1n, >+ 'The result of (-0xFEDCBA98n % 0xFEDCBA97n) is -0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n % 0x1234n, >+ -0x930n, >+ 'The result of (-0xFEDCBA98n % 0x1234n) is -0x930n' >+); >+ >+assert.sameValue(-0xFEDCBA98n % 0x3n, -0x2n, 'The result of (-0xFEDCBA98n % 0x3n) is -0x2n'); >+assert.sameValue(-0xFEDCBA98n % 0x2n, 0x0n, 'The result of (-0xFEDCBA98n % 0x2n) is 0x0n'); >+assert.sameValue(-0xFEDCBA98n % 0x1n, 0x0n, 'The result of (-0xFEDCBA98n % 0x1n) is 0x0n'); >+assert.sameValue(-0xFEDCBA98n % -0x1n, 0x0n, 'The result of (-0xFEDCBA98n % -0x1n) is 0x0n'); >+assert.sameValue(-0xFEDCBA98n % -0x2n, 0x0n, 'The result of (-0xFEDCBA98n % -0x2n) is 0x0n'); >+assert.sameValue(-0xFEDCBA98n % -0x3n, -0x2n, 'The result of (-0xFEDCBA98n % -0x3n) is -0x2n'); >+ >+assert.sameValue( >+ -0xFEDCBA98n % -0x1234n, >+ -0x930n, >+ 'The result of (-0xFEDCBA98n % -0x1234n) is -0x930n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n % -0xFEDCBA97n, >+ -0x1n, >+ 'The result of (-0xFEDCBA98n % -0xFEDCBA97n) is -0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n % -0xFEDCBA98n, >+ 0x0n, >+ 'The result of (-0xFEDCBA98n % -0xFEDCBA98n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n % -0xFEDCBA987654320Fn, >+ -0xFEDCBA98n, >+ 'The result of (-0xFEDCBA98n % -0xFEDCBA987654320Fn) is -0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n % -0xFEDCBA9876543210n, >+ -0xFEDCBA98n, >+ 'The result of (-0xFEDCBA98n % -0xFEDCBA9876543210n) is -0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn % 0xFEDCBA9876543210n, >+ -0xFEDCBA987654320Fn, >+ 'The result of (-0xFEDCBA987654320Fn % 0xFEDCBA9876543210n) is -0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn % 0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (-0xFEDCBA987654320Fn % 0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn % 0xFEDCBA98n, >+ -0x7654320Fn, >+ 'The result of (-0xFEDCBA987654320Fn % 0xFEDCBA98n) is -0x7654320Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn % 0xFEDCBA97n, >+ -0x77777778n, >+ 'The result of (-0xFEDCBA987654320Fn % 0xFEDCBA97n) is -0x77777778n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn % 0x1234n, >+ -0x95Fn, >+ 'The result of (-0xFEDCBA987654320Fn % 0x1234n) is -0x95Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn % 0x3n, >+ -0x2n, >+ 'The result of (-0xFEDCBA987654320Fn % 0x3n) is -0x2n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn % 0x2n, >+ -0x1n, >+ 'The result of (-0xFEDCBA987654320Fn % 0x2n) is -0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn % 0x1n, >+ 0x0n, >+ 'The result of (-0xFEDCBA987654320Fn % 0x1n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn % -0x1n, >+ 0x0n, >+ 'The result of (-0xFEDCBA987654320Fn % -0x1n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn % -0x2n, >+ -0x1n, >+ 'The result of (-0xFEDCBA987654320Fn % -0x2n) is -0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn % -0x3n, >+ -0x2n, >+ 'The result of (-0xFEDCBA987654320Fn % -0x3n) is -0x2n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn % -0x1234n, >+ -0x95Fn, >+ 'The result of (-0xFEDCBA987654320Fn % -0x1234n) is -0x95Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn % -0xFEDCBA97n, >+ -0x77777778n, >+ 'The result of (-0xFEDCBA987654320Fn % -0xFEDCBA97n) is -0x77777778n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn % -0xFEDCBA98n, >+ -0x7654320Fn, >+ 'The result of (-0xFEDCBA987654320Fn % -0xFEDCBA98n) is -0x7654320Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn % -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (-0xFEDCBA987654320Fn % -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn % -0xFEDCBA9876543210n, >+ -0xFEDCBA987654320Fn, >+ 'The result of (-0xFEDCBA987654320Fn % -0xFEDCBA9876543210n) is -0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n % 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0xFEDCBA9876543210n % 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n % 0xFEDCBA987654320Fn, >+ -0x1n, >+ 'The result of (-0xFEDCBA9876543210n % 0xFEDCBA987654320Fn) is -0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n % 0xFEDCBA98n, >+ -0x76543210n, >+ 'The result of (-0xFEDCBA9876543210n % 0xFEDCBA98n) is -0x76543210n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n % 0xFEDCBA97n, >+ -0x77777779n, >+ 'The result of (-0xFEDCBA9876543210n % 0xFEDCBA97n) is -0x77777779n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n % 0x1234n, >+ -0x960n, >+ 'The result of (-0xFEDCBA9876543210n % 0x1234n) is -0x960n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n % 0x3n, >+ 0x0n, >+ 'The result of (-0xFEDCBA9876543210n % 0x3n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n % 0x2n, >+ 0x0n, >+ 'The result of (-0xFEDCBA9876543210n % 0x2n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n % 0x1n, >+ 0x0n, >+ 'The result of (-0xFEDCBA9876543210n % 0x1n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n % -0x1n, >+ 0x0n, >+ 'The result of (-0xFEDCBA9876543210n % -0x1n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n % -0x2n, >+ 0x0n, >+ 'The result of (-0xFEDCBA9876543210n % -0x2n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n % -0x3n, >+ 0x0n, >+ 'The result of (-0xFEDCBA9876543210n % -0x3n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n % -0x1234n, >+ -0x960n, >+ 'The result of (-0xFEDCBA9876543210n % -0x1234n) is -0x960n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n % -0xFEDCBA97n, >+ -0x77777779n, >+ 'The result of (-0xFEDCBA9876543210n % -0xFEDCBA97n) is -0x77777779n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n % -0xFEDCBA98n, >+ -0x76543210n, >+ 'The result of (-0xFEDCBA9876543210n % -0xFEDCBA98n) is -0x76543210n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n % -0xFEDCBA987654320Fn, >+ -0x1n, >+ 'The result of (-0xFEDCBA9876543210n % -0xFEDCBA987654320Fn) is -0x1n' >+); > >-function testMod(x, y, z) { >- assert.sameValue(x % y, z, x + " % " + y + " = " + z); >-} >- >-testMod(0xFEDCBA9876543210n, 0xFEDCBA9876543210n, 0x0n); >-testMod(0xFEDCBA9876543210n, 0xFEDCBA987654320Fn, 0x1n); >-testMod(0xFEDCBA9876543210n, 0xFEDCBA98n, 0x76543210n); >-testMod(0xFEDCBA9876543210n, 0xFEDCBA97n, 0x77777779n); >-testMod(0xFEDCBA9876543210n, 0x1234n, 0x960n); >-testMod(0xFEDCBA9876543210n, 0x3n, 0x0n); >-testMod(0xFEDCBA9876543210n, 0x2n, 0x0n); >-testMod(0xFEDCBA9876543210n, 0x1n, 0x0n); >-testMod(0xFEDCBA9876543210n, -0x1n, 0x0n); >-testMod(0xFEDCBA9876543210n, -0x2n, 0x0n); >-testMod(0xFEDCBA9876543210n, -0x3n, 0x0n); >-testMod(0xFEDCBA9876543210n, -0x1234n, 0x960n); >-testMod(0xFEDCBA9876543210n, -0xFEDCBA97n, 0x77777779n); >-testMod(0xFEDCBA9876543210n, -0xFEDCBA98n, 0x76543210n); >-testMod(0xFEDCBA9876543210n, -0xFEDCBA987654320Fn, 0x1n); >-testMod(0xFEDCBA9876543210n, -0xFEDCBA9876543210n, 0x0n); >-testMod(0xFEDCBA987654320Fn, 0xFEDCBA9876543210n, 0xFEDCBA987654320Fn); >-testMod(0xFEDCBA987654320Fn, 0xFEDCBA987654320Fn, 0x0n); >-testMod(0xFEDCBA987654320Fn, 0xFEDCBA98n, 0x7654320Fn); >-testMod(0xFEDCBA987654320Fn, 0xFEDCBA97n, 0x77777778n); >-testMod(0xFEDCBA987654320Fn, 0x1234n, 0x95Fn); >-testMod(0xFEDCBA987654320Fn, 0x3n, 0x2n); >-testMod(0xFEDCBA987654320Fn, 0x2n, 0x1n); >-testMod(0xFEDCBA987654320Fn, 0x1n, 0x0n); >-testMod(0xFEDCBA987654320Fn, -0x1n, 0x0n); >-testMod(0xFEDCBA987654320Fn, -0x2n, 0x1n); >-testMod(0xFEDCBA987654320Fn, -0x3n, 0x2n); >-testMod(0xFEDCBA987654320Fn, -0x1234n, 0x95Fn); >-testMod(0xFEDCBA987654320Fn, -0xFEDCBA97n, 0x77777778n); >-testMod(0xFEDCBA987654320Fn, -0xFEDCBA98n, 0x7654320Fn); >-testMod(0xFEDCBA987654320Fn, -0xFEDCBA987654320Fn, 0x0n); >-testMod(0xFEDCBA987654320Fn, -0xFEDCBA9876543210n, 0xFEDCBA987654320Fn); >-testMod(0xFEDCBA98n, 0xFEDCBA9876543210n, 0xFEDCBA98n); >-testMod(0xFEDCBA98n, 0xFEDCBA987654320Fn, 0xFEDCBA98n); >-testMod(0xFEDCBA98n, 0xFEDCBA98n, 0x0n); >-testMod(0xFEDCBA98n, 0xFEDCBA97n, 0x1n); >-testMod(0xFEDCBA98n, 0x1234n, 0x930n); >-testMod(0xFEDCBA98n, 0x3n, 0x2n); >-testMod(0xFEDCBA98n, 0x2n, 0x0n); >-testMod(0xFEDCBA98n, 0x1n, 0x0n); >-testMod(0xFEDCBA98n, -0x1n, 0x0n); >-testMod(0xFEDCBA98n, -0x2n, 0x0n); >-testMod(0xFEDCBA98n, -0x3n, 0x2n); >-testMod(0xFEDCBA98n, -0x1234n, 0x930n); >-testMod(0xFEDCBA98n, -0xFEDCBA97n, 0x1n); >-testMod(0xFEDCBA98n, -0xFEDCBA98n, 0x0n); >-testMod(0xFEDCBA98n, -0xFEDCBA987654320Fn, 0xFEDCBA98n); >-testMod(0xFEDCBA98n, -0xFEDCBA9876543210n, 0xFEDCBA98n); >-testMod(0xFEDCBA97n, 0xFEDCBA9876543210n, 0xFEDCBA97n); >-testMod(0xFEDCBA97n, 0xFEDCBA987654320Fn, 0xFEDCBA97n); >-testMod(0xFEDCBA97n, 0xFEDCBA98n, 0xFEDCBA97n); >-testMod(0xFEDCBA97n, 0xFEDCBA97n, 0x0n); >-testMod(0xFEDCBA97n, 0x1234n, 0x92Fn); >-testMod(0xFEDCBA97n, 0x3n, 0x1n); >-testMod(0xFEDCBA97n, 0x2n, 0x1n); >-testMod(0xFEDCBA97n, 0x1n, 0x0n); >-testMod(0xFEDCBA97n, -0x1n, 0x0n); >-testMod(0xFEDCBA97n, -0x2n, 0x1n); >-testMod(0xFEDCBA97n, -0x3n, 0x1n); >-testMod(0xFEDCBA97n, -0x1234n, 0x92Fn); >-testMod(0xFEDCBA97n, -0xFEDCBA97n, 0x0n); >-testMod(0xFEDCBA97n, -0xFEDCBA98n, 0xFEDCBA97n); >-testMod(0xFEDCBA97n, -0xFEDCBA987654320Fn, 0xFEDCBA97n); >-testMod(0xFEDCBA97n, -0xFEDCBA9876543210n, 0xFEDCBA97n); >-testMod(0x1234n, 0xFEDCBA9876543210n, 0x1234n); >-testMod(0x1234n, 0xFEDCBA987654320Fn, 0x1234n); >-testMod(0x1234n, 0xFEDCBA98n, 0x1234n); >-testMod(0x1234n, 0xFEDCBA97n, 0x1234n); >-testMod(0x1234n, 0x1234n, 0x0n); >-testMod(0x1234n, 0x3n, 0x1n); >-testMod(0x1234n, 0x2n, 0x0n); >-testMod(0x1234n, 0x1n, 0x0n); >-testMod(0x1234n, -0x1n, 0x0n); >-testMod(0x1234n, -0x2n, 0x0n); >-testMod(0x1234n, -0x3n, 0x1n); >-testMod(0x1234n, -0x1234n, 0x0n); >-testMod(0x1234n, -0xFEDCBA97n, 0x1234n); >-testMod(0x1234n, -0xFEDCBA98n, 0x1234n); >-testMod(0x1234n, -0xFEDCBA987654320Fn, 0x1234n); >-testMod(0x1234n, -0xFEDCBA9876543210n, 0x1234n); >-testMod(0x3n, 0xFEDCBA9876543210n, 0x3n); >-testMod(0x3n, 0xFEDCBA987654320Fn, 0x3n); >-testMod(0x3n, 0xFEDCBA98n, 0x3n); >-testMod(0x3n, 0xFEDCBA97n, 0x3n); >-testMod(0x3n, 0x1234n, 0x3n); >-testMod(0x3n, 0x3n, 0x0n); >-testMod(0x3n, 0x2n, 0x1n); >-testMod(0x3n, 0x1n, 0x0n); >-testMod(0x3n, -0x1n, 0x0n); >-testMod(0x3n, -0x2n, 0x1n); >-testMod(0x3n, -0x3n, 0x0n); >-testMod(0x3n, -0x1234n, 0x3n); >-testMod(0x3n, -0xFEDCBA97n, 0x3n); >-testMod(0x3n, -0xFEDCBA98n, 0x3n); >-testMod(0x3n, -0xFEDCBA987654320Fn, 0x3n); >-testMod(0x3n, -0xFEDCBA9876543210n, 0x3n); >-testMod(0x2n, 0xFEDCBA9876543210n, 0x2n); >-testMod(0x2n, 0xFEDCBA987654320Fn, 0x2n); >-testMod(0x2n, 0xFEDCBA98n, 0x2n); >-testMod(0x2n, 0xFEDCBA97n, 0x2n); >-testMod(0x2n, 0x1234n, 0x2n); >-testMod(0x2n, 0x3n, 0x2n); >-testMod(0x2n, 0x2n, 0x0n); >-testMod(0x2n, 0x1n, 0x0n); >-testMod(0x2n, -0x1n, 0x0n); >-testMod(0x2n, -0x2n, 0x0n); >-testMod(0x2n, -0x3n, 0x2n); >-testMod(0x2n, -0x1234n, 0x2n); >-testMod(0x2n, -0xFEDCBA97n, 0x2n); >-testMod(0x2n, -0xFEDCBA98n, 0x2n); >-testMod(0x2n, -0xFEDCBA987654320Fn, 0x2n); >-testMod(0x2n, -0xFEDCBA9876543210n, 0x2n); >-testMod(0x1n, 0xFEDCBA9876543210n, 0x1n); >-testMod(0x1n, 0xFEDCBA987654320Fn, 0x1n); >-testMod(0x1n, 0xFEDCBA98n, 0x1n); >-testMod(0x1n, 0xFEDCBA97n, 0x1n); >-testMod(0x1n, 0x1234n, 0x1n); >-testMod(0x1n, 0x3n, 0x1n); >-testMod(0x1n, 0x2n, 0x1n); >-testMod(0x1n, 0x1n, 0x0n); >-testMod(0x1n, -0x1n, 0x0n); >-testMod(0x1n, -0x2n, 0x1n); >-testMod(0x1n, -0x3n, 0x1n); >-testMod(0x1n, -0x1234n, 0x1n); >-testMod(0x1n, -0xFEDCBA97n, 0x1n); >-testMod(0x1n, -0xFEDCBA98n, 0x1n); >-testMod(0x1n, -0xFEDCBA987654320Fn, 0x1n); >-testMod(0x1n, -0xFEDCBA9876543210n, 0x1n); >-testMod(-0x1n, 0xFEDCBA9876543210n, -0x1n); >-testMod(-0x1n, 0xFEDCBA987654320Fn, -0x1n); >-testMod(-0x1n, 0xFEDCBA98n, -0x1n); >-testMod(-0x1n, 0xFEDCBA97n, -0x1n); >-testMod(-0x1n, 0x1234n, -0x1n); >-testMod(-0x1n, 0x3n, -0x1n); >-testMod(-0x1n, 0x2n, -0x1n); >-testMod(-0x1n, 0x1n, 0x0n); >-testMod(-0x1n, -0x1n, 0x0n); >-testMod(-0x1n, -0x2n, -0x1n); >-testMod(-0x1n, -0x3n, -0x1n); >-testMod(-0x1n, -0x1234n, -0x1n); >-testMod(-0x1n, -0xFEDCBA97n, -0x1n); >-testMod(-0x1n, -0xFEDCBA98n, -0x1n); >-testMod(-0x1n, -0xFEDCBA987654320Fn, -0x1n); >-testMod(-0x1n, -0xFEDCBA9876543210n, -0x1n); >-testMod(-0x2n, 0xFEDCBA9876543210n, -0x2n); >-testMod(-0x2n, 0xFEDCBA987654320Fn, -0x2n); >-testMod(-0x2n, 0xFEDCBA98n, -0x2n); >-testMod(-0x2n, 0xFEDCBA97n, -0x2n); >-testMod(-0x2n, 0x1234n, -0x2n); >-testMod(-0x2n, 0x3n, -0x2n); >-testMod(-0x2n, 0x2n, 0x0n); >-testMod(-0x2n, 0x1n, 0x0n); >-testMod(-0x2n, -0x1n, 0x0n); >-testMod(-0x2n, -0x2n, 0x0n); >-testMod(-0x2n, -0x3n, -0x2n); >-testMod(-0x2n, -0x1234n, -0x2n); >-testMod(-0x2n, -0xFEDCBA97n, -0x2n); >-testMod(-0x2n, -0xFEDCBA98n, -0x2n); >-testMod(-0x2n, -0xFEDCBA987654320Fn, -0x2n); >-testMod(-0x2n, -0xFEDCBA9876543210n, -0x2n); >-testMod(-0x3n, 0xFEDCBA9876543210n, -0x3n); >-testMod(-0x3n, 0xFEDCBA987654320Fn, -0x3n); >-testMod(-0x3n, 0xFEDCBA98n, -0x3n); >-testMod(-0x3n, 0xFEDCBA97n, -0x3n); >-testMod(-0x3n, 0x1234n, -0x3n); >-testMod(-0x3n, 0x3n, 0x0n); >-testMod(-0x3n, 0x2n, -0x1n); >-testMod(-0x3n, 0x1n, 0x0n); >-testMod(-0x3n, -0x1n, 0x0n); >-testMod(-0x3n, -0x2n, -0x1n); >-testMod(-0x3n, -0x3n, 0x0n); >-testMod(-0x3n, -0x1234n, -0x3n); >-testMod(-0x3n, -0xFEDCBA97n, -0x3n); >-testMod(-0x3n, -0xFEDCBA98n, -0x3n); >-testMod(-0x3n, -0xFEDCBA987654320Fn, -0x3n); >-testMod(-0x3n, -0xFEDCBA9876543210n, -0x3n); >-testMod(-0x1234n, 0xFEDCBA9876543210n, -0x1234n); >-testMod(-0x1234n, 0xFEDCBA987654320Fn, -0x1234n); >-testMod(-0x1234n, 0xFEDCBA98n, -0x1234n); >-testMod(-0x1234n, 0xFEDCBA97n, -0x1234n); >-testMod(-0x1234n, 0x1234n, 0x0n); >-testMod(-0x1234n, 0x3n, -0x1n); >-testMod(-0x1234n, 0x2n, 0x0n); >-testMod(-0x1234n, 0x1n, 0x0n); >-testMod(-0x1234n, -0x1n, 0x0n); >-testMod(-0x1234n, -0x2n, 0x0n); >-testMod(-0x1234n, -0x3n, -0x1n); >-testMod(-0x1234n, -0x1234n, 0x0n); >-testMod(-0x1234n, -0xFEDCBA97n, -0x1234n); >-testMod(-0x1234n, -0xFEDCBA98n, -0x1234n); >-testMod(-0x1234n, -0xFEDCBA987654320Fn, -0x1234n); >-testMod(-0x1234n, -0xFEDCBA9876543210n, -0x1234n); >-testMod(-0xFEDCBA97n, 0xFEDCBA9876543210n, -0xFEDCBA97n); >-testMod(-0xFEDCBA97n, 0xFEDCBA987654320Fn, -0xFEDCBA97n); >-testMod(-0xFEDCBA97n, 0xFEDCBA98n, -0xFEDCBA97n); >-testMod(-0xFEDCBA97n, 0xFEDCBA97n, 0x0n); >-testMod(-0xFEDCBA97n, 0x1234n, -0x92Fn); >-testMod(-0xFEDCBA97n, 0x3n, -0x1n); >-testMod(-0xFEDCBA97n, 0x2n, -0x1n); >-testMod(-0xFEDCBA97n, 0x1n, 0x0n); >-testMod(-0xFEDCBA97n, -0x1n, 0x0n); >-testMod(-0xFEDCBA97n, -0x2n, -0x1n); >-testMod(-0xFEDCBA97n, -0x3n, -0x1n); >-testMod(-0xFEDCBA97n, -0x1234n, -0x92Fn); >-testMod(-0xFEDCBA97n, -0xFEDCBA97n, 0x0n); >-testMod(-0xFEDCBA97n, -0xFEDCBA98n, -0xFEDCBA97n); >-testMod(-0xFEDCBA97n, -0xFEDCBA987654320Fn, -0xFEDCBA97n); >-testMod(-0xFEDCBA97n, -0xFEDCBA9876543210n, -0xFEDCBA97n); >-testMod(-0xFEDCBA98n, 0xFEDCBA9876543210n, -0xFEDCBA98n); >-testMod(-0xFEDCBA98n, 0xFEDCBA987654320Fn, -0xFEDCBA98n); >-testMod(-0xFEDCBA98n, 0xFEDCBA98n, 0x0n); >-testMod(-0xFEDCBA98n, 0xFEDCBA97n, -0x1n); >-testMod(-0xFEDCBA98n, 0x1234n, -0x930n); >-testMod(-0xFEDCBA98n, 0x3n, -0x2n); >-testMod(-0xFEDCBA98n, 0x2n, 0x0n); >-testMod(-0xFEDCBA98n, 0x1n, 0x0n); >-testMod(-0xFEDCBA98n, -0x1n, 0x0n); >-testMod(-0xFEDCBA98n, -0x2n, 0x0n); >-testMod(-0xFEDCBA98n, -0x3n, -0x2n); >-testMod(-0xFEDCBA98n, -0x1234n, -0x930n); >-testMod(-0xFEDCBA98n, -0xFEDCBA97n, -0x1n); >-testMod(-0xFEDCBA98n, -0xFEDCBA98n, 0x0n); >-testMod(-0xFEDCBA98n, -0xFEDCBA987654320Fn, -0xFEDCBA98n); >-testMod(-0xFEDCBA98n, -0xFEDCBA9876543210n, -0xFEDCBA98n); >-testMod(-0xFEDCBA987654320Fn, 0xFEDCBA9876543210n, -0xFEDCBA987654320Fn); >-testMod(-0xFEDCBA987654320Fn, 0xFEDCBA987654320Fn, 0x0n); >-testMod(-0xFEDCBA987654320Fn, 0xFEDCBA98n, -0x7654320Fn); >-testMod(-0xFEDCBA987654320Fn, 0xFEDCBA97n, -0x77777778n); >-testMod(-0xFEDCBA987654320Fn, 0x1234n, -0x95Fn); >-testMod(-0xFEDCBA987654320Fn, 0x3n, -0x2n); >-testMod(-0xFEDCBA987654320Fn, 0x2n, -0x1n); >-testMod(-0xFEDCBA987654320Fn, 0x1n, 0x0n); >-testMod(-0xFEDCBA987654320Fn, -0x1n, 0x0n); >-testMod(-0xFEDCBA987654320Fn, -0x2n, -0x1n); >-testMod(-0xFEDCBA987654320Fn, -0x3n, -0x2n); >-testMod(-0xFEDCBA987654320Fn, -0x1234n, -0x95Fn); >-testMod(-0xFEDCBA987654320Fn, -0xFEDCBA97n, -0x77777778n); >-testMod(-0xFEDCBA987654320Fn, -0xFEDCBA98n, -0x7654320Fn); >-testMod(-0xFEDCBA987654320Fn, -0xFEDCBA987654320Fn, 0x0n); >-testMod(-0xFEDCBA987654320Fn, -0xFEDCBA9876543210n, -0xFEDCBA987654320Fn); >-testMod(-0xFEDCBA9876543210n, 0xFEDCBA9876543210n, 0x0n); >-testMod(-0xFEDCBA9876543210n, 0xFEDCBA987654320Fn, -0x1n); >-testMod(-0xFEDCBA9876543210n, 0xFEDCBA98n, -0x76543210n); >-testMod(-0xFEDCBA9876543210n, 0xFEDCBA97n, -0x77777779n); >-testMod(-0xFEDCBA9876543210n, 0x1234n, -0x960n); >-testMod(-0xFEDCBA9876543210n, 0x3n, 0x0n); >-testMod(-0xFEDCBA9876543210n, 0x2n, 0x0n); >-testMod(-0xFEDCBA9876543210n, 0x1n, 0x0n); >-testMod(-0xFEDCBA9876543210n, -0x1n, 0x0n); >-testMod(-0xFEDCBA9876543210n, -0x2n, 0x0n); >-testMod(-0xFEDCBA9876543210n, -0x3n, 0x0n); >-testMod(-0xFEDCBA9876543210n, -0x1234n, -0x960n); >-testMod(-0xFEDCBA9876543210n, -0xFEDCBA97n, -0x77777779n); >-testMod(-0xFEDCBA9876543210n, -0xFEDCBA98n, -0x76543210n); >-testMod(-0xFEDCBA9876543210n, -0xFEDCBA987654320Fn, -0x1n); >-testMod(-0xFEDCBA9876543210n, -0xFEDCBA9876543210n, 0x0n); >+assert.sameValue( >+ -0xFEDCBA9876543210n % -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0xFEDCBA9876543210n % -0xFEDCBA9876543210n) is 0x0n' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/modulus/bigint-errors.js b/JSTests/test262/test/language/expressions/modulus/bigint-errors.js >index ec59400418554e7687cb1cfc58eed48c8d8ac23a..5b986028319ffb35840d04447312f30d32c22898 100644 >--- a/JSTests/test262/test/language/expressions/modulus/bigint-errors.js >+++ b/JSTests/test262/test/language/expressions/modulus/bigint-errors.js >@@ -5,58 +5,66 @@ > esid: sec-multiplicative-operators-runtime-semantics-evaluation > features: [BigInt, Symbol, Symbol.toPrimitive, computed-property-names] > ---*/ >- > assert.throws(TypeError, function() { >- Symbol("1") % 1n; >-}, "ToBigInt: Symbol => TypeError"); >+ Symbol('1') % 1n; >+}, 'Symbol("1") % 1n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n % Symbol("1"); >-}, "ToBigInt: Symbol => TypeError"); >+ 0n % Symbol('1'); >+}, '0n % Symbol("1") throws TypeError'); >+ > assert.throws(TypeError, function() { >- Object(Symbol("1")) % 1n; >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ Object(Symbol('1')) % 1n; >+}, 'Object(Symbol("1")) % 1n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n % Object(Symbol("1")); >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ 0n % Object(Symbol('1')); >+}, '0n % Object(Symbol("1")) throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) % 1n; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '({[Symbol.toPrimitive]: function() {return Symbol("1");}}) % 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n % { > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '0n % {[Symbol.toPrimitive]: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) % 1n; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '({valueOf: function() {return Symbol("1");}}) % 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n % { > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '0n % {valueOf: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) % 1n; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '({toString: function() {return Symbol("1");}}) % 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n % { > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '0n % {toString: function() {return Symbol("1");}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/modulus/bigint-modulo-zero.js b/JSTests/test262/test/language/expressions/modulus/bigint-modulo-zero.js >index b309a7e676d066a97518c685c44ef0550583567e..40000b95a33876c87fcd9487189ab3003e846fdf 100644 >--- a/JSTests/test262/test/language/expressions/modulus/bigint-modulo-zero.js >+++ b/JSTests/test262/test/language/expressions/modulus/bigint-modulo-zero.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Robin Templeton. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: BigInt modulo 0 throws a range error > esid: sec-multiplicative-operators-runtime-semantics-evaluation >@@ -19,19 +18,18 @@ > 2. Return the BigInt representing x modulo y. > features: [BigInt] > ---*/ >- > assert.throws(RangeError, function() { >- 1n % 0n >-}); >+ 1n % 0n; >+}, '1n % 0n throws RangeError'); > > assert.throws(RangeError, function() { >- 10n % 0n >-}); >+ 10n % 0n; >+}, '10n % 0n throws RangeError'); > > assert.throws(RangeError, function() { >- 0n % 0n >-}); >+ 0n % 0n; >+}, '0n % 0n throws RangeError'); > > assert.throws(RangeError, function() { >- 1000000000000000000n % 0n >-}); >+ 1000000000000000000n % 0n; >+}, '1000000000000000000n % 0n throws RangeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/modulus/bigint-toprimitive.js b/JSTests/test262/test/language/expressions/modulus/bigint-toprimitive.js >index 00c7cd611048329b752d8db424cab2ed6a1d9d62..1bbc67e8ae36a8debf321bab72d839fafd256f70 100644 >--- a/JSTests/test262/test/language/expressions/modulus/bigint-toprimitive.js >+++ b/JSTests/test262/test/language/expressions/modulus/bigint-toprimitive.js >@@ -5,304 +5,368 @@ > esid: sec-multiplicative-operators-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >- > function err() { > throw new Test262Error(); > } > > function MyError() {} > >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}) % 2n, 0n, "ToPrimitive: @@toPrimitive takes precedence"); >+} % 2n, 0n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) % 2n) is 0n'); >+ > assert.sameValue(2n % { > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}, 0n, "ToPrimitive: @@toPrimitive takes precedence"); >-assert.sameValue(({ >+}, 0n, 'The result of (2n % {[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) is 0n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > }, >+ > toString: err >-}) % 2n, 0n, "ToPrimitive: valueOf takes precedence over toString"); >+} % 2n, 0n, 'The result of (({valueOf: function() {return 2n;}, toString: err}) % 2n) is 0n'); >+ > assert.sameValue(2n % { > valueOf: function() { > return 2n; > }, >+ > toString: err >-}, 0n, "ToPrimitive: valueOf takes precedence over toString"); >-assert.sameValue(({ >+}, 0n, 'The result of (2n % {valueOf: function() {return 2n;}, toString: err}) is 0n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) % 2n, 0n, "ToPrimitive: toString with no valueOf"); >+} % 2n, 0n, 'The result of (({toString: function() {return 2n;}}) % 2n) is 0n'); >+ > assert.sameValue(2n % { > toString: function() { > return 2n; > } >-}, 0n, "ToPrimitive: toString with no valueOf"); >-assert.sameValue(({ >+}, 0n, 'The result of (2n % {toString: function() {return 2n;}}) is 0n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}) % 2n, 0n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >+} % 2n, 0n, 'The result of (({[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) % 2n) is 0n'); >+ > assert.sameValue(2n % { > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}, 0n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >-assert.sameValue(({ >+}, 0n, 'The result of (2n % {[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) is 0n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}) % 2n, 0n, "ToPrimitive: skip @@toPrimitive when it's null"); >+} % 2n, 0n, 'The result of (({[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) % 2n) is 0n'); >+ > assert.sameValue(2n % { > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}, 0n, "ToPrimitive: skip @@toPrimitive when it's null"); >-assert.sameValue(({ >+}, 0n, 'The result of (2n % {[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) is 0n'); >+ >+assert.sameValue({ > valueOf: null, >+ > toString: function() { > return 2n; > } >-}) % 2n, 0n, "ToPrimitive: skip valueOf when it's not callable"); >+} % 2n, 0n, 'The result of (({valueOf: null, toString: function() {return 2n;}}) % 2n) is 0n'); >+ > assert.sameValue(2n % { > valueOf: null, >+ > toString: function() { > return 2n; > } >-}, 0n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 0n, 'The result of (2n % {valueOf: null, toString: function() {return 2n;}}) is 0n'); >+ >+assert.sameValue({ > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}) % 2n, 0n, "ToPrimitive: skip valueOf when it's not callable"); >+} % 2n, 0n, 'The result of (({valueOf: 1, toString: function() {return 2n;}}) % 2n) is 0n'); >+ > assert.sameValue(2n % { > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}, 0n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 0n, 'The result of (2n % {valueOf: 1, toString: function() {return 2n;}}) is 0n'); >+ >+assert.sameValue({ > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}) % 2n, 0n, "ToPrimitive: skip valueOf when it's not callable"); >+} % 2n, 0n, 'The result of (({valueOf: {}, toString: function() {return 2n;}}) % 2n) is 0n'); >+ > assert.sameValue(2n % { > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}, 0n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 0n, 'The result of (2n % {valueOf: {}, toString: function() {return 2n;}}) is 0n'); >+ >+assert.sameValue({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}) % 2n, 0n, "ToPrimitive: skip valueOf when it returns an object"); >+} % 2n, 0n, 'The result of (({valueOf: function() {return {};}, toString: function() {return 2n;}}) % 2n) is 0n'); >+ > assert.sameValue(2n % { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}, 0n, "ToPrimitive: skip valueOf when it returns an object"); >-assert.sameValue(({ >+}, 0n, 'The result of (2n % {valueOf: function() {return {};}, toString: function() {return 2n;}}) is 0n'); >+ >+assert.sameValue({ > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}) % 2n, 0n, "ToPrimitive: skip valueOf when it returns an object"); >+} % 2n, 0n, 'The result of (({valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) % 2n) is 0n'); >+ > assert.sameValue(2n % { > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}, 0n, "ToPrimitive: skip valueOf when it returns an object"); >+}, 0n, 'The result of (2n % {valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) is 0n'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: 1 > }) % 1n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: 1}) % 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n % { > [Symbol.toPrimitive]: 1 > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n % {[Symbol.toPrimitive]: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: {} > }) % 1n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: {}}) % 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n % { > [Symbol.toPrimitive]: {} > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n % {[Symbol.toPrimitive]: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return Object(1); > } > }) % 1n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return Object(1);}}) % 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n % { > [Symbol.toPrimitive]: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n % {[Symbol.toPrimitive]: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return {}; > } > }) % 1n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return {};}}) % 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n % { > [Symbol.toPrimitive]: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n % {[Symbol.toPrimitive]: function() {return {};}} throws TypeError'); >+ > assert.throws(MyError, function() { > ({ > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }) % 1n; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '({[Symbol.toPrimitive]: function() {throw new MyError();}}) % 1n throws MyError'); >+ > assert.throws(MyError, function() { > 0n % { > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '0n % {[Symbol.toPrimitive]: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > valueOf: function() { > throw new MyError(); > } > }) % 1n; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '({valueOf: function() {throw new MyError();}}) % 1n throws MyError'); >+ > assert.throws(MyError, function() { > 0n % { > valueOf: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '0n % {valueOf: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > toString: function() { > throw new MyError(); > } > }) % 1n; >-}, "ToPrimitive: propagate errors from toString"); >+}, '({toString: function() {throw new MyError();}}) % 1n throws MyError'); >+ > assert.throws(MyError, function() { > 0n % { > toString: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from toString"); >+}, '0n % {toString: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: null, > toString: null > }) % 1n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: null, toString: null}) % 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n % { > valueOf: null, > toString: null > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n % {valueOf: null, toString: null} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: 1, > toString: 1 > }) % 1n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: 1, toString: 1}) % 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n % { > valueOf: 1, > toString: 1 > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n % {valueOf: 1, toString: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: {}, > toString: {} > }) % 1n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: {}, toString: {}}) % 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n % { > valueOf: {}, > toString: {} > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n % {valueOf: {}, toString: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }) % 1n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return Object(1);}, toString: function() {return Object(1);}}) % 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n % { > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n % {valueOf: function() {return Object(1);}, toString: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }) % 1n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return {};}, toString: function() {return {};}}) % 1n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n % { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n % {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/modulus/bigint-wrapped-values.js b/JSTests/test262/test/language/expressions/modulus/bigint-wrapped-values.js >index 474e7f43c738510054fdcdf30de21780bcaced47..eeb1c38c4632734242dc484c6a93d0310d346434 100644 >--- a/JSTests/test262/test/language/expressions/modulus/bigint-wrapped-values.js >+++ b/JSTests/test262/test/language/expressions/modulus/bigint-wrapped-values.js >@@ -5,36 +5,41 @@ > esid: sec-multiplicative-operators-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >+assert.sameValue(Object(2n) % 2n, 0n, 'The result of (Object(2n) % 2n) is 0n'); >+assert.sameValue(2n % Object(2n), 0n, 'The result of (2n % Object(2n)) is 0n'); > >-assert.sameValue(Object(2n) % 2n, 0n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(2n % Object(2n), 0n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > } >-}) % 2n, 0n, "ToPrimitive: @@toPrimitive"); >+} % 2n, 0n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}}) % 2n) is 0n'); >+ > assert.sameValue(2n % { > [Symbol.toPrimitive]: function() { > return 2n; > } >-}, 0n, "ToPrimitive: @@toPrimitive"); >-assert.sameValue(({ >+}, 0n, 'The result of (2n % {[Symbol.toPrimitive]: function() {return 2n;}}) is 0n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > } >-}) % 2n, 0n, "ToPrimitive: valueOf"); >+} % 2n, 0n, 'The result of (({valueOf: function() {return 2n;}}) % 2n) is 0n'); >+ > assert.sameValue(2n % { > valueOf: function() { > return 2n; > } >-}, 0n, "ToPrimitive: valueOf"); >-assert.sameValue(({ >+}, 0n, 'The result of (2n % {valueOf: function() {return 2n;}}) is 0n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) % 2n, 0n, "ToPrimitive: toString"); >+} % 2n, 0n, 'The result of (({toString: function() {return 2n;}}) % 2n) is 0n'); >+ > assert.sameValue(2n % { > toString: function() { > return 2n; > } >-}, 0n, "ToPrimitive: toString"); >+}, 0n, 'The result of (2n % {toString: function() {return 2n;}}) is 0n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/multiplication/bigint-and-number.js b/JSTests/test262/test/language/expressions/multiplication/bigint-and-number.js >index a62f585671f5514f33d6d1b8bf57f60ae355b0bd..4a9eb0c2ed908892388e8e4938c394ad65e5a022 100644 >--- a/JSTests/test262/test/language/expressions/multiplication/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/multiplication/bigint-and-number.js >@@ -9,24 +9,82 @@ > Let rnum be ? ToNumeric(rightValue). > If Type(lnum) does not equal Type(rnum), throw a TypeError exception. > ---*/ >+assert.throws(TypeError, function() { >+ 1n * 1; >+}, '1n * 1 throws TypeError'); > >-assert.throws(TypeError, function() { 1n * 1; }, "1n * 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 * 1n; }, "1 * 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) * 1; }, "Object(1n) * 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 * Object(1n); }, "1 * Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n * Object(1); }, "1n * Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) * 1n; }, "Object(1) * 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) * Object(1); }, "Object(1n) * Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) * Object(1n); }, "Object(1) * Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n * NaN; }, "1n * NaN throws TypeError"); >-assert.throws(TypeError, function() { NaN * 1n; }, "NaN * 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n * Infinity; }, "1n * Infinity throws TypeError"); >-assert.throws(TypeError, function() { Infinity * 1n; }, "Infinity * 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n * true; }, "1n * true throws TypeError"); >-assert.throws(TypeError, function() { true * 1n; }, "true * 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n * "1"; }, '1n * "1" throws TypeError'); >-assert.throws(TypeError, function() { "1" * 1n; }, '"1" * 1n throws TypeError'); >-assert.throws(TypeError, function() { 1n * null; }, "1n * null throws TypeError"); >-assert.throws(TypeError, function() { null * 1n; }, "null * 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n * undefined; }, "1n * undefined throws TypeError"); >-assert.throws(TypeError, function() { undefined * 1n; }, "undefined * 1n throws TypeError"); >+assert.throws(TypeError, function() { >+ 1 * 1n; >+}, '1 * 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) * 1; >+}, 'Object(1n) * 1 throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1 * Object(1n); >+}, '1 * Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n * Object(1); >+}, '1n * Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) * 1n; >+}, 'Object(1) * 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) * Object(1); >+}, 'Object(1n) * Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) * Object(1n); >+}, 'Object(1) * Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n * NaN; >+}, '1n * NaN throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ NaN * 1n; >+}, 'NaN * 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n * Infinity; >+}, '1n * Infinity throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Infinity * 1n; >+}, 'Infinity * 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n * true; >+}, '1n * true throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ true * 1n; >+}, 'true * 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n * '1'; >+}, '1n * "1" throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ '1' * 1n; >+}, '"1" * 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n * null; >+}, '1n * null throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ null * 1n; >+}, 'null * 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n * undefined; >+}, '1n * undefined throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ undefined * 1n; >+}, 'undefined * 1n throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/multiplication/bigint-arithmetic.js b/JSTests/test262/test/language/expressions/multiplication/bigint-arithmetic.js >index 8e828e459c525aaeb3251cc4e358264a6d881d36..8305f167993936440e259f077896befc13460e23 100644 >--- a/JSTests/test262/test/language/expressions/multiplication/bigint-arithmetic.js >+++ b/JSTests/test262/test/language/expressions/multiplication/bigint-arithmetic.js >@@ -1,167 +1,699 @@ > // Copyright (C) 2017 Robin Templeton. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > esid: sec-multiplicative-operators-runtime-semantics-evaluation > description: BigInt multiplication arithmetic > features: [BigInt] > ---*/ >+assert.sameValue( >+ 0xFEDCBA9876543210n * 0xFEDCBA9876543210n, >+ 0xFDBAC097C8DC5ACCDEEC6CD7A44A4100n, >+ 'The result of (0xFEDCBA9876543210n * 0xFEDCBA9876543210n) is 0xFDBAC097C8DC5ACCDEEC6CD7A44A4100n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n * 0xFEDCBA987654320Fn, >+ 0xFDBAC097C8DC5ACBE00FB23F2DF60EF0n, >+ 'The result of (0xFEDCBA9876543210n * 0xFEDCBA987654320Fn) is 0xFDBAC097C8DC5ACBE00FB23F2DF60EF0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n * 0xFEDCBA98n, >+ 0xFDBAC097530ECA86541D5980n, >+ 'The result of (0xFEDCBA9876543210n * 0xFEDCBA98n) is 0xFDBAC097530ECA86541D5980n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n * 0xFEDCBA97n, >+ 0xFDBAC09654320FEDDDC92770n, >+ 'The result of (0xFEDCBA9876543210n * 0xFEDCBA97n) is 0xFDBAC09654320FEDDDC92770n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n * 0x1234n, >+ 0x121F49F49F49F49F4B40n, >+ 'The result of (0xFEDCBA9876543210n * 0x1234n) is 0x121F49F49F49F49F4B40n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n * 0x3n, >+ 0x2FC962FC962FC9630n, >+ 'The result of (0xFEDCBA9876543210n * 0x3n) is 0x2FC962FC962FC9630n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n * 0x2n, >+ 0x1FDB97530ECA86420n, >+ 'The result of (0xFEDCBA9876543210n * 0x2n) is 0x1FDB97530ECA86420n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n * 0x1n, >+ 0xFEDCBA9876543210n, >+ 'The result of (0xFEDCBA9876543210n * 0x1n) is 0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n * 0x0n, >+ 0x0n, >+ 'The result of (0xFEDCBA9876543210n * 0x0n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n * -0x1n, >+ -0xFEDCBA9876543210n, >+ 'The result of (0xFEDCBA9876543210n * -0x1n) is -0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n * -0x2n, >+ -0x1FDB97530ECA86420n, >+ 'The result of (0xFEDCBA9876543210n * -0x2n) is -0x1FDB97530ECA86420n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n * -0x3n, >+ -0x2FC962FC962FC9630n, >+ 'The result of (0xFEDCBA9876543210n * -0x3n) is -0x2FC962FC962FC9630n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n * -0x1234n, >+ -0x121F49F49F49F49F4B40n, >+ 'The result of (0xFEDCBA9876543210n * -0x1234n) is -0x121F49F49F49F49F4B40n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n * -0xFEDCBA97n, >+ -0xFDBAC09654320FEDDDC92770n, >+ 'The result of (0xFEDCBA9876543210n * -0xFEDCBA97n) is -0xFDBAC09654320FEDDDC92770n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n * -0xFEDCBA98n, >+ -0xFDBAC097530ECA86541D5980n, >+ 'The result of (0xFEDCBA9876543210n * -0xFEDCBA98n) is -0xFDBAC097530ECA86541D5980n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n * -0xFEDCBA987654320Fn, >+ -0xFDBAC097C8DC5ACBE00FB23F2DF60EF0n, >+ 'The result of (0xFEDCBA9876543210n * -0xFEDCBA987654320Fn) is -0xFDBAC097C8DC5ACBE00FB23F2DF60EF0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n * -0xFEDCBA9876543210n, >+ -0xFDBAC097C8DC5ACCDEEC6CD7A44A4100n, >+ 'The result of (0xFEDCBA9876543210n * -0xFEDCBA9876543210n) is -0xFDBAC097C8DC5ACCDEEC6CD7A44A4100n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn * 0xFEDCBA987654320Fn, >+ 0xFDBAC097C8DC5ACAE132F7A6B7A1DCE1n, >+ 'The result of (0xFEDCBA987654320Fn * 0xFEDCBA987654320Fn) is 0xFDBAC097C8DC5ACAE132F7A6B7A1DCE1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn * 0xFEDCBA98n, >+ 0xFDBAC097530ECA8555409EE8n, >+ 'The result of (0xFEDCBA987654320Fn * 0xFEDCBA98n) is 0xFDBAC097530ECA8555409EE8n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn * 0xFEDCBA97n, >+ 0xFDBAC09654320FECDEEC6CD9n, >+ 'The result of (0xFEDCBA987654320Fn * 0xFEDCBA97n) is 0xFDBAC09654320FECDEEC6CD9n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn * 0x1234n, >+ 0x121F49F49F49F49F390Cn, >+ 'The result of (0xFEDCBA987654320Fn * 0x1234n) is 0x121F49F49F49F49F390Cn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn * 0x3n, >+ 0x2FC962FC962FC962Dn, >+ 'The result of (0xFEDCBA987654320Fn * 0x3n) is 0x2FC962FC962FC962Dn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn * 0x2n, >+ 0x1FDB97530ECA8641En, >+ 'The result of (0xFEDCBA987654320Fn * 0x2n) is 0x1FDB97530ECA8641En' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn * 0x1n, >+ 0xFEDCBA987654320Fn, >+ 'The result of (0xFEDCBA987654320Fn * 0x1n) is 0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn * 0x0n, >+ 0x0n, >+ 'The result of (0xFEDCBA987654320Fn * 0x0n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn * -0x1n, >+ -0xFEDCBA987654320Fn, >+ 'The result of (0xFEDCBA987654320Fn * -0x1n) is -0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn * -0x2n, >+ -0x1FDB97530ECA8641En, >+ 'The result of (0xFEDCBA987654320Fn * -0x2n) is -0x1FDB97530ECA8641En' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn * -0x3n, >+ -0x2FC962FC962FC962Dn, >+ 'The result of (0xFEDCBA987654320Fn * -0x3n) is -0x2FC962FC962FC962Dn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn * -0x1234n, >+ -0x121F49F49F49F49F390Cn, >+ 'The result of (0xFEDCBA987654320Fn * -0x1234n) is -0x121F49F49F49F49F390Cn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn * -0xFEDCBA97n, >+ -0xFDBAC09654320FECDEEC6CD9n, >+ 'The result of (0xFEDCBA987654320Fn * -0xFEDCBA97n) is -0xFDBAC09654320FECDEEC6CD9n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn * -0xFEDCBA98n, >+ -0xFDBAC097530ECA8555409EE8n, >+ 'The result of (0xFEDCBA987654320Fn * -0xFEDCBA98n) is -0xFDBAC097530ECA8555409EE8n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn * -0xFEDCBA987654320Fn, >+ -0xFDBAC097C8DC5ACAE132F7A6B7A1DCE1n, >+ 'The result of (0xFEDCBA987654320Fn * -0xFEDCBA987654320Fn) is -0xFDBAC097C8DC5ACAE132F7A6B7A1DCE1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn * -0xFEDCBA9876543210n, >+ -0xFDBAC097C8DC5ACBE00FB23F2DF60EF0n, >+ 'The result of (0xFEDCBA987654320Fn * -0xFEDCBA9876543210n) is -0xFDBAC097C8DC5ACBE00FB23F2DF60EF0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n * 0xFEDCBA98n, >+ 0xFDBAC096DD413A40n, >+ 'The result of (0xFEDCBA98n * 0xFEDCBA98n) is 0xFDBAC096DD413A40n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n * 0xFEDCBA97n, >+ 0xFDBAC095DE647FA8n, >+ 'The result of (0xFEDCBA98n * 0xFEDCBA97n) is 0xFDBAC095DE647FA8n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n * 0x1234n, >+ 0x121F49F496E0n, >+ 'The result of (0xFEDCBA98n * 0x1234n) is 0x121F49F496E0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n * 0x3n, >+ 0x2FC962FC8n, >+ 'The result of (0xFEDCBA98n * 0x3n) is 0x2FC962FC8n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n * 0x2n, >+ 0x1FDB97530n, >+ 'The result of (0xFEDCBA98n * 0x2n) is 0x1FDB97530n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n * 0x1n, >+ 0xFEDCBA98n, >+ 'The result of (0xFEDCBA98n * 0x1n) is 0xFEDCBA98n' >+); >+ >+assert.sameValue(0xFEDCBA98n * 0x0n, 0x0n, 'The result of (0xFEDCBA98n * 0x0n) is 0x0n'); >+ >+assert.sameValue( >+ 0xFEDCBA98n * -0x1n, >+ -0xFEDCBA98n, >+ 'The result of (0xFEDCBA98n * -0x1n) is -0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n * -0x2n, >+ -0x1FDB97530n, >+ 'The result of (0xFEDCBA98n * -0x2n) is -0x1FDB97530n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n * -0x3n, >+ -0x2FC962FC8n, >+ 'The result of (0xFEDCBA98n * -0x3n) is -0x2FC962FC8n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n * -0x1234n, >+ -0x121F49F496E0n, >+ 'The result of (0xFEDCBA98n * -0x1234n) is -0x121F49F496E0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n * -0xFEDCBA97n, >+ -0xFDBAC095DE647FA8n, >+ 'The result of (0xFEDCBA98n * -0xFEDCBA97n) is -0xFDBAC095DE647FA8n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n * -0xFEDCBA98n, >+ -0xFDBAC096DD413A40n, >+ 'The result of (0xFEDCBA98n * -0xFEDCBA98n) is -0xFDBAC096DD413A40n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n * -0xFEDCBA987654320Fn, >+ -0xFDBAC097530ECA8555409EE8n, >+ 'The result of (0xFEDCBA98n * -0xFEDCBA987654320Fn) is -0xFDBAC097530ECA8555409EE8n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n * -0xFEDCBA9876543210n, >+ -0xFDBAC097530ECA86541D5980n, >+ 'The result of (0xFEDCBA98n * -0xFEDCBA9876543210n) is -0xFDBAC097530ECA86541D5980n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n * 0xFEDCBA97n, >+ 0xFDBAC094DF87C511n, >+ 'The result of (0xFEDCBA97n * 0xFEDCBA97n) is 0xFDBAC094DF87C511n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n * 0x1234n, >+ 0x121F49F484ACn, >+ 'The result of (0xFEDCBA97n * 0x1234n) is 0x121F49F484ACn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n * 0x3n, >+ 0x2FC962FC5n, >+ 'The result of (0xFEDCBA97n * 0x3n) is 0x2FC962FC5n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n * 0x2n, >+ 0x1FDB9752En, >+ 'The result of (0xFEDCBA97n * 0x2n) is 0x1FDB9752En' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n * 0x1n, >+ 0xFEDCBA97n, >+ 'The result of (0xFEDCBA97n * 0x1n) is 0xFEDCBA97n' >+); >+ >+assert.sameValue(0xFEDCBA97n * 0x0n, 0x0n, 'The result of (0xFEDCBA97n * 0x0n) is 0x0n'); >+ >+assert.sameValue( >+ 0xFEDCBA97n * -0x1n, >+ -0xFEDCBA97n, >+ 'The result of (0xFEDCBA97n * -0x1n) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n * -0x2n, >+ -0x1FDB9752En, >+ 'The result of (0xFEDCBA97n * -0x2n) is -0x1FDB9752En' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n * -0x3n, >+ -0x2FC962FC5n, >+ 'The result of (0xFEDCBA97n * -0x3n) is -0x2FC962FC5n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n * -0x1234n, >+ -0x121F49F484ACn, >+ 'The result of (0xFEDCBA97n * -0x1234n) is -0x121F49F484ACn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n * -0xFEDCBA97n, >+ -0xFDBAC094DF87C511n, >+ 'The result of (0xFEDCBA97n * -0xFEDCBA97n) is -0xFDBAC094DF87C511n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n * -0xFEDCBA98n, >+ -0xFDBAC095DE647FA8n, >+ 'The result of (0xFEDCBA97n * -0xFEDCBA98n) is -0xFDBAC095DE647FA8n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n * -0xFEDCBA987654320Fn, >+ -0xFDBAC09654320FECDEEC6CD9n, >+ 'The result of (0xFEDCBA97n * -0xFEDCBA987654320Fn) is -0xFDBAC09654320FECDEEC6CD9n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n * -0xFEDCBA9876543210n, >+ -0xFDBAC09654320FEDDDC92770n, >+ 'The result of (0xFEDCBA97n * -0xFEDCBA9876543210n) is -0xFDBAC09654320FEDDDC92770n' >+); >+ >+assert.sameValue(0x1234n * 0x1234n, 0x14B5A90n, 'The result of (0x1234n * 0x1234n) is 0x14B5A90n'); >+assert.sameValue(0x1234n * 0x3n, 0x369Cn, 'The result of (0x1234n * 0x3n) is 0x369Cn'); >+assert.sameValue(0x1234n * 0x2n, 0x2468n, 'The result of (0x1234n * 0x2n) is 0x2468n'); >+assert.sameValue(0x1234n * 0x1n, 0x1234n, 'The result of (0x1234n * 0x1n) is 0x1234n'); >+assert.sameValue(0x1234n * 0x0n, 0x0n, 'The result of (0x1234n * 0x0n) is 0x0n'); >+assert.sameValue(0x1234n * -0x1n, -0x1234n, 'The result of (0x1234n * -0x1n) is -0x1234n'); >+assert.sameValue(0x1234n * -0x2n, -0x2468n, 'The result of (0x1234n * -0x2n) is -0x2468n'); >+assert.sameValue(0x1234n * -0x3n, -0x369Cn, 'The result of (0x1234n * -0x3n) is -0x369Cn'); >+ >+assert.sameValue( >+ 0x1234n * -0x1234n, >+ -0x14B5A90n, >+ 'The result of (0x1234n * -0x1234n) is -0x14B5A90n' >+); >+ >+assert.sameValue( >+ 0x1234n * -0xFEDCBA97n, >+ -0x121F49F484ACn, >+ 'The result of (0x1234n * -0xFEDCBA97n) is -0x121F49F484ACn' >+); >+ >+assert.sameValue( >+ 0x1234n * -0xFEDCBA98n, >+ -0x121F49F496E0n, >+ 'The result of (0x1234n * -0xFEDCBA98n) is -0x121F49F496E0n' >+); >+ >+assert.sameValue( >+ 0x1234n * -0xFEDCBA987654320Fn, >+ -0x121F49F49F49F49F390Cn, >+ 'The result of (0x1234n * -0xFEDCBA987654320Fn) is -0x121F49F49F49F49F390Cn' >+); >+ >+assert.sameValue( >+ 0x1234n * -0xFEDCBA9876543210n, >+ -0x121F49F49F49F49F4B40n, >+ 'The result of (0x1234n * -0xFEDCBA9876543210n) is -0x121F49F49F49F49F4B40n' >+); >+ >+assert.sameValue(0x3n * 0x3n, 0x9n, 'The result of (0x3n * 0x3n) is 0x9n'); >+assert.sameValue(0x3n * 0x2n, 0x6n, 'The result of (0x3n * 0x2n) is 0x6n'); >+assert.sameValue(0x3n * 0x1n, 0x3n, 'The result of (0x3n * 0x1n) is 0x3n'); >+assert.sameValue(0x3n * 0x0n, 0x0n, 'The result of (0x3n * 0x0n) is 0x0n'); >+assert.sameValue(0x3n * -0x1n, -0x3n, 'The result of (0x3n * -0x1n) is -0x3n'); >+assert.sameValue(0x3n * -0x2n, -0x6n, 'The result of (0x3n * -0x2n) is -0x6n'); >+assert.sameValue(0x3n * -0x3n, -0x9n, 'The result of (0x3n * -0x3n) is -0x9n'); >+assert.sameValue(0x3n * -0x1234n, -0x369Cn, 'The result of (0x3n * -0x1234n) is -0x369Cn'); >+ >+assert.sameValue( >+ 0x3n * -0xFEDCBA97n, >+ -0x2FC962FC5n, >+ 'The result of (0x3n * -0xFEDCBA97n) is -0x2FC962FC5n' >+); >+ >+assert.sameValue( >+ 0x3n * -0xFEDCBA98n, >+ -0x2FC962FC8n, >+ 'The result of (0x3n * -0xFEDCBA98n) is -0x2FC962FC8n' >+); >+ >+assert.sameValue( >+ 0x3n * -0xFEDCBA987654320Fn, >+ -0x2FC962FC962FC962Dn, >+ 'The result of (0x3n * -0xFEDCBA987654320Fn) is -0x2FC962FC962FC962Dn' >+); >+ >+assert.sameValue( >+ 0x3n * -0xFEDCBA9876543210n, >+ -0x2FC962FC962FC9630n, >+ 'The result of (0x3n * -0xFEDCBA9876543210n) is -0x2FC962FC962FC9630n' >+); >+ >+assert.sameValue(0x2n * 0x2n, 0x4n, 'The result of (0x2n * 0x2n) is 0x4n'); >+assert.sameValue(0x2n * 0x1n, 0x2n, 'The result of (0x2n * 0x1n) is 0x2n'); >+assert.sameValue(0x2n * 0x0n, 0x0n, 'The result of (0x2n * 0x0n) is 0x0n'); >+assert.sameValue(0x2n * -0x1n, -0x2n, 'The result of (0x2n * -0x1n) is -0x2n'); >+assert.sameValue(0x2n * -0x2n, -0x4n, 'The result of (0x2n * -0x2n) is -0x4n'); >+assert.sameValue(0x2n * -0x3n, -0x6n, 'The result of (0x2n * -0x3n) is -0x6n'); >+assert.sameValue(0x2n * -0x1234n, -0x2468n, 'The result of (0x2n * -0x1234n) is -0x2468n'); >+ >+assert.sameValue( >+ 0x2n * -0xFEDCBA97n, >+ -0x1FDB9752En, >+ 'The result of (0x2n * -0xFEDCBA97n) is -0x1FDB9752En' >+); >+ >+assert.sameValue( >+ 0x2n * -0xFEDCBA98n, >+ -0x1FDB97530n, >+ 'The result of (0x2n * -0xFEDCBA98n) is -0x1FDB97530n' >+); >+ >+assert.sameValue( >+ 0x2n * -0xFEDCBA987654320Fn, >+ -0x1FDB97530ECA8641En, >+ 'The result of (0x2n * -0xFEDCBA987654320Fn) is -0x1FDB97530ECA8641En' >+); >+ >+assert.sameValue( >+ 0x2n * -0xFEDCBA9876543210n, >+ -0x1FDB97530ECA86420n, >+ 'The result of (0x2n * -0xFEDCBA9876543210n) is -0x1FDB97530ECA86420n' >+); >+ >+assert.sameValue(0x1n * 0x1n, 0x1n, 'The result of (0x1n * 0x1n) is 0x1n'); >+assert.sameValue(0x1n * 0x0n, 0x0n, 'The result of (0x1n * 0x0n) is 0x0n'); >+assert.sameValue(0x1n * -0x1n, -0x1n, 'The result of (0x1n * -0x1n) is -0x1n'); >+assert.sameValue(0x1n * -0x2n, -0x2n, 'The result of (0x1n * -0x2n) is -0x2n'); >+assert.sameValue(0x1n * -0x3n, -0x3n, 'The result of (0x1n * -0x3n) is -0x3n'); >+assert.sameValue(0x1n * -0x1234n, -0x1234n, 'The result of (0x1n * -0x1234n) is -0x1234n'); >+ >+assert.sameValue( >+ 0x1n * -0xFEDCBA97n, >+ -0xFEDCBA97n, >+ 'The result of (0x1n * -0xFEDCBA97n) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0x1n * -0xFEDCBA98n, >+ -0xFEDCBA98n, >+ 'The result of (0x1n * -0xFEDCBA98n) is -0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0x1n * -0xFEDCBA987654320Fn, >+ -0xFEDCBA987654320Fn, >+ 'The result of (0x1n * -0xFEDCBA987654320Fn) is -0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0x1n * -0xFEDCBA9876543210n, >+ -0xFEDCBA9876543210n, >+ 'The result of (0x1n * -0xFEDCBA9876543210n) is -0xFEDCBA9876543210n' >+); >+ >+assert.sameValue(0x0n * 0x0n, 0x0n, 'The result of (0x0n * 0x0n) is 0x0n'); >+assert.sameValue(0x0n * -0x1n, 0x0n, 'The result of (0x0n * -0x1n) is 0x0n'); >+assert.sameValue(0x0n * -0x2n, 0x0n, 'The result of (0x0n * -0x2n) is 0x0n'); >+assert.sameValue(0x0n * -0x3n, 0x0n, 'The result of (0x0n * -0x3n) is 0x0n'); >+assert.sameValue(0x0n * -0x1234n, 0x0n, 'The result of (0x0n * -0x1234n) is 0x0n'); >+assert.sameValue(0x0n * -0xFEDCBA97n, 0x0n, 'The result of (0x0n * -0xFEDCBA97n) is 0x0n'); >+assert.sameValue(0x0n * -0xFEDCBA98n, 0x0n, 'The result of (0x0n * -0xFEDCBA98n) is 0x0n'); >+ >+assert.sameValue( >+ 0x0n * -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0x0n * -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ 0x0n * -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0x0n * -0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue(-0x1n * -0x1n, 0x1n, 'The result of (-0x1n * -0x1n) is 0x1n'); >+assert.sameValue(-0x1n * -0x2n, 0x2n, 'The result of (-0x1n * -0x2n) is 0x2n'); >+assert.sameValue(-0x1n * -0x3n, 0x3n, 'The result of (-0x1n * -0x3n) is 0x3n'); >+assert.sameValue(-0x1n * -0x1234n, 0x1234n, 'The result of (-0x1n * -0x1234n) is 0x1234n'); >+ >+assert.sameValue( >+ -0x1n * -0xFEDCBA97n, >+ 0xFEDCBA97n, >+ 'The result of (-0x1n * -0xFEDCBA97n) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ -0x1n * -0xFEDCBA98n, >+ 0xFEDCBA98n, >+ 'The result of (-0x1n * -0xFEDCBA98n) is 0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ -0x1n * -0xFEDCBA987654320Fn, >+ 0xFEDCBA987654320Fn, >+ 'The result of (-0x1n * -0xFEDCBA987654320Fn) is 0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ -0x1n * -0xFEDCBA9876543210n, >+ 0xFEDCBA9876543210n, >+ 'The result of (-0x1n * -0xFEDCBA9876543210n) is 0xFEDCBA9876543210n' >+); >+ >+assert.sameValue(-0x2n * -0x2n, 0x4n, 'The result of (-0x2n * -0x2n) is 0x4n'); >+assert.sameValue(-0x2n * -0x3n, 0x6n, 'The result of (-0x2n * -0x3n) is 0x6n'); >+assert.sameValue(-0x2n * -0x1234n, 0x2468n, 'The result of (-0x2n * -0x1234n) is 0x2468n'); >+ >+assert.sameValue( >+ -0x2n * -0xFEDCBA97n, >+ 0x1FDB9752En, >+ 'The result of (-0x2n * -0xFEDCBA97n) is 0x1FDB9752En' >+); >+ >+assert.sameValue( >+ -0x2n * -0xFEDCBA98n, >+ 0x1FDB97530n, >+ 'The result of (-0x2n * -0xFEDCBA98n) is 0x1FDB97530n' >+); >+ >+assert.sameValue( >+ -0x2n * -0xFEDCBA987654320Fn, >+ 0x1FDB97530ECA8641En, >+ 'The result of (-0x2n * -0xFEDCBA987654320Fn) is 0x1FDB97530ECA8641En' >+); >+ >+assert.sameValue( >+ -0x2n * -0xFEDCBA9876543210n, >+ 0x1FDB97530ECA86420n, >+ 'The result of (-0x2n * -0xFEDCBA9876543210n) is 0x1FDB97530ECA86420n' >+); >+ >+assert.sameValue(-0x3n * -0x3n, 0x9n, 'The result of (-0x3n * -0x3n) is 0x9n'); >+assert.sameValue(-0x3n * -0x1234n, 0x369Cn, 'The result of (-0x3n * -0x1234n) is 0x369Cn'); >+ >+assert.sameValue( >+ -0x3n * -0xFEDCBA97n, >+ 0x2FC962FC5n, >+ 'The result of (-0x3n * -0xFEDCBA97n) is 0x2FC962FC5n' >+); >+ >+assert.sameValue( >+ -0x3n * -0xFEDCBA98n, >+ 0x2FC962FC8n, >+ 'The result of (-0x3n * -0xFEDCBA98n) is 0x2FC962FC8n' >+); >+ >+assert.sameValue( >+ -0x3n * -0xFEDCBA987654320Fn, >+ 0x2FC962FC962FC962Dn, >+ 'The result of (-0x3n * -0xFEDCBA987654320Fn) is 0x2FC962FC962FC962Dn' >+); >+ >+assert.sameValue( >+ -0x3n * -0xFEDCBA9876543210n, >+ 0x2FC962FC962FC9630n, >+ 'The result of (-0x3n * -0xFEDCBA9876543210n) is 0x2FC962FC962FC9630n' >+); >+ >+assert.sameValue( >+ -0x1234n * -0x1234n, >+ 0x14B5A90n, >+ 'The result of (-0x1234n * -0x1234n) is 0x14B5A90n' >+); >+ >+assert.sameValue( >+ -0x1234n * -0xFEDCBA97n, >+ 0x121F49F484ACn, >+ 'The result of (-0x1234n * -0xFEDCBA97n) is 0x121F49F484ACn' >+); >+ >+assert.sameValue( >+ -0x1234n * -0xFEDCBA98n, >+ 0x121F49F496E0n, >+ 'The result of (-0x1234n * -0xFEDCBA98n) is 0x121F49F496E0n' >+); >+ >+assert.sameValue( >+ -0x1234n * -0xFEDCBA987654320Fn, >+ 0x121F49F49F49F49F390Cn, >+ 'The result of (-0x1234n * -0xFEDCBA987654320Fn) is 0x121F49F49F49F49F390Cn' >+); >+ >+assert.sameValue( >+ -0x1234n * -0xFEDCBA9876543210n, >+ 0x121F49F49F49F49F4B40n, >+ 'The result of (-0x1234n * -0xFEDCBA9876543210n) is 0x121F49F49F49F49F4B40n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n * -0xFEDCBA97n, >+ 0xFDBAC094DF87C511n, >+ 'The result of (-0xFEDCBA97n * -0xFEDCBA97n) is 0xFDBAC094DF87C511n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n * -0xFEDCBA98n, >+ 0xFDBAC095DE647FA8n, >+ 'The result of (-0xFEDCBA97n * -0xFEDCBA98n) is 0xFDBAC095DE647FA8n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n * -0xFEDCBA987654320Fn, >+ 0xFDBAC09654320FECDEEC6CD9n, >+ 'The result of (-0xFEDCBA97n * -0xFEDCBA987654320Fn) is 0xFDBAC09654320FECDEEC6CD9n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n * -0xFEDCBA9876543210n, >+ 0xFDBAC09654320FEDDDC92770n, >+ 'The result of (-0xFEDCBA97n * -0xFEDCBA9876543210n) is 0xFDBAC09654320FEDDDC92770n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n * -0xFEDCBA98n, >+ 0xFDBAC096DD413A40n, >+ 'The result of (-0xFEDCBA98n * -0xFEDCBA98n) is 0xFDBAC096DD413A40n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n * -0xFEDCBA987654320Fn, >+ 0xFDBAC097530ECA8555409EE8n, >+ 'The result of (-0xFEDCBA98n * -0xFEDCBA987654320Fn) is 0xFDBAC097530ECA8555409EE8n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n * -0xFEDCBA9876543210n, >+ 0xFDBAC097530ECA86541D5980n, >+ 'The result of (-0xFEDCBA98n * -0xFEDCBA9876543210n) is 0xFDBAC097530ECA86541D5980n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn * -0xFEDCBA987654320Fn, >+ 0xFDBAC097C8DC5ACAE132F7A6B7A1DCE1n, >+ 'The result of (-0xFEDCBA987654320Fn * -0xFEDCBA987654320Fn) is 0xFDBAC097C8DC5ACAE132F7A6B7A1DCE1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn * -0xFEDCBA9876543210n, >+ 0xFDBAC097C8DC5ACBE00FB23F2DF60EF0n, >+ 'The result of (-0xFEDCBA987654320Fn * -0xFEDCBA9876543210n) is 0xFDBAC097C8DC5ACBE00FB23F2DF60EF0n' >+); > >-function testMul(x, y, z) { >- assert.sameValue(x * y, z, x + " * " + y + " = " + z); >- assert.sameValue(y * x, z, y + " * " + x + " = " + z); >-} >- >-testMul(0xFEDCBA9876543210n, 0xFEDCBA9876543210n, 0xFDBAC097C8DC5ACCDEEC6CD7A44A4100n); >-testMul(0xFEDCBA9876543210n, 0xFEDCBA987654320Fn, 0xFDBAC097C8DC5ACBE00FB23F2DF60EF0n); >-testMul(0xFEDCBA9876543210n, 0xFEDCBA98n, 0xFDBAC097530ECA86541D5980n); >-testMul(0xFEDCBA9876543210n, 0xFEDCBA97n, 0xFDBAC09654320FEDDDC92770n); >-testMul(0xFEDCBA9876543210n, 0x1234n, 0x121F49F49F49F49F4B40n); >-testMul(0xFEDCBA9876543210n, 0x3n, 0x2FC962FC962FC9630n); >-testMul(0xFEDCBA9876543210n, 0x2n, 0x1FDB97530ECA86420n); >-testMul(0xFEDCBA9876543210n, 0x1n, 0xFEDCBA9876543210n); >-testMul(0xFEDCBA9876543210n, 0x0n, 0x0n); >-testMul(0xFEDCBA9876543210n, -0x1n, -0xFEDCBA9876543210n); >-testMul(0xFEDCBA9876543210n, -0x2n, -0x1FDB97530ECA86420n); >-testMul(0xFEDCBA9876543210n, -0x3n, -0x2FC962FC962FC9630n); >-testMul(0xFEDCBA9876543210n, -0x1234n, -0x121F49F49F49F49F4B40n); >-testMul(0xFEDCBA9876543210n, -0xFEDCBA97n, -0xFDBAC09654320FEDDDC92770n); >-testMul(0xFEDCBA9876543210n, -0xFEDCBA98n, -0xFDBAC097530ECA86541D5980n); >-testMul(0xFEDCBA9876543210n, -0xFEDCBA987654320Fn, -0xFDBAC097C8DC5ACBE00FB23F2DF60EF0n); >-testMul(0xFEDCBA9876543210n, -0xFEDCBA9876543210n, -0xFDBAC097C8DC5ACCDEEC6CD7A44A4100n); >-testMul(0xFEDCBA987654320Fn, 0xFEDCBA987654320Fn, 0xFDBAC097C8DC5ACAE132F7A6B7A1DCE1n); >-testMul(0xFEDCBA987654320Fn, 0xFEDCBA98n, 0xFDBAC097530ECA8555409EE8n); >-testMul(0xFEDCBA987654320Fn, 0xFEDCBA97n, 0xFDBAC09654320FECDEEC6CD9n); >-testMul(0xFEDCBA987654320Fn, 0x1234n, 0x121F49F49F49F49F390Cn); >-testMul(0xFEDCBA987654320Fn, 0x3n, 0x2FC962FC962FC962Dn); >-testMul(0xFEDCBA987654320Fn, 0x2n, 0x1FDB97530ECA8641En); >-testMul(0xFEDCBA987654320Fn, 0x1n, 0xFEDCBA987654320Fn); >-testMul(0xFEDCBA987654320Fn, 0x0n, 0x0n); >-testMul(0xFEDCBA987654320Fn, -0x1n, -0xFEDCBA987654320Fn); >-testMul(0xFEDCBA987654320Fn, -0x2n, -0x1FDB97530ECA8641En); >-testMul(0xFEDCBA987654320Fn, -0x3n, -0x2FC962FC962FC962Dn); >-testMul(0xFEDCBA987654320Fn, -0x1234n, -0x121F49F49F49F49F390Cn); >-testMul(0xFEDCBA987654320Fn, -0xFEDCBA97n, -0xFDBAC09654320FECDEEC6CD9n); >-testMul(0xFEDCBA987654320Fn, -0xFEDCBA98n, -0xFDBAC097530ECA8555409EE8n); >-testMul(0xFEDCBA987654320Fn, -0xFEDCBA987654320Fn, -0xFDBAC097C8DC5ACAE132F7A6B7A1DCE1n); >-testMul(0xFEDCBA987654320Fn, -0xFEDCBA9876543210n, -0xFDBAC097C8DC5ACBE00FB23F2DF60EF0n); >-testMul(0xFEDCBA98n, 0xFEDCBA98n, 0xFDBAC096DD413A40n); >-testMul(0xFEDCBA98n, 0xFEDCBA97n, 0xFDBAC095DE647FA8n); >-testMul(0xFEDCBA98n, 0x1234n, 0x121F49F496E0n); >-testMul(0xFEDCBA98n, 0x3n, 0x2FC962FC8n); >-testMul(0xFEDCBA98n, 0x2n, 0x1FDB97530n); >-testMul(0xFEDCBA98n, 0x1n, 0xFEDCBA98n); >-testMul(0xFEDCBA98n, 0x0n, 0x0n); >-testMul(0xFEDCBA98n, -0x1n, -0xFEDCBA98n); >-testMul(0xFEDCBA98n, -0x2n, -0x1FDB97530n); >-testMul(0xFEDCBA98n, -0x3n, -0x2FC962FC8n); >-testMul(0xFEDCBA98n, -0x1234n, -0x121F49F496E0n); >-testMul(0xFEDCBA98n, -0xFEDCBA97n, -0xFDBAC095DE647FA8n); >-testMul(0xFEDCBA98n, -0xFEDCBA98n, -0xFDBAC096DD413A40n); >-testMul(0xFEDCBA98n, -0xFEDCBA987654320Fn, -0xFDBAC097530ECA8555409EE8n); >-testMul(0xFEDCBA98n, -0xFEDCBA9876543210n, -0xFDBAC097530ECA86541D5980n); >-testMul(0xFEDCBA97n, 0xFEDCBA97n, 0xFDBAC094DF87C511n); >-testMul(0xFEDCBA97n, 0x1234n, 0x121F49F484ACn); >-testMul(0xFEDCBA97n, 0x3n, 0x2FC962FC5n); >-testMul(0xFEDCBA97n, 0x2n, 0x1FDB9752En); >-testMul(0xFEDCBA97n, 0x1n, 0xFEDCBA97n); >-testMul(0xFEDCBA97n, 0x0n, 0x0n); >-testMul(0xFEDCBA97n, -0x1n, -0xFEDCBA97n); >-testMul(0xFEDCBA97n, -0x2n, -0x1FDB9752En); >-testMul(0xFEDCBA97n, -0x3n, -0x2FC962FC5n); >-testMul(0xFEDCBA97n, -0x1234n, -0x121F49F484ACn); >-testMul(0xFEDCBA97n, -0xFEDCBA97n, -0xFDBAC094DF87C511n); >-testMul(0xFEDCBA97n, -0xFEDCBA98n, -0xFDBAC095DE647FA8n); >-testMul(0xFEDCBA97n, -0xFEDCBA987654320Fn, -0xFDBAC09654320FECDEEC6CD9n); >-testMul(0xFEDCBA97n, -0xFEDCBA9876543210n, -0xFDBAC09654320FEDDDC92770n); >-testMul(0x1234n, 0x1234n, 0x14B5A90n); >-testMul(0x1234n, 0x3n, 0x369Cn); >-testMul(0x1234n, 0x2n, 0x2468n); >-testMul(0x1234n, 0x1n, 0x1234n); >-testMul(0x1234n, 0x0n, 0x0n); >-testMul(0x1234n, -0x1n, -0x1234n); >-testMul(0x1234n, -0x2n, -0x2468n); >-testMul(0x1234n, -0x3n, -0x369Cn); >-testMul(0x1234n, -0x1234n, -0x14B5A90n); >-testMul(0x1234n, -0xFEDCBA97n, -0x121F49F484ACn); >-testMul(0x1234n, -0xFEDCBA98n, -0x121F49F496E0n); >-testMul(0x1234n, -0xFEDCBA987654320Fn, -0x121F49F49F49F49F390Cn); >-testMul(0x1234n, -0xFEDCBA9876543210n, -0x121F49F49F49F49F4B40n); >-testMul(0x3n, 0x3n, 0x9n); >-testMul(0x3n, 0x2n, 0x6n); >-testMul(0x3n, 0x1n, 0x3n); >-testMul(0x3n, 0x0n, 0x0n); >-testMul(0x3n, -0x1n, -0x3n); >-testMul(0x3n, -0x2n, -0x6n); >-testMul(0x3n, -0x3n, -0x9n); >-testMul(0x3n, -0x1234n, -0x369Cn); >-testMul(0x3n, -0xFEDCBA97n, -0x2FC962FC5n); >-testMul(0x3n, -0xFEDCBA98n, -0x2FC962FC8n); >-testMul(0x3n, -0xFEDCBA987654320Fn, -0x2FC962FC962FC962Dn); >-testMul(0x3n, -0xFEDCBA9876543210n, -0x2FC962FC962FC9630n); >-testMul(0x2n, 0x2n, 0x4n); >-testMul(0x2n, 0x1n, 0x2n); >-testMul(0x2n, 0x0n, 0x0n); >-testMul(0x2n, -0x1n, -0x2n); >-testMul(0x2n, -0x2n, -0x4n); >-testMul(0x2n, -0x3n, -0x6n); >-testMul(0x2n, -0x1234n, -0x2468n); >-testMul(0x2n, -0xFEDCBA97n, -0x1FDB9752En); >-testMul(0x2n, -0xFEDCBA98n, -0x1FDB97530n); >-testMul(0x2n, -0xFEDCBA987654320Fn, -0x1FDB97530ECA8641En); >-testMul(0x2n, -0xFEDCBA9876543210n, -0x1FDB97530ECA86420n); >-testMul(0x1n, 0x1n, 0x1n); >-testMul(0x1n, 0x0n, 0x0n); >-testMul(0x1n, -0x1n, -0x1n); >-testMul(0x1n, -0x2n, -0x2n); >-testMul(0x1n, -0x3n, -0x3n); >-testMul(0x1n, -0x1234n, -0x1234n); >-testMul(0x1n, -0xFEDCBA97n, -0xFEDCBA97n); >-testMul(0x1n, -0xFEDCBA98n, -0xFEDCBA98n); >-testMul(0x1n, -0xFEDCBA987654320Fn, -0xFEDCBA987654320Fn); >-testMul(0x1n, -0xFEDCBA9876543210n, -0xFEDCBA9876543210n); >-testMul(0x0n, 0x0n, 0x0n); >-testMul(0x0n, -0x1n, 0x0n); >-testMul(0x0n, -0x2n, 0x0n); >-testMul(0x0n, -0x3n, 0x0n); >-testMul(0x0n, -0x1234n, 0x0n); >-testMul(0x0n, -0xFEDCBA97n, 0x0n); >-testMul(0x0n, -0xFEDCBA98n, 0x0n); >-testMul(0x0n, -0xFEDCBA987654320Fn, 0x0n); >-testMul(0x0n, -0xFEDCBA9876543210n, 0x0n); >-testMul(-0x1n, -0x1n, 0x1n); >-testMul(-0x1n, -0x2n, 0x2n); >-testMul(-0x1n, -0x3n, 0x3n); >-testMul(-0x1n, -0x1234n, 0x1234n); >-testMul(-0x1n, -0xFEDCBA97n, 0xFEDCBA97n); >-testMul(-0x1n, -0xFEDCBA98n, 0xFEDCBA98n); >-testMul(-0x1n, -0xFEDCBA987654320Fn, 0xFEDCBA987654320Fn); >-testMul(-0x1n, -0xFEDCBA9876543210n, 0xFEDCBA9876543210n); >-testMul(-0x2n, -0x2n, 0x4n); >-testMul(-0x2n, -0x3n, 0x6n); >-testMul(-0x2n, -0x1234n, 0x2468n); >-testMul(-0x2n, -0xFEDCBA97n, 0x1FDB9752En); >-testMul(-0x2n, -0xFEDCBA98n, 0x1FDB97530n); >-testMul(-0x2n, -0xFEDCBA987654320Fn, 0x1FDB97530ECA8641En); >-testMul(-0x2n, -0xFEDCBA9876543210n, 0x1FDB97530ECA86420n); >-testMul(-0x3n, -0x3n, 0x9n); >-testMul(-0x3n, -0x1234n, 0x369Cn); >-testMul(-0x3n, -0xFEDCBA97n, 0x2FC962FC5n); >-testMul(-0x3n, -0xFEDCBA98n, 0x2FC962FC8n); >-testMul(-0x3n, -0xFEDCBA987654320Fn, 0x2FC962FC962FC962Dn); >-testMul(-0x3n, -0xFEDCBA9876543210n, 0x2FC962FC962FC9630n); >-testMul(-0x1234n, -0x1234n, 0x14B5A90n); >-testMul(-0x1234n, -0xFEDCBA97n, 0x121F49F484ACn); >-testMul(-0x1234n, -0xFEDCBA98n, 0x121F49F496E0n); >-testMul(-0x1234n, -0xFEDCBA987654320Fn, 0x121F49F49F49F49F390Cn); >-testMul(-0x1234n, -0xFEDCBA9876543210n, 0x121F49F49F49F49F4B40n); >-testMul(-0xFEDCBA97n, -0xFEDCBA97n, 0xFDBAC094DF87C511n); >-testMul(-0xFEDCBA97n, -0xFEDCBA98n, 0xFDBAC095DE647FA8n); >-testMul(-0xFEDCBA97n, -0xFEDCBA987654320Fn, 0xFDBAC09654320FECDEEC6CD9n); >-testMul(-0xFEDCBA97n, -0xFEDCBA9876543210n, 0xFDBAC09654320FEDDDC92770n); >-testMul(-0xFEDCBA98n, -0xFEDCBA98n, 0xFDBAC096DD413A40n); >-testMul(-0xFEDCBA98n, -0xFEDCBA987654320Fn, 0xFDBAC097530ECA8555409EE8n); >-testMul(-0xFEDCBA98n, -0xFEDCBA9876543210n, 0xFDBAC097530ECA86541D5980n); >-testMul(-0xFEDCBA987654320Fn, -0xFEDCBA987654320Fn, 0xFDBAC097C8DC5ACAE132F7A6B7A1DCE1n); >-testMul(-0xFEDCBA987654320Fn, -0xFEDCBA9876543210n, 0xFDBAC097C8DC5ACBE00FB23F2DF60EF0n); >-testMul(-0xFEDCBA9876543210n, -0xFEDCBA9876543210n, 0xFDBAC097C8DC5ACCDEEC6CD7A44A4100n); >+assert.sameValue( >+ -0xFEDCBA9876543210n * -0xFEDCBA9876543210n, >+ 0xFDBAC097C8DC5ACCDEEC6CD7A44A4100n, >+ 'The result of (-0xFEDCBA9876543210n * -0xFEDCBA9876543210n) is 0xFDBAC097C8DC5ACCDEEC6CD7A44A4100n' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/multiplication/bigint-errors.js b/JSTests/test262/test/language/expressions/multiplication/bigint-errors.js >index a2cc666b4d26c0cdb7287d3cd1e84a7a2f3005bc..30a8553452a54ccc404aff02f1a83b84878bbe67 100644 >--- a/JSTests/test262/test/language/expressions/multiplication/bigint-errors.js >+++ b/JSTests/test262/test/language/expressions/multiplication/bigint-errors.js >@@ -5,58 +5,66 @@ > esid: sec-multiplicative-operators-runtime-semantics-evaluation > features: [BigInt, Symbol, Symbol.toPrimitive, computed-property-names] > ---*/ >- > assert.throws(TypeError, function() { >- Symbol("1") * 0n; >-}, "ToBigInt: Symbol => TypeError"); >+ Symbol('1') * 0n; >+}, 'Symbol("1") * 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n * Symbol("1"); >-}, "ToBigInt: Symbol => TypeError"); >+ 0n * Symbol('1'); >+}, '0n * Symbol("1") throws TypeError'); >+ > assert.throws(TypeError, function() { >- Object(Symbol("1")) * 0n; >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ Object(Symbol('1')) * 0n; >+}, 'Object(Symbol("1")) * 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n * Object(Symbol("1")); >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ 0n * Object(Symbol('1')); >+}, '0n * Object(Symbol("1")) throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) * 0n; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '({[Symbol.toPrimitive]: function() {return Symbol("1");}}) * 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n * { > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '0n * {[Symbol.toPrimitive]: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) * 0n; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '({valueOf: function() {return Symbol("1");}}) * 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n * { > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '0n * {valueOf: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) * 0n; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '({toString: function() {return Symbol("1");}}) * 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n * { > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '0n * {toString: function() {return Symbol("1");}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/multiplication/bigint-toprimitive.js b/JSTests/test262/test/language/expressions/multiplication/bigint-toprimitive.js >index adb1a64745726d02f02e7d2df91a6aa5dd71516a..95127189c126b0ffbb5bea944eb4b79d0f7d89cb 100644 >--- a/JSTests/test262/test/language/expressions/multiplication/bigint-toprimitive.js >+++ b/JSTests/test262/test/language/expressions/multiplication/bigint-toprimitive.js >@@ -5,304 +5,368 @@ > esid: sec-multiplicative-operators-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >- > function err() { > throw new Test262Error(); > } > > function MyError() {} > >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}) * 2n, 4n, "ToPrimitive: @@toPrimitive takes precedence"); >+} * 2n, 4n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) * 2n) is 4n'); >+ > assert.sameValue(2n * { > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}, 4n, "ToPrimitive: @@toPrimitive takes precedence"); >-assert.sameValue(({ >+}, 4n, 'The result of (2n * {[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) is 4n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > }, >+ > toString: err >-}) * 2n, 4n, "ToPrimitive: valueOf takes precedence over toString"); >+} * 2n, 4n, 'The result of (({valueOf: function() {return 2n;}, toString: err}) * 2n) is 4n'); >+ > assert.sameValue(2n * { > valueOf: function() { > return 2n; > }, >+ > toString: err >-}, 4n, "ToPrimitive: valueOf takes precedence over toString"); >-assert.sameValue(({ >+}, 4n, 'The result of (2n * {valueOf: function() {return 2n;}, toString: err}) is 4n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) * 2n, 4n, "ToPrimitive: toString with no valueOf"); >+} * 2n, 4n, 'The result of (({toString: function() {return 2n;}}) * 2n) is 4n'); >+ > assert.sameValue(2n * { > toString: function() { > return 2n; > } >-}, 4n, "ToPrimitive: toString with no valueOf"); >-assert.sameValue(({ >+}, 4n, 'The result of (2n * {toString: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}) * 2n, 4n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >+} * 2n, 4n, 'The result of (({[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) * 2n) is 4n'); >+ > assert.sameValue(2n * { > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}, 4n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >-assert.sameValue(({ >+}, 4n, 'The result of (2n * {[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}) * 2n, 4n, "ToPrimitive: skip @@toPrimitive when it's null"); >+} * 2n, 4n, 'The result of (({[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) * 2n) is 4n'); >+ > assert.sameValue(2n * { > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}, 4n, "ToPrimitive: skip @@toPrimitive when it's null"); >-assert.sameValue(({ >+}, 4n, 'The result of (2n * {[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > valueOf: null, >+ > toString: function() { > return 2n; > } >-}) * 2n, 4n, "ToPrimitive: skip valueOf when it's not callable"); >+} * 2n, 4n, 'The result of (({valueOf: null, toString: function() {return 2n;}}) * 2n) is 4n'); >+ > assert.sameValue(2n * { > valueOf: null, >+ > toString: function() { > return 2n; > } >-}, 4n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 4n, 'The result of (2n * {valueOf: null, toString: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}) * 2n, 4n, "ToPrimitive: skip valueOf when it's not callable"); >+} * 2n, 4n, 'The result of (({valueOf: 1, toString: function() {return 2n;}}) * 2n) is 4n'); >+ > assert.sameValue(2n * { > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}, 4n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 4n, 'The result of (2n * {valueOf: 1, toString: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}) * 2n, 4n, "ToPrimitive: skip valueOf when it's not callable"); >+} * 2n, 4n, 'The result of (({valueOf: {}, toString: function() {return 2n;}}) * 2n) is 4n'); >+ > assert.sameValue(2n * { > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}, 4n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 4n, 'The result of (2n * {valueOf: {}, toString: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}) * 2n, 4n, "ToPrimitive: skip valueOf when it returns an object"); >+} * 2n, 4n, 'The result of (({valueOf: function() {return {};}, toString: function() {return 2n;}}) * 2n) is 4n'); >+ > assert.sameValue(2n * { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}, 4n, "ToPrimitive: skip valueOf when it returns an object"); >-assert.sameValue(({ >+}, 4n, 'The result of (2n * {valueOf: function() {return {};}, toString: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}) * 2n, 4n, "ToPrimitive: skip valueOf when it returns an object"); >+} * 2n, 4n, 'The result of (({valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) * 2n) is 4n'); >+ > assert.sameValue(2n * { > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}, 4n, "ToPrimitive: skip valueOf when it returns an object"); >+}, 4n, 'The result of (2n * {valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) is 4n'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: 1 > }) * 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: 1}) * 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n * { > [Symbol.toPrimitive]: 1 > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n * {[Symbol.toPrimitive]: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: {} > }) * 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: {}}) * 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n * { > [Symbol.toPrimitive]: {} > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n * {[Symbol.toPrimitive]: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return Object(1); > } > }) * 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return Object(1);}}) * 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n * { > [Symbol.toPrimitive]: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n * {[Symbol.toPrimitive]: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return {}; > } > }) * 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return {};}}) * 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n * { > [Symbol.toPrimitive]: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n * {[Symbol.toPrimitive]: function() {return {};}} throws TypeError'); >+ > assert.throws(MyError, function() { > ({ > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }) * 0n; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '({[Symbol.toPrimitive]: function() {throw new MyError();}}) * 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n * { > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '0n * {[Symbol.toPrimitive]: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > valueOf: function() { > throw new MyError(); > } > }) * 0n; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '({valueOf: function() {throw new MyError();}}) * 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n * { > valueOf: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '0n * {valueOf: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > toString: function() { > throw new MyError(); > } > }) * 0n; >-}, "ToPrimitive: propagate errors from toString"); >+}, '({toString: function() {throw new MyError();}}) * 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n * { > toString: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from toString"); >+}, '0n * {toString: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: null, > toString: null > }) * 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: null, toString: null}) * 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n * { > valueOf: null, > toString: null > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n * {valueOf: null, toString: null} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: 1, > toString: 1 > }) * 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: 1, toString: 1}) * 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n * { > valueOf: 1, > toString: 1 > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n * {valueOf: 1, toString: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: {}, > toString: {} > }) * 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: {}, toString: {}}) * 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n * { > valueOf: {}, > toString: {} > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n * {valueOf: {}, toString: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }) * 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return Object(1);}, toString: function() {return Object(1);}}) * 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n * { > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n * {valueOf: function() {return Object(1);}, toString: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }) * 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return {};}, toString: function() {return {};}}) * 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n * { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n * {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/multiplication/bigint-wrapped-values.js b/JSTests/test262/test/language/expressions/multiplication/bigint-wrapped-values.js >index 2421ee83a704540b69c296670a2ec3c47cd1f6b6..5a5c5506aedd3ce447f9a81c5fa8df157a6e4a85 100644 >--- a/JSTests/test262/test/language/expressions/multiplication/bigint-wrapped-values.js >+++ b/JSTests/test262/test/language/expressions/multiplication/bigint-wrapped-values.js >@@ -5,36 +5,41 @@ > esid: sec-multiplicative-operators-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >+assert.sameValue(Object(2n) * 2n, 4n, 'The result of (Object(2n) * 2n) is 4n'); >+assert.sameValue(2n * Object(2n), 4n, 'The result of (2n * Object(2n)) is 4n'); > >-assert.sameValue(Object(2n) * 2n, 4n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(2n * Object(2n), 4n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > } >-}) * 2n, 4n, "ToPrimitive: @@toPrimitive"); >+} * 2n, 4n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}}) * 2n) is 4n'); >+ > assert.sameValue(2n * { > [Symbol.toPrimitive]: function() { > return 2n; > } >-}, 4n, "ToPrimitive: @@toPrimitive"); >-assert.sameValue(({ >+}, 4n, 'The result of (2n * {[Symbol.toPrimitive]: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > } >-}) * 2n, 4n, "ToPrimitive: valueOf"); >+} * 2n, 4n, 'The result of (({valueOf: function() {return 2n;}}) * 2n) is 4n'); >+ > assert.sameValue(2n * { > valueOf: function() { > return 2n; > } >-}, 4n, "ToPrimitive: valueOf"); >-assert.sameValue(({ >+}, 4n, 'The result of (2n * {valueOf: function() {return 2n;}}) is 4n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) * 2n, 4n, "ToPrimitive: toString"); >+} * 2n, 4n, 'The result of (({toString: function() {return 2n;}}) * 2n) is 4n'); >+ > assert.sameValue(2n * { > toString: function() { > return 2n; > } >-}, 4n, "ToPrimitive: toString"); >+}, 4n, 'The result of (2n * {toString: function() {return 2n;}}) is 4n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/right-shift/bigint-and-number.js b/JSTests/test262/test/language/expressions/right-shift/bigint-and-number.js >index e8dde0473b9dc10698e0c4f528896153e50d7e89..81ca9f27579e1c25758ddef34234c0cc9dd98149 100644 >--- a/JSTests/test262/test/language/expressions/right-shift/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/right-shift/bigint-and-number.js >@@ -9,24 +9,82 @@ > Let rnum be ? ToNumeric(rightValue). > If Type(lnum) does not equal Type(rnum), throw a TypeError exception. > ---*/ >+assert.throws(TypeError, function() { >+ 1n >> 1; >+}, '1n >> 1 throws TypeError'); > >-assert.throws(TypeError, function() { 1n >> 1; }, "1n >> 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 >> 1n; }, "1 >> 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) >> 1; }, "Object(1n) >> 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 >> Object(1n); }, "1 >> Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n >> Object(1); }, "1n >> Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) >> 1n; }, "Object(1) >> 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) >> Object(1); }, "Object(1n) >> Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) >> Object(1n); }, "Object(1) >> Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n >> NaN; }, "1n >> NaN throws TypeError"); >-assert.throws(TypeError, function() { NaN >> 1n; }, "NaN >> 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n >> Infinity; }, "1n >> Infinity throws TypeError"); >-assert.throws(TypeError, function() { Infinity >> 1n; }, "Infinity >> 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n >> true; }, "1n >> true throws TypeError"); >-assert.throws(TypeError, function() { true >> 1n; }, "true >> 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n >> "1"; }, '1n >> "1" throws TypeError'); >-assert.throws(TypeError, function() { "1" >> 1n; }, '"1" >> 1n throws TypeError'); >-assert.throws(TypeError, function() { 1n >> null; }, "1n >> null throws TypeError"); >-assert.throws(TypeError, function() { null >> 1n; }, "null >> 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n >> undefined; }, "1n >> undefined throws TypeError"); >-assert.throws(TypeError, function() { undefined >> 1n; }, "undefined >> 1n throws TypeError"); >+assert.throws(TypeError, function() { >+ 1 >> 1n; >+}, '1 >> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) >> 1; >+}, 'Object(1n) >> 1 throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1 >> Object(1n); >+}, '1 >> Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n >> Object(1); >+}, '1n >> Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) >> 1n; >+}, 'Object(1) >> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) >> Object(1); >+}, 'Object(1n) >> Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) >> Object(1n); >+}, 'Object(1) >> Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n >> NaN; >+}, '1n >> NaN throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ NaN >> 1n; >+}, 'NaN >> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n >> Infinity; >+}, '1n >> Infinity throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Infinity >> 1n; >+}, 'Infinity >> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n >> true; >+}, '1n >> true throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ true >> 1n; >+}, 'true >> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n >> '1'; >+}, '1n >> "1" throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ '1' >> 1n; >+}, '"1" >> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n >> null; >+}, '1n >> null throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ null >> 1n; >+}, 'null >> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n >> undefined; >+}, '1n >> undefined throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ undefined >> 1n; >+}, 'undefined >> 1n throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/right-shift/bigint-errors.js b/JSTests/test262/test/language/expressions/right-shift/bigint-errors.js >index c7c7371cd975985c1108fce08304002df7862ff9..a5e77bc4e192491103beec5af9590d95d5c3f5a7 100644 >--- a/JSTests/test262/test/language/expressions/right-shift/bigint-errors.js >+++ b/JSTests/test262/test/language/expressions/right-shift/bigint-errors.js >@@ -5,58 +5,66 @@ > esid: sec-signed-right-shift-operator-runtime-semantics-evaluation > features: [BigInt, Symbol, Symbol.toPrimitive, computed-property-names] > ---*/ >- > assert.throws(TypeError, function() { >- Symbol("1") >> 0n; >-}, "ToBigInt: Symbol => TypeError"); >+ Symbol('1') >> 0n; >+}, 'Symbol("1") >> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n >> Symbol("1"); >-}, "ToBigInt: Symbol => TypeError"); >+ 0n >> Symbol('1'); >+}, '0n >> Symbol("1") throws TypeError'); >+ > assert.throws(TypeError, function() { >- Object(Symbol("1")) >> 0n; >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ Object(Symbol('1')) >> 0n; >+}, 'Object(Symbol("1")) >> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n >> Object(Symbol("1")); >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ 0n >> Object(Symbol('1')); >+}, '0n >> Object(Symbol("1")) throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) >> 0n; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '({[Symbol.toPrimitive]: function() {return Symbol("1");}}) >> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >> { > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '0n >> {[Symbol.toPrimitive]: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) >> 0n; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '({valueOf: function() {return Symbol("1");}}) >> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >> { > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '0n >> {valueOf: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) >> 0n; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '({toString: function() {return Symbol("1");}}) >> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >> { > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '0n >> {toString: function() {return Symbol("1");}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/right-shift/bigint-non-primitive.js b/JSTests/test262/test/language/expressions/right-shift/bigint-non-primitive.js >index 6a44f7b03ba5cc693acfdf47c55884bd773f83be..7abdca846ed0e869b45b0e37805af34e5024b0ca 100644 >--- a/JSTests/test262/test/language/expressions/right-shift/bigint-non-primitive.js >+++ b/JSTests/test262/test/language/expressions/right-shift/bigint-non-primitive.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Right shift for non-primitive BigInt values > esid: sec-signed-right-shift-operator-runtime-semantics-evaluation >@@ -19,32 +18,70 @@ > > features: [BigInt, Symbol.toPrimitive] > ---*/ >+assert.sameValue(Object(0b101n) >> 1n, 0b10n, 'The result of (Object(0b101n) >> 1n) is 0b10n'); > >-assert.sameValue(Object(0b101n) >> 1n, 0b10n, "Object(0b101n) >> 1n === 0b10n"); >-assert.sameValue(Object(0b101n) >> Object(1n), 0b10n, "Object(0b101n) >> Object(1n) === 0b10n"); >+assert.sameValue( >+ Object(0b101n) >> Object(1n), >+ 0b10n, >+ 'The result of (Object(0b101n) >> Object(1n)) is 0b10n' >+); > > function err() { > throw new Test262Error(); > } > >-assert.sameValue( >- {[Symbol.toPrimitive]: function() { return 0b101n; }, valueOf: err, toString: err} >> 1n, 0b10n, >- "primitive from @@toPrimitive"); >-assert.sameValue( >- {valueOf: function() { return 0b101n; }, toString: err} >> 1n, 0b10n, >- "primitive from {}.valueOf"); >-assert.sameValue( >- {toString: function() { return 0b101n; }} >> 1n, 0b10n, >- "primitive from {}.toString"); >-assert.sameValue( >- 0b101n >> {[Symbol.toPrimitive]: function() { return 1n; }, valueOf: err, toString: err}, 0b10n, >- "primitive from @@toPrimitive"); >-assert.sameValue( >- 0b101n >> {valueOf: function() { return 1n; }, toString: err}, 0b10n, >- "primitive from {}.valueOf"); >-assert.sameValue( >- 0b101n >> {toString: function() { return 1n; }}, 0b10n, >- "primitive from {}.toString"); >-assert.sameValue( >- {valueOf: function() { return 0b101n; }} >> {valueOf: function() { return 1n; }}, 0b10n, >- "primitive from {}.valueOf"); >+assert.sameValue({ >+ [Symbol.toPrimitive]: function() { >+ return 0b101n; >+ }, >+ >+ valueOf: err, >+ toString: err >+} >> 1n, 0b10n, 'The result of (({[Symbol.toPrimitive]: function() {return 0b101n;}, valueOf: err, toString: err}) >> 1n) is 0b10n'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 0b101n; >+ }, >+ >+ toString: err >+} >> 1n, 0b10n, 'The result of (({valueOf: function() {return 0b101n;}, toString: err}) >> 1n) is 0b10n'); >+ >+assert.sameValue({ >+ toString: function() { >+ return 0b101n; >+ } >+} >> 1n, 0b10n, 'The result of (({toString: function() {return 0b101n;}}) >> 1n) is 0b10n'); >+ >+assert.sameValue(0b101n >> { >+ [Symbol.toPrimitive]: function() { >+ return 1n; >+ }, >+ >+ valueOf: err, >+ toString: err >+}, 0b10n, 'The result of (0b101n >> {[Symbol.toPrimitive]: function() {return 1n;}, valueOf: err, toString: err}) is 0b10n'); >+ >+assert.sameValue(0b101n >> { >+ valueOf: function() { >+ return 1n; >+ }, >+ >+ toString: err >+}, 0b10n, 'The result of (0b101n >> {valueOf: function() {return 1n;}, toString: err}) is 0b10n'); >+ >+assert.sameValue(0b101n >> { >+ toString: function() { >+ return 1n; >+ } >+}, 0b10n, 'The result of (0b101n >> {toString: function() {return 1n;}}) is 0b10n'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 0b101n; >+ } >+} >> { >+ valueOf: function() { >+ return 1n; >+ } >+}, 0b10n, 'The result of (({valueOf: function() {return 0b101n;}}) >> {valueOf: function() {return 1n;}}) is 0b10n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/right-shift/bigint-toprimitive.js b/JSTests/test262/test/language/expressions/right-shift/bigint-toprimitive.js >index 3d40f35b2de8b6beab335888b5eab7bb0dcb0a42..a1dd9746f79fb15fc829517842dca267f9abc747 100644 >--- a/JSTests/test262/test/language/expressions/right-shift/bigint-toprimitive.js >+++ b/JSTests/test262/test/language/expressions/right-shift/bigint-toprimitive.js >@@ -5,304 +5,368 @@ > esid: sec-signed-right-shift-operator-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >- > function err() { > throw new Test262Error(); > } > > function MyError() {} > >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}) >> 1n, 1n, "ToPrimitive: @@toPrimitive takes precedence"); >+} >> 1n, 1n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) >> 1n) is 1n'); >+ > assert.sameValue(4n >> { > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}, 1n, "ToPrimitive: @@toPrimitive takes precedence"); >-assert.sameValue(({ >+}, 1n, 'The result of (4n >> {[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > }, >+ > toString: err >-}) >> 1n, 1n, "ToPrimitive: valueOf takes precedence over toString"); >+} >> 1n, 1n, 'The result of (({valueOf: function() {return 2n;}, toString: err}) >> 1n) is 1n'); >+ > assert.sameValue(4n >> { > valueOf: function() { > return 2n; > }, >+ > toString: err >-}, 1n, "ToPrimitive: valueOf takes precedence over toString"); >-assert.sameValue(({ >+}, 1n, 'The result of (4n >> {valueOf: function() {return 2n;}, toString: err}) is 1n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) >> 1n, 1n, "ToPrimitive: toString with no valueOf"); >+} >> 1n, 1n, 'The result of (({toString: function() {return 2n;}}) >> 1n) is 1n'); >+ > assert.sameValue(4n >> { > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: toString with no valueOf"); >-assert.sameValue(({ >+}, 1n, 'The result of (4n >> {toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}) >> 1n, 1n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >+} >> 1n, 1n, 'The result of (({[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) >> 1n) is 1n'); >+ > assert.sameValue(4n >> { > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >-assert.sameValue(({ >+}, 1n, 'The result of (4n >> {[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}) >> 1n, 1n, "ToPrimitive: skip @@toPrimitive when it's null"); >+} >> 1n, 1n, 'The result of (({[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) >> 1n) is 1n'); >+ > assert.sameValue(4n >> { > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip @@toPrimitive when it's null"); >-assert.sameValue(({ >+}, 1n, 'The result of (4n >> {[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: null, >+ > toString: function() { > return 2n; > } >-}) >> 1n, 1n, "ToPrimitive: skip valueOf when it's not callable"); >+} >> 1n, 1n, 'The result of (({valueOf: null, toString: function() {return 2n;}}) >> 1n) is 1n'); >+ > assert.sameValue(4n >> { > valueOf: null, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 1n, 'The result of (4n >> {valueOf: null, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}) >> 1n, 1n, "ToPrimitive: skip valueOf when it's not callable"); >+} >> 1n, 1n, 'The result of (({valueOf: 1, toString: function() {return 2n;}}) >> 1n) is 1n'); >+ > assert.sameValue(4n >> { > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 1n, 'The result of (4n >> {valueOf: 1, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}) >> 1n, 1n, "ToPrimitive: skip valueOf when it's not callable"); >+} >> 1n, 1n, 'The result of (({valueOf: {}, toString: function() {return 2n;}}) >> 1n) is 1n'); >+ > assert.sameValue(4n >> { > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 1n, 'The result of (4n >> {valueOf: {}, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}) >> 1n, 1n, "ToPrimitive: skip valueOf when it returns an object"); >+} >> 1n, 1n, 'The result of (({valueOf: function() {return {};}, toString: function() {return 2n;}}) >> 1n) is 1n'); >+ > assert.sameValue(4n >> { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it returns an object"); >-assert.sameValue(({ >+}, 1n, 'The result of (4n >> {valueOf: function() {return {};}, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}) >> 1n, 1n, "ToPrimitive: skip valueOf when it returns an object"); >+} >> 1n, 1n, 'The result of (({valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) >> 1n) is 1n'); >+ > assert.sameValue(4n >> { > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it returns an object"); >+}, 1n, 'The result of (4n >> {valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) is 1n'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: 1 > }) >> 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: 1}) >> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >> { > [Symbol.toPrimitive]: 1 > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n >> {[Symbol.toPrimitive]: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: {} > }) >> 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: {}}) >> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >> { > [Symbol.toPrimitive]: {} > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n >> {[Symbol.toPrimitive]: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return Object(1); > } > }) >> 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return Object(1);}}) >> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >> { > [Symbol.toPrimitive]: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n >> {[Symbol.toPrimitive]: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return {}; > } > }) >> 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return {};}}) >> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >> { > [Symbol.toPrimitive]: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n >> {[Symbol.toPrimitive]: function() {return {};}} throws TypeError'); >+ > assert.throws(MyError, function() { > ({ > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }) >> 0n; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '({[Symbol.toPrimitive]: function() {throw new MyError();}}) >> 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n >> { > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '0n >> {[Symbol.toPrimitive]: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > valueOf: function() { > throw new MyError(); > } > }) >> 0n; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '({valueOf: function() {throw new MyError();}}) >> 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n >> { > valueOf: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '0n >> {valueOf: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > toString: function() { > throw new MyError(); > } > }) >> 0n; >-}, "ToPrimitive: propagate errors from toString"); >+}, '({toString: function() {throw new MyError();}}) >> 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n >> { > toString: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from toString"); >+}, '0n >> {toString: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: null, > toString: null > }) >> 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: null, toString: null}) >> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >> { > valueOf: null, > toString: null > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n >> {valueOf: null, toString: null} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: 1, > toString: 1 > }) >> 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: 1, toString: 1}) >> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >> { > valueOf: 1, > toString: 1 > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n >> {valueOf: 1, toString: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: {}, > toString: {} > }) >> 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: {}, toString: {}}) >> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >> { > valueOf: {}, > toString: {} > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n >> {valueOf: {}, toString: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }) >> 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return Object(1);}, toString: function() {return Object(1);}}) >> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >> { > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n >> {valueOf: function() {return Object(1);}, toString: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }) >> 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return {};}, toString: function() {return {};}}) >> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >> { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n >> {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/right-shift/bigint-wrapped-values.js b/JSTests/test262/test/language/expressions/right-shift/bigint-wrapped-values.js >index dd0069afb869e034bfc6dcdd8c8186061beb9bef..ad0d6c0d78f928ec2cde7ec601c177ce37ecf07e 100644 >--- a/JSTests/test262/test/language/expressions/right-shift/bigint-wrapped-values.js >+++ b/JSTests/test262/test/language/expressions/right-shift/bigint-wrapped-values.js >@@ -5,36 +5,41 @@ > esid: sec-signed-right-shift-operator-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >+assert.sameValue(Object(2n) >> 1n, 1n, 'The result of (Object(2n) >> 1n) is 1n'); >+assert.sameValue(4n >> Object(2n), 1n, 'The result of (4n >> Object(2n)) is 1n'); > >-assert.sameValue(Object(2n) >> 1n, 1n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(4n >> Object(2n), 1n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > } >-}) >> 1n, 1n, "ToPrimitive: @@toPrimitive"); >+} >> 1n, 1n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}}) >> 1n) is 1n'); >+ > assert.sameValue(4n >> { > [Symbol.toPrimitive]: function() { > return 2n; > } >-}, 1n, "ToPrimitive: @@toPrimitive"); >-assert.sameValue(({ >+}, 1n, 'The result of (4n >> {[Symbol.toPrimitive]: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > } >-}) >> 1n, 1n, "ToPrimitive: valueOf"); >+} >> 1n, 1n, 'The result of (({valueOf: function() {return 2n;}}) >> 1n) is 1n'); >+ > assert.sameValue(4n >> { > valueOf: function() { > return 2n; > } >-}, 1n, "ToPrimitive: valueOf"); >-assert.sameValue(({ >+}, 1n, 'The result of (4n >> {valueOf: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) >> 1n, 1n, "ToPrimitive: toString"); >+} >> 1n, 1n, 'The result of (({toString: function() {return 2n;}}) >> 1n) is 1n'); >+ > assert.sameValue(4n >> { > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: toString"); >+}, 1n, 'The result of (4n >> {toString: function() {return 2n;}}) is 1n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-bigint.js b/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-bigint.js >index 3486a4dd528fe30619329c2317e12acc90147c6a..ab8f7d57f333126234c013f942ad0726051c0ca1 100644 >--- a/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-bigint.js >+++ b/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-bigint.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Strict inequality comparison of BigInt values > esid: sec-strict-equality-comparison >@@ -16,39 +15,158 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n !== 0n, false, 'The result of (0n !== 0n) is false'); >+assert.sameValue(1n !== 1n, false, 'The result of (1n !== 1n) is false'); >+assert.sameValue(-1n !== -1n, false, 'The result of (-1n !== -1n) is false'); >+assert.sameValue(0n !== -0n, false, 'The result of (0n !== -0n) is false'); >+assert.sameValue(-0n !== 0n, false, 'The result of (-0n !== 0n) is false'); >+assert.sameValue(0n !== 1n, true, 'The result of (0n !== 1n) is true'); >+assert.sameValue(1n !== 0n, true, 'The result of (1n !== 0n) is true'); >+assert.sameValue(0n !== -1n, true, 'The result of (0n !== -1n) is true'); >+assert.sameValue(-1n !== 0n, true, 'The result of (-1n !== 0n) is true'); >+assert.sameValue(1n !== -1n, true, 'The result of (1n !== -1n) is true'); >+assert.sameValue(-1n !== 1n, true, 'The result of (-1n !== 1n) is true'); >+ >+assert.sameValue( >+ 0x1fffffffffffff01n !== 0x1fffffffffffff01n, >+ false, >+ 'The result of (0x1fffffffffffff01n !== 0x1fffffffffffff01n) is false' >+); >+ >+assert.sameValue( >+ 0x1fffffffffffff01n !== 0x1fffffffffffff02n, >+ true, >+ 'The result of (0x1fffffffffffff01n !== 0x1fffffffffffff02n) is true' >+); >+ >+assert.sameValue( >+ 0x1fffffffffffff02n !== 0x1fffffffffffff01n, >+ true, >+ 'The result of (0x1fffffffffffff02n !== 0x1fffffffffffff01n) is true' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff01n !== -0x1fffffffffffff01n, >+ false, >+ 'The result of (-0x1fffffffffffff01n !== -0x1fffffffffffff01n) is false' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff01n !== -0x1fffffffffffff02n, >+ true, >+ 'The result of (-0x1fffffffffffff01n !== -0x1fffffffffffff02n) is true' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff02n !== -0x1fffffffffffff01n, >+ true, >+ 'The result of (-0x1fffffffffffff02n !== -0x1fffffffffffff01n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n !== 0n, >+ true, >+ 'The result of (0x10000000000000000n !== 0n) is true' >+); >+ >+assert.sameValue( >+ 0n !== 0x10000000000000000n, >+ true, >+ 'The result of (0n !== 0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n !== 1n, >+ true, >+ 'The result of (0x10000000000000000n !== 1n) is true' >+); >+ >+assert.sameValue( >+ 1n !== 0x10000000000000000n, >+ true, >+ 'The result of (1n !== 0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n !== -1n, >+ true, >+ 'The result of (0x10000000000000000n !== -1n) is true' >+); >+ >+assert.sameValue( >+ -1n !== 0x10000000000000000n, >+ true, >+ 'The result of (-1n !== 0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000001n !== 0n, >+ true, >+ 'The result of (0x10000000000000001n !== 0n) is true' >+); >+ >+assert.sameValue( >+ 0n !== 0x10000000000000001n, >+ true, >+ 'The result of (0n !== 0x10000000000000001n) is true' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n !== 0n, >+ true, >+ 'The result of (-0x10000000000000000n !== 0n) is true' >+); >+ >+assert.sameValue( >+ 0n !== -0x10000000000000000n, >+ true, >+ 'The result of (0n !== -0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n !== 1n, >+ true, >+ 'The result of (-0x10000000000000000n !== 1n) is true' >+); >+ >+assert.sameValue( >+ 1n !== -0x10000000000000000n, >+ true, >+ 'The result of (1n !== -0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n !== -1n, >+ true, >+ 'The result of (-0x10000000000000000n !== -1n) is true' >+); >+ >+assert.sameValue( >+ -1n !== -0x10000000000000000n, >+ true, >+ 'The result of (-1n !== -0x10000000000000000n) is true' >+); >+ >+assert.sameValue( >+ -0x10000000000000001n !== 0n, >+ true, >+ 'The result of (-0x10000000000000001n !== 0n) is true' >+); >+ >+assert.sameValue( >+ 0n !== -0x10000000000000001n, >+ true, >+ 'The result of (0n !== -0x10000000000000001n) is true' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n !== 0x100000000n, >+ true, >+ 'The result of (0x10000000000000000n !== 0x100000000n) is true' >+); > >-assert.sameValue(0n !== 0n, false, "0n !== 0n"); >-assert.sameValue(1n !== 1n, false, "1n !== 1n"); >-assert.sameValue(-1n !== -1n, false, "-1n !== -1n"); >-assert.sameValue(0n !== -0n, false, "0n !== -0n"); >-assert.sameValue(-0n !== 0n, false, "-0n !== 0n"); >-assert.sameValue(0n !== 1n, true, "0n !== 1n"); >-assert.sameValue(1n !== 0n, true, "1n !== 0n"); >-assert.sameValue(0n !== -1n, true, "0n !== -1n"); >-assert.sameValue(-1n !== 0n, true, "-1n !== 0n"); >-assert.sameValue(1n !== -1n, true, "1n !== -1n"); >-assert.sameValue(-1n !== 1n, true, "-1n !== 1n"); >-assert.sameValue(0x1fffffffffffff01n !== 0x1fffffffffffff01n, false, "0x1fffffffffffff01n !== 0x1fffffffffffff01n"); >-assert.sameValue(0x1fffffffffffff01n !== 0x1fffffffffffff02n, true, "0x1fffffffffffff01n !== 0x1fffffffffffff02n"); >-assert.sameValue(0x1fffffffffffff02n !== 0x1fffffffffffff01n, true, "0x1fffffffffffff02n !== 0x1fffffffffffff01n"); >-assert.sameValue(-0x1fffffffffffff01n !== -0x1fffffffffffff01n, false, "-0x1fffffffffffff01n !== -0x1fffffffffffff01n"); >-assert.sameValue(-0x1fffffffffffff01n !== -0x1fffffffffffff02n, true, "-0x1fffffffffffff01n !== -0x1fffffffffffff02n"); >-assert.sameValue(-0x1fffffffffffff02n !== -0x1fffffffffffff01n, true, "-0x1fffffffffffff02n !== -0x1fffffffffffff01n"); >-assert.sameValue(0x10000000000000000n !== 0n, true, "0x10000000000000000n !== 0n"); >-assert.sameValue(0n !== 0x10000000000000000n, true, "0n !== 0x10000000000000000n"); >-assert.sameValue(0x10000000000000000n !== 1n, true, "0x10000000000000000n !== 1n"); >-assert.sameValue(1n !== 0x10000000000000000n, true, "1n !== 0x10000000000000000n"); >-assert.sameValue(0x10000000000000000n !== -1n, true, "0x10000000000000000n !== -1n"); >-assert.sameValue(-1n !== 0x10000000000000000n, true, "-1n !== 0x10000000000000000n"); >-assert.sameValue(0x10000000000000001n !== 0n, true, "0x10000000000000001n !== 0n"); >-assert.sameValue(0n !== 0x10000000000000001n, true, "0n !== 0x10000000000000001n"); >-assert.sameValue(-0x10000000000000000n !== 0n, true, "-0x10000000000000000n !== 0n"); >-assert.sameValue(0n !== -0x10000000000000000n, true, "0n !== -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000000n !== 1n, true, "-0x10000000000000000n !== 1n"); >-assert.sameValue(1n !== -0x10000000000000000n, true, "1n !== -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000000n !== -1n, true, "-0x10000000000000000n !== -1n"); >-assert.sameValue(-1n !== -0x10000000000000000n, true, "-1n !== -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000001n !== 0n, true, "-0x10000000000000001n !== 0n"); >-assert.sameValue(0n !== -0x10000000000000001n, true, "0n !== -0x10000000000000001n"); >-assert.sameValue(0x10000000000000000n !== 0x100000000n, true, "0x10000000000000000n !== 0x100000000n"); >-assert.sameValue(0x100000000n !== 0x10000000000000000n, true, "0x100000000n !== 0x10000000000000000n"); >+assert.sameValue( >+ 0x100000000n !== 0x10000000000000000n, >+ true, >+ 'The result of (0x100000000n !== 0x10000000000000000n) is true' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-boolean.js b/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-boolean.js >index fc33b2bf6a6d2c2930b45beeb9944c232325569b..8259acb3915d1da449f02f383b8e0b149d0ca8af 100644 >--- a/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-boolean.js >+++ b/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-boolean.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Strict inequality comparison of BigInt and Boolean values > esid: sec-strict-equality-comparison >@@ -9,20 +8,19 @@ > > features: [BigInt] > ---*/ >- >-assert.sameValue(-1n !== false, true, "-1n !== false"); >-assert.sameValue(false !== -1n, true, "false !== -1n"); >-assert.sameValue(-1n !== true, true, "-1n !== true"); >-assert.sameValue(true !== -1n, true, "true !== -1n"); >-assert.sameValue(0n !== false, true, "0n !== false"); >-assert.sameValue(false !== 0n, true, "false !== 0n"); >-assert.sameValue(0n !== true, true, "0n !== true"); >-assert.sameValue(true !== 0n, true, "true !== 0n"); >-assert.sameValue(1n !== false, true, "1n !== false"); >-assert.sameValue(false !== 1n, true, "false !== 1n"); >-assert.sameValue(1n !== true, true, "1n !== true"); >-assert.sameValue(true !== 1n, true, "true !== 1n"); >-assert.sameValue(2n !== false, true, "2n !== false"); >-assert.sameValue(false !== 2n, true, "false !== 2n"); >-assert.sameValue(2n !== true, true, "2n !== true"); >-assert.sameValue(true !== 2n, true, "true !== 2n"); >+assert.sameValue(-1n !== false, true, 'The result of (-1n !== false) is true'); >+assert.sameValue(false !== -1n, true, 'The result of (false !== -1n) is true'); >+assert.sameValue(-1n !== true, true, 'The result of (-1n !== true) is true'); >+assert.sameValue(true !== -1n, true, 'The result of (true !== -1n) is true'); >+assert.sameValue(0n !== false, true, 'The result of (0n !== false) is true'); >+assert.sameValue(false !== 0n, true, 'The result of (false !== 0n) is true'); >+assert.sameValue(0n !== true, true, 'The result of (0n !== true) is true'); >+assert.sameValue(true !== 0n, true, 'The result of (true !== 0n) is true'); >+assert.sameValue(1n !== false, true, 'The result of (1n !== false) is true'); >+assert.sameValue(false !== 1n, true, 'The result of (false !== 1n) is true'); >+assert.sameValue(1n !== true, true, 'The result of (1n !== true) is true'); >+assert.sameValue(true !== 1n, true, 'The result of (true !== 1n) is true'); >+assert.sameValue(2n !== false, true, 'The result of (2n !== false) is true'); >+assert.sameValue(false !== 2n, true, 'The result of (false !== 2n) is true'); >+assert.sameValue(2n !== true, true, 'The result of (2n !== true) is true'); >+assert.sameValue(true !== 2n, true, 'The result of (true !== 2n) is true'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-incomparable-primitive.js b/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-incomparable-primitive.js >index 8aa41f663172eb6ddbc7983192be1c4cd4e96f35..26a3012d092787f58626de00ecf93c43b1c9204b 100644 >--- a/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-incomparable-primitive.js >+++ b/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-incomparable-primitive.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Strict inequality comparison of BigInt and miscellaneous primitive values > esid: sec-strict-equality-comparison >@@ -9,16 +8,15 @@ > > features: [BigInt, Symbol] > ---*/ >- >-assert.sameValue(0n !== undefined, true, "0n !== undefined"); >-assert.sameValue(undefined !== 0n, true, "undefined !== 0n"); >-assert.sameValue(1n !== undefined, true, "1n !== undefined"); >-assert.sameValue(undefined !== 1n, true, "undefined !== 1n"); >-assert.sameValue(0n !== null, true, "0n !== null"); >-assert.sameValue(null !== 0n, true, "null !== 0n"); >-assert.sameValue(1n !== null, true, "1n !== null"); >-assert.sameValue(null !== 1n, true, "null !== 1n"); >-assert.sameValue(0n !== Symbol("1"), true, '0n !== Symbol("1")'); >-assert.sameValue(Symbol("1") !== 0n, true, 'Symbol("1") !== 0n'); >-assert.sameValue(1n !== Symbol("1"), true, '1n !== Symbol("1")'); >-assert.sameValue(Symbol("1") !== 1n, true, 'Symbol("1") !== 1n'); >+assert.sameValue(0n !== undefined, true, 'The result of (0n !== undefined) is true'); >+assert.sameValue(undefined !== 0n, true, 'The result of (undefined !== 0n) is true'); >+assert.sameValue(1n !== undefined, true, 'The result of (1n !== undefined) is true'); >+assert.sameValue(undefined !== 1n, true, 'The result of (undefined !== 1n) is true'); >+assert.sameValue(0n !== null, true, 'The result of (0n !== null) is true'); >+assert.sameValue(null !== 0n, true, 'The result of (null !== 0n) is true'); >+assert.sameValue(1n !== null, true, 'The result of (1n !== null) is true'); >+assert.sameValue(null !== 1n, true, 'The result of (null !== 1n) is true'); >+assert.sameValue(0n !== Symbol('1'), true, 'The result of (0n !== Symbol("1")) is true'); >+assert.sameValue(Symbol('1') !== 0n, true, 'The result of (Symbol("1") !== 0n) is true'); >+assert.sameValue(1n !== Symbol('1'), true, 'The result of (1n !== Symbol("1")) is true'); >+assert.sameValue(Symbol('1') !== 1n, true, 'The result of (Symbol("1") !== 1n) is true'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-non-finite.js b/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-non-finite.js >index 52708d8e94ee7cd7a1f785e7a961a36f10f2b91b..0bf8148eae8b70f46a0cef72686681a66dbac9a9 100644 >--- a/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-non-finite.js >+++ b/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-non-finite.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Strict inequality comparison of BigInt and non-finite Number values > esid: sec-strict-equality-comparison >@@ -9,22 +8,21 @@ > > features: [BigInt] > ---*/ >- >-assert.sameValue(0n !== Infinity, true, "0n !== Infinity"); >-assert.sameValue(Infinity !== 0n, true, "Infinity !== 0n"); >-assert.sameValue(1n !== Infinity, true, "1n !== Infinity"); >-assert.sameValue(Infinity !== 1n, true, "Infinity !== 1n"); >-assert.sameValue(-1n !== Infinity, true, "-1n !== Infinity"); >-assert.sameValue(Infinity !== -1n, true, "Infinity !== -1n"); >-assert.sameValue(0n !== -Infinity, true, "0n !== -Infinity"); >-assert.sameValue(-Infinity !== 0n, true, "-Infinity !== 0n"); >-assert.sameValue(1n !== -Infinity, true, "1n !== -Infinity"); >-assert.sameValue(-Infinity !== 1n, true, "-Infinity !== 1n"); >-assert.sameValue(-1n !== -Infinity, true, "-1n !== -Infinity"); >-assert.sameValue(-Infinity !== -1n, true, "-Infinity !== -1n"); >-assert.sameValue(0n !== NaN, true, "0n !== NaN"); >-assert.sameValue(NaN !== 0n, true, "NaN !== 0n"); >-assert.sameValue(1n !== NaN, true, "1n !== NaN"); >-assert.sameValue(NaN !== 1n, true, "NaN !== 1n"); >-assert.sameValue(-1n !== NaN, true, "-1n !== NaN"); >-assert.sameValue(NaN !== -1n, true, "NaN !== -1n"); >+assert.sameValue(0n !== Infinity, true, 'The result of (0n !== Infinity) is true'); >+assert.sameValue(Infinity !== 0n, true, 'The result of (Infinity !== 0n) is true'); >+assert.sameValue(1n !== Infinity, true, 'The result of (1n !== Infinity) is true'); >+assert.sameValue(Infinity !== 1n, true, 'The result of (Infinity !== 1n) is true'); >+assert.sameValue(-1n !== Infinity, true, 'The result of (-1n !== Infinity) is true'); >+assert.sameValue(Infinity !== -1n, true, 'The result of (Infinity !== -1n) is true'); >+assert.sameValue(0n !== -Infinity, true, 'The result of (0n !== -Infinity) is true'); >+assert.sameValue(-Infinity !== 0n, true, 'The result of (-Infinity !== 0n) is true'); >+assert.sameValue(1n !== -Infinity, true, 'The result of (1n !== -Infinity) is true'); >+assert.sameValue(-Infinity !== 1n, true, 'The result of (-Infinity !== 1n) is true'); >+assert.sameValue(-1n !== -Infinity, true, 'The result of (-1n !== -Infinity) is true'); >+assert.sameValue(-Infinity !== -1n, true, 'The result of (-Infinity !== -1n) is true'); >+assert.sameValue(0n !== NaN, true, 'The result of (0n !== NaN) is true'); >+assert.sameValue(NaN !== 0n, true, 'The result of (NaN !== 0n) is true'); >+assert.sameValue(1n !== NaN, true, 'The result of (1n !== NaN) is true'); >+assert.sameValue(NaN !== 1n, true, 'The result of (NaN !== 1n) is true'); >+assert.sameValue(-1n !== NaN, true, 'The result of (-1n !== NaN) is true'); >+assert.sameValue(NaN !== -1n, true, 'The result of (NaN !== -1n) is true'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-number-extremes.js b/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-number-extremes.js >index 6449e350cd9ae23969e03fcbd4f0d0dc7eb9d08c..74f82676ecff394cbd31a05803913e824d8a46ca 100644 >--- a/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-number-extremes.js >+++ b/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-number-extremes.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Strict inequality comparison of BigInt and large Number values > esid: sec-strict-equality-comparison >@@ -9,32 +8,53 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(1n !== Number.MAX_VALUE, true, 'The result of (1n !== Number.MAX_VALUE) is true'); >+assert.sameValue(Number.MAX_VALUE !== 1n, true, 'The result of (Number.MAX_VALUE !== 1n) is true'); >+ >+assert.sameValue( >+ 1n !== -Number.MAX_VALUE, >+ true, >+ 'The result of (1n !== -Number.MAX_VALUE) is true' >+); >+ >+assert.sameValue( >+ -Number.MAX_VALUE !== 1n, >+ true, >+ 'The result of (-Number.MAX_VALUE !== 1n) is true' >+); > >-assert.sameValue(1n !== Number.MAX_VALUE, true, "1n !== Number.MAX_VALUE"); >-assert.sameValue(Number.MAX_VALUE !== 1n, true, "Number.MAX_VALUE !== 1n"); >-assert.sameValue(1n !== -Number.MAX_VALUE, true, "1n !== -Number.MAX_VALUE"); >-assert.sameValue(-Number.MAX_VALUE !== 1n, true, "-Number.MAX_VALUE !== 1n"); > assert.sameValue( > 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn !== Number.MAX_VALUE, > true, >- "0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn !== Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn !== Number.MAX_VALUE) is true' >+); >+ > assert.sameValue( > Number.MAX_VALUE !== 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn, > true, >- "Number.MAX_VALUE !== 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn"); >+ 'The result of (Number.MAX_VALUE !== 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn) is true' >+); >+ > assert.sameValue( > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n !== Number.MAX_VALUE, > true, >- "0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n !== Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n !== Number.MAX_VALUE) is true' >+); >+ > assert.sameValue( > Number.MAX_VALUE !== 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n, > true, >- "Number.MAX_VALUE !== 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n"); >+ 'The result of (Number.MAX_VALUE !== 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n) is true' >+); >+ > assert.sameValue( > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n !== Number.MAX_VALUE, > true, >- "0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n !== Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n !== Number.MAX_VALUE) is true' >+); >+ > assert.sameValue( > Number.MAX_VALUE !== 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n, > true, >- "Number.MAX_VALUE !== 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n"); >+ 'The result of (Number.MAX_VALUE !== 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n) is true' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-number.js b/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-number.js >index eb3f991ed78a8ec1edffa5209318d87cba098dda..26146460553f10001b34599a6ad352a44f64417b 100644 >--- a/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-number.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Strict inequality comparison of BigInt and Number values > esid: sec-strict-equality-comparison >@@ -9,24 +8,43 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n !== 0, true, 'The result of (0n !== 0) is true'); >+assert.sameValue(0 !== 0n, true, 'The result of (0 !== 0n) is true'); >+assert.sameValue(0n !== -0, true, 'The result of (0n !== -0) is true'); >+assert.sameValue(-0 !== 0n, true, 'The result of (-0 !== 0n) is true'); >+assert.sameValue(0n !== 0.000000000001, true, 'The result of (0n !== 0.000000000001) is true'); >+assert.sameValue(0.000000000001 !== 0n, true, 'The result of (0.000000000001 !== 0n) is true'); >+assert.sameValue(0n !== 1, true, 'The result of (0n !== 1) is true'); >+assert.sameValue(1 !== 0n, true, 'The result of (1 !== 0n) is true'); >+assert.sameValue(1n !== 0, true, 'The result of (1n !== 0) is true'); >+assert.sameValue(0 !== 1n, true, 'The result of (0 !== 1n) is true'); >+assert.sameValue(1n !== 0.999999999999, true, 'The result of (1n !== 0.999999999999) is true'); >+assert.sameValue(0.999999999999 !== 1n, true, 'The result of (0.999999999999 !== 1n) is true'); >+assert.sameValue(1n !== 1, true, 'The result of (1n !== 1) is true'); >+assert.sameValue(1 !== 1n, true, 'The result of (1 !== 1n) is true'); >+assert.sameValue(0n !== Number.MIN_VALUE, true, 'The result of (0n !== Number.MIN_VALUE) is true'); >+assert.sameValue(Number.MIN_VALUE !== 0n, true, 'The result of (Number.MIN_VALUE !== 0n) is true'); >+ >+assert.sameValue( >+ 0n !== -Number.MIN_VALUE, >+ true, >+ 'The result of (0n !== -Number.MIN_VALUE) is true' >+); >+ >+assert.sameValue( >+ -Number.MIN_VALUE !== 0n, >+ true, >+ 'The result of (-Number.MIN_VALUE !== 0n) is true' >+); >+ >+assert.sameValue( >+ -10n !== Number.MIN_VALUE, >+ true, >+ 'The result of (-10n !== Number.MIN_VALUE) is true' >+); > >-assert.sameValue(0n !== 0, true, "0n !== 0"); >-assert.sameValue(0 !== 0n, true, "0 !== 0n"); >-assert.sameValue(0n !== -0, true, "0n !== -0"); >-assert.sameValue(-0 !== 0n, true, "-0 !== 0n"); >-assert.sameValue(0n !== 0.000000000001, true, "0n !== 0.000000000001"); >-assert.sameValue(0.000000000001 !== 0n, true, "0.000000000001 !== 0n"); >-assert.sameValue(0n !== 1, true, "0n !== 1"); >-assert.sameValue(1 !== 0n, true, "1 !== 0n"); >-assert.sameValue(1n !== 0, true, "1n !== 0"); >-assert.sameValue(0 !== 1n, true, "0 !== 1n"); >-assert.sameValue(1n !== 0.999999999999, true, "1n !== 0.999999999999"); >-assert.sameValue(0.999999999999 !== 1n, true, "0.999999999999 !== 1n"); >-assert.sameValue(1n !== 1, true, "1n !== 1"); >-assert.sameValue(1 !== 1n, true, "1 !== 1n"); >-assert.sameValue(0n !== Number.MIN_VALUE, true, "0n !== Number.MIN_VALUE"); >-assert.sameValue(Number.MIN_VALUE !== 0n, true, "Number.MIN_VALUE !== 0n"); >-assert.sameValue(0n !== -Number.MIN_VALUE, true, "0n !== -Number.MIN_VALUE"); >-assert.sameValue(-Number.MIN_VALUE !== 0n, true, "-Number.MIN_VALUE !== 0n"); >-assert.sameValue(-10n !== Number.MIN_VALUE, true, "-10n !== Number.MIN_VALUE"); >-assert.sameValue(Number.MIN_VALUE !== -10n, true, "Number.MIN_VALUE !== -10n"); >+assert.sameValue( >+ Number.MIN_VALUE !== -10n, >+ true, >+ 'The result of (Number.MIN_VALUE !== -10n) is true' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-object.js b/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-object.js >index 4121f5dddcafaa9c541ccb862f427293f1acc4e6..73b992803db3b682f9b863524ff800f323cdb41a 100644 >--- a/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-object.js >+++ b/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-object.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Strict inequality comparison of BigInt values and non-primitive objects > esid: sec-strict-equality-comparison >@@ -9,36 +8,115 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n !== Object(0n), true, 'The result of (0n !== Object(0n)) is true'); >+assert.sameValue(Object(0n) !== 0n, true, 'The result of (Object(0n) !== 0n) is true'); >+assert.sameValue(0n !== Object(1n), true, 'The result of (0n !== Object(1n)) is true'); >+assert.sameValue(Object(1n) !== 0n, true, 'The result of (Object(1n) !== 0n) is true'); >+assert.sameValue(1n !== Object(0n), true, 'The result of (1n !== Object(0n)) is true'); >+assert.sameValue(Object(0n) !== 1n, true, 'The result of (Object(0n) !== 1n) is true'); >+assert.sameValue(1n !== Object(1n), true, 'The result of (1n !== Object(1n)) is true'); >+assert.sameValue(Object(1n) !== 1n, true, 'The result of (Object(1n) !== 1n) is true'); >+assert.sameValue(2n !== Object(0n), true, 'The result of (2n !== Object(0n)) is true'); >+assert.sameValue(Object(0n) !== 2n, true, 'The result of (Object(0n) !== 2n) is true'); >+assert.sameValue(2n !== Object(1n), true, 'The result of (2n !== Object(1n)) is true'); >+assert.sameValue(Object(1n) !== 2n, true, 'The result of (Object(1n) !== 2n) is true'); >+assert.sameValue(2n !== Object(2n), true, 'The result of (2n !== Object(2n)) is true'); >+assert.sameValue(Object(2n) !== 2n, true, 'The result of (Object(2n) !== 2n) is true'); >+assert.sameValue(0n !== {}, true, 'The result of (0n !== {}) is true'); >+assert.sameValue({} !== 0n, true, 'The result of (({}) !== 0n) is true'); >+ >+assert.sameValue(0n !== { >+ valueOf: function() { >+ return 0n; >+ } >+}, true, 'The result of (0n !== {valueOf: function() {return 0n;}}) is true'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 0n; >+ } >+} !== 0n, true, 'The result of (({valueOf: function() {return 0n;}}) !== 0n) is true'); >+ >+assert.sameValue(0n !== { >+ valueOf: function() { >+ return 1n; >+ } >+}, true, 'The result of (0n !== {valueOf: function() {return 1n;}}) is true'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 1n; >+ } >+} !== 0n, true, 'The result of (({valueOf: function() {return 1n;}}) !== 0n) is true'); >+ >+assert.sameValue(0n !== { >+ toString: function() { >+ return '0'; >+ } >+}, true, 'The result of (0n !== {toString: function() {return "0";}}) is true'); >+ >+assert.sameValue({ >+ toString: function() { >+ return '0'; >+ } >+} !== 0n, true, 'The result of (({toString: function() {return "0";}}) !== 0n) is true'); >+ >+assert.sameValue(0n !== { >+ toString: function() { >+ return '1'; >+ } >+}, true, 'The result of (0n !== {toString: function() {return "1";}}) is true'); >+ >+assert.sameValue({ >+ toString: function() { >+ return '1'; >+ } >+} !== 0n, true, 'The result of (({toString: function() {return "1";}}) !== 0n) is true'); >+ >+assert.sameValue(900719925474099101n !== { >+ valueOf: function() { >+ return 900719925474099101n; >+ } >+}, true, 'The result of (900719925474099101n !== {valueOf: function() {return 900719925474099101n;}}) is true'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 900719925474099101n; >+ } >+} !== 900719925474099101n, true, 'The result of (({valueOf: function() {return 900719925474099101n;}}) !== 900719925474099101n) is true'); >+ >+assert.sameValue(900719925474099101n !== { >+ valueOf: function() { >+ return 900719925474099102n; >+ } >+}, true, 'The result of (900719925474099101n !== {valueOf: function() {return 900719925474099102n;}}) is true'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 900719925474099102n; >+ } >+} !== 900719925474099101n, true, 'The result of (({valueOf: function() {return 900719925474099102n;}}) !== 900719925474099101n) is true'); >+ >+assert.sameValue(900719925474099101n !== { >+ toString: function() { >+ return '900719925474099101'; >+ } >+}, true, 'The result of (900719925474099101n !== {toString: function() {return "900719925474099101";}}) is true'); >+ >+assert.sameValue({ >+ toString: function() { >+ return '900719925474099101'; >+ } >+} !== 900719925474099101n, true, 'The result of (({toString: function() {return "900719925474099101";}}) !== 900719925474099101n) is true'); >+ >+assert.sameValue(900719925474099101n !== { >+ toString: function() { >+ return '900719925474099102'; >+ } >+}, true, 'The result of (900719925474099101n !== {toString: function() {return "900719925474099102";}}) is true'); > >-assert.sameValue(0n !== Object(0n), true, "0n !== Object(0n)"); >-assert.sameValue(Object(0n) !== 0n, true, "Object(0n) !== 0n"); >-assert.sameValue(0n !== Object(1n), true, "0n !== Object(1n)"); >-assert.sameValue(Object(1n) !== 0n, true, "Object(1n) !== 0n"); >-assert.sameValue(1n !== Object(0n), true, "1n !== Object(0n)"); >-assert.sameValue(Object(0n) !== 1n, true, "Object(0n) !== 1n"); >-assert.sameValue(1n !== Object(1n), true, "1n !== Object(1n)"); >-assert.sameValue(Object(1n) !== 1n, true, "Object(1n) !== 1n"); >-assert.sameValue(2n !== Object(0n), true, "2n !== Object(0n)"); >-assert.sameValue(Object(0n) !== 2n, true, "Object(0n) !== 2n"); >-assert.sameValue(2n !== Object(1n), true, "2n !== Object(1n)"); >-assert.sameValue(Object(1n) !== 2n, true, "Object(1n) !== 2n"); >-assert.sameValue(2n !== Object(2n), true, "2n !== Object(2n)"); >-assert.sameValue(Object(2n) !== 2n, true, "Object(2n) !== 2n"); >-assert.sameValue(0n !== {}, true, "0n !== {}"); >-assert.sameValue({} !== 0n, true, "{} !== 0n"); >-assert.sameValue(0n !== {valueOf: function() { return 0n; }}, true, "0n !== {valueOf: function() { return 0n; }}"); >-assert.sameValue({valueOf: function() { return 0n; }} !== 0n, true, "{valueOf: function() { return 0n; }} !== 0n"); >-assert.sameValue(0n !== {valueOf: function() { return 1n; }}, true, "0n !== {valueOf: function() { return 1n; }}"); >-assert.sameValue({valueOf: function() { return 1n; }} !== 0n, true, "{valueOf: function() { return 1n; }} !== 0n"); >-assert.sameValue(0n !== {toString: function() { return "0"; }}, true, '0n !== {toString: function() { return "0"; }}'); >-assert.sameValue({toString: function() { return "0"; }} !== 0n, true, '{toString: function() { return "0"; }} !== 0n'); >-assert.sameValue(0n !== {toString: function() { return "1"; }}, true, '0n !== {toString: function() { return "1"; }}'); >-assert.sameValue({toString: function() { return "1"; }} !== 0n, true, '{toString: function() { return "1"; }} !== 0n'); >-assert.sameValue(900719925474099101n !== {valueOf: function() { return 900719925474099101n; }}, true, "900719925474099101n !== {valueOf: function() { return 900719925474099101n; }}"); >-assert.sameValue({valueOf: function() { return 900719925474099101n; }} !== 900719925474099101n, true, "{valueOf: function() { return 900719925474099101n; }} !== 900719925474099101n"); >-assert.sameValue(900719925474099101n !== {valueOf: function() { return 900719925474099102n; }}, true, "900719925474099101n !== {valueOf: function() { return 900719925474099102n; }}"); >-assert.sameValue({valueOf: function() { return 900719925474099102n; }} !== 900719925474099101n, true, "{valueOf: function() { return 900719925474099102n; }} !== 900719925474099101n"); >-assert.sameValue(900719925474099101n !== {toString: function() { return "900719925474099101"; }}, true, '900719925474099101n !== {toString: function() { return "900719925474099101"; }}'); >-assert.sameValue({toString: function() { return "900719925474099101"; }} !== 900719925474099101n, true, '{toString: function() { return "900719925474099101"; }} !== 900719925474099101n'); >-assert.sameValue(900719925474099101n !== {toString: function() { return "900719925474099102"; }}, true, '900719925474099101n !== {toString: function() { return "900719925474099102"; }}'); >-assert.sameValue({toString: function() { return "900719925474099102"; }} !== 900719925474099101n, true, '{toString: function() { return "900719925474099102"; }} !== 900719925474099101n'); >+assert.sameValue({ >+ toString: function() { >+ return '900719925474099102'; >+ } >+} !== 900719925474099101n, true, 'The result of (({toString: function() {return "900719925474099102";}}) !== 900719925474099101n) is true'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-string.js b/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-string.js >index 4be6cd41278465d7da6972f4c8071b1f2a5a8e05..8b1e5e6fb346415f30b8b3a5467d400b68056750 100644 >--- a/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-string.js >+++ b/JSTests/test262/test/language/expressions/strict-does-not-equals/bigint-and-string.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Strict inequality comparison of BigInt and String values > esid: sec-strict-equality-comparison >@@ -9,40 +8,59 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n !== '', true, 'The result of (0n !== "") is true'); >+assert.sameValue('' !== 0n, true, 'The result of ("" !== 0n) is true'); >+assert.sameValue(0n !== '-0', true, 'The result of (0n !== "-0") is true'); >+assert.sameValue('-0' !== 0n, true, 'The result of ("-0" !== 0n) is true'); >+assert.sameValue(0n !== '0', true, 'The result of (0n !== "0") is true'); >+assert.sameValue('0' !== 0n, true, 'The result of ("0" !== 0n) is true'); >+assert.sameValue(0n !== '-1', true, 'The result of (0n !== "-1") is true'); >+assert.sameValue('-1' !== 0n, true, 'The result of ("-1" !== 0n) is true'); >+assert.sameValue(0n !== '1', true, 'The result of (0n !== "1") is true'); >+assert.sameValue('1' !== 0n, true, 'The result of ("1" !== 0n) is true'); >+assert.sameValue(0n !== 'foo', true, 'The result of (0n !== "foo") is true'); >+assert.sameValue('foo' !== 0n, true, 'The result of ("foo" !== 0n) is true'); >+assert.sameValue(1n !== '', true, 'The result of (1n !== "") is true'); >+assert.sameValue('' !== 1n, true, 'The result of ("" !== 1n) is true'); >+assert.sameValue(1n !== '-0', true, 'The result of (1n !== "-0") is true'); >+assert.sameValue('-0' !== 1n, true, 'The result of ("-0" !== 1n) is true'); >+assert.sameValue(1n !== '0', true, 'The result of (1n !== "0") is true'); >+assert.sameValue('0' !== 1n, true, 'The result of ("0" !== 1n) is true'); >+assert.sameValue(1n !== '-1', true, 'The result of (1n !== "-1") is true'); >+assert.sameValue('-1' !== 1n, true, 'The result of ("-1" !== 1n) is true'); >+assert.sameValue(1n !== '1', true, 'The result of (1n !== "1") is true'); >+assert.sameValue('1' !== 1n, true, 'The result of ("1" !== 1n) is true'); >+assert.sameValue(1n !== 'foo', true, 'The result of (1n !== "foo") is true'); >+assert.sameValue('foo' !== 1n, true, 'The result of ("foo" !== 1n) is true'); >+assert.sameValue(-1n !== '-', true, 'The result of (-1n !== "-") is true'); >+assert.sameValue('-' !== -1n, true, 'The result of ("-" !== -1n) is true'); >+assert.sameValue(-1n !== '-0', true, 'The result of (-1n !== "-0") is true'); >+assert.sameValue('-0' !== -1n, true, 'The result of ("-0" !== -1n) is true'); >+assert.sameValue(-1n !== '-1', true, 'The result of (-1n !== "-1") is true'); >+assert.sameValue('-1' !== -1n, true, 'The result of ("-1" !== -1n) is true'); >+assert.sameValue(-1n !== '-foo', true, 'The result of (-1n !== "-foo") is true'); >+assert.sameValue('-foo' !== -1n, true, 'The result of ("-foo" !== -1n) is true'); >+ >+assert.sameValue( >+ 900719925474099101n !== '900719925474099101', >+ true, >+ 'The result of (900719925474099101n !== "900719925474099101") is true' >+); >+ >+assert.sameValue( >+ '900719925474099101' !== 900719925474099101n, >+ true, >+ 'The result of ("900719925474099101" !== 900719925474099101n) is true' >+); >+ >+assert.sameValue( >+ 900719925474099102n !== '900719925474099101', >+ true, >+ 'The result of (900719925474099102n !== "900719925474099101") is true' >+); > >-assert.sameValue(0n !== "", true, '0n !== ""'); >-assert.sameValue("" !== 0n, true, '"" !== 0n'); >-assert.sameValue(0n !== "-0", true, '0n !== "-0"'); >-assert.sameValue("-0" !== 0n, true, '"-0" !== 0n'); >-assert.sameValue(0n !== "0", true, '0n !== "0"'); >-assert.sameValue("0" !== 0n, true, '"0" !== 0n'); >-assert.sameValue(0n !== "-1", true, '0n !== "-1"'); >-assert.sameValue("-1" !== 0n, true, '"-1" !== 0n'); >-assert.sameValue(0n !== "1", true, '0n !== "1"'); >-assert.sameValue("1" !== 0n, true, '"1" !== 0n'); >-assert.sameValue(0n !== "foo", true, '0n !== "foo"'); >-assert.sameValue("foo" !== 0n, true, '"foo" !== 0n'); >-assert.sameValue(1n !== "", true, '1n !== ""'); >-assert.sameValue("" !== 1n, true, '"" !== 1n'); >-assert.sameValue(1n !== "-0", true, '1n !== "-0"'); >-assert.sameValue("-0" !== 1n, true, '"-0" !== 1n'); >-assert.sameValue(1n !== "0", true, '1n !== "0"'); >-assert.sameValue("0" !== 1n, true, '"0" !== 1n'); >-assert.sameValue(1n !== "-1", true, '1n !== "-1"'); >-assert.sameValue("-1" !== 1n, true, '"-1" !== 1n'); >-assert.sameValue(1n !== "1", true, '1n !== "1"'); >-assert.sameValue("1" !== 1n, true, '"1" !== 1n'); >-assert.sameValue(1n !== "foo", true, '1n !== "foo"'); >-assert.sameValue("foo" !== 1n, true, '"foo" !== 1n'); >-assert.sameValue(-1n !== "-", true, '-1n !== "-"'); >-assert.sameValue("-" !== -1n, true, '"-" !== -1n'); >-assert.sameValue(-1n !== "-0", true, '-1n !== "-0"'); >-assert.sameValue("-0" !== -1n, true, '"-0" !== -1n'); >-assert.sameValue(-1n !== "-1", true, '-1n !== "-1"'); >-assert.sameValue("-1" !== -1n, true, '"-1" !== -1n'); >-assert.sameValue(-1n !== "-foo", true, '-1n !== "-foo"'); >-assert.sameValue("-foo" !== -1n, true, '"-foo" !== -1n'); >-assert.sameValue(900719925474099101n !== "900719925474099101", true, '900719925474099101n !== "900719925474099101"'); >-assert.sameValue("900719925474099101" !== 900719925474099101n, true, '"900719925474099101" !== 900719925474099101n'); >-assert.sameValue(900719925474099102n !== "900719925474099101", true, '900719925474099102n !== "900719925474099101"'); >-assert.sameValue("900719925474099101" !== 900719925474099102n, true, '"900719925474099101" !== 900719925474099102n'); >+assert.sameValue( >+ '900719925474099101' !== 900719925474099102n, >+ true, >+ 'The result of ("900719925474099101" !== 900719925474099102n) is true' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/strict-equals/bigint-and-bigint.js b/JSTests/test262/test/language/expressions/strict-equals/bigint-and-bigint.js >index 8d733b37bc879434daa1695855821e1c8162b0da..057f432b0394eac6ff6d6b1d7c04a7a2e3f6dae4 100644 >--- a/JSTests/test262/test/language/expressions/strict-equals/bigint-and-bigint.js >+++ b/JSTests/test262/test/language/expressions/strict-equals/bigint-and-bigint.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Strict equality comparison of BigInt values > esid: sec-strict-equality-comparison >@@ -16,39 +15,158 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n === 0n, true, 'The result of (0n === 0n) is true'); >+assert.sameValue(1n === 1n, true, 'The result of (1n === 1n) is true'); >+assert.sameValue(-1n === -1n, true, 'The result of (-1n === -1n) is true'); >+assert.sameValue(0n === -0n, true, 'The result of (0n === -0n) is true'); >+assert.sameValue(-0n === 0n, true, 'The result of (-0n === 0n) is true'); >+assert.sameValue(0n === 1n, false, 'The result of (0n === 1n) is false'); >+assert.sameValue(1n === 0n, false, 'The result of (1n === 0n) is false'); >+assert.sameValue(0n === -1n, false, 'The result of (0n === -1n) is false'); >+assert.sameValue(-1n === 0n, false, 'The result of (-1n === 0n) is false'); >+assert.sameValue(1n === -1n, false, 'The result of (1n === -1n) is false'); >+assert.sameValue(-1n === 1n, false, 'The result of (-1n === 1n) is false'); >+ >+assert.sameValue( >+ 0x1fffffffffffff01n === 0x1fffffffffffff01n, >+ true, >+ 'The result of (0x1fffffffffffff01n === 0x1fffffffffffff01n) is true' >+); >+ >+assert.sameValue( >+ 0x1fffffffffffff01n === 0x1fffffffffffff02n, >+ false, >+ 'The result of (0x1fffffffffffff01n === 0x1fffffffffffff02n) is false' >+); >+ >+assert.sameValue( >+ 0x1fffffffffffff02n === 0x1fffffffffffff01n, >+ false, >+ 'The result of (0x1fffffffffffff02n === 0x1fffffffffffff01n) is false' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff01n === -0x1fffffffffffff01n, >+ true, >+ 'The result of (-0x1fffffffffffff01n === -0x1fffffffffffff01n) is true' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff01n === -0x1fffffffffffff02n, >+ false, >+ 'The result of (-0x1fffffffffffff01n === -0x1fffffffffffff02n) is false' >+); >+ >+assert.sameValue( >+ -0x1fffffffffffff02n === -0x1fffffffffffff01n, >+ false, >+ 'The result of (-0x1fffffffffffff02n === -0x1fffffffffffff01n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n === 0n, >+ false, >+ 'The result of (0x10000000000000000n === 0n) is false' >+); >+ >+assert.sameValue( >+ 0n === 0x10000000000000000n, >+ false, >+ 'The result of (0n === 0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n === 1n, >+ false, >+ 'The result of (0x10000000000000000n === 1n) is false' >+); >+ >+assert.sameValue( >+ 1n === 0x10000000000000000n, >+ false, >+ 'The result of (1n === 0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n === -1n, >+ false, >+ 'The result of (0x10000000000000000n === -1n) is false' >+); >+ >+assert.sameValue( >+ -1n === 0x10000000000000000n, >+ false, >+ 'The result of (-1n === 0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000001n === 0n, >+ false, >+ 'The result of (0x10000000000000001n === 0n) is false' >+); >+ >+assert.sameValue( >+ 0n === 0x10000000000000001n, >+ false, >+ 'The result of (0n === 0x10000000000000001n) is false' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n === 0n, >+ false, >+ 'The result of (-0x10000000000000000n === 0n) is false' >+); >+ >+assert.sameValue( >+ 0n === -0x10000000000000000n, >+ false, >+ 'The result of (0n === -0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n === 1n, >+ false, >+ 'The result of (-0x10000000000000000n === 1n) is false' >+); >+ >+assert.sameValue( >+ 1n === -0x10000000000000000n, >+ false, >+ 'The result of (1n === -0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ -0x10000000000000000n === -1n, >+ false, >+ 'The result of (-0x10000000000000000n === -1n) is false' >+); >+ >+assert.sameValue( >+ -1n === -0x10000000000000000n, >+ false, >+ 'The result of (-1n === -0x10000000000000000n) is false' >+); >+ >+assert.sameValue( >+ -0x10000000000000001n === 0n, >+ false, >+ 'The result of (-0x10000000000000001n === 0n) is false' >+); >+ >+assert.sameValue( >+ 0n === -0x10000000000000001n, >+ false, >+ 'The result of (0n === -0x10000000000000001n) is false' >+); >+ >+assert.sameValue( >+ 0x10000000000000000n === 0x100000000n, >+ false, >+ 'The result of (0x10000000000000000n === 0x100000000n) is false' >+); > >-assert.sameValue(0n === 0n, true, "0n === 0n"); >-assert.sameValue(1n === 1n, true, "1n === 1n"); >-assert.sameValue(-1n === -1n, true, "-1n === -1n"); >-assert.sameValue(0n === -0n, true, "0n === -0n"); >-assert.sameValue(-0n === 0n, true, "-0n === 0n"); >-assert.sameValue(0n === 1n, false, "0n === 1n"); >-assert.sameValue(1n === 0n, false, "1n === 0n"); >-assert.sameValue(0n === -1n, false, "0n === -1n"); >-assert.sameValue(-1n === 0n, false, "-1n === 0n"); >-assert.sameValue(1n === -1n, false, "1n === -1n"); >-assert.sameValue(-1n === 1n, false, "-1n === 1n"); >-assert.sameValue(0x1fffffffffffff01n === 0x1fffffffffffff01n, true, "0x1fffffffffffff01n === 0x1fffffffffffff01n"); >-assert.sameValue(0x1fffffffffffff01n === 0x1fffffffffffff02n, false, "0x1fffffffffffff01n === 0x1fffffffffffff02n"); >-assert.sameValue(0x1fffffffffffff02n === 0x1fffffffffffff01n, false, "0x1fffffffffffff02n === 0x1fffffffffffff01n"); >-assert.sameValue(-0x1fffffffffffff01n === -0x1fffffffffffff01n, true, "-0x1fffffffffffff01n === -0x1fffffffffffff01n"); >-assert.sameValue(-0x1fffffffffffff01n === -0x1fffffffffffff02n, false, "-0x1fffffffffffff01n === -0x1fffffffffffff02n"); >-assert.sameValue(-0x1fffffffffffff02n === -0x1fffffffffffff01n, false, "-0x1fffffffffffff02n === -0x1fffffffffffff01n"); >-assert.sameValue(0x10000000000000000n === 0n, false, "0x10000000000000000n === 0n"); >-assert.sameValue(0n === 0x10000000000000000n, false, "0n === 0x10000000000000000n"); >-assert.sameValue(0x10000000000000000n === 1n, false, "0x10000000000000000n === 1n"); >-assert.sameValue(1n === 0x10000000000000000n, false, "1n === 0x10000000000000000n"); >-assert.sameValue(0x10000000000000000n === -1n, false, "0x10000000000000000n === -1n"); >-assert.sameValue(-1n === 0x10000000000000000n, false, "-1n === 0x10000000000000000n"); >-assert.sameValue(0x10000000000000001n === 0n, false, "0x10000000000000001n === 0n"); >-assert.sameValue(0n === 0x10000000000000001n, false, "0n === 0x10000000000000001n"); >-assert.sameValue(-0x10000000000000000n === 0n, false, "-0x10000000000000000n === 0n"); >-assert.sameValue(0n === -0x10000000000000000n, false, "0n === -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000000n === 1n, false, "-0x10000000000000000n === 1n"); >-assert.sameValue(1n === -0x10000000000000000n, false, "1n === -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000000n === -1n, false, "-0x10000000000000000n === -1n"); >-assert.sameValue(-1n === -0x10000000000000000n, false, "-1n === -0x10000000000000000n"); >-assert.sameValue(-0x10000000000000001n === 0n, false, "-0x10000000000000001n === 0n"); >-assert.sameValue(0n === -0x10000000000000001n, false, "0n === -0x10000000000000001n"); >-assert.sameValue(0x10000000000000000n === 0x100000000n, false, "0x10000000000000000n === 0x100000000n"); >-assert.sameValue(0x100000000n === 0x10000000000000000n, false, "0x100000000n === 0x10000000000000000n"); >+assert.sameValue( >+ 0x100000000n === 0x10000000000000000n, >+ false, >+ 'The result of (0x100000000n === 0x10000000000000000n) is false' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/strict-equals/bigint-and-boolean.js b/JSTests/test262/test/language/expressions/strict-equals/bigint-and-boolean.js >index 718a4afc005ba9ddc729f318b7573848afee7979..461b5ac34ba8c89229198ccb298731bee2c4e38c 100644 >--- a/JSTests/test262/test/language/expressions/strict-equals/bigint-and-boolean.js >+++ b/JSTests/test262/test/language/expressions/strict-equals/bigint-and-boolean.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Strict equality comparison of BigInt and Boolean values > esid: sec-strict-equality-comparison >@@ -9,20 +8,19 @@ > > features: [BigInt] > ---*/ >- >-assert.sameValue(-1n === false, false, "-1n === false"); >-assert.sameValue(false === -1n, false, "false === -1n"); >-assert.sameValue(-1n === true, false, "-1n === true"); >-assert.sameValue(true === -1n, false, "true === -1n"); >-assert.sameValue(0n === false, false, "0n === false"); >-assert.sameValue(false === 0n, false, "false === 0n"); >-assert.sameValue(0n === true, false, "0n === true"); >-assert.sameValue(true === 0n, false, "true === 0n"); >-assert.sameValue(1n === false, false, "1n === false"); >-assert.sameValue(false === 1n, false, "false === 1n"); >-assert.sameValue(1n === true, false, "1n === true"); >-assert.sameValue(true === 1n, false, "true === 1n"); >-assert.sameValue(2n === false, false, "2n === false"); >-assert.sameValue(false === 2n, false, "false === 2n"); >-assert.sameValue(2n === true, false, "2n === true"); >-assert.sameValue(true === 2n, false, "true === 2n"); >+assert.sameValue(-1n === false, false, 'The result of (-1n === false) is false'); >+assert.sameValue(false === -1n, false, 'The result of (false === -1n) is false'); >+assert.sameValue(-1n === true, false, 'The result of (-1n === true) is false'); >+assert.sameValue(true === -1n, false, 'The result of (true === -1n) is false'); >+assert.sameValue(0n === false, false, 'The result of (0n === false) is false'); >+assert.sameValue(false === 0n, false, 'The result of (false === 0n) is false'); >+assert.sameValue(0n === true, false, 'The result of (0n === true) is false'); >+assert.sameValue(true === 0n, false, 'The result of (true === 0n) is false'); >+assert.sameValue(1n === false, false, 'The result of (1n === false) is false'); >+assert.sameValue(false === 1n, false, 'The result of (false === 1n) is false'); >+assert.sameValue(1n === true, false, 'The result of (1n === true) is false'); >+assert.sameValue(true === 1n, false, 'The result of (true === 1n) is false'); >+assert.sameValue(2n === false, false, 'The result of (2n === false) is false'); >+assert.sameValue(false === 2n, false, 'The result of (false === 2n) is false'); >+assert.sameValue(2n === true, false, 'The result of (2n === true) is false'); >+assert.sameValue(true === 2n, false, 'The result of (true === 2n) is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/strict-equals/bigint-and-incomparable-primitive.js b/JSTests/test262/test/language/expressions/strict-equals/bigint-and-incomparable-primitive.js >index 042cc2cfe3bc807704b0f191300335bbdf381759..6ed9bd1bdc504e962037632e4063faf49df2ef46 100644 >--- a/JSTests/test262/test/language/expressions/strict-equals/bigint-and-incomparable-primitive.js >+++ b/JSTests/test262/test/language/expressions/strict-equals/bigint-and-incomparable-primitive.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Strict equality comparison of BigInt and miscellaneous primitive values > esid: sec-strict-equality-comparison >@@ -9,16 +8,15 @@ > > features: [BigInt, Symbol] > ---*/ >- >-assert.sameValue(0n === undefined, false, "0n === undefined"); >-assert.sameValue(undefined === 0n, false, "undefined === 0n"); >-assert.sameValue(1n === undefined, false, "1n === undefined"); >-assert.sameValue(undefined === 1n, false, "undefined === 1n"); >-assert.sameValue(0n === null, false, "0n === null"); >-assert.sameValue(null === 0n, false, "null === 0n"); >-assert.sameValue(1n === null, false, "1n === null"); >-assert.sameValue(null === 1n, false, "null === 1n"); >-assert.sameValue(0n === Symbol("1"), false, '0n === Symbol("1")'); >-assert.sameValue(Symbol("1") === 0n, false, 'Symbol("1") === 0n'); >-assert.sameValue(1n === Symbol("1"), false, '1n === Symbol("1")'); >-assert.sameValue(Symbol("1") === 1n, false, 'Symbol("1") === 1n'); >+assert.sameValue(0n === undefined, false, 'The result of (0n === undefined) is false'); >+assert.sameValue(undefined === 0n, false, 'The result of (undefined === 0n) is false'); >+assert.sameValue(1n === undefined, false, 'The result of (1n === undefined) is false'); >+assert.sameValue(undefined === 1n, false, 'The result of (undefined === 1n) is false'); >+assert.sameValue(0n === null, false, 'The result of (0n === null) is false'); >+assert.sameValue(null === 0n, false, 'The result of (null === 0n) is false'); >+assert.sameValue(1n === null, false, 'The result of (1n === null) is false'); >+assert.sameValue(null === 1n, false, 'The result of (null === 1n) is false'); >+assert.sameValue(0n === Symbol('1'), false, 'The result of (0n === Symbol("1")) is false'); >+assert.sameValue(Symbol('1') === 0n, false, 'The result of (Symbol("1") === 0n) is false'); >+assert.sameValue(1n === Symbol('1'), false, 'The result of (1n === Symbol("1")) is false'); >+assert.sameValue(Symbol('1') === 1n, false, 'The result of (Symbol("1") === 1n) is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/strict-equals/bigint-and-non-finite.js b/JSTests/test262/test/language/expressions/strict-equals/bigint-and-non-finite.js >index 7352fc3dc58ccb67cc4eb4a344bab73ea4204aa4..2ffa93ad46efb816b912ad68890975e203446a4c 100644 >--- a/JSTests/test262/test/language/expressions/strict-equals/bigint-and-non-finite.js >+++ b/JSTests/test262/test/language/expressions/strict-equals/bigint-and-non-finite.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Strict equality comparison of BigInt and non-finite Number values > esid: sec-strict-equality-comparison >@@ -9,22 +8,21 @@ > > features: [BigInt] > ---*/ >- >-assert.sameValue(0n === Infinity, false, "0n === Infinity"); >-assert.sameValue(Infinity === 0n, false, "Infinity === 0n"); >-assert.sameValue(1n === Infinity, false, "1n === Infinity"); >-assert.sameValue(Infinity === 1n, false, "Infinity === 1n"); >-assert.sameValue(-1n === Infinity, false, "-1n === Infinity"); >-assert.sameValue(Infinity === -1n, false, "Infinity === -1n"); >-assert.sameValue(0n === -Infinity, false, "0n === -Infinity"); >-assert.sameValue(-Infinity === 0n, false, "-Infinity === 0n"); >-assert.sameValue(1n === -Infinity, false, "1n === -Infinity"); >-assert.sameValue(-Infinity === 1n, false, "-Infinity === 1n"); >-assert.sameValue(-1n === -Infinity, false, "-1n === -Infinity"); >-assert.sameValue(-Infinity === -1n, false, "-Infinity === -1n"); >-assert.sameValue(0n === NaN, false, "0n === NaN"); >-assert.sameValue(NaN === 0n, false, "NaN === 0n"); >-assert.sameValue(1n === NaN, false, "1n === NaN"); >-assert.sameValue(NaN === 1n, false, "NaN === 1n"); >-assert.sameValue(-1n === NaN, false, "-1n === NaN"); >-assert.sameValue(NaN === -1n, false, "NaN === -1n"); >+assert.sameValue(0n === Infinity, false, 'The result of (0n === Infinity) is false'); >+assert.sameValue(Infinity === 0n, false, 'The result of (Infinity === 0n) is false'); >+assert.sameValue(1n === Infinity, false, 'The result of (1n === Infinity) is false'); >+assert.sameValue(Infinity === 1n, false, 'The result of (Infinity === 1n) is false'); >+assert.sameValue(-1n === Infinity, false, 'The result of (-1n === Infinity) is false'); >+assert.sameValue(Infinity === -1n, false, 'The result of (Infinity === -1n) is false'); >+assert.sameValue(0n === -Infinity, false, 'The result of (0n === -Infinity) is false'); >+assert.sameValue(-Infinity === 0n, false, 'The result of (-Infinity === 0n) is false'); >+assert.sameValue(1n === -Infinity, false, 'The result of (1n === -Infinity) is false'); >+assert.sameValue(-Infinity === 1n, false, 'The result of (-Infinity === 1n) is false'); >+assert.sameValue(-1n === -Infinity, false, 'The result of (-1n === -Infinity) is false'); >+assert.sameValue(-Infinity === -1n, false, 'The result of (-Infinity === -1n) is false'); >+assert.sameValue(0n === NaN, false, 'The result of (0n === NaN) is false'); >+assert.sameValue(NaN === 0n, false, 'The result of (NaN === 0n) is false'); >+assert.sameValue(1n === NaN, false, 'The result of (1n === NaN) is false'); >+assert.sameValue(NaN === 1n, false, 'The result of (NaN === 1n) is false'); >+assert.sameValue(-1n === NaN, false, 'The result of (-1n === NaN) is false'); >+assert.sameValue(NaN === -1n, false, 'The result of (NaN === -1n) is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/strict-equals/bigint-and-number-extremes.js b/JSTests/test262/test/language/expressions/strict-equals/bigint-and-number-extremes.js >index e129355737697a2c471252b1e69ffc3d45a07686..c6c1f5eee0ffc0be5e0b1f9201e551dc2f2c1fbb 100644 >--- a/JSTests/test262/test/language/expressions/strict-equals/bigint-and-number-extremes.js >+++ b/JSTests/test262/test/language/expressions/strict-equals/bigint-and-number-extremes.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Strict equality comparison of BigInt and large Number values > esid: sec-strict-equality-comparison >@@ -9,32 +8,62 @@ > > features: [BigInt] > ---*/ >+assert.sameValue( >+ 1n === Number.MAX_VALUE, >+ false, >+ 'The result of (1n === Number.MAX_VALUE) is false' >+); >+ >+assert.sameValue( >+ Number.MAX_VALUE === 1n, >+ false, >+ 'The result of (Number.MAX_VALUE === 1n) is false' >+); >+ >+assert.sameValue( >+ 1n === -Number.MAX_VALUE, >+ false, >+ 'The result of (1n === -Number.MAX_VALUE) is false' >+); >+ >+assert.sameValue( >+ -Number.MAX_VALUE === 1n, >+ false, >+ 'The result of (-Number.MAX_VALUE === 1n) is false' >+); > >-assert.sameValue(1n === Number.MAX_VALUE, false, "1n === Number.MAX_VALUE"); >-assert.sameValue(Number.MAX_VALUE === 1n, false, "Number.MAX_VALUE === 1n"); >-assert.sameValue(1n === -Number.MAX_VALUE, false, "1n === -Number.MAX_VALUE"); >-assert.sameValue(-Number.MAX_VALUE === 1n, false, "-Number.MAX_VALUE === 1n"); > assert.sameValue( > 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn === Number.MAX_VALUE, > false, >- "0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn === Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn === Number.MAX_VALUE) is false' >+); >+ > assert.sameValue( > Number.MAX_VALUE === 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn, > false, >- "Number.MAX_VALUE === 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn"); >+ 'The result of (Number.MAX_VALUE === 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn) is false' >+); >+ > assert.sameValue( > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n === Number.MAX_VALUE, > false, >- "0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n === Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n === Number.MAX_VALUE) is false' >+); >+ > assert.sameValue( > Number.MAX_VALUE === 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n, > false, >- "Number.MAX_VALUE === 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n"); >+ 'The result of (Number.MAX_VALUE === 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n) is false' >+); >+ > assert.sameValue( > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n === Number.MAX_VALUE, > false, >- "0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n === Number.MAX_VALUE"); >+ 'The result of (0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n === Number.MAX_VALUE) is false' >+); >+ > assert.sameValue( > Number.MAX_VALUE === 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n, > false, >- "Number.MAX_VALUE === 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n"); >+ 'The result of (Number.MAX_VALUE === 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n) is false' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/strict-equals/bigint-and-number.js b/JSTests/test262/test/language/expressions/strict-equals/bigint-and-number.js >index ed1dde71a240818e645d6f550657eabfb6e84411..09d0c3a14ba39307ec1546c0a35cce537db988b8 100644 >--- a/JSTests/test262/test/language/expressions/strict-equals/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/strict-equals/bigint-and-number.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Strict equality comparison of BigInt and Number values > esid: sec-strict-equality-comparison >@@ -9,24 +8,53 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n === 0, false, 'The result of (0n === 0) is false'); >+assert.sameValue(0 === 0n, false, 'The result of (0 === 0n) is false'); >+assert.sameValue(0n === -0, false, 'The result of (0n === -0) is false'); >+assert.sameValue(-0 === 0n, false, 'The result of (-0 === 0n) is false'); >+assert.sameValue(0n === 0.000000000001, false, 'The result of (0n === 0.000000000001) is false'); >+assert.sameValue(0.000000000001 === 0n, false, 'The result of (0.000000000001 === 0n) is false'); >+assert.sameValue(0n === 1, false, 'The result of (0n === 1) is false'); >+assert.sameValue(1 === 0n, false, 'The result of (1 === 0n) is false'); >+assert.sameValue(1n === 0, false, 'The result of (1n === 0) is false'); >+assert.sameValue(0 === 1n, false, 'The result of (0 === 1n) is false'); >+assert.sameValue(1n === 0.999999999999, false, 'The result of (1n === 0.999999999999) is false'); >+assert.sameValue(0.999999999999 === 1n, false, 'The result of (0.999999999999 === 1n) is false'); >+assert.sameValue(1n === 1, false, 'The result of (1n === 1) is false'); >+assert.sameValue(1 === 1n, false, 'The result of (1 === 1n) is false'); >+ >+assert.sameValue( >+ 0n === Number.MIN_VALUE, >+ false, >+ 'The result of (0n === Number.MIN_VALUE) is false' >+); >+ >+assert.sameValue( >+ Number.MIN_VALUE === 0n, >+ false, >+ 'The result of (Number.MIN_VALUE === 0n) is false' >+); >+ >+assert.sameValue( >+ 0n === -Number.MIN_VALUE, >+ false, >+ 'The result of (0n === -Number.MIN_VALUE) is false' >+); >+ >+assert.sameValue( >+ -Number.MIN_VALUE === 0n, >+ false, >+ 'The result of (-Number.MIN_VALUE === 0n) is false' >+); >+ >+assert.sameValue( >+ -10n === Number.MIN_VALUE, >+ false, >+ 'The result of (-10n === Number.MIN_VALUE) is false' >+); > >-assert.sameValue(0n === 0, false, "0n === 0"); >-assert.sameValue(0 === 0n, false, "0 === 0n"); >-assert.sameValue(0n === -0, false, "0n === -0"); >-assert.sameValue(-0 === 0n, false, "-0 === 0n"); >-assert.sameValue(0n === 0.000000000001, false, "0n === 0.000000000001"); >-assert.sameValue(0.000000000001 === 0n, false, "0.000000000001 === 0n"); >-assert.sameValue(0n === 1, false, "0n === 1"); >-assert.sameValue(1 === 0n, false, "1 === 0n"); >-assert.sameValue(1n === 0, false, "1n === 0"); >-assert.sameValue(0 === 1n, false, "0 === 1n"); >-assert.sameValue(1n === 0.999999999999, false, "1n === 0.999999999999"); >-assert.sameValue(0.999999999999 === 1n, false, "0.999999999999 === 1n"); >-assert.sameValue(1n === 1, false, "1n === 1"); >-assert.sameValue(1 === 1n, false, "1 === 1n"); >-assert.sameValue(0n === Number.MIN_VALUE, false, "0n === Number.MIN_VALUE"); >-assert.sameValue(Number.MIN_VALUE === 0n, false, "Number.MIN_VALUE === 0n"); >-assert.sameValue(0n === -Number.MIN_VALUE, false, "0n === -Number.MIN_VALUE"); >-assert.sameValue(-Number.MIN_VALUE === 0n, false, "-Number.MIN_VALUE === 0n"); >-assert.sameValue(-10n === Number.MIN_VALUE, false, "-10n === Number.MIN_VALUE"); >-assert.sameValue(Number.MIN_VALUE === -10n, false, "Number.MIN_VALUE === -10n"); >+assert.sameValue( >+ Number.MIN_VALUE === -10n, >+ false, >+ 'The result of (Number.MIN_VALUE === -10n) is false' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/strict-equals/bigint-and-object.js b/JSTests/test262/test/language/expressions/strict-equals/bigint-and-object.js >index edcf182384432c42f43f9ab7961009a6fed331b3..638540d1537cc0264e46a28eeb68d82a68433a3a 100644 >--- a/JSTests/test262/test/language/expressions/strict-equals/bigint-and-object.js >+++ b/JSTests/test262/test/language/expressions/strict-equals/bigint-and-object.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Strict equality comparison of BigInt values and non-primitive objects > esid: sec-strict-equality-comparison >@@ -9,36 +8,115 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n === Object(0n), false, 'The result of (0n === Object(0n)) is false'); >+assert.sameValue(Object(0n) === 0n, false, 'The result of (Object(0n) === 0n) is false'); >+assert.sameValue(0n === Object(1n), false, 'The result of (0n === Object(1n)) is false'); >+assert.sameValue(Object(1n) === 0n, false, 'The result of (Object(1n) === 0n) is false'); >+assert.sameValue(1n === Object(0n), false, 'The result of (1n === Object(0n)) is false'); >+assert.sameValue(Object(0n) === 1n, false, 'The result of (Object(0n) === 1n) is false'); >+assert.sameValue(1n === Object(1n), false, 'The result of (1n === Object(1n)) is false'); >+assert.sameValue(Object(1n) === 1n, false, 'The result of (Object(1n) === 1n) is false'); >+assert.sameValue(2n === Object(0n), false, 'The result of (2n === Object(0n)) is false'); >+assert.sameValue(Object(0n) === 2n, false, 'The result of (Object(0n) === 2n) is false'); >+assert.sameValue(2n === Object(1n), false, 'The result of (2n === Object(1n)) is false'); >+assert.sameValue(Object(1n) === 2n, false, 'The result of (Object(1n) === 2n) is false'); >+assert.sameValue(2n === Object(2n), false, 'The result of (2n === Object(2n)) is false'); >+assert.sameValue(Object(2n) === 2n, false, 'The result of (Object(2n) === 2n) is false'); >+assert.sameValue(0n === {}, false, 'The result of (0n === {}) is false'); >+assert.sameValue({} === 0n, false, 'The result of (({}) === 0n) is false'); >+ >+assert.sameValue(0n === { >+ valueOf: function() { >+ return 0n; >+ } >+}, false, 'The result of (0n === {valueOf: function() {return 0n;}}) is false'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 0n; >+ } >+} === 0n, false, 'The result of (({valueOf: function() {return 0n;}}) === 0n) is false'); >+ >+assert.sameValue(0n === { >+ valueOf: function() { >+ return 1n; >+ } >+}, false, 'The result of (0n === {valueOf: function() {return 1n;}}) is false'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 1n; >+ } >+} === 0n, false, 'The result of (({valueOf: function() {return 1n;}}) === 0n) is false'); >+ >+assert.sameValue(0n === { >+ toString: function() { >+ return '0'; >+ } >+}, false, 'The result of (0n === {toString: function() {return "0";}}) is false'); >+ >+assert.sameValue({ >+ toString: function() { >+ return '0'; >+ } >+} === 0n, false, 'The result of (({toString: function() {return "0";}}) === 0n) is false'); >+ >+assert.sameValue(0n === { >+ toString: function() { >+ return '1'; >+ } >+}, false, 'The result of (0n === {toString: function() {return "1";}}) is false'); >+ >+assert.sameValue({ >+ toString: function() { >+ return '1'; >+ } >+} === 0n, false, 'The result of (({toString: function() {return "1";}}) === 0n) is false'); >+ >+assert.sameValue(900719925474099101n === { >+ valueOf: function() { >+ return 900719925474099101n; >+ } >+}, false, 'The result of (900719925474099101n === {valueOf: function() {return 900719925474099101n;}}) is false'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 900719925474099101n; >+ } >+} === 900719925474099101n, false, 'The result of (({valueOf: function() {return 900719925474099101n;}}) === 900719925474099101n) is false'); >+ >+assert.sameValue(900719925474099101n === { >+ valueOf: function() { >+ return 900719925474099102n; >+ } >+}, false, 'The result of (900719925474099101n === {valueOf: function() {return 900719925474099102n;}}) is false'); >+ >+assert.sameValue({ >+ valueOf: function() { >+ return 900719925474099102n; >+ } >+} === 900719925474099101n, false, 'The result of (({valueOf: function() {return 900719925474099102n;}}) === 900719925474099101n) is false'); >+ >+assert.sameValue(900719925474099101n === { >+ toString: function() { >+ return '900719925474099101'; >+ } >+}, false, 'The result of (900719925474099101n === {toString: function() {return "900719925474099101";}}) is false'); >+ >+assert.sameValue({ >+ toString: function() { >+ return '900719925474099101'; >+ } >+} === 900719925474099101n, false, 'The result of (({toString: function() {return "900719925474099101";}}) === 900719925474099101n) is false'); >+ >+assert.sameValue(900719925474099101n === { >+ toString: function() { >+ return '900719925474099102'; >+ } >+}, false, 'The result of (900719925474099101n === {toString: function() {return "900719925474099102";}}) is false'); > >-assert.sameValue(0n === Object(0n), false, "0n === Object(0n)"); >-assert.sameValue(Object(0n) === 0n, false, "Object(0n) === 0n"); >-assert.sameValue(0n === Object(1n), false, "0n === Object(1n)"); >-assert.sameValue(Object(1n) === 0n, false, "Object(1n) === 0n"); >-assert.sameValue(1n === Object(0n), false, "1n === Object(0n)"); >-assert.sameValue(Object(0n) === 1n, false, "Object(0n) === 1n"); >-assert.sameValue(1n === Object(1n), false, "1n === Object(1n)"); >-assert.sameValue(Object(1n) === 1n, false, "Object(1n) === 1n"); >-assert.sameValue(2n === Object(0n), false, "2n === Object(0n)"); >-assert.sameValue(Object(0n) === 2n, false, "Object(0n) === 2n"); >-assert.sameValue(2n === Object(1n), false, "2n === Object(1n)"); >-assert.sameValue(Object(1n) === 2n, false, "Object(1n) === 2n"); >-assert.sameValue(2n === Object(2n), false, "2n === Object(2n)"); >-assert.sameValue(Object(2n) === 2n, false, "Object(2n) === 2n"); >-assert.sameValue(0n === {}, false, "0n === {}"); >-assert.sameValue({} === 0n, false, "{} === 0n"); >-assert.sameValue(0n === {valueOf: function() { return 0n; }}, false, "0n === {valueOf: function() { return 0n; }}"); >-assert.sameValue({valueOf: function() { return 0n; }} === 0n, false, "{valueOf: function() { return 0n; }} === 0n"); >-assert.sameValue(0n === {valueOf: function() { return 1n; }}, false, "0n === {valueOf: function() { return 1n; }}"); >-assert.sameValue({valueOf: function() { return 1n; }} === 0n, false, "{valueOf: function() { return 1n; }} === 0n"); >-assert.sameValue(0n === {toString: function() { return "0"; }}, false, '0n === {toString: function() { return "0"; }}'); >-assert.sameValue({toString: function() { return "0"; }} === 0n, false, '{toString: function() { return "0"; }} === 0n'); >-assert.sameValue(0n === {toString: function() { return "1"; }}, false, '0n === {toString: function() { return "1"; }}'); >-assert.sameValue({toString: function() { return "1"; }} === 0n, false, '{toString: function() { return "1"; }} === 0n'); >-assert.sameValue(900719925474099101n === {valueOf: function() { return 900719925474099101n; }}, false, "900719925474099101n === {valueOf: function() { return 900719925474099101n; }}"); >-assert.sameValue({valueOf: function() { return 900719925474099101n; }} === 900719925474099101n, false, "{valueOf: function() { return 900719925474099101n; }} === 900719925474099101n"); >-assert.sameValue(900719925474099101n === {valueOf: function() { return 900719925474099102n; }}, false, "900719925474099101n === {valueOf: function() { return 900719925474099102n; }}"); >-assert.sameValue({valueOf: function() { return 900719925474099102n; }} === 900719925474099101n, false, "{valueOf: function() { return 900719925474099102n; }} === 900719925474099101n"); >-assert.sameValue(900719925474099101n === {toString: function() { return "900719925474099101"; }}, false, '900719925474099101n === {toString: function() { return "900719925474099101"; }}'); >-assert.sameValue({toString: function() { return "900719925474099101"; }} === 900719925474099101n, false, '{toString: function() { return "900719925474099101"; }} === 900719925474099101n'); >-assert.sameValue(900719925474099101n === {toString: function() { return "900719925474099102"; }}, false, '900719925474099101n === {toString: function() { return "900719925474099102"; }}'); >-assert.sameValue({toString: function() { return "900719925474099102"; }} === 900719925474099101n, false, '{toString: function() { return "900719925474099102"; }} === 900719925474099101n'); >+assert.sameValue({ >+ toString: function() { >+ return '900719925474099102'; >+ } >+} === 900719925474099101n, false, 'The result of (({toString: function() {return "900719925474099102";}}) === 900719925474099101n) is false'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/strict-equals/bigint-and-string.js b/JSTests/test262/test/language/expressions/strict-equals/bigint-and-string.js >index 7e83b80887c9cccde1f688f6571f15a7a27ab70c..f810c00e8f6b6565f2b89374e831b5c96242dfa8 100644 >--- a/JSTests/test262/test/language/expressions/strict-equals/bigint-and-string.js >+++ b/JSTests/test262/test/language/expressions/strict-equals/bigint-and-string.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Strict equality comparison of BigInt and String values > esid: sec-strict-equality-comparison >@@ -9,40 +8,59 @@ > > features: [BigInt] > ---*/ >+assert.sameValue(0n === '', false, 'The result of (0n === "") is false'); >+assert.sameValue('' === 0n, false, 'The result of ("" === 0n) is false'); >+assert.sameValue(0n === '-0', false, 'The result of (0n === "-0") is false'); >+assert.sameValue('-0' === 0n, false, 'The result of ("-0" === 0n) is false'); >+assert.sameValue(0n === '0', false, 'The result of (0n === "0") is false'); >+assert.sameValue('0' === 0n, false, 'The result of ("0" === 0n) is false'); >+assert.sameValue(0n === '-1', false, 'The result of (0n === "-1") is false'); >+assert.sameValue('-1' === 0n, false, 'The result of ("-1" === 0n) is false'); >+assert.sameValue(0n === '1', false, 'The result of (0n === "1") is false'); >+assert.sameValue('1' === 0n, false, 'The result of ("1" === 0n) is false'); >+assert.sameValue(0n === 'foo', false, 'The result of (0n === "foo") is false'); >+assert.sameValue('foo' === 0n, false, 'The result of ("foo" === 0n) is false'); >+assert.sameValue(1n === '', false, 'The result of (1n === "") is false'); >+assert.sameValue('' === 1n, false, 'The result of ("" === 1n) is false'); >+assert.sameValue(1n === '-0', false, 'The result of (1n === "-0") is false'); >+assert.sameValue('-0' === 1n, false, 'The result of ("-0" === 1n) is false'); >+assert.sameValue(1n === '0', false, 'The result of (1n === "0") is false'); >+assert.sameValue('0' === 1n, false, 'The result of ("0" === 1n) is false'); >+assert.sameValue(1n === '-1', false, 'The result of (1n === "-1") is false'); >+assert.sameValue('-1' === 1n, false, 'The result of ("-1" === 1n) is false'); >+assert.sameValue(1n === '1', false, 'The result of (1n === "1") is false'); >+assert.sameValue('1' === 1n, false, 'The result of ("1" === 1n) is false'); >+assert.sameValue(1n === 'foo', false, 'The result of (1n === "foo") is false'); >+assert.sameValue('foo' === 1n, false, 'The result of ("foo" === 1n) is false'); >+assert.sameValue(-1n === '-', false, 'The result of (-1n === "-") is false'); >+assert.sameValue('-' === -1n, false, 'The result of ("-" === -1n) is false'); >+assert.sameValue(-1n === '-0', false, 'The result of (-1n === "-0") is false'); >+assert.sameValue('-0' === -1n, false, 'The result of ("-0" === -1n) is false'); >+assert.sameValue(-1n === '-1', false, 'The result of (-1n === "-1") is false'); >+assert.sameValue('-1' === -1n, false, 'The result of ("-1" === -1n) is false'); >+assert.sameValue(-1n === '-foo', false, 'The result of (-1n === "-foo") is false'); >+assert.sameValue('-foo' === -1n, false, 'The result of ("-foo" === -1n) is false'); >+ >+assert.sameValue( >+ 900719925474099101n === '900719925474099101', >+ false, >+ 'The result of (900719925474099101n === "900719925474099101") is false' >+); >+ >+assert.sameValue( >+ '900719925474099101' === 900719925474099101n, >+ false, >+ 'The result of ("900719925474099101" === 900719925474099101n) is false' >+); >+ >+assert.sameValue( >+ 900719925474099102n === '900719925474099101', >+ false, >+ 'The result of (900719925474099102n === "900719925474099101") is false' >+); > >-assert.sameValue(0n === "", false, '0n === ""'); >-assert.sameValue("" === 0n, false, '"" === 0n'); >-assert.sameValue(0n === "-0", false, '0n === "-0"'); >-assert.sameValue("-0" === 0n, false, '"-0" === 0n'); >-assert.sameValue(0n === "0", false, '0n === "0"'); >-assert.sameValue("0" === 0n, false, '"0" === 0n'); >-assert.sameValue(0n === "-1", false, '0n === "-1"'); >-assert.sameValue("-1" === 0n, false, '"-1" === 0n'); >-assert.sameValue(0n === "1", false, '0n === "1"'); >-assert.sameValue("1" === 0n, false, '"1" === 0n'); >-assert.sameValue(0n === "foo", false, '0n === "foo"'); >-assert.sameValue("foo" === 0n, false, '"foo" === 0n'); >-assert.sameValue(1n === "", false, '1n === ""'); >-assert.sameValue("" === 1n, false, '"" === 1n'); >-assert.sameValue(1n === "-0", false, '1n === "-0"'); >-assert.sameValue("-0" === 1n, false, '"-0" === 1n'); >-assert.sameValue(1n === "0", false, '1n === "0"'); >-assert.sameValue("0" === 1n, false, '"0" === 1n'); >-assert.sameValue(1n === "-1", false, '1n === "-1"'); >-assert.sameValue("-1" === 1n, false, '"-1" === 1n'); >-assert.sameValue(1n === "1", false, '1n === "1"'); >-assert.sameValue("1" === 1n, false, '"1" === 1n'); >-assert.sameValue(1n === "foo", false, '1n === "foo"'); >-assert.sameValue("foo" === 1n, false, '"foo" === 1n'); >-assert.sameValue(-1n === "-", false, '-1n === "-"'); >-assert.sameValue("-" === -1n, false, '"-" === -1n'); >-assert.sameValue(-1n === "-0", false, '-1n === "-0"'); >-assert.sameValue("-0" === -1n, false, '"-0" === -1n'); >-assert.sameValue(-1n === "-1", false, '-1n === "-1"'); >-assert.sameValue("-1" === -1n, false, '"-1" === -1n'); >-assert.sameValue(-1n === "-foo", false, '-1n === "-foo"'); >-assert.sameValue("-foo" === -1n, false, '"-foo" === -1n'); >-assert.sameValue(900719925474099101n === "900719925474099101", false, '900719925474099101n === "900719925474099101"'); >-assert.sameValue("900719925474099101" === 900719925474099101n, false, '"900719925474099101" === 900719925474099101n'); >-assert.sameValue(900719925474099102n === "900719925474099101", false, '900719925474099102n === "900719925474099101"'); >-assert.sameValue("900719925474099101" === 900719925474099102n, false, '"900719925474099101" === 900719925474099102n'); >+assert.sameValue( >+ '900719925474099101' === 900719925474099102n, >+ false, >+ 'The result of ("900719925474099101" === 900719925474099102n) is false' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/subtraction/bigint-and-number.js b/JSTests/test262/test/language/expressions/subtraction/bigint-and-number.js >index c75fd73a0f35b4b140643c91d761c8548a0265ad..1e4f3a16fbf0574e9c524f0db025ffddd6df45db 100644 >--- a/JSTests/test262/test/language/expressions/subtraction/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/subtraction/bigint-and-number.js >@@ -9,24 +9,82 @@ > Let rnum be ? ToNumeric(rightValue). > If Type(lnum) does not equal Type(rnum), throw a TypeError exception. > ---*/ >+assert.throws(TypeError, function() { >+ 1n - 1; >+}, '1n - 1 throws TypeError'); > >-assert.throws(TypeError, function() { 1n - 1; }, "1n - 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 - 1n; }, "1 - 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) - 1; }, "Object(1n) - 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 - Object(1n); }, "1 - Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n - Object(1); }, "1n - Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) - 1n; }, "Object(1) - 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) - Object(1); }, "Object(1n) - Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) - Object(1n); }, "Object(1) - Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n - NaN; }, "1n - NaN throws TypeError"); >-assert.throws(TypeError, function() { NaN - 1n; }, "NaN - 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n - Infinity; }, "1n - Infinity throws TypeError"); >-assert.throws(TypeError, function() { Infinity - 1n; }, "Infinity - 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n - true; }, "1n - true throws TypeError"); >-assert.throws(TypeError, function() { true - 1n; }, "true - 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n - "1"; }, '1n - "1" throws TypeError'); >-assert.throws(TypeError, function() { "1" - 1n; }, '"1" - 1n throws TypeError'); >-assert.throws(TypeError, function() { 1n - null; }, "1n - null throws TypeError"); >-assert.throws(TypeError, function() { null - 1n; }, "null - 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n - undefined; }, "1n - undefined throws TypeError"); >-assert.throws(TypeError, function() { undefined - 1n; }, "undefined - 1n throws TypeError"); >+assert.throws(TypeError, function() { >+ 1 - 1n; >+}, '1 - 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) - 1; >+}, 'Object(1n) - 1 throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1 - Object(1n); >+}, '1 - Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n - Object(1); >+}, '1n - Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) - 1n; >+}, 'Object(1) - 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) - Object(1); >+}, 'Object(1n) - Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) - Object(1n); >+}, 'Object(1) - Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n - NaN; >+}, '1n - NaN throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ NaN - 1n; >+}, 'NaN - 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n - Infinity; >+}, '1n - Infinity throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Infinity - 1n; >+}, 'Infinity - 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n - true; >+}, '1n - true throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ true - 1n; >+}, 'true - 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n - '1'; >+}, '1n - "1" throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ '1' - 1n; >+}, '"1" - 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n - null; >+}, '1n - null throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ null - 1n; >+}, 'null - 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n - undefined; >+}, '1n - undefined throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ undefined - 1n; >+}, 'undefined - 1n throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/subtraction/bigint-arithmetic.js b/JSTests/test262/test/language/expressions/subtraction/bigint-arithmetic.js >index 724486d86fad0c47e50c8e978c58e171f67e95c8..48b4b5c3b9866df9b7d87cecd562e4cfd214f418 100644 >--- a/JSTests/test262/test/language/expressions/subtraction/bigint-arithmetic.js >+++ b/JSTests/test262/test/language/expressions/subtraction/bigint-arithmetic.js >@@ -1,302 +1,1344 @@ > // Copyright (C) 2017 Robin Templeton. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > esid: sec-subtraction-operator-minus-runtime-semantics-evaluation > description: BigInt subtraction arithmetic > features: [BigInt] > ---*/ >+assert.sameValue( >+ 0xFEDCBA9876543210n - 0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (0xFEDCBA9876543210n - 0xFEDCBA9876543210n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n - 0xFEDCBA987654320Fn, >+ 0x1n, >+ 'The result of (0xFEDCBA9876543210n - 0xFEDCBA987654320Fn) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n - 0xFEDCBA98n, >+ 0xFEDCBA9777777778n, >+ 'The result of (0xFEDCBA9876543210n - 0xFEDCBA98n) is 0xFEDCBA9777777778n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n - 0xFEDCBA97n, >+ 0xFEDCBA9777777779n, >+ 'The result of (0xFEDCBA9876543210n - 0xFEDCBA97n) is 0xFEDCBA9777777779n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n - 0x1234n, >+ 0xFEDCBA9876541FDCn, >+ 'The result of (0xFEDCBA9876543210n - 0x1234n) is 0xFEDCBA9876541FDCn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n - 0x3n, >+ 0xFEDCBA987654320Dn, >+ 'The result of (0xFEDCBA9876543210n - 0x3n) is 0xFEDCBA987654320Dn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n - 0x2n, >+ 0xFEDCBA987654320En, >+ 'The result of (0xFEDCBA9876543210n - 0x2n) is 0xFEDCBA987654320En' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n - 0x1n, >+ 0xFEDCBA987654320Fn, >+ 'The result of (0xFEDCBA9876543210n - 0x1n) is 0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n - 0x0n, >+ 0xFEDCBA9876543210n, >+ 'The result of (0xFEDCBA9876543210n - 0x0n) is 0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n - -0x1n, >+ 0xFEDCBA9876543211n, >+ 'The result of (0xFEDCBA9876543210n - -0x1n) is 0xFEDCBA9876543211n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n - -0x2n, >+ 0xFEDCBA9876543212n, >+ 'The result of (0xFEDCBA9876543210n - -0x2n) is 0xFEDCBA9876543212n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n - -0x3n, >+ 0xFEDCBA9876543213n, >+ 'The result of (0xFEDCBA9876543210n - -0x3n) is 0xFEDCBA9876543213n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n - -0x1234n, >+ 0xFEDCBA9876544444n, >+ 'The result of (0xFEDCBA9876543210n - -0x1234n) is 0xFEDCBA9876544444n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n - -0xFEDCBA97n, >+ 0xFEDCBA997530ECA7n, >+ 'The result of (0xFEDCBA9876543210n - -0xFEDCBA97n) is 0xFEDCBA997530ECA7n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n - -0xFEDCBA98n, >+ 0xFEDCBA997530ECA8n, >+ 'The result of (0xFEDCBA9876543210n - -0xFEDCBA98n) is 0xFEDCBA997530ECA8n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n - -0xFEDCBA987654320Fn, >+ 0x1FDB97530ECA8641Fn, >+ 'The result of (0xFEDCBA9876543210n - -0xFEDCBA987654320Fn) is 0x1FDB97530ECA8641Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA9876543210n - -0xFEDCBA9876543210n, >+ 0x1FDB97530ECA86420n, >+ 'The result of (0xFEDCBA9876543210n - -0xFEDCBA9876543210n) is 0x1FDB97530ECA86420n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - 0xFEDCBA9876543210n, >+ -0x1n, >+ 'The result of (0xFEDCBA987654320Fn - 0xFEDCBA9876543210n) is -0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - 0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (0xFEDCBA987654320Fn - 0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - 0xFEDCBA98n, >+ 0xFEDCBA9777777777n, >+ 'The result of (0xFEDCBA987654320Fn - 0xFEDCBA98n) is 0xFEDCBA9777777777n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - 0xFEDCBA97n, >+ 0xFEDCBA9777777778n, >+ 'The result of (0xFEDCBA987654320Fn - 0xFEDCBA97n) is 0xFEDCBA9777777778n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - 0x1234n, >+ 0xFEDCBA9876541FDBn, >+ 'The result of (0xFEDCBA987654320Fn - 0x1234n) is 0xFEDCBA9876541FDBn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - 0x3n, >+ 0xFEDCBA987654320Cn, >+ 'The result of (0xFEDCBA987654320Fn - 0x3n) is 0xFEDCBA987654320Cn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - 0x2n, >+ 0xFEDCBA987654320Dn, >+ 'The result of (0xFEDCBA987654320Fn - 0x2n) is 0xFEDCBA987654320Dn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - 0x1n, >+ 0xFEDCBA987654320En, >+ 'The result of (0xFEDCBA987654320Fn - 0x1n) is 0xFEDCBA987654320En' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - 0x0n, >+ 0xFEDCBA987654320Fn, >+ 'The result of (0xFEDCBA987654320Fn - 0x0n) is 0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - -0x1n, >+ 0xFEDCBA9876543210n, >+ 'The result of (0xFEDCBA987654320Fn - -0x1n) is 0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - -0x2n, >+ 0xFEDCBA9876543211n, >+ 'The result of (0xFEDCBA987654320Fn - -0x2n) is 0xFEDCBA9876543211n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - -0x3n, >+ 0xFEDCBA9876543212n, >+ 'The result of (0xFEDCBA987654320Fn - -0x3n) is 0xFEDCBA9876543212n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - -0x1234n, >+ 0xFEDCBA9876544443n, >+ 'The result of (0xFEDCBA987654320Fn - -0x1234n) is 0xFEDCBA9876544443n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - -0xFEDCBA97n, >+ 0xFEDCBA997530ECA6n, >+ 'The result of (0xFEDCBA987654320Fn - -0xFEDCBA97n) is 0xFEDCBA997530ECA6n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - -0xFEDCBA98n, >+ 0xFEDCBA997530ECA7n, >+ 'The result of (0xFEDCBA987654320Fn - -0xFEDCBA98n) is 0xFEDCBA997530ECA7n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - -0xFEDCBA987654320Fn, >+ 0x1FDB97530ECA8641En, >+ 'The result of (0xFEDCBA987654320Fn - -0xFEDCBA987654320Fn) is 0x1FDB97530ECA8641En' >+); >+ >+assert.sameValue( >+ 0xFEDCBA987654320Fn - -0xFEDCBA9876543210n, >+ 0x1FDB97530ECA8641Fn, >+ 'The result of (0xFEDCBA987654320Fn - -0xFEDCBA9876543210n) is 0x1FDB97530ECA8641Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - 0xFEDCBA9876543210n, >+ -0xFEDCBA9777777778n, >+ 'The result of (0xFEDCBA98n - 0xFEDCBA9876543210n) is -0xFEDCBA9777777778n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - 0xFEDCBA987654320Fn, >+ -0xFEDCBA9777777777n, >+ 'The result of (0xFEDCBA98n - 0xFEDCBA987654320Fn) is -0xFEDCBA9777777777n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - 0xFEDCBA98n, >+ 0x0n, >+ 'The result of (0xFEDCBA98n - 0xFEDCBA98n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - 0xFEDCBA97n, >+ 0x1n, >+ 'The result of (0xFEDCBA98n - 0xFEDCBA97n) is 0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - 0x1234n, >+ 0xFEDCA864n, >+ 'The result of (0xFEDCBA98n - 0x1234n) is 0xFEDCA864n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - 0x3n, >+ 0xFEDCBA95n, >+ 'The result of (0xFEDCBA98n - 0x3n) is 0xFEDCBA95n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - 0x2n, >+ 0xFEDCBA96n, >+ 'The result of (0xFEDCBA98n - 0x2n) is 0xFEDCBA96n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - 0x1n, >+ 0xFEDCBA97n, >+ 'The result of (0xFEDCBA98n - 0x1n) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - 0x0n, >+ 0xFEDCBA98n, >+ 'The result of (0xFEDCBA98n - 0x0n) is 0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - -0x1n, >+ 0xFEDCBA99n, >+ 'The result of (0xFEDCBA98n - -0x1n) is 0xFEDCBA99n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - -0x2n, >+ 0xFEDCBA9An, >+ 'The result of (0xFEDCBA98n - -0x2n) is 0xFEDCBA9An' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - -0x3n, >+ 0xFEDCBA9Bn, >+ 'The result of (0xFEDCBA98n - -0x3n) is 0xFEDCBA9Bn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - -0x1234n, >+ 0xFEDCCCCCn, >+ 'The result of (0xFEDCBA98n - -0x1234n) is 0xFEDCCCCCn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - -0xFEDCBA97n, >+ 0x1FDB9752Fn, >+ 'The result of (0xFEDCBA98n - -0xFEDCBA97n) is 0x1FDB9752Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - -0xFEDCBA98n, >+ 0x1FDB97530n, >+ 'The result of (0xFEDCBA98n - -0xFEDCBA98n) is 0x1FDB97530n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - -0xFEDCBA987654320Fn, >+ 0xFEDCBA997530ECA7n, >+ 'The result of (0xFEDCBA98n - -0xFEDCBA987654320Fn) is 0xFEDCBA997530ECA7n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA98n - -0xFEDCBA9876543210n, >+ 0xFEDCBA997530ECA8n, >+ 'The result of (0xFEDCBA98n - -0xFEDCBA9876543210n) is 0xFEDCBA997530ECA8n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - 0xFEDCBA9876543210n, >+ -0xFEDCBA9777777779n, >+ 'The result of (0xFEDCBA97n - 0xFEDCBA9876543210n) is -0xFEDCBA9777777779n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - 0xFEDCBA987654320Fn, >+ -0xFEDCBA9777777778n, >+ 'The result of (0xFEDCBA97n - 0xFEDCBA987654320Fn) is -0xFEDCBA9777777778n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - 0xFEDCBA98n, >+ -0x1n, >+ 'The result of (0xFEDCBA97n - 0xFEDCBA98n) is -0x1n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - 0xFEDCBA97n, >+ 0x0n, >+ 'The result of (0xFEDCBA97n - 0xFEDCBA97n) is 0x0n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - 0x1234n, >+ 0xFEDCA863n, >+ 'The result of (0xFEDCBA97n - 0x1234n) is 0xFEDCA863n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - 0x3n, >+ 0xFEDCBA94n, >+ 'The result of (0xFEDCBA97n - 0x3n) is 0xFEDCBA94n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - 0x2n, >+ 0xFEDCBA95n, >+ 'The result of (0xFEDCBA97n - 0x2n) is 0xFEDCBA95n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - 0x1n, >+ 0xFEDCBA96n, >+ 'The result of (0xFEDCBA97n - 0x1n) is 0xFEDCBA96n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - 0x0n, >+ 0xFEDCBA97n, >+ 'The result of (0xFEDCBA97n - 0x0n) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - -0x1n, >+ 0xFEDCBA98n, >+ 'The result of (0xFEDCBA97n - -0x1n) is 0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - -0x2n, >+ 0xFEDCBA99n, >+ 'The result of (0xFEDCBA97n - -0x2n) is 0xFEDCBA99n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - -0x3n, >+ 0xFEDCBA9An, >+ 'The result of (0xFEDCBA97n - -0x3n) is 0xFEDCBA9An' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - -0x1234n, >+ 0xFEDCCCCBn, >+ 'The result of (0xFEDCBA97n - -0x1234n) is 0xFEDCCCCBn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - -0xFEDCBA97n, >+ 0x1FDB9752En, >+ 'The result of (0xFEDCBA97n - -0xFEDCBA97n) is 0x1FDB9752En' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - -0xFEDCBA98n, >+ 0x1FDB9752Fn, >+ 'The result of (0xFEDCBA97n - -0xFEDCBA98n) is 0x1FDB9752Fn' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - -0xFEDCBA987654320Fn, >+ 0xFEDCBA997530ECA6n, >+ 'The result of (0xFEDCBA97n - -0xFEDCBA987654320Fn) is 0xFEDCBA997530ECA6n' >+); >+ >+assert.sameValue( >+ 0xFEDCBA97n - -0xFEDCBA9876543210n, >+ 0xFEDCBA997530ECA7n, >+ 'The result of (0xFEDCBA97n - -0xFEDCBA9876543210n) is 0xFEDCBA997530ECA7n' >+); >+ >+assert.sameValue( >+ 0x1234n - 0xFEDCBA9876543210n, >+ -0xFEDCBA9876541FDCn, >+ 'The result of (0x1234n - 0xFEDCBA9876543210n) is -0xFEDCBA9876541FDCn' >+); >+ >+assert.sameValue( >+ 0x1234n - 0xFEDCBA987654320Fn, >+ -0xFEDCBA9876541FDBn, >+ 'The result of (0x1234n - 0xFEDCBA987654320Fn) is -0xFEDCBA9876541FDBn' >+); >+ >+assert.sameValue( >+ 0x1234n - 0xFEDCBA98n, >+ -0xFEDCA864n, >+ 'The result of (0x1234n - 0xFEDCBA98n) is -0xFEDCA864n' >+); >+ >+assert.sameValue( >+ 0x1234n - 0xFEDCBA97n, >+ -0xFEDCA863n, >+ 'The result of (0x1234n - 0xFEDCBA97n) is -0xFEDCA863n' >+); >+ >+assert.sameValue(0x1234n - 0x1234n, 0x0n, 'The result of (0x1234n - 0x1234n) is 0x0n'); >+assert.sameValue(0x1234n - 0x3n, 0x1231n, 'The result of (0x1234n - 0x3n) is 0x1231n'); >+assert.sameValue(0x1234n - 0x2n, 0x1232n, 'The result of (0x1234n - 0x2n) is 0x1232n'); >+assert.sameValue(0x1234n - 0x1n, 0x1233n, 'The result of (0x1234n - 0x1n) is 0x1233n'); >+assert.sameValue(0x1234n - 0x0n, 0x1234n, 'The result of (0x1234n - 0x0n) is 0x1234n'); >+assert.sameValue(0x1234n - -0x1n, 0x1235n, 'The result of (0x1234n - -0x1n) is 0x1235n'); >+assert.sameValue(0x1234n - -0x2n, 0x1236n, 'The result of (0x1234n - -0x2n) is 0x1236n'); >+assert.sameValue(0x1234n - -0x3n, 0x1237n, 'The result of (0x1234n - -0x3n) is 0x1237n'); >+assert.sameValue(0x1234n - -0x1234n, 0x2468n, 'The result of (0x1234n - -0x1234n) is 0x2468n'); >+ >+assert.sameValue( >+ 0x1234n - -0xFEDCBA97n, >+ 0xFEDCCCCBn, >+ 'The result of (0x1234n - -0xFEDCBA97n) is 0xFEDCCCCBn' >+); >+ >+assert.sameValue( >+ 0x1234n - -0xFEDCBA98n, >+ 0xFEDCCCCCn, >+ 'The result of (0x1234n - -0xFEDCBA98n) is 0xFEDCCCCCn' >+); >+ >+assert.sameValue( >+ 0x1234n - -0xFEDCBA987654320Fn, >+ 0xFEDCBA9876544443n, >+ 'The result of (0x1234n - -0xFEDCBA987654320Fn) is 0xFEDCBA9876544443n' >+); >+ >+assert.sameValue( >+ 0x1234n - -0xFEDCBA9876543210n, >+ 0xFEDCBA9876544444n, >+ 'The result of (0x1234n - -0xFEDCBA9876543210n) is 0xFEDCBA9876544444n' >+); >+ >+assert.sameValue( >+ 0x3n - 0xFEDCBA9876543210n, >+ -0xFEDCBA987654320Dn, >+ 'The result of (0x3n - 0xFEDCBA9876543210n) is -0xFEDCBA987654320Dn' >+); >+ >+assert.sameValue( >+ 0x3n - 0xFEDCBA987654320Fn, >+ -0xFEDCBA987654320Cn, >+ 'The result of (0x3n - 0xFEDCBA987654320Fn) is -0xFEDCBA987654320Cn' >+); >+ >+assert.sameValue( >+ 0x3n - 0xFEDCBA98n, >+ -0xFEDCBA95n, >+ 'The result of (0x3n - 0xFEDCBA98n) is -0xFEDCBA95n' >+); >+ >+assert.sameValue( >+ 0x3n - 0xFEDCBA97n, >+ -0xFEDCBA94n, >+ 'The result of (0x3n - 0xFEDCBA97n) is -0xFEDCBA94n' >+); >+ >+assert.sameValue(0x3n - 0x1234n, -0x1231n, 'The result of (0x3n - 0x1234n) is -0x1231n'); >+assert.sameValue(0x3n - 0x3n, 0x0n, 'The result of (0x3n - 0x3n) is 0x0n'); >+assert.sameValue(0x3n - 0x2n, 0x1n, 'The result of (0x3n - 0x2n) is 0x1n'); >+assert.sameValue(0x3n - 0x1n, 0x2n, 'The result of (0x3n - 0x1n) is 0x2n'); >+assert.sameValue(0x3n - 0x0n, 0x3n, 'The result of (0x3n - 0x0n) is 0x3n'); >+assert.sameValue(0x3n - -0x1n, 0x4n, 'The result of (0x3n - -0x1n) is 0x4n'); >+assert.sameValue(0x3n - -0x2n, 0x5n, 'The result of (0x3n - -0x2n) is 0x5n'); >+assert.sameValue(0x3n - -0x3n, 0x6n, 'The result of (0x3n - -0x3n) is 0x6n'); >+assert.sameValue(0x3n - -0x1234n, 0x1237n, 'The result of (0x3n - -0x1234n) is 0x1237n'); >+ >+assert.sameValue( >+ 0x3n - -0xFEDCBA97n, >+ 0xFEDCBA9An, >+ 'The result of (0x3n - -0xFEDCBA97n) is 0xFEDCBA9An' >+); >+ >+assert.sameValue( >+ 0x3n - -0xFEDCBA98n, >+ 0xFEDCBA9Bn, >+ 'The result of (0x3n - -0xFEDCBA98n) is 0xFEDCBA9Bn' >+); >+ >+assert.sameValue( >+ 0x3n - -0xFEDCBA987654320Fn, >+ 0xFEDCBA9876543212n, >+ 'The result of (0x3n - -0xFEDCBA987654320Fn) is 0xFEDCBA9876543212n' >+); >+ >+assert.sameValue( >+ 0x3n - -0xFEDCBA9876543210n, >+ 0xFEDCBA9876543213n, >+ 'The result of (0x3n - -0xFEDCBA9876543210n) is 0xFEDCBA9876543213n' >+); >+ >+assert.sameValue( >+ 0x2n - 0xFEDCBA9876543210n, >+ -0xFEDCBA987654320En, >+ 'The result of (0x2n - 0xFEDCBA9876543210n) is -0xFEDCBA987654320En' >+); >+ >+assert.sameValue( >+ 0x2n - 0xFEDCBA987654320Fn, >+ -0xFEDCBA987654320Dn, >+ 'The result of (0x2n - 0xFEDCBA987654320Fn) is -0xFEDCBA987654320Dn' >+); >+ >+assert.sameValue( >+ 0x2n - 0xFEDCBA98n, >+ -0xFEDCBA96n, >+ 'The result of (0x2n - 0xFEDCBA98n) is -0xFEDCBA96n' >+); >+ >+assert.sameValue( >+ 0x2n - 0xFEDCBA97n, >+ -0xFEDCBA95n, >+ 'The result of (0x2n - 0xFEDCBA97n) is -0xFEDCBA95n' >+); >+ >+assert.sameValue(0x2n - 0x1234n, -0x1232n, 'The result of (0x2n - 0x1234n) is -0x1232n'); >+assert.sameValue(0x2n - 0x3n, -0x1n, 'The result of (0x2n - 0x3n) is -0x1n'); >+assert.sameValue(0x2n - 0x2n, 0x0n, 'The result of (0x2n - 0x2n) is 0x0n'); >+assert.sameValue(0x2n - 0x1n, 0x1n, 'The result of (0x2n - 0x1n) is 0x1n'); >+assert.sameValue(0x2n - 0x0n, 0x2n, 'The result of (0x2n - 0x0n) is 0x2n'); >+assert.sameValue(0x2n - -0x1n, 0x3n, 'The result of (0x2n - -0x1n) is 0x3n'); >+assert.sameValue(0x2n - -0x2n, 0x4n, 'The result of (0x2n - -0x2n) is 0x4n'); >+assert.sameValue(0x2n - -0x3n, 0x5n, 'The result of (0x2n - -0x3n) is 0x5n'); >+assert.sameValue(0x2n - -0x1234n, 0x1236n, 'The result of (0x2n - -0x1234n) is 0x1236n'); >+ >+assert.sameValue( >+ 0x2n - -0xFEDCBA97n, >+ 0xFEDCBA99n, >+ 'The result of (0x2n - -0xFEDCBA97n) is 0xFEDCBA99n' >+); >+ >+assert.sameValue( >+ 0x2n - -0xFEDCBA98n, >+ 0xFEDCBA9An, >+ 'The result of (0x2n - -0xFEDCBA98n) is 0xFEDCBA9An' >+); >+ >+assert.sameValue( >+ 0x2n - -0xFEDCBA987654320Fn, >+ 0xFEDCBA9876543211n, >+ 'The result of (0x2n - -0xFEDCBA987654320Fn) is 0xFEDCBA9876543211n' >+); >+ >+assert.sameValue( >+ 0x2n - -0xFEDCBA9876543210n, >+ 0xFEDCBA9876543212n, >+ 'The result of (0x2n - -0xFEDCBA9876543210n) is 0xFEDCBA9876543212n' >+); >+ >+assert.sameValue( >+ 0x1n - 0xFEDCBA9876543210n, >+ -0xFEDCBA987654320Fn, >+ 'The result of (0x1n - 0xFEDCBA9876543210n) is -0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0x1n - 0xFEDCBA987654320Fn, >+ -0xFEDCBA987654320En, >+ 'The result of (0x1n - 0xFEDCBA987654320Fn) is -0xFEDCBA987654320En' >+); >+ >+assert.sameValue( >+ 0x1n - 0xFEDCBA98n, >+ -0xFEDCBA97n, >+ 'The result of (0x1n - 0xFEDCBA98n) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0x1n - 0xFEDCBA97n, >+ -0xFEDCBA96n, >+ 'The result of (0x1n - 0xFEDCBA97n) is -0xFEDCBA96n' >+); >+ >+assert.sameValue(0x1n - 0x1234n, -0x1233n, 'The result of (0x1n - 0x1234n) is -0x1233n'); >+assert.sameValue(0x1n - 0x3n, -0x2n, 'The result of (0x1n - 0x3n) is -0x2n'); >+assert.sameValue(0x1n - 0x2n, -0x1n, 'The result of (0x1n - 0x2n) is -0x1n'); >+assert.sameValue(0x1n - 0x1n, 0x0n, 'The result of (0x1n - 0x1n) is 0x0n'); >+assert.sameValue(0x1n - 0x0n, 0x1n, 'The result of (0x1n - 0x0n) is 0x1n'); >+assert.sameValue(0x1n - -0x1n, 0x2n, 'The result of (0x1n - -0x1n) is 0x2n'); >+assert.sameValue(0x1n - -0x2n, 0x3n, 'The result of (0x1n - -0x2n) is 0x3n'); >+assert.sameValue(0x1n - -0x3n, 0x4n, 'The result of (0x1n - -0x3n) is 0x4n'); >+assert.sameValue(0x1n - -0x1234n, 0x1235n, 'The result of (0x1n - -0x1234n) is 0x1235n'); >+ >+assert.sameValue( >+ 0x1n - -0xFEDCBA97n, >+ 0xFEDCBA98n, >+ 'The result of (0x1n - -0xFEDCBA97n) is 0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0x1n - -0xFEDCBA98n, >+ 0xFEDCBA99n, >+ 'The result of (0x1n - -0xFEDCBA98n) is 0xFEDCBA99n' >+); >+ >+assert.sameValue( >+ 0x1n - -0xFEDCBA987654320Fn, >+ 0xFEDCBA9876543210n, >+ 'The result of (0x1n - -0xFEDCBA987654320Fn) is 0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ 0x1n - -0xFEDCBA9876543210n, >+ 0xFEDCBA9876543211n, >+ 'The result of (0x1n - -0xFEDCBA9876543210n) is 0xFEDCBA9876543211n' >+); >+ >+assert.sameValue( >+ 0x0n - 0xFEDCBA9876543210n, >+ -0xFEDCBA9876543210n, >+ 'The result of (0x0n - 0xFEDCBA9876543210n) is -0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ 0x0n - 0xFEDCBA987654320Fn, >+ -0xFEDCBA987654320Fn, >+ 'The result of (0x0n - 0xFEDCBA987654320Fn) is -0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0x0n - 0xFEDCBA98n, >+ -0xFEDCBA98n, >+ 'The result of (0x0n - 0xFEDCBA98n) is -0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0x0n - 0xFEDCBA97n, >+ -0xFEDCBA97n, >+ 'The result of (0x0n - 0xFEDCBA97n) is -0xFEDCBA97n' >+); >+ >+assert.sameValue(0x0n - 0x1234n, -0x1234n, 'The result of (0x0n - 0x1234n) is -0x1234n'); >+assert.sameValue(0x0n - 0x3n, -0x3n, 'The result of (0x0n - 0x3n) is -0x3n'); >+assert.sameValue(0x0n - 0x2n, -0x2n, 'The result of (0x0n - 0x2n) is -0x2n'); >+assert.sameValue(0x0n - 0x1n, -0x1n, 'The result of (0x0n - 0x1n) is -0x1n'); >+assert.sameValue(0x0n - 0x0n, 0x0n, 'The result of (0x0n - 0x0n) is 0x0n'); >+assert.sameValue(0x0n - -0x1n, 0x1n, 'The result of (0x0n - -0x1n) is 0x1n'); >+assert.sameValue(0x0n - -0x2n, 0x2n, 'The result of (0x0n - -0x2n) is 0x2n'); >+assert.sameValue(0x0n - -0x3n, 0x3n, 'The result of (0x0n - -0x3n) is 0x3n'); >+assert.sameValue(0x0n - -0x1234n, 0x1234n, 'The result of (0x0n - -0x1234n) is 0x1234n'); >+ >+assert.sameValue( >+ 0x0n - -0xFEDCBA97n, >+ 0xFEDCBA97n, >+ 'The result of (0x0n - -0xFEDCBA97n) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ 0x0n - -0xFEDCBA98n, >+ 0xFEDCBA98n, >+ 'The result of (0x0n - -0xFEDCBA98n) is 0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ 0x0n - -0xFEDCBA987654320Fn, >+ 0xFEDCBA987654320Fn, >+ 'The result of (0x0n - -0xFEDCBA987654320Fn) is 0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ 0x0n - -0xFEDCBA9876543210n, >+ 0xFEDCBA9876543210n, >+ 'The result of (0x0n - -0xFEDCBA9876543210n) is 0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ -0x1n - 0xFEDCBA9876543210n, >+ -0xFEDCBA9876543211n, >+ 'The result of (-0x1n - 0xFEDCBA9876543210n) is -0xFEDCBA9876543211n' >+); >+ >+assert.sameValue( >+ -0x1n - 0xFEDCBA987654320Fn, >+ -0xFEDCBA9876543210n, >+ 'The result of (-0x1n - 0xFEDCBA987654320Fn) is -0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ -0x1n - 0xFEDCBA98n, >+ -0xFEDCBA99n, >+ 'The result of (-0x1n - 0xFEDCBA98n) is -0xFEDCBA99n' >+); >+ >+assert.sameValue( >+ -0x1n - 0xFEDCBA97n, >+ -0xFEDCBA98n, >+ 'The result of (-0x1n - 0xFEDCBA97n) is -0xFEDCBA98n' >+); >+ >+assert.sameValue(-0x1n - 0x1234n, -0x1235n, 'The result of (-0x1n - 0x1234n) is -0x1235n'); >+assert.sameValue(-0x1n - 0x3n, -0x4n, 'The result of (-0x1n - 0x3n) is -0x4n'); >+assert.sameValue(-0x1n - 0x2n, -0x3n, 'The result of (-0x1n - 0x2n) is -0x3n'); >+assert.sameValue(-0x1n - 0x1n, -0x2n, 'The result of (-0x1n - 0x1n) is -0x2n'); >+assert.sameValue(-0x1n - 0x0n, -0x1n, 'The result of (-0x1n - 0x0n) is -0x1n'); >+assert.sameValue(-0x1n - -0x1n, 0x0n, 'The result of (-0x1n - -0x1n) is 0x0n'); >+assert.sameValue(-0x1n - -0x2n, 0x1n, 'The result of (-0x1n - -0x2n) is 0x1n'); >+assert.sameValue(-0x1n - -0x3n, 0x2n, 'The result of (-0x1n - -0x3n) is 0x2n'); >+assert.sameValue(-0x1n - -0x1234n, 0x1233n, 'The result of (-0x1n - -0x1234n) is 0x1233n'); >+ >+assert.sameValue( >+ -0x1n - -0xFEDCBA97n, >+ 0xFEDCBA96n, >+ 'The result of (-0x1n - -0xFEDCBA97n) is 0xFEDCBA96n' >+); >+ >+assert.sameValue( >+ -0x1n - -0xFEDCBA98n, >+ 0xFEDCBA97n, >+ 'The result of (-0x1n - -0xFEDCBA98n) is 0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ -0x1n - -0xFEDCBA987654320Fn, >+ 0xFEDCBA987654320En, >+ 'The result of (-0x1n - -0xFEDCBA987654320Fn) is 0xFEDCBA987654320En' >+); >+ >+assert.sameValue( >+ -0x1n - -0xFEDCBA9876543210n, >+ 0xFEDCBA987654320Fn, >+ 'The result of (-0x1n - -0xFEDCBA9876543210n) is 0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ -0x2n - 0xFEDCBA9876543210n, >+ -0xFEDCBA9876543212n, >+ 'The result of (-0x2n - 0xFEDCBA9876543210n) is -0xFEDCBA9876543212n' >+); >+ >+assert.sameValue( >+ -0x2n - 0xFEDCBA987654320Fn, >+ -0xFEDCBA9876543211n, >+ 'The result of (-0x2n - 0xFEDCBA987654320Fn) is -0xFEDCBA9876543211n' >+); >+ >+assert.sameValue( >+ -0x2n - 0xFEDCBA98n, >+ -0xFEDCBA9An, >+ 'The result of (-0x2n - 0xFEDCBA98n) is -0xFEDCBA9An' >+); >+ >+assert.sameValue( >+ -0x2n - 0xFEDCBA97n, >+ -0xFEDCBA99n, >+ 'The result of (-0x2n - 0xFEDCBA97n) is -0xFEDCBA99n' >+); >+ >+assert.sameValue(-0x2n - 0x1234n, -0x1236n, 'The result of (-0x2n - 0x1234n) is -0x1236n'); >+assert.sameValue(-0x2n - 0x3n, -0x5n, 'The result of (-0x2n - 0x3n) is -0x5n'); >+assert.sameValue(-0x2n - 0x2n, -0x4n, 'The result of (-0x2n - 0x2n) is -0x4n'); >+assert.sameValue(-0x2n - 0x1n, -0x3n, 'The result of (-0x2n - 0x1n) is -0x3n'); >+assert.sameValue(-0x2n - 0x0n, -0x2n, 'The result of (-0x2n - 0x0n) is -0x2n'); >+assert.sameValue(-0x2n - -0x1n, -0x1n, 'The result of (-0x2n - -0x1n) is -0x1n'); >+assert.sameValue(-0x2n - -0x2n, 0x0n, 'The result of (-0x2n - -0x2n) is 0x0n'); >+assert.sameValue(-0x2n - -0x3n, 0x1n, 'The result of (-0x2n - -0x3n) is 0x1n'); >+assert.sameValue(-0x2n - -0x1234n, 0x1232n, 'The result of (-0x2n - -0x1234n) is 0x1232n'); >+ >+assert.sameValue( >+ -0x2n - -0xFEDCBA97n, >+ 0xFEDCBA95n, >+ 'The result of (-0x2n - -0xFEDCBA97n) is 0xFEDCBA95n' >+); >+ >+assert.sameValue( >+ -0x2n - -0xFEDCBA98n, >+ 0xFEDCBA96n, >+ 'The result of (-0x2n - -0xFEDCBA98n) is 0xFEDCBA96n' >+); >+ >+assert.sameValue( >+ -0x2n - -0xFEDCBA987654320Fn, >+ 0xFEDCBA987654320Dn, >+ 'The result of (-0x2n - -0xFEDCBA987654320Fn) is 0xFEDCBA987654320Dn' >+); >+ >+assert.sameValue( >+ -0x2n - -0xFEDCBA9876543210n, >+ 0xFEDCBA987654320En, >+ 'The result of (-0x2n - -0xFEDCBA9876543210n) is 0xFEDCBA987654320En' >+); >+ >+assert.sameValue( >+ -0x3n - 0xFEDCBA9876543210n, >+ -0xFEDCBA9876543213n, >+ 'The result of (-0x3n - 0xFEDCBA9876543210n) is -0xFEDCBA9876543213n' >+); >+ >+assert.sameValue( >+ -0x3n - 0xFEDCBA987654320Fn, >+ -0xFEDCBA9876543212n, >+ 'The result of (-0x3n - 0xFEDCBA987654320Fn) is -0xFEDCBA9876543212n' >+); >+ >+assert.sameValue( >+ -0x3n - 0xFEDCBA98n, >+ -0xFEDCBA9Bn, >+ 'The result of (-0x3n - 0xFEDCBA98n) is -0xFEDCBA9Bn' >+); >+ >+assert.sameValue( >+ -0x3n - 0xFEDCBA97n, >+ -0xFEDCBA9An, >+ 'The result of (-0x3n - 0xFEDCBA97n) is -0xFEDCBA9An' >+); >+ >+assert.sameValue(-0x3n - 0x1234n, -0x1237n, 'The result of (-0x3n - 0x1234n) is -0x1237n'); >+assert.sameValue(-0x3n - 0x3n, -0x6n, 'The result of (-0x3n - 0x3n) is -0x6n'); >+assert.sameValue(-0x3n - 0x2n, -0x5n, 'The result of (-0x3n - 0x2n) is -0x5n'); >+assert.sameValue(-0x3n - 0x1n, -0x4n, 'The result of (-0x3n - 0x1n) is -0x4n'); >+assert.sameValue(-0x3n - 0x0n, -0x3n, 'The result of (-0x3n - 0x0n) is -0x3n'); >+assert.sameValue(-0x3n - -0x1n, -0x2n, 'The result of (-0x3n - -0x1n) is -0x2n'); >+assert.sameValue(-0x3n - -0x2n, -0x1n, 'The result of (-0x3n - -0x2n) is -0x1n'); >+assert.sameValue(-0x3n - -0x3n, 0x0n, 'The result of (-0x3n - -0x3n) is 0x0n'); >+assert.sameValue(-0x3n - -0x1234n, 0x1231n, 'The result of (-0x3n - -0x1234n) is 0x1231n'); >+ >+assert.sameValue( >+ -0x3n - -0xFEDCBA97n, >+ 0xFEDCBA94n, >+ 'The result of (-0x3n - -0xFEDCBA97n) is 0xFEDCBA94n' >+); >+ >+assert.sameValue( >+ -0x3n - -0xFEDCBA98n, >+ 0xFEDCBA95n, >+ 'The result of (-0x3n - -0xFEDCBA98n) is 0xFEDCBA95n' >+); >+ >+assert.sameValue( >+ -0x3n - -0xFEDCBA987654320Fn, >+ 0xFEDCBA987654320Cn, >+ 'The result of (-0x3n - -0xFEDCBA987654320Fn) is 0xFEDCBA987654320Cn' >+); >+ >+assert.sameValue( >+ -0x3n - -0xFEDCBA9876543210n, >+ 0xFEDCBA987654320Dn, >+ 'The result of (-0x3n - -0xFEDCBA9876543210n) is 0xFEDCBA987654320Dn' >+); >+ >+assert.sameValue( >+ -0x1234n - 0xFEDCBA9876543210n, >+ -0xFEDCBA9876544444n, >+ 'The result of (-0x1234n - 0xFEDCBA9876543210n) is -0xFEDCBA9876544444n' >+); >+ >+assert.sameValue( >+ -0x1234n - 0xFEDCBA987654320Fn, >+ -0xFEDCBA9876544443n, >+ 'The result of (-0x1234n - 0xFEDCBA987654320Fn) is -0xFEDCBA9876544443n' >+); >+ >+assert.sameValue( >+ -0x1234n - 0xFEDCBA98n, >+ -0xFEDCCCCCn, >+ 'The result of (-0x1234n - 0xFEDCBA98n) is -0xFEDCCCCCn' >+); >+ >+assert.sameValue( >+ -0x1234n - 0xFEDCBA97n, >+ -0xFEDCCCCBn, >+ 'The result of (-0x1234n - 0xFEDCBA97n) is -0xFEDCCCCBn' >+); >+ >+assert.sameValue(-0x1234n - 0x1234n, -0x2468n, 'The result of (-0x1234n - 0x1234n) is -0x2468n'); >+assert.sameValue(-0x1234n - 0x3n, -0x1237n, 'The result of (-0x1234n - 0x3n) is -0x1237n'); >+assert.sameValue(-0x1234n - 0x2n, -0x1236n, 'The result of (-0x1234n - 0x2n) is -0x1236n'); >+assert.sameValue(-0x1234n - 0x1n, -0x1235n, 'The result of (-0x1234n - 0x1n) is -0x1235n'); >+assert.sameValue(-0x1234n - 0x0n, -0x1234n, 'The result of (-0x1234n - 0x0n) is -0x1234n'); >+assert.sameValue(-0x1234n - -0x1n, -0x1233n, 'The result of (-0x1234n - -0x1n) is -0x1233n'); >+assert.sameValue(-0x1234n - -0x2n, -0x1232n, 'The result of (-0x1234n - -0x2n) is -0x1232n'); >+assert.sameValue(-0x1234n - -0x3n, -0x1231n, 'The result of (-0x1234n - -0x3n) is -0x1231n'); >+assert.sameValue(-0x1234n - -0x1234n, 0x0n, 'The result of (-0x1234n - -0x1234n) is 0x0n'); >+ >+assert.sameValue( >+ -0x1234n - -0xFEDCBA97n, >+ 0xFEDCA863n, >+ 'The result of (-0x1234n - -0xFEDCBA97n) is 0xFEDCA863n' >+); >+ >+assert.sameValue( >+ -0x1234n - -0xFEDCBA98n, >+ 0xFEDCA864n, >+ 'The result of (-0x1234n - -0xFEDCBA98n) is 0xFEDCA864n' >+); >+ >+assert.sameValue( >+ -0x1234n - -0xFEDCBA987654320Fn, >+ 0xFEDCBA9876541FDBn, >+ 'The result of (-0x1234n - -0xFEDCBA987654320Fn) is 0xFEDCBA9876541FDBn' >+); >+ >+assert.sameValue( >+ -0x1234n - -0xFEDCBA9876543210n, >+ 0xFEDCBA9876541FDCn, >+ 'The result of (-0x1234n - -0xFEDCBA9876543210n) is 0xFEDCBA9876541FDCn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - 0xFEDCBA9876543210n, >+ -0xFEDCBA997530ECA7n, >+ 'The result of (-0xFEDCBA97n - 0xFEDCBA9876543210n) is -0xFEDCBA997530ECA7n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - 0xFEDCBA987654320Fn, >+ -0xFEDCBA997530ECA6n, >+ 'The result of (-0xFEDCBA97n - 0xFEDCBA987654320Fn) is -0xFEDCBA997530ECA6n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - 0xFEDCBA98n, >+ -0x1FDB9752Fn, >+ 'The result of (-0xFEDCBA97n - 0xFEDCBA98n) is -0x1FDB9752Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - 0xFEDCBA97n, >+ -0x1FDB9752En, >+ 'The result of (-0xFEDCBA97n - 0xFEDCBA97n) is -0x1FDB9752En' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - 0x1234n, >+ -0xFEDCCCCBn, >+ 'The result of (-0xFEDCBA97n - 0x1234n) is -0xFEDCCCCBn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - 0x3n, >+ -0xFEDCBA9An, >+ 'The result of (-0xFEDCBA97n - 0x3n) is -0xFEDCBA9An' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - 0x2n, >+ -0xFEDCBA99n, >+ 'The result of (-0xFEDCBA97n - 0x2n) is -0xFEDCBA99n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - 0x1n, >+ -0xFEDCBA98n, >+ 'The result of (-0xFEDCBA97n - 0x1n) is -0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - 0x0n, >+ -0xFEDCBA97n, >+ 'The result of (-0xFEDCBA97n - 0x0n) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - -0x1n, >+ -0xFEDCBA96n, >+ 'The result of (-0xFEDCBA97n - -0x1n) is -0xFEDCBA96n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - -0x2n, >+ -0xFEDCBA95n, >+ 'The result of (-0xFEDCBA97n - -0x2n) is -0xFEDCBA95n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - -0x3n, >+ -0xFEDCBA94n, >+ 'The result of (-0xFEDCBA97n - -0x3n) is -0xFEDCBA94n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - -0x1234n, >+ -0xFEDCA863n, >+ 'The result of (-0xFEDCBA97n - -0x1234n) is -0xFEDCA863n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - -0xFEDCBA97n, >+ 0x0n, >+ 'The result of (-0xFEDCBA97n - -0xFEDCBA97n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - -0xFEDCBA98n, >+ 0x1n, >+ 'The result of (-0xFEDCBA97n - -0xFEDCBA98n) is 0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - -0xFEDCBA987654320Fn, >+ 0xFEDCBA9777777778n, >+ 'The result of (-0xFEDCBA97n - -0xFEDCBA987654320Fn) is 0xFEDCBA9777777778n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA97n - -0xFEDCBA9876543210n, >+ 0xFEDCBA9777777779n, >+ 'The result of (-0xFEDCBA97n - -0xFEDCBA9876543210n) is 0xFEDCBA9777777779n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - 0xFEDCBA9876543210n, >+ -0xFEDCBA997530ECA8n, >+ 'The result of (-0xFEDCBA98n - 0xFEDCBA9876543210n) is -0xFEDCBA997530ECA8n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - 0xFEDCBA987654320Fn, >+ -0xFEDCBA997530ECA7n, >+ 'The result of (-0xFEDCBA98n - 0xFEDCBA987654320Fn) is -0xFEDCBA997530ECA7n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - 0xFEDCBA98n, >+ -0x1FDB97530n, >+ 'The result of (-0xFEDCBA98n - 0xFEDCBA98n) is -0x1FDB97530n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - 0xFEDCBA97n, >+ -0x1FDB9752Fn, >+ 'The result of (-0xFEDCBA98n - 0xFEDCBA97n) is -0x1FDB9752Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - 0x1234n, >+ -0xFEDCCCCCn, >+ 'The result of (-0xFEDCBA98n - 0x1234n) is -0xFEDCCCCCn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - 0x3n, >+ -0xFEDCBA9Bn, >+ 'The result of (-0xFEDCBA98n - 0x3n) is -0xFEDCBA9Bn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - 0x2n, >+ -0xFEDCBA9An, >+ 'The result of (-0xFEDCBA98n - 0x2n) is -0xFEDCBA9An' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - 0x1n, >+ -0xFEDCBA99n, >+ 'The result of (-0xFEDCBA98n - 0x1n) is -0xFEDCBA99n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - 0x0n, >+ -0xFEDCBA98n, >+ 'The result of (-0xFEDCBA98n - 0x0n) is -0xFEDCBA98n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - -0x1n, >+ -0xFEDCBA97n, >+ 'The result of (-0xFEDCBA98n - -0x1n) is -0xFEDCBA97n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - -0x2n, >+ -0xFEDCBA96n, >+ 'The result of (-0xFEDCBA98n - -0x2n) is -0xFEDCBA96n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - -0x3n, >+ -0xFEDCBA95n, >+ 'The result of (-0xFEDCBA98n - -0x3n) is -0xFEDCBA95n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - -0x1234n, >+ -0xFEDCA864n, >+ 'The result of (-0xFEDCBA98n - -0x1234n) is -0xFEDCA864n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - -0xFEDCBA97n, >+ -0x1n, >+ 'The result of (-0xFEDCBA98n - -0xFEDCBA97n) is -0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - -0xFEDCBA98n, >+ 0x0n, >+ 'The result of (-0xFEDCBA98n - -0xFEDCBA98n) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - -0xFEDCBA987654320Fn, >+ 0xFEDCBA9777777777n, >+ 'The result of (-0xFEDCBA98n - -0xFEDCBA987654320Fn) is 0xFEDCBA9777777777n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA98n - -0xFEDCBA9876543210n, >+ 0xFEDCBA9777777778n, >+ 'The result of (-0xFEDCBA98n - -0xFEDCBA9876543210n) is 0xFEDCBA9777777778n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - 0xFEDCBA9876543210n, >+ -0x1FDB97530ECA8641Fn, >+ 'The result of (-0xFEDCBA987654320Fn - 0xFEDCBA9876543210n) is -0x1FDB97530ECA8641Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - 0xFEDCBA987654320Fn, >+ -0x1FDB97530ECA8641En, >+ 'The result of (-0xFEDCBA987654320Fn - 0xFEDCBA987654320Fn) is -0x1FDB97530ECA8641En' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - 0xFEDCBA98n, >+ -0xFEDCBA997530ECA7n, >+ 'The result of (-0xFEDCBA987654320Fn - 0xFEDCBA98n) is -0xFEDCBA997530ECA7n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - 0xFEDCBA97n, >+ -0xFEDCBA997530ECA6n, >+ 'The result of (-0xFEDCBA987654320Fn - 0xFEDCBA97n) is -0xFEDCBA997530ECA6n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - 0x1234n, >+ -0xFEDCBA9876544443n, >+ 'The result of (-0xFEDCBA987654320Fn - 0x1234n) is -0xFEDCBA9876544443n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - 0x3n, >+ -0xFEDCBA9876543212n, >+ 'The result of (-0xFEDCBA987654320Fn - 0x3n) is -0xFEDCBA9876543212n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - 0x2n, >+ -0xFEDCBA9876543211n, >+ 'The result of (-0xFEDCBA987654320Fn - 0x2n) is -0xFEDCBA9876543211n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - 0x1n, >+ -0xFEDCBA9876543210n, >+ 'The result of (-0xFEDCBA987654320Fn - 0x1n) is -0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - 0x0n, >+ -0xFEDCBA987654320Fn, >+ 'The result of (-0xFEDCBA987654320Fn - 0x0n) is -0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - -0x1n, >+ -0xFEDCBA987654320En, >+ 'The result of (-0xFEDCBA987654320Fn - -0x1n) is -0xFEDCBA987654320En' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - -0x2n, >+ -0xFEDCBA987654320Dn, >+ 'The result of (-0xFEDCBA987654320Fn - -0x2n) is -0xFEDCBA987654320Dn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - -0x3n, >+ -0xFEDCBA987654320Cn, >+ 'The result of (-0xFEDCBA987654320Fn - -0x3n) is -0xFEDCBA987654320Cn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - -0x1234n, >+ -0xFEDCBA9876541FDBn, >+ 'The result of (-0xFEDCBA987654320Fn - -0x1234n) is -0xFEDCBA9876541FDBn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - -0xFEDCBA97n, >+ -0xFEDCBA9777777778n, >+ 'The result of (-0xFEDCBA987654320Fn - -0xFEDCBA97n) is -0xFEDCBA9777777778n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - -0xFEDCBA98n, >+ -0xFEDCBA9777777777n, >+ 'The result of (-0xFEDCBA987654320Fn - -0xFEDCBA98n) is -0xFEDCBA9777777777n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - -0xFEDCBA987654320Fn, >+ 0x0n, >+ 'The result of (-0xFEDCBA987654320Fn - -0xFEDCBA987654320Fn) is 0x0n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA987654320Fn - -0xFEDCBA9876543210n, >+ 0x1n, >+ 'The result of (-0xFEDCBA987654320Fn - -0xFEDCBA9876543210n) is 0x1n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n - 0xFEDCBA9876543210n, >+ -0x1FDB97530ECA86420n, >+ 'The result of (-0xFEDCBA9876543210n - 0xFEDCBA9876543210n) is -0x1FDB97530ECA86420n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n - 0xFEDCBA987654320Fn, >+ -0x1FDB97530ECA8641Fn, >+ 'The result of (-0xFEDCBA9876543210n - 0xFEDCBA987654320Fn) is -0x1FDB97530ECA8641Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n - 0xFEDCBA98n, >+ -0xFEDCBA997530ECA8n, >+ 'The result of (-0xFEDCBA9876543210n - 0xFEDCBA98n) is -0xFEDCBA997530ECA8n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n - 0xFEDCBA97n, >+ -0xFEDCBA997530ECA7n, >+ 'The result of (-0xFEDCBA9876543210n - 0xFEDCBA97n) is -0xFEDCBA997530ECA7n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n - 0x1234n, >+ -0xFEDCBA9876544444n, >+ 'The result of (-0xFEDCBA9876543210n - 0x1234n) is -0xFEDCBA9876544444n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n - 0x3n, >+ -0xFEDCBA9876543213n, >+ 'The result of (-0xFEDCBA9876543210n - 0x3n) is -0xFEDCBA9876543213n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n - 0x2n, >+ -0xFEDCBA9876543212n, >+ 'The result of (-0xFEDCBA9876543210n - 0x2n) is -0xFEDCBA9876543212n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n - 0x1n, >+ -0xFEDCBA9876543211n, >+ 'The result of (-0xFEDCBA9876543210n - 0x1n) is -0xFEDCBA9876543211n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n - 0x0n, >+ -0xFEDCBA9876543210n, >+ 'The result of (-0xFEDCBA9876543210n - 0x0n) is -0xFEDCBA9876543210n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n - -0x1n, >+ -0xFEDCBA987654320Fn, >+ 'The result of (-0xFEDCBA9876543210n - -0x1n) is -0xFEDCBA987654320Fn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n - -0x2n, >+ -0xFEDCBA987654320En, >+ 'The result of (-0xFEDCBA9876543210n - -0x2n) is -0xFEDCBA987654320En' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n - -0x3n, >+ -0xFEDCBA987654320Dn, >+ 'The result of (-0xFEDCBA9876543210n - -0x3n) is -0xFEDCBA987654320Dn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n - -0x1234n, >+ -0xFEDCBA9876541FDCn, >+ 'The result of (-0xFEDCBA9876543210n - -0x1234n) is -0xFEDCBA9876541FDCn' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n - -0xFEDCBA97n, >+ -0xFEDCBA9777777779n, >+ 'The result of (-0xFEDCBA9876543210n - -0xFEDCBA97n) is -0xFEDCBA9777777779n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n - -0xFEDCBA98n, >+ -0xFEDCBA9777777778n, >+ 'The result of (-0xFEDCBA9876543210n - -0xFEDCBA98n) is -0xFEDCBA9777777778n' >+); >+ >+assert.sameValue( >+ -0xFEDCBA9876543210n - -0xFEDCBA987654320Fn, >+ -0x1n, >+ 'The result of (-0xFEDCBA9876543210n - -0xFEDCBA987654320Fn) is -0x1n' >+); > >-function testSub(x, y, z) { >- assert.sameValue(x - y, z, x + " - " + y + " = " + z); >-} >- >-testSub(0xFEDCBA9876543210n, 0xFEDCBA9876543210n, 0x0n); >-testSub(0xFEDCBA9876543210n, 0xFEDCBA987654320Fn, 0x1n); >-testSub(0xFEDCBA9876543210n, 0xFEDCBA98n, 0xFEDCBA9777777778n); >-testSub(0xFEDCBA9876543210n, 0xFEDCBA97n, 0xFEDCBA9777777779n); >-testSub(0xFEDCBA9876543210n, 0x1234n, 0xFEDCBA9876541FDCn); >-testSub(0xFEDCBA9876543210n, 0x3n, 0xFEDCBA987654320Dn); >-testSub(0xFEDCBA9876543210n, 0x2n, 0xFEDCBA987654320En); >-testSub(0xFEDCBA9876543210n, 0x1n, 0xFEDCBA987654320Fn); >-testSub(0xFEDCBA9876543210n, 0x0n, 0xFEDCBA9876543210n); >-testSub(0xFEDCBA9876543210n, -0x1n, 0xFEDCBA9876543211n); >-testSub(0xFEDCBA9876543210n, -0x2n, 0xFEDCBA9876543212n); >-testSub(0xFEDCBA9876543210n, -0x3n, 0xFEDCBA9876543213n); >-testSub(0xFEDCBA9876543210n, -0x1234n, 0xFEDCBA9876544444n); >-testSub(0xFEDCBA9876543210n, -0xFEDCBA97n, 0xFEDCBA997530ECA7n); >-testSub(0xFEDCBA9876543210n, -0xFEDCBA98n, 0xFEDCBA997530ECA8n); >-testSub(0xFEDCBA9876543210n, -0xFEDCBA987654320Fn, 0x1FDB97530ECA8641Fn); >-testSub(0xFEDCBA9876543210n, -0xFEDCBA9876543210n, 0x1FDB97530ECA86420n); >-testSub(0xFEDCBA987654320Fn, 0xFEDCBA9876543210n, -0x1n); >-testSub(0xFEDCBA987654320Fn, 0xFEDCBA987654320Fn, 0x0n); >-testSub(0xFEDCBA987654320Fn, 0xFEDCBA98n, 0xFEDCBA9777777777n); >-testSub(0xFEDCBA987654320Fn, 0xFEDCBA97n, 0xFEDCBA9777777778n); >-testSub(0xFEDCBA987654320Fn, 0x1234n, 0xFEDCBA9876541FDBn); >-testSub(0xFEDCBA987654320Fn, 0x3n, 0xFEDCBA987654320Cn); >-testSub(0xFEDCBA987654320Fn, 0x2n, 0xFEDCBA987654320Dn); >-testSub(0xFEDCBA987654320Fn, 0x1n, 0xFEDCBA987654320En); >-testSub(0xFEDCBA987654320Fn, 0x0n, 0xFEDCBA987654320Fn); >-testSub(0xFEDCBA987654320Fn, -0x1n, 0xFEDCBA9876543210n); >-testSub(0xFEDCBA987654320Fn, -0x2n, 0xFEDCBA9876543211n); >-testSub(0xFEDCBA987654320Fn, -0x3n, 0xFEDCBA9876543212n); >-testSub(0xFEDCBA987654320Fn, -0x1234n, 0xFEDCBA9876544443n); >-testSub(0xFEDCBA987654320Fn, -0xFEDCBA97n, 0xFEDCBA997530ECA6n); >-testSub(0xFEDCBA987654320Fn, -0xFEDCBA98n, 0xFEDCBA997530ECA7n); >-testSub(0xFEDCBA987654320Fn, -0xFEDCBA987654320Fn, 0x1FDB97530ECA8641En); >-testSub(0xFEDCBA987654320Fn, -0xFEDCBA9876543210n, 0x1FDB97530ECA8641Fn); >-testSub(0xFEDCBA98n, 0xFEDCBA9876543210n, -0xFEDCBA9777777778n); >-testSub(0xFEDCBA98n, 0xFEDCBA987654320Fn, -0xFEDCBA9777777777n); >-testSub(0xFEDCBA98n, 0xFEDCBA98n, 0x0n); >-testSub(0xFEDCBA98n, 0xFEDCBA97n, 0x1n); >-testSub(0xFEDCBA98n, 0x1234n, 0xFEDCA864n); >-testSub(0xFEDCBA98n, 0x3n, 0xFEDCBA95n); >-testSub(0xFEDCBA98n, 0x2n, 0xFEDCBA96n); >-testSub(0xFEDCBA98n, 0x1n, 0xFEDCBA97n); >-testSub(0xFEDCBA98n, 0x0n, 0xFEDCBA98n); >-testSub(0xFEDCBA98n, -0x1n, 0xFEDCBA99n); >-testSub(0xFEDCBA98n, -0x2n, 0xFEDCBA9An); >-testSub(0xFEDCBA98n, -0x3n, 0xFEDCBA9Bn); >-testSub(0xFEDCBA98n, -0x1234n, 0xFEDCCCCCn); >-testSub(0xFEDCBA98n, -0xFEDCBA97n, 0x1FDB9752Fn); >-testSub(0xFEDCBA98n, -0xFEDCBA98n, 0x1FDB97530n); >-testSub(0xFEDCBA98n, -0xFEDCBA987654320Fn, 0xFEDCBA997530ECA7n); >-testSub(0xFEDCBA98n, -0xFEDCBA9876543210n, 0xFEDCBA997530ECA8n); >-testSub(0xFEDCBA97n, 0xFEDCBA9876543210n, -0xFEDCBA9777777779n); >-testSub(0xFEDCBA97n, 0xFEDCBA987654320Fn, -0xFEDCBA9777777778n); >-testSub(0xFEDCBA97n, 0xFEDCBA98n, -0x1n); >-testSub(0xFEDCBA97n, 0xFEDCBA97n, 0x0n); >-testSub(0xFEDCBA97n, 0x1234n, 0xFEDCA863n); >-testSub(0xFEDCBA97n, 0x3n, 0xFEDCBA94n); >-testSub(0xFEDCBA97n, 0x2n, 0xFEDCBA95n); >-testSub(0xFEDCBA97n, 0x1n, 0xFEDCBA96n); >-testSub(0xFEDCBA97n, 0x0n, 0xFEDCBA97n); >-testSub(0xFEDCBA97n, -0x1n, 0xFEDCBA98n); >-testSub(0xFEDCBA97n, -0x2n, 0xFEDCBA99n); >-testSub(0xFEDCBA97n, -0x3n, 0xFEDCBA9An); >-testSub(0xFEDCBA97n, -0x1234n, 0xFEDCCCCBn); >-testSub(0xFEDCBA97n, -0xFEDCBA97n, 0x1FDB9752En); >-testSub(0xFEDCBA97n, -0xFEDCBA98n, 0x1FDB9752Fn); >-testSub(0xFEDCBA97n, -0xFEDCBA987654320Fn, 0xFEDCBA997530ECA6n); >-testSub(0xFEDCBA97n, -0xFEDCBA9876543210n, 0xFEDCBA997530ECA7n); >-testSub(0x1234n, 0xFEDCBA9876543210n, -0xFEDCBA9876541FDCn); >-testSub(0x1234n, 0xFEDCBA987654320Fn, -0xFEDCBA9876541FDBn); >-testSub(0x1234n, 0xFEDCBA98n, -0xFEDCA864n); >-testSub(0x1234n, 0xFEDCBA97n, -0xFEDCA863n); >-testSub(0x1234n, 0x1234n, 0x0n); >-testSub(0x1234n, 0x3n, 0x1231n); >-testSub(0x1234n, 0x2n, 0x1232n); >-testSub(0x1234n, 0x1n, 0x1233n); >-testSub(0x1234n, 0x0n, 0x1234n); >-testSub(0x1234n, -0x1n, 0x1235n); >-testSub(0x1234n, -0x2n, 0x1236n); >-testSub(0x1234n, -0x3n, 0x1237n); >-testSub(0x1234n, -0x1234n, 0x2468n); >-testSub(0x1234n, -0xFEDCBA97n, 0xFEDCCCCBn); >-testSub(0x1234n, -0xFEDCBA98n, 0xFEDCCCCCn); >-testSub(0x1234n, -0xFEDCBA987654320Fn, 0xFEDCBA9876544443n); >-testSub(0x1234n, -0xFEDCBA9876543210n, 0xFEDCBA9876544444n); >-testSub(0x3n, 0xFEDCBA9876543210n, -0xFEDCBA987654320Dn); >-testSub(0x3n, 0xFEDCBA987654320Fn, -0xFEDCBA987654320Cn); >-testSub(0x3n, 0xFEDCBA98n, -0xFEDCBA95n); >-testSub(0x3n, 0xFEDCBA97n, -0xFEDCBA94n); >-testSub(0x3n, 0x1234n, -0x1231n); >-testSub(0x3n, 0x3n, 0x0n); >-testSub(0x3n, 0x2n, 0x1n); >-testSub(0x3n, 0x1n, 0x2n); >-testSub(0x3n, 0x0n, 0x3n); >-testSub(0x3n, -0x1n, 0x4n); >-testSub(0x3n, -0x2n, 0x5n); >-testSub(0x3n, -0x3n, 0x6n); >-testSub(0x3n, -0x1234n, 0x1237n); >-testSub(0x3n, -0xFEDCBA97n, 0xFEDCBA9An); >-testSub(0x3n, -0xFEDCBA98n, 0xFEDCBA9Bn); >-testSub(0x3n, -0xFEDCBA987654320Fn, 0xFEDCBA9876543212n); >-testSub(0x3n, -0xFEDCBA9876543210n, 0xFEDCBA9876543213n); >-testSub(0x2n, 0xFEDCBA9876543210n, -0xFEDCBA987654320En); >-testSub(0x2n, 0xFEDCBA987654320Fn, -0xFEDCBA987654320Dn); >-testSub(0x2n, 0xFEDCBA98n, -0xFEDCBA96n); >-testSub(0x2n, 0xFEDCBA97n, -0xFEDCBA95n); >-testSub(0x2n, 0x1234n, -0x1232n); >-testSub(0x2n, 0x3n, -0x1n); >-testSub(0x2n, 0x2n, 0x0n); >-testSub(0x2n, 0x1n, 0x1n); >-testSub(0x2n, 0x0n, 0x2n); >-testSub(0x2n, -0x1n, 0x3n); >-testSub(0x2n, -0x2n, 0x4n); >-testSub(0x2n, -0x3n, 0x5n); >-testSub(0x2n, -0x1234n, 0x1236n); >-testSub(0x2n, -0xFEDCBA97n, 0xFEDCBA99n); >-testSub(0x2n, -0xFEDCBA98n, 0xFEDCBA9An); >-testSub(0x2n, -0xFEDCBA987654320Fn, 0xFEDCBA9876543211n); >-testSub(0x2n, -0xFEDCBA9876543210n, 0xFEDCBA9876543212n); >-testSub(0x1n, 0xFEDCBA9876543210n, -0xFEDCBA987654320Fn); >-testSub(0x1n, 0xFEDCBA987654320Fn, -0xFEDCBA987654320En); >-testSub(0x1n, 0xFEDCBA98n, -0xFEDCBA97n); >-testSub(0x1n, 0xFEDCBA97n, -0xFEDCBA96n); >-testSub(0x1n, 0x1234n, -0x1233n); >-testSub(0x1n, 0x3n, -0x2n); >-testSub(0x1n, 0x2n, -0x1n); >-testSub(0x1n, 0x1n, 0x0n); >-testSub(0x1n, 0x0n, 0x1n); >-testSub(0x1n, -0x1n, 0x2n); >-testSub(0x1n, -0x2n, 0x3n); >-testSub(0x1n, -0x3n, 0x4n); >-testSub(0x1n, -0x1234n, 0x1235n); >-testSub(0x1n, -0xFEDCBA97n, 0xFEDCBA98n); >-testSub(0x1n, -0xFEDCBA98n, 0xFEDCBA99n); >-testSub(0x1n, -0xFEDCBA987654320Fn, 0xFEDCBA9876543210n); >-testSub(0x1n, -0xFEDCBA9876543210n, 0xFEDCBA9876543211n); >-testSub(0x0n, 0xFEDCBA9876543210n, -0xFEDCBA9876543210n); >-testSub(0x0n, 0xFEDCBA987654320Fn, -0xFEDCBA987654320Fn); >-testSub(0x0n, 0xFEDCBA98n, -0xFEDCBA98n); >-testSub(0x0n, 0xFEDCBA97n, -0xFEDCBA97n); >-testSub(0x0n, 0x1234n, -0x1234n); >-testSub(0x0n, 0x3n, -0x3n); >-testSub(0x0n, 0x2n, -0x2n); >-testSub(0x0n, 0x1n, -0x1n); >-testSub(0x0n, 0x0n, 0x0n); >-testSub(0x0n, -0x1n, 0x1n); >-testSub(0x0n, -0x2n, 0x2n); >-testSub(0x0n, -0x3n, 0x3n); >-testSub(0x0n, -0x1234n, 0x1234n); >-testSub(0x0n, -0xFEDCBA97n, 0xFEDCBA97n); >-testSub(0x0n, -0xFEDCBA98n, 0xFEDCBA98n); >-testSub(0x0n, -0xFEDCBA987654320Fn, 0xFEDCBA987654320Fn); >-testSub(0x0n, -0xFEDCBA9876543210n, 0xFEDCBA9876543210n); >-testSub(-0x1n, 0xFEDCBA9876543210n, -0xFEDCBA9876543211n); >-testSub(-0x1n, 0xFEDCBA987654320Fn, -0xFEDCBA9876543210n); >-testSub(-0x1n, 0xFEDCBA98n, -0xFEDCBA99n); >-testSub(-0x1n, 0xFEDCBA97n, -0xFEDCBA98n); >-testSub(-0x1n, 0x1234n, -0x1235n); >-testSub(-0x1n, 0x3n, -0x4n); >-testSub(-0x1n, 0x2n, -0x3n); >-testSub(-0x1n, 0x1n, -0x2n); >-testSub(-0x1n, 0x0n, -0x1n); >-testSub(-0x1n, -0x1n, 0x0n); >-testSub(-0x1n, -0x2n, 0x1n); >-testSub(-0x1n, -0x3n, 0x2n); >-testSub(-0x1n, -0x1234n, 0x1233n); >-testSub(-0x1n, -0xFEDCBA97n, 0xFEDCBA96n); >-testSub(-0x1n, -0xFEDCBA98n, 0xFEDCBA97n); >-testSub(-0x1n, -0xFEDCBA987654320Fn, 0xFEDCBA987654320En); >-testSub(-0x1n, -0xFEDCBA9876543210n, 0xFEDCBA987654320Fn); >-testSub(-0x2n, 0xFEDCBA9876543210n, -0xFEDCBA9876543212n); >-testSub(-0x2n, 0xFEDCBA987654320Fn, -0xFEDCBA9876543211n); >-testSub(-0x2n, 0xFEDCBA98n, -0xFEDCBA9An); >-testSub(-0x2n, 0xFEDCBA97n, -0xFEDCBA99n); >-testSub(-0x2n, 0x1234n, -0x1236n); >-testSub(-0x2n, 0x3n, -0x5n); >-testSub(-0x2n, 0x2n, -0x4n); >-testSub(-0x2n, 0x1n, -0x3n); >-testSub(-0x2n, 0x0n, -0x2n); >-testSub(-0x2n, -0x1n, -0x1n); >-testSub(-0x2n, -0x2n, 0x0n); >-testSub(-0x2n, -0x3n, 0x1n); >-testSub(-0x2n, -0x1234n, 0x1232n); >-testSub(-0x2n, -0xFEDCBA97n, 0xFEDCBA95n); >-testSub(-0x2n, -0xFEDCBA98n, 0xFEDCBA96n); >-testSub(-0x2n, -0xFEDCBA987654320Fn, 0xFEDCBA987654320Dn); >-testSub(-0x2n, -0xFEDCBA9876543210n, 0xFEDCBA987654320En); >-testSub(-0x3n, 0xFEDCBA9876543210n, -0xFEDCBA9876543213n); >-testSub(-0x3n, 0xFEDCBA987654320Fn, -0xFEDCBA9876543212n); >-testSub(-0x3n, 0xFEDCBA98n, -0xFEDCBA9Bn); >-testSub(-0x3n, 0xFEDCBA97n, -0xFEDCBA9An); >-testSub(-0x3n, 0x1234n, -0x1237n); >-testSub(-0x3n, 0x3n, -0x6n); >-testSub(-0x3n, 0x2n, -0x5n); >-testSub(-0x3n, 0x1n, -0x4n); >-testSub(-0x3n, 0x0n, -0x3n); >-testSub(-0x3n, -0x1n, -0x2n); >-testSub(-0x3n, -0x2n, -0x1n); >-testSub(-0x3n, -0x3n, 0x0n); >-testSub(-0x3n, -0x1234n, 0x1231n); >-testSub(-0x3n, -0xFEDCBA97n, 0xFEDCBA94n); >-testSub(-0x3n, -0xFEDCBA98n, 0xFEDCBA95n); >-testSub(-0x3n, -0xFEDCBA987654320Fn, 0xFEDCBA987654320Cn); >-testSub(-0x3n, -0xFEDCBA9876543210n, 0xFEDCBA987654320Dn); >-testSub(-0x1234n, 0xFEDCBA9876543210n, -0xFEDCBA9876544444n); >-testSub(-0x1234n, 0xFEDCBA987654320Fn, -0xFEDCBA9876544443n); >-testSub(-0x1234n, 0xFEDCBA98n, -0xFEDCCCCCn); >-testSub(-0x1234n, 0xFEDCBA97n, -0xFEDCCCCBn); >-testSub(-0x1234n, 0x1234n, -0x2468n); >-testSub(-0x1234n, 0x3n, -0x1237n); >-testSub(-0x1234n, 0x2n, -0x1236n); >-testSub(-0x1234n, 0x1n, -0x1235n); >-testSub(-0x1234n, 0x0n, -0x1234n); >-testSub(-0x1234n, -0x1n, -0x1233n); >-testSub(-0x1234n, -0x2n, -0x1232n); >-testSub(-0x1234n, -0x3n, -0x1231n); >-testSub(-0x1234n, -0x1234n, 0x0n); >-testSub(-0x1234n, -0xFEDCBA97n, 0xFEDCA863n); >-testSub(-0x1234n, -0xFEDCBA98n, 0xFEDCA864n); >-testSub(-0x1234n, -0xFEDCBA987654320Fn, 0xFEDCBA9876541FDBn); >-testSub(-0x1234n, -0xFEDCBA9876543210n, 0xFEDCBA9876541FDCn); >-testSub(-0xFEDCBA97n, 0xFEDCBA9876543210n, -0xFEDCBA997530ECA7n); >-testSub(-0xFEDCBA97n, 0xFEDCBA987654320Fn, -0xFEDCBA997530ECA6n); >-testSub(-0xFEDCBA97n, 0xFEDCBA98n, -0x1FDB9752Fn); >-testSub(-0xFEDCBA97n, 0xFEDCBA97n, -0x1FDB9752En); >-testSub(-0xFEDCBA97n, 0x1234n, -0xFEDCCCCBn); >-testSub(-0xFEDCBA97n, 0x3n, -0xFEDCBA9An); >-testSub(-0xFEDCBA97n, 0x2n, -0xFEDCBA99n); >-testSub(-0xFEDCBA97n, 0x1n, -0xFEDCBA98n); >-testSub(-0xFEDCBA97n, 0x0n, -0xFEDCBA97n); >-testSub(-0xFEDCBA97n, -0x1n, -0xFEDCBA96n); >-testSub(-0xFEDCBA97n, -0x2n, -0xFEDCBA95n); >-testSub(-0xFEDCBA97n, -0x3n, -0xFEDCBA94n); >-testSub(-0xFEDCBA97n, -0x1234n, -0xFEDCA863n); >-testSub(-0xFEDCBA97n, -0xFEDCBA97n, 0x0n); >-testSub(-0xFEDCBA97n, -0xFEDCBA98n, 0x1n); >-testSub(-0xFEDCBA97n, -0xFEDCBA987654320Fn, 0xFEDCBA9777777778n); >-testSub(-0xFEDCBA97n, -0xFEDCBA9876543210n, 0xFEDCBA9777777779n); >-testSub(-0xFEDCBA98n, 0xFEDCBA9876543210n, -0xFEDCBA997530ECA8n); >-testSub(-0xFEDCBA98n, 0xFEDCBA987654320Fn, -0xFEDCBA997530ECA7n); >-testSub(-0xFEDCBA98n, 0xFEDCBA98n, -0x1FDB97530n); >-testSub(-0xFEDCBA98n, 0xFEDCBA97n, -0x1FDB9752Fn); >-testSub(-0xFEDCBA98n, 0x1234n, -0xFEDCCCCCn); >-testSub(-0xFEDCBA98n, 0x3n, -0xFEDCBA9Bn); >-testSub(-0xFEDCBA98n, 0x2n, -0xFEDCBA9An); >-testSub(-0xFEDCBA98n, 0x1n, -0xFEDCBA99n); >-testSub(-0xFEDCBA98n, 0x0n, -0xFEDCBA98n); >-testSub(-0xFEDCBA98n, -0x1n, -0xFEDCBA97n); >-testSub(-0xFEDCBA98n, -0x2n, -0xFEDCBA96n); >-testSub(-0xFEDCBA98n, -0x3n, -0xFEDCBA95n); >-testSub(-0xFEDCBA98n, -0x1234n, -0xFEDCA864n); >-testSub(-0xFEDCBA98n, -0xFEDCBA97n, -0x1n); >-testSub(-0xFEDCBA98n, -0xFEDCBA98n, 0x0n); >-testSub(-0xFEDCBA98n, -0xFEDCBA987654320Fn, 0xFEDCBA9777777777n); >-testSub(-0xFEDCBA98n, -0xFEDCBA9876543210n, 0xFEDCBA9777777778n); >-testSub(-0xFEDCBA987654320Fn, 0xFEDCBA9876543210n, -0x1FDB97530ECA8641Fn); >-testSub(-0xFEDCBA987654320Fn, 0xFEDCBA987654320Fn, -0x1FDB97530ECA8641En); >-testSub(-0xFEDCBA987654320Fn, 0xFEDCBA98n, -0xFEDCBA997530ECA7n); >-testSub(-0xFEDCBA987654320Fn, 0xFEDCBA97n, -0xFEDCBA997530ECA6n); >-testSub(-0xFEDCBA987654320Fn, 0x1234n, -0xFEDCBA9876544443n); >-testSub(-0xFEDCBA987654320Fn, 0x3n, -0xFEDCBA9876543212n); >-testSub(-0xFEDCBA987654320Fn, 0x2n, -0xFEDCBA9876543211n); >-testSub(-0xFEDCBA987654320Fn, 0x1n, -0xFEDCBA9876543210n); >-testSub(-0xFEDCBA987654320Fn, 0x0n, -0xFEDCBA987654320Fn); >-testSub(-0xFEDCBA987654320Fn, -0x1n, -0xFEDCBA987654320En); >-testSub(-0xFEDCBA987654320Fn, -0x2n, -0xFEDCBA987654320Dn); >-testSub(-0xFEDCBA987654320Fn, -0x3n, -0xFEDCBA987654320Cn); >-testSub(-0xFEDCBA987654320Fn, -0x1234n, -0xFEDCBA9876541FDBn); >-testSub(-0xFEDCBA987654320Fn, -0xFEDCBA97n, -0xFEDCBA9777777778n); >-testSub(-0xFEDCBA987654320Fn, -0xFEDCBA98n, -0xFEDCBA9777777777n); >-testSub(-0xFEDCBA987654320Fn, -0xFEDCBA987654320Fn, 0x0n); >-testSub(-0xFEDCBA987654320Fn, -0xFEDCBA9876543210n, 0x1n); >-testSub(-0xFEDCBA9876543210n, 0xFEDCBA9876543210n, -0x1FDB97530ECA86420n); >-testSub(-0xFEDCBA9876543210n, 0xFEDCBA987654320Fn, -0x1FDB97530ECA8641Fn); >-testSub(-0xFEDCBA9876543210n, 0xFEDCBA98n, -0xFEDCBA997530ECA8n); >-testSub(-0xFEDCBA9876543210n, 0xFEDCBA97n, -0xFEDCBA997530ECA7n); >-testSub(-0xFEDCBA9876543210n, 0x1234n, -0xFEDCBA9876544444n); >-testSub(-0xFEDCBA9876543210n, 0x3n, -0xFEDCBA9876543213n); >-testSub(-0xFEDCBA9876543210n, 0x2n, -0xFEDCBA9876543212n); >-testSub(-0xFEDCBA9876543210n, 0x1n, -0xFEDCBA9876543211n); >-testSub(-0xFEDCBA9876543210n, 0x0n, -0xFEDCBA9876543210n); >-testSub(-0xFEDCBA9876543210n, -0x1n, -0xFEDCBA987654320Fn); >-testSub(-0xFEDCBA9876543210n, -0x2n, -0xFEDCBA987654320En); >-testSub(-0xFEDCBA9876543210n, -0x3n, -0xFEDCBA987654320Dn); >-testSub(-0xFEDCBA9876543210n, -0x1234n, -0xFEDCBA9876541FDCn); >-testSub(-0xFEDCBA9876543210n, -0xFEDCBA97n, -0xFEDCBA9777777779n); >-testSub(-0xFEDCBA9876543210n, -0xFEDCBA98n, -0xFEDCBA9777777778n); >-testSub(-0xFEDCBA9876543210n, -0xFEDCBA987654320Fn, -0x1n); >-testSub(-0xFEDCBA9876543210n, -0xFEDCBA9876543210n, 0x0n); >+assert.sameValue( >+ -0xFEDCBA9876543210n - -0xFEDCBA9876543210n, >+ 0x0n, >+ 'The result of (-0xFEDCBA9876543210n - -0xFEDCBA9876543210n) is 0x0n' >+); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/subtraction/bigint-errors.js b/JSTests/test262/test/language/expressions/subtraction/bigint-errors.js >index b512c78ad5d9f8e38386a68df2f8503a34105b68..5d65a7f6c08ea9209bb98b257a0d0ebb990649b2 100644 >--- a/JSTests/test262/test/language/expressions/subtraction/bigint-errors.js >+++ b/JSTests/test262/test/language/expressions/subtraction/bigint-errors.js >@@ -5,58 +5,66 @@ > esid: sec-subtraction-operator-minus-runtime-semantics-evaluation > features: [BigInt, Symbol, Symbol.toPrimitive, computed-property-names] > ---*/ >- > assert.throws(TypeError, function() { >- Symbol("1") - 0n; >-}, "ToBigInt: Symbol => TypeError"); >+ Symbol('1') - 0n; >+}, 'Symbol("1") - 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n - Symbol("1"); >-}, "ToBigInt: Symbol => TypeError"); >+ 0n - Symbol('1'); >+}, '0n - Symbol("1") throws TypeError'); >+ > assert.throws(TypeError, function() { >- Object(Symbol("1")) - 0n; >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ Object(Symbol('1')) - 0n; >+}, 'Object(Symbol("1")) - 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n - Object(Symbol("1")); >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ 0n - Object(Symbol('1')); >+}, '0n - Object(Symbol("1")) throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) - 0n; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '({[Symbol.toPrimitive]: function() {return Symbol("1");}}) - 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n - { > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '0n - {[Symbol.toPrimitive]: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) - 0n; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '({valueOf: function() {return Symbol("1");}}) - 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n - { > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '0n - {valueOf: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) - 0n; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '({toString: function() {return Symbol("1");}}) - 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n - { > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '0n - {toString: function() {return Symbol("1");}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/subtraction/bigint-toprimitive.js b/JSTests/test262/test/language/expressions/subtraction/bigint-toprimitive.js >index 70da440dd22de546cf29c0846e1caf5c02c1b1bb..64247e9c39179e90f6260663bc04746b9de1db55 100644 >--- a/JSTests/test262/test/language/expressions/subtraction/bigint-toprimitive.js >+++ b/JSTests/test262/test/language/expressions/subtraction/bigint-toprimitive.js >@@ -5,304 +5,368 @@ > esid: sec-subtraction-operator-minus-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >- > function err() { > throw new Test262Error(); > } > > function MyError() {} > >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}) - 1n, 1n, "ToPrimitive: @@toPrimitive takes precedence"); >+} - 1n, 1n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) - 1n) is 1n'); >+ > assert.sameValue(3n - { > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err >-}, 1n, "ToPrimitive: @@toPrimitive takes precedence"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n - {[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > }, >+ > toString: err >-}) - 1n, 1n, "ToPrimitive: valueOf takes precedence over toString"); >+} - 1n, 1n, 'The result of (({valueOf: function() {return 2n;}, toString: err}) - 1n) is 1n'); >+ > assert.sameValue(3n - { > valueOf: function() { > return 2n; > }, >+ > toString: err >-}, 1n, "ToPrimitive: valueOf takes precedence over toString"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n - {valueOf: function() {return 2n;}, toString: err}) is 1n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) - 1n, 1n, "ToPrimitive: toString with no valueOf"); >+} - 1n, 1n, 'The result of (({toString: function() {return 2n;}}) - 1n) is 1n'); >+ > assert.sameValue(3n - { > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: toString with no valueOf"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n - {toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}) - 1n, 1n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >+} - 1n, 1n, 'The result of (({[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) - 1n) is 1n'); >+ > assert.sameValue(3n - { > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip @@toPrimitive when it's undefined"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n - {[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}) - 1n, 1n, "ToPrimitive: skip @@toPrimitive when it's null"); >+} - 1n, 1n, 'The result of (({[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) - 1n) is 1n'); >+ > assert.sameValue(3n - { > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip @@toPrimitive when it's null"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n - {[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: null, >+ > toString: function() { > return 2n; > } >-}) - 1n, 1n, "ToPrimitive: skip valueOf when it's not callable"); >+} - 1n, 1n, 'The result of (({valueOf: null, toString: function() {return 2n;}}) - 1n) is 1n'); >+ > assert.sameValue(3n - { > valueOf: null, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n - {valueOf: null, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}) - 1n, 1n, "ToPrimitive: skip valueOf when it's not callable"); >+} - 1n, 1n, 'The result of (({valueOf: 1, toString: function() {return 2n;}}) - 1n) is 1n'); >+ > assert.sameValue(3n - { > valueOf: 1, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n - {valueOf: 1, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}) - 1n, 1n, "ToPrimitive: skip valueOf when it's not callable"); >+} - 1n, 1n, 'The result of (({valueOf: {}, toString: function() {return 2n;}}) - 1n) is 1n'); >+ > assert.sameValue(3n - { > valueOf: {}, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it's not callable"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n - {valueOf: {}, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}) - 1n, 1n, "ToPrimitive: skip valueOf when it returns an object"); >+} - 1n, 1n, 'The result of (({valueOf: function() {return {};}, toString: function() {return 2n;}}) - 1n) is 1n'); >+ > assert.sameValue(3n - { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it returns an object"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n - {valueOf: function() {return {};}, toString: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}) - 1n, 1n, "ToPrimitive: skip valueOf when it returns an object"); >+} - 1n, 1n, 'The result of (({valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) - 1n) is 1n'); >+ > assert.sameValue(3n - { > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: skip valueOf when it returns an object"); >+}, 1n, 'The result of (3n - {valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) is 1n'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: 1 > }) - 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: 1}) - 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n - { > [Symbol.toPrimitive]: 1 > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n - {[Symbol.toPrimitive]: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: {} > }) - 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: {}}) - 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n - { > [Symbol.toPrimitive]: {} > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n - {[Symbol.toPrimitive]: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return Object(1); > } > }) - 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return Object(1);}}) - 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n - { > [Symbol.toPrimitive]: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n - {[Symbol.toPrimitive]: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return {}; > } > }) - 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return {};}}) - 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n - { > [Symbol.toPrimitive]: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n - {[Symbol.toPrimitive]: function() {return {};}} throws TypeError'); >+ > assert.throws(MyError, function() { > ({ > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }) - 0n; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '({[Symbol.toPrimitive]: function() {throw new MyError();}}) - 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n - { > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '0n - {[Symbol.toPrimitive]: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > valueOf: function() { > throw new MyError(); > } > }) - 0n; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '({valueOf: function() {throw new MyError();}}) - 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n - { > valueOf: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '0n - {valueOf: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > toString: function() { > throw new MyError(); > } > }) - 0n; >-}, "ToPrimitive: propagate errors from toString"); >+}, '({toString: function() {throw new MyError();}}) - 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n - { > toString: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from toString"); >+}, '0n - {toString: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: null, > toString: null > }) - 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: null, toString: null}) - 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n - { > valueOf: null, > toString: null > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n - {valueOf: null, toString: null} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: 1, > toString: 1 > }) - 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: 1, toString: 1}) - 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n - { > valueOf: 1, > toString: 1 > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n - {valueOf: 1, toString: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: {}, > toString: {} > }) - 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: {}, toString: {}}) - 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n - { > valueOf: {}, > toString: {} > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n - {valueOf: {}, toString: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }) - 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return Object(1);}, toString: function() {return Object(1);}}) - 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n - { > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n - {valueOf: function() {return Object(1);}, toString: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }) - 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return {};}, toString: function() {return {};}}) - 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n - { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n - {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/subtraction/bigint-wrapped-values.js b/JSTests/test262/test/language/expressions/subtraction/bigint-wrapped-values.js >index f75ea687fad244792b34d423174c39c123244e36..fde9ae639e3dfbe89c40086b3e94b4aeb8bb62f9 100644 >--- a/JSTests/test262/test/language/expressions/subtraction/bigint-wrapped-values.js >+++ b/JSTests/test262/test/language/expressions/subtraction/bigint-wrapped-values.js >@@ -5,36 +5,41 @@ > esid: sec-subtraction-operator-minus-runtime-semantics-evaluation > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >+assert.sameValue(Object(2n) - 1n, 1n, 'The result of (Object(2n) - 1n) is 1n'); >+assert.sameValue(3n - Object(2n), 1n, 'The result of (3n - Object(2n)) is 1n'); > >-assert.sameValue(Object(2n) - 1n, 1n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(3n - Object(2n), 1n, "ToPrimitive: unbox object with internal slot"); >-assert.sameValue(({ >+assert.sameValue({ > [Symbol.toPrimitive]: function() { > return 2n; > } >-}) - 1n, 1n, "ToPrimitive: @@toPrimitive"); >+} - 1n, 1n, 'The result of (({[Symbol.toPrimitive]: function() {return 2n;}}) - 1n) is 1n'); >+ > assert.sameValue(3n - { > [Symbol.toPrimitive]: function() { > return 2n; > } >-}, 1n, "ToPrimitive: @@toPrimitive"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n - {[Symbol.toPrimitive]: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > valueOf: function() { > return 2n; > } >-}) - 1n, 1n, "ToPrimitive: valueOf"); >+} - 1n, 1n, 'The result of (({valueOf: function() {return 2n;}}) - 1n) is 1n'); >+ > assert.sameValue(3n - { > valueOf: function() { > return 2n; > } >-}, 1n, "ToPrimitive: valueOf"); >-assert.sameValue(({ >+}, 1n, 'The result of (3n - {valueOf: function() {return 2n;}}) is 1n'); >+ >+assert.sameValue({ > toString: function() { > return 2n; > } >-}) - 1n, 1n, "ToPrimitive: toString"); >+} - 1n, 1n, 'The result of (({toString: function() {return 2n;}}) - 1n) is 1n'); >+ > assert.sameValue(3n - { > toString: function() { > return 2n; > } >-}, 1n, "ToPrimitive: toString"); >+}, 1n, 'The result of (3n - {toString: function() {return 2n;}}) is 1n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/unary-minus/bigint-non-primitive.js b/JSTests/test262/test/language/expressions/unary-minus/bigint-non-primitive.js >index 02587c5d56ede7484de1ca55fd698c6df0adf293..2d35b64203eaa8d32c6d6896ec84a745957b72a7 100644 >--- a/JSTests/test262/test/language/expressions/unary-minus/bigint-non-primitive.js >+++ b/JSTests/test262/test/language/expressions/unary-minus/bigint-non-primitive.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Unary minus for BigInt object wrappers > esid: sec-unary-minus-operator-runtime-semantics-evaluation >@@ -15,19 +14,39 @@ > > features: [BigInt, Symbol.toPrimitive] > ---*/ >+assert.sameValue(-Object(1n), -1n, 'The value of -Object(1n) is -1n'); >+assert.notSameValue(-Object(1n), 1n, 'The value of -Object(1n) is not 1n'); >+assert.notSameValue(-Object(1n), Object(-1n), 'The value of -Object(1n) is not Object(-1n)'); >+assert.sameValue(-Object(-1n), 1n, 'The value of -Object(-1n) is 1n'); >+assert.notSameValue(-Object(-1n), -1n, 'The value of -Object(-1n) is not -1n'); >+assert.notSameValue(-Object(-1n), Object(1n), 'The value of -Object(-1n) is not Object(1n)'); >+ >+assert.sameValue(-{ >+ [Symbol.toPrimitive]: function() { >+ return 1n; >+ }, >+ >+ valueOf: function() { >+ $ERROR(); >+ }, >+ >+ toString: function() { >+ $ERROR(); >+ } >+}, -1n, 'The value of -{[Symbol.toPrimitive]: function() {return 1n;}, valueOf: function() {$ERROR();}, toString: function() {$ERROR();}} is -1n'); >+ >+assert.sameValue(-{ >+ valueOf: function() { >+ return 1n; >+ }, >+ >+ toString: function() { >+ $ERROR(); >+ } >+}, -1n, 'The value of -{valueOf: function() {return 1n;}, toString: function() {$ERROR();}} is -1n'); > >-assert.sameValue(-Object(1n), -1n, "-Object(1n) === -1n"); >-assert.notSameValue(-Object(1n), 1n, "-Object(1n) !== 1n"); >-assert.notSameValue(-Object(1n), Object(-1n), "-Object(1n) !== Object(-1n)"); >-assert.sameValue(-Object(-1n), 1n, "-Object(-1n) === 1n"); >-assert.notSameValue(-Object(-1n), -1n, "-Object(-1n) !== -1n"); >-assert.notSameValue(-Object(-1n), Object(1n), "-Object(-1n) !== Object(1n)"); >-assert.sameValue( >- -{[Symbol.toPrimitive]: function() { return 1n; }, valueOf: function() { $ERROR(); }, toString: function() { $ERROR(); }}, -1n, >- "-{[Symbol.toPrimitive]: function() { return 1n; }, valueOf: function() { $ERROR(); }, toString: function() { $ERROR(); }} === -1n"); >-assert.sameValue( >- -{valueOf: function() { return 1n; }, toString: function() { $ERROR(); }}, -1n, >- "-{valueOf: function() { return 1n; }, toString: function() { $ERROR(); }} === -1n"); >-assert.sameValue( >- -{toString: function() { return 1n; }}, -1n, >- "-{toString: function() { return 1n; }} === -1n"); >+assert.sameValue(-{ >+ toString: function() { >+ return 1n; >+ } >+}, -1n, 'The value of -{toString: function() {return 1n;}} is -1n'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/unary-plus/bigint-throws.js b/JSTests/test262/test/language/expressions/unary-plus/bigint-throws.js >index f3960c740e6567ba5f77d05a6594fa1c2a1bee34..72f0442318d311335dab18921b1d75b7021fe434 100644 >--- a/JSTests/test262/test/language/expressions/unary-plus/bigint-throws.js >+++ b/JSTests/test262/test/language/expressions/unary-plus/bigint-throws.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Robin Templeton. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: The Unary + Operator throws a TypeError on BigInt numbers > esid: sec-unary-plus-operator-runtime-semantics-evaluation >@@ -15,8 +14,18 @@ > BigInt: Throw a TypeError exception > features: [BigInt] > ---*/ >+assert.throws(TypeError, function() { >+ +0n; >+}, '+0n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ +1n; >+}, '+1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ +-1n; >+}, '+-1n throws TypeError'); > >-assert.throws(TypeError, function() { +0n }); >-assert.throws(TypeError, function() { +1n }); >-assert.throws(TypeError, function() { +-1n }); >-assert.throws(TypeError, function() { +1000000000000000n }); >+assert.throws(TypeError, function() { >+ +1000000000000000n; >+}, '+1000000000000000n throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-and-number.js b/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-and-number.js >index d60cdcff74b8b0b44f004fbe39c50109ca4eeceb..18ed19422ed3c1d392427df0f12ec81b1696e682 100644 >--- a/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-and-number.js >+++ b/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-and-number.js >@@ -9,24 +9,82 @@ > Let rnum be ? ToNumeric(rightValue). > If Type(lnum) does not equal Type(rnum), throw a TypeError exception. > ---*/ >+assert.throws(TypeError, function() { >+ 1n >>> 1; >+}, '1n >>> 1 throws TypeError'); > >-assert.throws(TypeError, function() { 1n >>> 1; }, "1n >>> 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 >>> 1n; }, "1 >>> 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) >>> 1; }, "Object(1n) >>> 1 throws TypeError"); >-assert.throws(TypeError, function() { 1 >>> Object(1n); }, "1 >>> Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n >>> Object(1); }, "1n >>> Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) >>> 1n; }, "Object(1) >>> 1n throws TypeError"); >-assert.throws(TypeError, function() { Object(1n) >>> Object(1); }, "Object(1n) >>> Object(1) throws TypeError"); >-assert.throws(TypeError, function() { Object(1) >>> Object(1n); }, "Object(1) >>> Object(1n) throws TypeError"); >-assert.throws(TypeError, function() { 1n >>> NaN; }, "1n >>> NaN throws TypeError"); >-assert.throws(TypeError, function() { NaN >>> 1n; }, "NaN >>> 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n >>> Infinity; }, "1n >>> Infinity throws TypeError"); >-assert.throws(TypeError, function() { Infinity >>> 1n; }, "Infinity >>> 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n >>> true; }, "1n >>> true throws TypeError"); >-assert.throws(TypeError, function() { true >>> 1n; }, "true >>> 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n >>> "1"; }, '1n >>> "1" throws TypeError'); >-assert.throws(TypeError, function() { "1" >>> 1n; }, '"1" >>> 1n throws TypeError'); >-assert.throws(TypeError, function() { 1n >>> null; }, "1n >>> null throws TypeError"); >-assert.throws(TypeError, function() { null >>> 1n; }, "null >>> 1n throws TypeError"); >-assert.throws(TypeError, function() { 1n >>> undefined; }, "1n >>> undefined throws TypeError"); >-assert.throws(TypeError, function() { undefined >>> 1n; }, "undefined >>> 1n throws TypeError"); >+assert.throws(TypeError, function() { >+ 1 >>> 1n; >+}, '1 >>> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) >>> 1; >+}, 'Object(1n) >>> 1 throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1 >>> Object(1n); >+}, '1 >>> Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n >>> Object(1); >+}, '1n >>> Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) >>> 1n; >+}, 'Object(1) >>> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1n) >>> Object(1); >+}, 'Object(1n) >>> Object(1) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Object(1) >>> Object(1n); >+}, 'Object(1) >>> Object(1n) throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n >>> NaN; >+}, '1n >>> NaN throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ NaN >>> 1n; >+}, 'NaN >>> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n >>> Infinity; >+}, '1n >>> Infinity throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ Infinity >>> 1n; >+}, 'Infinity >>> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n >>> true; >+}, '1n >>> true throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ true >>> 1n; >+}, 'true >>> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n >>> '1'; >+}, '1n >>> "1" throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ '1' >>> 1n; >+}, '"1" >>> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n >>> null; >+}, '1n >>> null throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ null >>> 1n; >+}, 'null >>> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 1n >>> undefined; >+}, '1n >>> undefined throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ undefined >>> 1n; >+}, 'undefined >>> 1n throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-errors.js b/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-errors.js >index 47d9db06419e990367f8fe9c87dcb28c5b6b2742..6aa73c03531160062f3a443f82cb56e2c260f2ce 100644 >--- a/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-errors.js >+++ b/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-errors.js >@@ -6,58 +6,66 @@ > info: After ToNumeric type coercion, unsigned-right-shift always throws for BigInt operands > features: [BigInt, Symbol, Symbol.toPrimitive, computed-property-names] > ---*/ >- > assert.throws(TypeError, function() { >- Symbol("1") >>> 0n; >-}, "ToBigInt: Symbol => TypeError"); >+ Symbol('1') >>> 0n; >+}, 'Symbol("1") >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n >>> Symbol("1"); >-}, "ToBigInt: Symbol => TypeError"); >+ 0n >>> Symbol('1'); >+}, '0n >>> Symbol("1") throws TypeError'); >+ > assert.throws(TypeError, function() { >- Object(Symbol("1")) >>> 0n; >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ Object(Symbol('1')) >>> 0n; >+}, 'Object(Symbol("1")) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { >- 0n >>> Object(Symbol("1")); >-}, "ToBigInt: unbox object with internal slot => Symbol => TypeError"); >+ 0n >>> Object(Symbol('1')); >+}, '0n >>> Object(Symbol("1")) throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) >>> 0n; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '({[Symbol.toPrimitive]: function() {return Symbol("1");}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > [Symbol.toPrimitive]: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: @@toPrimitive => Symbol => TypeError"); >+}, '0n >>> {[Symbol.toPrimitive]: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) >>> 0n; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '({valueOf: function() {return Symbol("1");}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > valueOf: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: valueOf => Symbol => TypeError"); >+}, '0n >>> {valueOf: function() {return Symbol("1");}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }) >>> 0n; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '({toString: function() {return Symbol("1");}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > toString: function() { >- return Symbol("1"); >+ return Symbol('1'); > } > }; >-}, "ToBigInt: toString => Symbol => TypeError"); >+}, '0n >>> {toString: function() {return Symbol("1");}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-non-primitive.js b/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-non-primitive.js >index af88a121f76938368fdfa1bb36a658d474447b0b..aa955c7e1b878731ca41191d8e9d064ba83578ec 100644 >--- a/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-non-primitive.js >+++ b/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-non-primitive.js >@@ -1,6 +1,5 @@ > // Copyright (C) 2017 Josh Wolfe. All rights reserved. > // This code is governed by the BSD license found in the LICENSE file. >- > /*--- > description: Unsigned right shift always throws for non-primitive BigInt values > esid: sec-unsigned-right-shift-operator-runtime-semantics-evaluation >@@ -21,36 +20,84 @@ > > features: [BigInt, Symbol.toPrimitive] > ---*/ >+assert.throws(TypeError, function() { >+ Object(0b101n) >>> 1n; >+}, 'Object(0b101n) >>> 1n throws TypeError'); > >-assert.throws(TypeError, >- function() { Object(0b101n) >>> 1n; }, >- "bigint >>> bigint throws a TypeError for Object(0b101n) >>> 1n"); >-assert.throws(TypeError, >- function() { Object(0b101n) >>> Object(1n); }, >- "bigint >>> bigint throws a TypeError for Object(0b101n) >>> Object(1n)"); >+assert.throws(TypeError, function() { >+ Object(0b101n) >>> Object(1n); >+}, 'Object(0b101n) >>> Object(1n) throws TypeError'); > > function err() { > throw new Test262Error(); > } > >-assert.throws(TypeError, >- function() { ({[Symbol.toPrimitive]: function() { return 0b101n; }, valueOf: err, toString: err} >>> 1n); }, >- "bigint >>> bigint throws a TypeError for primitive from @@toPrimitive"); >-assert.throws(TypeError, >- function() { ({valueOf: function() { return 0b101n; }, toString: err} >>> 1n); }, >- "bigint >>> bigint throws a TypeError for primitive from {}.valueOf"); >-assert.throws(TypeError, >- function() { ({toString: function() { return 0b101n; }} >>> 1n); }, >- "bigint >>> bigint throws a TypeError for primitive from {}.toString"); >-assert.throws(TypeError, >- function() { 0b101n >>> {[Symbol.toPrimitive]: function() { return 1n; }, valueOf: err, toString: err}; }, >- "bigint >>> bigint throws a TypeError for primitive from @@toPrimitive"); >-assert.throws(TypeError, >- function() { 0b101n >>> {valueOf: function() { return 1n; }, toString: err}; }, >- "bigint >>> bigint throws a TypeError for primitive from {}.valueOf"); >-assert.throws(TypeError, >- function() { 0b101n >>> {toString: function() { return 1n; }}; }, >- "bigint >>> bigint throws a TypeError for primitive from {}.toString"); >-assert.throws(TypeError, >- function() { ({valueOf: function() { return 0b101n; }} >>> {valueOf: function() { return 1n; }}); }, >- "bigint >>> bigint throws a TypeError for primitive from {}.valueOf"); >+assert.throws(TypeError, function() { >+ ({ >+ [Symbol.toPrimitive]: function() { >+ return 0b101n; >+ }, >+ >+ valueOf: err, >+ toString: err >+ }) >>> 1n; >+}, '({[Symbol.toPrimitive]: function() {return 0b101n;}, valueOf: err, toString: err}) >>> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ ({ >+ valueOf: function() { >+ return 0b101n; >+ }, >+ >+ toString: err >+ }) >>> 1n; >+}, '({valueOf: function() {return 0b101n;}, toString: err}) >>> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ ({ >+ toString: function() { >+ return 0b101n; >+ } >+ }) >>> 1n; >+}, '({toString: function() {return 0b101n;}}) >>> 1n throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 0b101n >>> { >+ [Symbol.toPrimitive]: function() { >+ return 1n; >+ }, >+ >+ valueOf: err, >+ toString: err >+ }; >+}, '0b101n >>> {[Symbol.toPrimitive]: function() {return 1n;}, valueOf: err, toString: err} throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 0b101n >>> { >+ valueOf: function() { >+ return 1n; >+ }, >+ >+ toString: err >+ }; >+}, '0b101n >>> {valueOf: function() {return 1n;}, toString: err} throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ 0b101n >>> { >+ toString: function() { >+ return 1n; >+ } >+ }; >+}, '0b101n >>> {toString: function() {return 1n;}} throws TypeError'); >+ >+assert.throws(TypeError, function() { >+ ({ >+ valueOf: function() { >+ return 0b101n; >+ } >+ }) >>> { >+ valueOf: function() { >+ return 1n; >+ } >+ }; >+}, '({valueOf: function() {return 0b101n;}}) >>> {valueOf: function() {return 1n;}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-toprimitive.js b/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-toprimitive.js >index 5d8c00d776af3b4a1f4a8dfb0c4cf7352143bc73..6f6aca011e4a2785e9723a1ba2e8798378d0956c 100644 >--- a/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-toprimitive.js >+++ b/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-toprimitive.js >@@ -6,7 +6,6 @@ > info: After ToNumeric type coercion, unsigned-right-shift always throws for BigInt operands > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >- > function err() { > throw new Test262Error(); > } >@@ -18,332 +17,397 @@ function MyError() {} > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err > }) >>> 0n; >-}, "ToPrimitive: @@toPrimitive takes precedence"); >+}, '({[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > [Symbol.toPrimitive]: function() { > return 2n; > }, >+ > valueOf: err, > toString: err > }; >-}, "ToPrimitive: @@toPrimitive takes precedence"); >+}, '0n >>> {[Symbol.toPrimitive]: function() {return 2n;}, valueOf: err, toString: err} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return 2n; > }, >+ > toString: err > }) >>> 0n; >-}, "ToPrimitive: valueOf takes precedence over toString"); >+}, '({valueOf: function() {return 2n;}, toString: err}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > valueOf: function() { > return 2n; > }, >+ > toString: err > }; >-}, "ToPrimitive: valueOf takes precedence over toString"); >+}, '0n >>> {valueOf: function() {return 2n;}, toString: err} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > toString: function() { > return 2n; > } > }) >>> 0n; >-}, "ToPrimitive: toString with no valueOf"); >+}, '({toString: function() {return 2n;}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > toString: function() { > return 2n; > } > }; >-}, "ToPrimitive: toString with no valueOf"); >+}, '0n >>> {toString: function() {return 2n;}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } > }) >>> 0n; >-}, "ToPrimitive: skip @@toPrimitive when it's undefined"); >+}, '({[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > [Symbol.toPrimitive]: undefined, >+ > valueOf: function() { > return 2n; > } > }; >-}, "ToPrimitive: skip @@toPrimitive when it's undefined"); >+}, '0n >>> {[Symbol.toPrimitive]: undefined, valueOf: function() {return 2n;}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } > }) >>> 0n; >-}, "ToPrimitive: skip @@toPrimitive when it's null"); >+}, '({[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > [Symbol.toPrimitive]: null, >+ > valueOf: function() { > return 2n; > } > }; >-}, "ToPrimitive: skip @@toPrimitive when it's null"); >+}, '0n >>> {[Symbol.toPrimitive]: null, valueOf: function() {return 2n;}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: null, >+ > toString: function() { > return 2n; > } > }) >>> 0n; >-}, "ToPrimitive: skip valueOf when it's not callable"); >+}, '({valueOf: null, toString: function() {return 2n;}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > valueOf: null, >+ > toString: function() { > return 2n; > } > }; >-}, "ToPrimitive: skip valueOf when it's not callable"); >+}, '0n >>> {valueOf: null, toString: function() {return 2n;}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: 1, >+ > toString: function() { > return 2n; > } > }) >>> 0n; >-}, "ToPrimitive: skip valueOf when it's not callable"); >+}, '({valueOf: 1, toString: function() {return 2n;}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > valueOf: 1, >+ > toString: function() { > return 2n; > } > }; >-}, "ToPrimitive: skip valueOf when it's not callable"); >+}, '0n >>> {valueOf: 1, toString: function() {return 2n;}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: {}, >+ > toString: function() { > return 2n; > } > }) >>> 0n; >-}, "ToPrimitive: skip valueOf when it's not callable"); >+}, '({valueOf: {}, toString: function() {return 2n;}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > valueOf: {}, >+ > toString: function() { > return 2n; > } > }; >-}, "ToPrimitive: skip valueOf when it's not callable"); >+}, '0n >>> {valueOf: {}, toString: function() {return 2n;}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } > }) >>> 0n; >-}, "ToPrimitive: skip valueOf when it returns an object"); >+}, '({valueOf: function() {return {};}, toString: function() {return 2n;}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return 2n; > } > }; >-}, "ToPrimitive: skip valueOf when it returns an object"); >+}, '0n >>> {valueOf: function() {return {};}, toString: function() {return 2n;}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } > }) >>> 0n; >-}, "ToPrimitive: skip valueOf when it returns an object"); >+}, '({valueOf: function() {return Object(12345);}, toString: function() {return 2n;}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > valueOf: function() { > return Object(12345); > }, >+ > toString: function() { > return 2n; > } > }; >-}, "ToPrimitive: skip valueOf when it returns an object"); >+}, '0n >>> {valueOf: function() {return Object(12345);}, toString: function() {return 2n;}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: 1 > }) >>> 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: 1}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > [Symbol.toPrimitive]: 1 > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n >>> {[Symbol.toPrimitive]: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: {} > }) >>> 0n; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '({[Symbol.toPrimitive]: {}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > [Symbol.toPrimitive]: {} > }; >-}, "ToPrimitive: throw when @@toPrimitive is not callable"); >+}, '0n >>> {[Symbol.toPrimitive]: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return Object(1); > } > }) >>> 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return Object(1);}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > [Symbol.toPrimitive]: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n >>> {[Symbol.toPrimitive]: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return {}; > } > }) >>> 0n; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '({[Symbol.toPrimitive]: function() {return {};}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > [Symbol.toPrimitive]: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when @@toPrimitive returns an object"); >+}, '0n >>> {[Symbol.toPrimitive]: function() {return {};}} throws TypeError'); >+ > assert.throws(MyError, function() { > ({ > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }) >>> 0n; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '({[Symbol.toPrimitive]: function() {throw new MyError();}}) >>> 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n >>> { > [Symbol.toPrimitive]: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from @@toPrimitive"); >+}, '0n >>> {[Symbol.toPrimitive]: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > valueOf: function() { > throw new MyError(); > } > }) >>> 0n; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '({valueOf: function() {throw new MyError();}}) >>> 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n >>> { > valueOf: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from valueOf"); >+}, '0n >>> {valueOf: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(MyError, function() { > ({ > toString: function() { > throw new MyError(); > } > }) >>> 0n; >-}, "ToPrimitive: propagate errors from toString"); >+}, '({toString: function() {throw new MyError();}}) >>> 0n throws MyError'); >+ > assert.throws(MyError, function() { > 0n >>> { > toString: function() { > throw new MyError(); > } > }; >-}, "ToPrimitive: propagate errors from toString"); >+}, '0n >>> {toString: function() {throw new MyError();}} throws MyError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: null, > toString: null > }) >>> 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: null, toString: null}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > valueOf: null, > toString: null > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n >>> {valueOf: null, toString: null} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: 1, > toString: 1 > }) >>> 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: 1, toString: 1}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > valueOf: 1, > toString: 1 > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n >>> {valueOf: 1, toString: 1} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: {}, > toString: {} > }) >>> 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: {}, toString: {}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > valueOf: {}, > toString: {} > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n >>> {valueOf: {}, toString: {}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }) >>> 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return Object(1);}, toString: function() {return Object(1);}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > valueOf: function() { > return Object(1); > }, >+ > toString: function() { > return Object(1); > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n >>> {valueOf: function() {return Object(1);}, toString: function() {return Object(1);}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }) >>> 0n; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '({valueOf: function() {return {};}, toString: function() {return {};}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > valueOf: function() { > return {}; > }, >+ > toString: function() { > return {}; > } > }; >-}, "ToPrimitive: throw when skipping both valueOf and toString"); >+}, '0n >>> {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-wrapped-values.js b/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-wrapped-values.js >index 526bce637353d9186763e6107c746a4d856aa0f3..46fe1027b4799d359a428e7d33e45baf16d6be24 100644 >--- a/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-wrapped-values.js >+++ b/JSTests/test262/test/language/expressions/unsigned-right-shift/bigint-wrapped-values.js >@@ -6,52 +6,58 @@ > info: After ToNumeric type coercion, unsigned-right-shift always throws for BigInt operands > features: [BigInt, Symbol.toPrimitive, computed-property-names] > ---*/ >- > assert.throws(TypeError, function() { > Object(2n) >>> 0n; >-}, "ToPrimitive: unbox object with internal slot"); >+}, 'Object(2n) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> Object(2n); >-}, "ToPrimitive: unbox object with internal slot"); >+}, '0n >>> Object(2n) throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > [Symbol.toPrimitive]: function() { > return 2n; > } > }) >>> 0n; >-}, "ToPrimitive: @@toPrimitive"); >+}, '({[Symbol.toPrimitive]: function() {return 2n;}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > [Symbol.toPrimitive]: function() { > return 2n; > } > }; >-}, "ToPrimitive: @@toPrimitive"); >+}, '0n >>> {[Symbol.toPrimitive]: function() {return 2n;}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > valueOf: function() { > return 2n; > } > }) >>> 0n; >-}, "ToPrimitive: valueOf"); >+}, '({valueOf: function() {return 2n;}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > valueOf: function() { > return 2n; > } > }; >-}, "ToPrimitive: valueOf"); >+}, '0n >>> {valueOf: function() {return 2n;}} throws TypeError'); >+ > assert.throws(TypeError, function() { > ({ > toString: function() { > return 2n; > } > }) >>> 0n; >-}, "ToPrimitive: toString"); >+}, '({toString: function() {return 2n;}}) >>> 0n throws TypeError'); >+ > assert.throws(TypeError, function() { > 0n >>> { > toString: function() { > return 2n; > } > }; >-}, "ToPrimitive: toString"); >+}, '0n >>> {toString: function() {return 2n;}} throws TypeError'); >\ No newline at end of file >diff --git a/JSTests/test262/test/language/literals/numeric/numeric-followed-by-ident.js b/JSTests/test262/test/language/literals/numeric/numeric-followed-by-ident.js >new file mode 100644 >index 0000000000000000000000000000000000000000..d15babcd46ac72efa9a8abda36fcef59220171c6 >--- /dev/null >+++ b/JSTests/test262/test/language/literals/numeric/numeric-followed-by-ident.js >@@ -0,0 +1,18 @@ >+// Copyright (C) 2018 Mozilla. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-literals-numeric-literals >+description: > >+ NumericLiteral followed by IdentifierStart >+info: | >+ The source character immediately following a NumericLiteral must not be an IdentifierStart or DecimalDigit. >+ >+negative: >+ phase: parse >+ type: SyntaxError >+---*/ >+ >+throw "Test262: This statement should not be evaluated."; >+ >+3in [] >diff --git a/JSTests/test262/test/language/literals/string/line-continuation-double.js b/JSTests/test262/test/language/literals/string/line-continuation-double.js >new file mode 100644 >index 0000000000000000000000000000000000000000..d1795e1efc44fba48278635af13872dc56d22440 >--- /dev/null >+++ b/JSTests/test262/test/language/literals/string/line-continuation-double.js >@@ -0,0 +1,60 @@ >+// Copyright (C) 2018 Richard Gibson. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-literals-string-literals >+description: > >+ Line terminators may occur within string literals as part of a |LineContinuation| >+ to produce the empty code points sequence. >+info: | >+ 11.8.4 String Literals >+ >+ StringLiteral :: >+ `"` DoubleStringCharacters? `"` >+ `'` SingleStringCharacters? `'` >+ >+ DoubleStringCharacters :: >+ DoubleStringCharacter DoubleStringCharacters? >+ >+ DoubleStringCharacter :: >+ SourceCharacter but not one of `"` or `\` or LineTerminator >+ <LS> >+ <PS> >+ `\` EscapeSequence >+ LineContinuation >+ >+ LineContinuation :: >+ `\` LineTerminatorSequence >+ >+ 11.3 Line Terminators >+ >+ LineTerminatorSequence :: >+ <LF> >+ <CR> [lookahead != <LF>] >+ <LS> >+ <PS> >+ <CR> <LF> >+ >+ 11.8.4.2 Static Semantics: SV >+ >+ The SV of DoubleStringCharacter :: LineContinuation is the empty code unit sequence. >+---*/ >+ >+// LineTerminatorSequence :: <LF> >+assert.sameValue("\ >+", ""); >+ >+// LineTerminatorSequence :: <CR> [lookahead â <LF>] >+assert.sameValue("\ ", ""); >+ >+// LineTerminatorSequence :: <LS> >+// <LS> is U+2028 LINE SEPARATOR; UTF8(0x2028) = 0xE2 0x80 0xA8 >+assert.sameValue("\â¨", ""); >+ >+// LineTerminatorSequence :: <PS> >+// <PS> is U+2029 PARAGRAPH SEPARATOR; UTF8(0x2029) = 0xE2 0x80 0xA9 >+assert.sameValue("\â©", ""); >+ >+// LineTerminatorSequence :: <CR> <LF> >+assert.sameValue("\ >+", ""); >diff --git a/JSTests/test262/test/language/literals/string/line-continuation-single.js b/JSTests/test262/test/language/literals/string/line-continuation-single.js >new file mode 100644 >index 0000000000000000000000000000000000000000..3e286b0f87cf47b47ad9760bc9e16ccd6160301d >--- /dev/null >+++ b/JSTests/test262/test/language/literals/string/line-continuation-single.js >@@ -0,0 +1,60 @@ >+// Copyright (C) 2018 Richard Gibson. All rights reserved. >+// This code is governed by the BSD license found in the LICENSE file. >+ >+/*--- >+esid: sec-literals-string-literals >+description: > >+ Line terminators may occur within string literals as part of a |LineContinuation| >+ to produce the empty code points sequence. >+info: | >+ 11.8.4 String Literals >+ >+ StringLiteral :: >+ `"` DoubleStringCharacters? `"` >+ `'` SingleStringCharacters? `'` >+ >+ SingleStringCharacters :: >+ SingleStringCharacter SingleStringCharacters? >+ >+ SingleStringCharacter :: >+ SourceCharacter but not one of `'` or `\` or LineTerminator >+ <LS> >+ <PS> >+ `\` EscapeSequence >+ LineContinuation >+ >+ LineContinuation :: >+ `\` LineTerminatorSequence >+ >+ 11.3 Line Terminators >+ >+ LineTerminatorSequence :: >+ <LF> >+ <CR> [lookahead != <LF>] >+ <LS> >+ <PS> >+ <CR> <LF> >+ >+ 11.8.4.2 Static Semantics: SV >+ >+ The SV of SingleStringCharacter :: LineContinuation is the empty code unit sequence. >+---*/ >+ >+// LineTerminatorSequence :: <LF> >+assert.sameValue('\ >+', ''); >+ >+// LineTerminatorSequence :: <CR> [lookahead â <LF>] >+assert.sameValue('\ ', ''); >+ >+// LineTerminatorSequence :: <LS> >+// <LS> is U+2028 LINE SEPARATOR; UTF8(0x2028) = 0xE2 0x80 0xA8 >+assert.sameValue('\â¨', ''); >+ >+// LineTerminatorSequence :: <PS> >+// <PS> is U+2029 PARAGRAPH SEPARATOR; UTF8(0x2029) = 0xE2 0x80 0xA9 >+assert.sameValue('\â©', ''); >+ >+// LineTerminatorSequence :: <CR> <LF> >+assert.sameValue('\ >+', ''); >diff --git a/JSTests/test262/test262-Revision.txt b/JSTests/test262/test262-Revision.txt >index 78382f58c412ad63412f63915e7bfd545360b671..a7cc6f369cc6333a709c2850c9479a63af327801 100644 >--- a/JSTests/test262/test262-Revision.txt >+++ b/JSTests/test262/test262-Revision.txt >@@ -1,2 +1,2 @@ > test262 remote url: git@github.com:tc39/test262.git >-test262 revision: c38bf8ba2335bed22e20169377c808699986eb4d >+test262 revision: a8f7012587250b32ffb43a3cbd8da8a9f9d1565e
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
darin
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185937
: 341173