summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Temporal/Duration/call-builtin.js
blob: 99f9c244283dde48a46ebaa618abf892268909ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// |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.duration
description: Constructor should not call built-in functions.
includes: [temporalHelpers.js]
features: [Temporal]
---*/

Number.isFinite = () => { throw new Test262Error("should not call Number.isFinite") };
Math.sign = () => { throw new Test262Error("should not call Math.sign") };

const duration = new Temporal.Duration(1, 1);
TemporalHelpers.assertDuration(duration, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0);

reportCompare(0, 0);