Skip to content

Commit 3ff9618

Browse files
ioannadMs2ger
authored andcommitted
[Temporal] Remove v8 staging test plain-date-time-with-calendar and -with-plain-time
The tests in `test/staging/Temporal/v8/plain-date-time-with-calendar.js` are covered by `test/built-ins/Temporal/PlainDateTime/prototype/withCalendar/branding.js`. Move the rest to `test/intl402/Temporal/PlainDateTime/prototype/withCalendar/roundtrip-from-iso8601.js`. Some tests in `test/staging/Temporal/v8/plain-date-time-with-plain-time.js` are covered by tests in - `test/built-ins/Temporal/PlainDateTime/prototype/withPlainTime/branding.js` - `test/built-ins/Temporal/PlainDateTime/prototype/withPlainTime/argument-propertybag-optional-properties.js` - `test/built-ins/Temporal/PlainDateTime/prototype/withPlainTime/argument-wrong-type.js` Move the rest to `test/intl402/Temporal/PlainDate/prototype/withPlainTime/basic-roc.js` (in new directory).
1 parent 9411a36 commit 3ff9618

File tree

3 files changed

+23
-41
lines changed

3 files changed

+23
-41
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright 2021 the V8 project authors. 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.withplaintime
6+
description: withPlainTime should work for roc calendar dates
7+
features: [Temporal, Intl.Era-monthcode]
8+
includes: [temporalHelpers.js]
9+
---*/
10+
11+
let timeRecord = {
12+
hour: 9,
13+
minute: 8,
14+
second: 7,
15+
millisecond: 6,
16+
microsecond: 5,
17+
nanosecond: 4
18+
};
19+
20+
let d = new Temporal.PlainDateTime(2020, 3, 15, 4, 5, 6, 7, 8, 9, 'roc');
21+
TemporalHelpers.assertPlainDateTime(d.withPlainTime(timeRecord), 109, 3, 'M03', 15, 9, 8, 7, 6, 5, 4, '', 'roc', 109);

test/staging/Temporal/v8/plain-date-time-with-calendar.js renamed to test/intl402/Temporal/PlainDateTime/prototype/withCalendar/roundtrip-from-iso8601.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,13 @@
22
// This code is governed by the BSD license found in the LICENSE file.
33

44
/*---
5-
esid: pending
6-
description: >
7-
Automatically ported from plain-date-time-with-calendar test
8-
in V8's mjsunit test plain-date-time-with-calendar.js
5+
esid: sec-temporal.plaindatetime.prototype.withcalendar
6+
description: Converting to iso8601 and back works as expeced.
97
includes: [temporalHelpers.js]
108
features: [Temporal]
119
---*/
1210

1311
let d1 = new Temporal.PlainDateTime(1911, 10, 10, 4, 5, 6, 7, 8, 9);
14-
let badDateTime = { withCalendar: d1.withCalendar };
15-
assert.throws(TypeError, () => badDateTime.withCalendar('iso8601'));
16-
1712
let d2 = d1.withCalendar('roc');
1813
assert.sameValue('roc', d2.calendarId);
1914
TemporalHelpers.assertPlainDateTime(d2, 0, 10, 'M10', 10, 4, 5, 6, 7, 8, 9, '', 'broc', 1);

test/staging/Temporal/v8/plain-date-time-with-plain-time.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)