2021-08-10 19:29:43 +00:00
|
|
|
// Copyright 2021 the V8 project authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
// Flags: --harmony-temporal
|
|
|
|
|
|
|
|
// https://tc39.es/proposal-temporal/#sec-temporal.calendar
|
|
|
|
// 1. If NewTarget is undefined, then
|
|
|
|
// a. Throw a TypeError exception.
|
2022-01-06 03:32:26 +00:00
|
|
|
assertThrows(() => Temporal.Calendar("iso8601"), TypeError);
|
2021-08-10 19:29:43 +00:00
|
|
|
|
2022-01-06 03:32:26 +00:00
|
|
|
assertThrows(() => new Temporal.Calendar(), RangeError);
|
2021-08-10 19:29:43 +00:00
|
|
|
|
2022-11-04 21:20:14 +00:00
|
|
|
assertEquals("iso8601", (new Temporal.Calendar("IsO8601")).id)
|
2021-08-10 19:29:43 +00:00
|
|
|
|
|
|
|
assertEquals("iso8601", (new Temporal.Calendar("iso8601")).id)
|