diff --git a/third_party/test262/test/built-ins/Number/MAX_VALUE/value.js b/third_party/test262/test/built-ins/Number/MAX_VALUE/value.js new file mode 100644 index 00000000000000..82f46335d7bea0 --- /dev/null +++ b/third_party/test262/test/built-ins/Number/MAX_VALUE/value.js @@ -0,0 +1,19 @@ +// Copyright (C) 2026 Luna Pfeiffer. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-number.max_value +description: > + Number.MAX_VALUE is approximately 1.7976931348623157 × 10³⁰⁸ + +---*/ + + +assert.sameValue(typeof Number.MAX_VALUE, "number", "Number.MAX_VALUE should be a number"); +assert(Number.MAX_VALUE > 0, "Number.MAX_VALUE must be positive"); + +assert(Number.MAX_VALUE > Number.MAX_SAFE_INTEGER, "Number.MAX_VALUE should be larger than Number.MAX_SAFE_INTEGER"); +assert(Number.MAX_VALUE < Infinity, "Number.MAX_VALUE should be less than Infinity"); + +assert.sameValue(Number.MAX_VALUE * 2, Infinity, "Number.MAX_VALUE multiplied by 2 should be Infinity"); +assert.sameValue(Number.MAX_VALUE, 1.7976931348623157e+308, "Number.MAX_VALUE should be approximately 1.7976931348623157e+308"); diff --git a/third_party/test262/test/built-ins/Number/MIN_VALUE/value.js b/third_party/test262/test/built-ins/Number/MIN_VALUE/value.js new file mode 100644 index 00000000000000..33b0baae4a0142 --- /dev/null +++ b/third_party/test262/test/built-ins/Number/MIN_VALUE/value.js @@ -0,0 +1,20 @@ +// Copyright (C) 2026 Luna Pfeiffer. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-number.min_value +description: > + Number.MIN_VALUE is approximately 5e-324. We can't directly compare it as the spec states: + + In the IEEE 754-2019 double precision binary representation, the smallest possible value is a denormalized number. + If an implementation does not support denormalized values, the value of Number.MIN_VALUE must be the smallest + non-zero positive value that can actually be represented by the implementation. +---*/ + + +assert.sameValue(typeof Number.MIN_VALUE, "number", "Number.MIN_VALUE should be a number"); +assert(Number.MIN_VALUE > 0, "Number.MIN_VALUE must be positive"); + +assert(Number.MIN_VALUE < Number.EPSILON, "Number.MIN_VALUE should be smaller than Number.EPSILON") + +assert.sameValue(Number.MIN_VALUE / 2, 0, "Number.MIN_VALUE divided by 2 should underflow to 0"); diff --git a/third_party/test262/test/built-ins/Temporal/Duration/prototype/round/rounding-increment-relativeto.js b/third_party/test262/test/built-ins/Temporal/Duration/prototype/round/rounding-increment-relativeto.js index 762be1f1d5bba1..1e66b492d05f40 100644 --- a/third_party/test262/test/built-ins/Temporal/Duration/prototype/round/rounding-increment-relativeto.js +++ b/third_party/test262/test/built-ins/Temporal/Duration/prototype/round/rounding-increment-relativeto.js @@ -39,8 +39,3 @@ TemporalHelpers.assertDuration(new Temporal.Duration(0, 1, 0, 30).round({ roundingIncrement: 2, relativeTo: new Temporal.PlainDate(1970, 7, 31) }), 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, `1m30d to 2m with relativeTo 1970-07-31`); -TemporalHelpers.assertDuration(new Temporal.Duration(0, 1, 0, 30).round({ - smallestUnit: "months", - roundingIncrement: 2, - relativeTo: Temporal.ZonedDateTime.from('2025-03-09T03:00:00-07:00[America/Vancouver]') -}), 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, `1m30d to 2m with relativeTo 2025-03-09T03:00:00-07:00[America/Vancouver]`); diff --git a/third_party/test262/test/intl402/Temporal/Duration/prototype/round/rounding-increment-relativeto.js b/third_party/test262/test/intl402/Temporal/Duration/prototype/round/rounding-increment-relativeto.js new file mode 100644 index 00000000000000..b50c5d7e3cb1a3 --- /dev/null +++ b/third_party/test262/test/intl402/Temporal/Duration/prototype/round/rounding-increment-relativeto.js @@ -0,0 +1,16 @@ +// Copyright (C) 2026 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.duration.prototype.round +description: Test a specific buggy case from temporal_rs +includes: [temporalHelpers.js] +features: [Temporal] +---*/ + +const relativeTo = Temporal.ZonedDateTime.from('2025-03-09T03:00:00-07:00[America/Vancouver]'); +TemporalHelpers.assertDuration(new Temporal.Duration(0, 1, 0, 30).round({ + smallestUnit: "months", + roundingIncrement: 2, + relativeTo, +}), 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, `1m30d to 2m with relativeTo 2025-03-09T03:00:00-07:00[America/Vancouver]`); diff --git a/third_party/test262/test/staging/sm/Atomics/cross-compartment.js b/third_party/test262/test/staging/sm/Atomics/cross-compartment.js index 2606709b850ad6..4dd3fe77775b65 100644 --- a/third_party/test262/test/staging/sm/Atomics/cross-compartment.js +++ b/third_party/test262/test/staging/sm/Atomics/cross-compartment.js @@ -5,6 +5,7 @@ description: | pending esid: pending +features: [Atomics, SharedArrayBuffer] ---*/ const otherGlobal = $262.createRealm().global; @@ -111,4 +112,3 @@ for (let TA of intArrayConstructors) { assert.sameValue(val, 3); assert.sameValue(ta[0], 2); } - diff --git a/third_party/test262/test/staging/sm/Atomics/detached-buffers.js b/third_party/test262/test/staging/sm/Atomics/detached-buffers.js index 9d0e605c2793c7..d1b1bf3ce31a8e 100644 --- a/third_party/test262/test/staging/sm/Atomics/detached-buffers.js +++ b/third_party/test262/test/staging/sm/Atomics/detached-buffers.js @@ -6,6 +6,7 @@ includes: [detachArrayBuffer.js] description: | pending esid: pending +features: [Atomics] ---*/ const intArrayConstructors = [ @@ -97,4 +98,3 @@ for (let TA of intArrayConstructors) { assert.throws(TypeError, () => Atomics.xor(ta, badValue(ta), 0)); assert.throws(TypeError, () => Atomics.xor(ta, 0, badValue(ta))); } - diff --git a/third_party/test262/test/staging/sm/TypedArray/sort-negative-nan.js b/third_party/test262/test/staging/sm/TypedArray/sort-negative-nan.js index 00e1c6c070c298..c5e0f433017679 100644 --- a/third_party/test262/test/staging/sm/TypedArray/sort-negative-nan.js +++ b/third_party/test262/test/staging/sm/TypedArray/sort-negative-nan.js @@ -6,6 +6,7 @@ includes: [sm/non262-TypedArray-shell.js] description: | pending esid: pending +features: [Float16Array, Float32Array, Float64Array] ---*/ // Test with all floating point typed arrays. const floatConstructors = anyTypedArrayConstructors.filter(isFloatConstructor); @@ -136,4 +137,3 @@ for (const [TA, taLength] of prod(floatConstructors, typedArrayLengths)) { assert.sameValue(fta[nanOffset + i], NaN, `At offset: ${nanOffset + i}`); } } - diff --git a/third_party/test262/test/staging/sm/TypedArray/toString.js b/third_party/test262/test/staging/sm/TypedArray/toString.js index 29adb9038ba34b..2b4d27d99a9067 100644 --- a/third_party/test262/test/staging/sm/TypedArray/toString.js +++ b/third_party/test262/test/staging/sm/TypedArray/toString.js @@ -6,6 +6,7 @@ includes: [sm/non262-TypedArray-shell.js, propertyHelper.js] description: | pending esid: pending +features: [Float16Array] ---*/ const TypedArrayPrototype = Object.getPrototypeOf(Int8Array.prototype); diff --git a/third_party/test262/vendored.toml b/third_party/test262/vendored.toml index 11954844c86b41..15b808c6cc920f 100644 --- a/third_party/test262/vendored.toml +++ b/third_party/test262/vendored.toml @@ -1,3 +1,3 @@ [test262] source = "https://github.com/tc39/test262" -rev = "b66872a92487694396fb082343e08dd7cca5ddf4" +rev = "d5e73fc8d2c663554fb72e2380a8c2bc1a318a33"