WebKit Bugzilla
Attachment 340642 Details for
Bug 185744
: Update Test262 test files - 2018-05-17
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185744-20180517181420.patch (text/plain), 1.02 MB, created by
Leo Balter
on 2018-05-17 14:14:25 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Leo Balter
Created:
2018-05-17 14:14:25 PDT
Size:
1.02 MB
patch
obsolete
>Subversion Revision: 231917 >diff --git a/JSTests/ChangeLog b/JSTests/ChangeLog >index adb042509092c83c2f33ddbb9c3ba46a27e13787..57df8a6c589b6b67dd3d056a9e2449f657039323 100644 >--- a/JSTests/ChangeLog >+++ b/JSTests/ChangeLog >@@ -1,3 +1,409 @@ >+2018-05-17 Leo Balter <leonardo.balter@gmail.com> >+ >+ Update Test262 test files - 2018-05-17 >+ https://bugs.webkit.org/show_bug.cgi?id=185744 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * test262/expectations.yaml: >+ * 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/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/Locale/invalid-tag-throws-symbol.js: >+ * test262/test/intl402/Locale/prop-desc.js: >+ * test262/test/intl402/Locale/prototype/maximize/length.js: >+ * test262/test/intl402/Locale/prototype/maximize/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/test262-Revision.txt: >+ > 2018-05-16 Caio Lima <ticaiolima@gmail.com> > > [ESNext][BigInt] Implement support for "/" operation >diff --git a/JSTests/test262/expectations.yaml b/JSTests/test262/expectations.yaml >index ee0b3801600a254346402a1620e8878091611272..92c0ad2a417707c0c732601e9c422d15715955f6 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: >@@ -1201,7 +1185,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: >@@ -1932,8 +1916,8 @@ 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' >+ default: 'Test262Error: obj should have an own property Locale' >+ strict mode: 'Test262Error: obj should have an own property Locale' > test/intl402/Locale/prototype/constructor.js: > default: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" > strict mode: "TypeError: undefined is not an object (evaluating 'Intl.Locale.prototype')" >diff --git a/JSTests/test262/latest-changes-summary.txt b/JSTests/test262/latest-changes-summary.txt >index 349b604210d2baf8c3c7a96cc298ce1ca9239693..0f68c52faedccca8a11eeb402eb2a4d928bf9d80 100644 >--- a/JSTests/test262/latest-changes-summary.txt >+++ b/JSTests/test262/latest-changes-summary.txt >@@ -1,191 +1,54 @@ >-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 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 >+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 +58,151 @@ 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/Locale/invalid-tag-throws-symbol.js >+M test/intl402/Locale/prop-desc.js >+M test/intl402/Locale/prototype/maximize/length.js >+M test/intl402/Locale/prototype/maximize/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 >\ 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 @@ info: | > > [...] > 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 @@ Object.defineProperty(fnGlobalObject(), 'f', { > > 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 @@ info: | > > [...] > 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 @@ Object.defineProperty(fnGlobalObject(), 'f', { > > 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 @@ info: | > > [...] > 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 @@ Object.defineProperty(fnGlobalObject(), 'f', { > > 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 @@ info: | > > [...] > 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 @@ Object.defineProperty(fnGlobalObject(), 'f', { > > 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 @@ info: | > > [...] > 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 @@ Object.defineProperty(fnGlobalObject(), 'f', { > > 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 @@ info: | > > [...] > 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 @@ Object.defineProperty(fnGlobalObject(), 'f', { > > 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 @@ info: | > > [...] > 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 @@ Object.defineProperty(fnGlobalObject(), 'f', { > > 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 @@ info: | > > [...] > 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 @@ Object.defineProperty(fnGlobalObject(), 'f', { > > 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 @@ info: | > > [...] > 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 @@ Object.defineProperty(fnGlobalObject(), 'f', { > > (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 @@ info: | > > [...] > 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 @@ Object.defineProperty(fnGlobalObject(), 'f', { > > (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 @@ info: | > > [...] > 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 @@ Object.defineProperty(fnGlobalObject(), 'f', { > > (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 @@ info: | > > [...] > 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 @@ Object.defineProperty(fnGlobalObject(), 'f', { > > (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 @@ info: | > > [...] > 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 @@ Object.defineProperty(fnGlobalObject(), 'f', { > > (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 @@ info: | > > [...] > 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 @@ Object.defineProperty(fnGlobalObject(), 'f', { > > (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 @@ info: | > > [...] > 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 @@ Object.defineProperty(fnGlobalObject(), 'f', { > > (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 @@ info: | > > [...] > 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 @@ Object.defineProperty(fnGlobalObject(), 'f', { > > (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/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 @@ info: | > 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 @@ info: | > 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 @@ info: | > 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/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 @@ info: | > 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/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/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 @@ features: [Intl.Locale] > ---*/ > > 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 @@ features: [Intl.Locale] > ---*/ > > 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/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 @@ info: | > 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 @@ description: addition operator ToNumeric with BigInt operands > 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 @@ description: addition operator ToNumeric with BigInt operands > 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 @@ description: addition operator ToNumeric with BigInt operands > 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 @@ info: | > 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 @@ description: bitwise-and operator ToNumeric with BigInt operands > 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 @@ info: | > > 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 @@ description: bitwise-and operator ToNumeric with BigInt operands > 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 @@ description: bitwise-and operator ToNumeric with BigInt operands > 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 @@ info: | > > 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 @@ info: | > 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 @@ description: bitwise-or operator ToNumeric with BigInt operands > 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 @@ info: | > > 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 @@ description: bitwise-or operator ToNumeric with BigInt operands > 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 @@ description: bitwise-or operator ToNumeric with BigInt operands > 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 @@ info: | > 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 @@ description: bitwise-xor operator ToNumeric with BigInt operands > 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 @@ info: | > > 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 @@ description: bitwise-xor operator ToNumeric with BigInt operands > 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 @@ description: bitwise-xor operator ToNumeric with BigInt operands > 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 @@ info: | > 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 @@ info: | > ... > 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 @@ description: division operator ToNumeric with BigInt operands > 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 @@ description: division operator ToNumeric with BigInt operands > 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 @@ description: division operator ToNumeric with BigInt operands > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > 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 @@ description: exponentiation operator ToNumeric with BigInt operands > 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 @@ description: exponentiation operator ToNumeric with BigInt operands > 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 @@ description: exponentiation operator ToNumeric with BigInt operands > 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 @@ info: | > ... > 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 @@ info: | > > 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 @@ info: | > 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 @@ info: | > 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 @@ info: | > 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 @@ description: > > 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 @@ description: > > 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 @@ info: | > > 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 @@ info: | > 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 @@ info: | > 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 @@ info: | > 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..68b5f7b4cacdae47dd6ae1999b32d3fda04fa386 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,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", 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( >+ 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/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 @@ info: | > 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 @@ description: left-shift operator ToNumeric with BigInt operands > 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 @@ info: | > > 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 @@ description: left-shift operator ToNumeric with BigInt operands > 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 @@ description: left-shift operator ToNumeric with BigInt operands > 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 @@ description: > > 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 @@ description: > > 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 @@ description: > > 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 @@ description: > > 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 @@ info: | > > 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 @@ info: | > 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 @@ info: | > 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 @@ info: | > 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 @@ info: | > > 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 @@ info: | > 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 @@ info: | > 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 @@ info: | > 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..1866b3c382c9984e45830d3c9701ba2c209353b3 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,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", 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( >+ 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-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 @@ info: | > 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 @@ description: modulus operator ToNumeric with BigInt operands > 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 @@ info: | > 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 @@ description: modulus operator ToNumeric with BigInt operands > 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 @@ description: modulus operator ToNumeric with BigInt operands > 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 @@ info: | > 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 @@ description: multiplication operator ToNumeric with BigInt operands > 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 @@ description: multiplication operator ToNumeric with BigInt operands > 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 @@ description: multiplication operator ToNumeric with BigInt operands > 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 @@ info: | > 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 @@ description: right-shift operator ToNumeric with BigInt operands > 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 @@ info: | > > 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 @@ description: right-shift operator ToNumeric with BigInt operands > 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 @@ description: right-shift operator ToNumeric with BigInt operands > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > > 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 @@ info: | > 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 @@ description: subtraction operator ToNumeric with BigInt operands > 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 @@ description: subtraction operator ToNumeric with BigInt operands > 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 @@ description: subtraction operator ToNumeric with BigInt operands > 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 @@ info: | > > 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 @@ info: | > 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 @@ info: | > 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 @@ esid: sec-unsigned-right-shift-operator-runtime-semantics-evaluation > 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 @@ info: | > > 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 @@ esid: sec-unsigned-right-shift-operator-runtime-semantics-evaluation > 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 @@ assert.throws(TypeError, function() { > [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 @@ esid: sec-unsigned-right-shift-operator-runtime-semantics-evaluation > 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/test262-Revision.txt b/JSTests/test262/test262-Revision.txt >index 78382f58c412ad63412f63915e7bfd545360b671..beac028f4b0f3d4131e1806ddcbb2788cf23194e 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: 7ff8d48178656fc8cbc0009057273d1887857c0f
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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185744
: 340642