My working unpac space for OCaml projects in development
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Temporal: Add coverage for modified Array iteration when called from GetPossibleEpochNanoseconds

authored by

Tim Chevalier and committed by
Ms2ger
8931597f cdd64ddc

+60
+20
vendor/git/test262/test/built-ins/Temporal/Instant/prototype/toZonedDateTimeISO/no-observable-array-iteration.js
··· 1 + // Copyright (C) 2025 Igalia, S.L. All rights reserved. 2 + // This code is governed by the BSD license found in the LICENSE file. 3 + 4 + /*--- 5 + esid: sec-temporal.instant.prototype.tozoneddatetimeiso 6 + description: > 7 + Calling GetPossibleEpochNanoseconds (from ToTemporalZonedDateTime > InterpretISODateTimeOffset) 8 + causes no observable array iteration. 9 + features: [Temporal] 10 + ---*/ 11 + 12 + const arrayPrototypeSymbolIteratorOriginal = Array.prototype[Symbol.iterator]; 13 + Array.prototype[Symbol.iterator] = function arrayIterator() { 14 + throw new Test262Error("Array should not be iterated"); 15 + } 16 + 17 + let inst = new Temporal.Instant(0n); 18 + let zdt = inst.toZonedDateTimeISO("UTC"); 19 + 20 + Array.prototype[Symbol.iterator] = arrayPrototypeSymbolIteratorOriginal;
+20
vendor/git/test262/test/built-ins/Temporal/PlainDate/prototype/toZonedDateTime/no-observable-array-iteration.js
··· 1 + // Copyright (C) 2025 Igalia, S.L. All rights reserved. 2 + // This code is governed by the BSD license found in the LICENSE file. 3 + 4 + /*--- 5 + esid: sec-temporal.plaindate.prototype.tozoneddatetime 6 + description: > 7 + Calling GetPossibleEpochNanoseconds (from ToTemporalZonedDateTime > InterpretISODateTimeOffset) 8 + causes no observable array iteration. 9 + features: [Temporal] 10 + ---*/ 11 + 12 + const arrayPrototypeSymbolIteratorOriginal = Array.prototype[Symbol.iterator]; 13 + Array.prototype[Symbol.iterator] = function arrayIterator() { 14 + throw new Test262Error("Array should not be iterated"); 15 + } 16 + 17 + let pd = new Temporal.PlainDate(2000, 1, 1); 18 + let zdt = pd.toZonedDateTime("UTC"); 19 + 20 + Array.prototype[Symbol.iterator] = arrayPrototypeSymbolIteratorOriginal;
+20
vendor/git/test262/test/built-ins/Temporal/PlainDateTime/prototype/toZonedDateTime/no-observable-array-iteration.js
··· 1 + // Copyright (C) 2025 Igalia, S.L. All rights reserved. 2 + // This code is governed by the BSD license found in the LICENSE file. 3 + 4 + /*--- 5 + esid: sec-temporal.plaindatetime.prototype.tozoneddatetime 6 + description: > 7 + Calling GetPossibleEpochNanoseconds (from ToTemporalZonedDateTime > InterpretISODateTimeOffset) 8 + causes no observable array iteration. 9 + features: [Temporal] 10 + ---*/ 11 + 12 + const arrayPrototypeSymbolIteratorOriginal = Array.prototype[Symbol.iterator]; 13 + Array.prototype[Symbol.iterator] = function arrayIterator() { 14 + throw new Test262Error("Array should not be iterated"); 15 + } 16 + 17 + let pdt = new Temporal.PlainDateTime(2000, 1, 1, 12, 0, 0, 0); 18 + let zdt = pdt.toZonedDateTime("UTC"); 19 + 20 + Array.prototype[Symbol.iterator] = arrayPrototypeSymbolIteratorOriginal;