blob: a268bb672df043f3d20bb0d12859354d1ec6fbaf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.plaindate
description: Test for Temporal.PlainDate subclassing.
includes: [temporalHelpers.js]
features: [Temporal]
---*/
class CustomPlainDate extends Temporal.PlainDate {
}
const instance = new CustomPlainDate(2000, 5, 2);
TemporalHelpers.assertPlainDate(instance, 2000, 5, "M05", 2);
assert.sameValue(Object.getPrototypeOf(instance), CustomPlainDate.prototype, "Instance of CustomPlainDate");
assert(instance instanceof CustomPlainDate, "Instance of CustomPlainDate");
assert(instance instanceof Temporal.PlainDate, "Instance of Temporal.PlainDate");
reportCompare(0, 0);
|