summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Temporal/PlainTime/subclass.js
blob: 693ea6f52c96c5574ca6587faa95020ca181792a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// |reftest| skip -- Temporal is not supported
// 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.plaintime
description: Test for Temporal.PlainTime subclassing.
includes: [temporalHelpers.js]
features: [Temporal]
---*/

class CustomPlainTime extends Temporal.PlainTime {
}

const instance = new CustomPlainTime(12, 34, 56, 987, 654, 321);
TemporalHelpers.assertPlainTime(instance, 12, 34, 56, 987, 654, 321);
assert.sameValue(Object.getPrototypeOf(instance), CustomPlainTime.prototype, "Instance of CustomPlainTime");
assert(instance instanceof CustomPlainTime, "Instance of CustomPlainTime");
assert(instance instanceof Temporal.PlainTime, "Instance of Temporal.PlainTime");

reportCompare(0, 0);