blob: 3906806b5fb8faa649b71844f72d25ddb25cb8a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Copyright (C) 2021 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-Intl.NumberFormat.prototype.formatRangeToParts
description: >
"formatRangeToParts" basic tests when arguments are undefined throw a TypeError exception.
info: |
Intl.NumberFormat.prototype.formatRangeToParts ( start, end )
(...)
3. If start is undefined or end is undefined, throw a TypeError exception.
features: [Intl.NumberFormat-v3]
---*/
const nf = new Intl.NumberFormat();
// If arguments are undefined throw a TypeError exception.
assert.throws(TypeError, () => { nf.formatRangeToParts(undefined, 23) });
assert.throws(TypeError, () => { nf.formatRangeToParts(1,undefined) });
assert.throws(TypeError, () => { nf.formatRangeToParts(undefined, undefined)});
reportCompare(0, 0);
|