OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 assertThrows(() => new Intl.getCanonicalLocales('en'), TypeError); |
| 6 |
| 7 let collator = new Intl.Collator('en'); |
| 8 assertThrows(() => new collator.resolvedOptions(), TypeError); |
| 9 |
| 10 assertThrows(() => new Intl.Collator.supportedLocalesOf('en'), TypeError); |
| 11 |
| 12 let numberformat = new Intl.NumberFormat('en'); |
| 13 assertThrows(() => new numberformat.resolvedOptions(), TypeError); |
| 14 |
| 15 assertThrows(() => new Intl.NumberFormat.supportedLocalesOf('en'), TypeError); |
| 16 |
| 17 let datetimeformat = new Intl.DateTimeFormat('en'); |
| 18 assertThrows(() => new datetimeformat.resolvedOptions(), TypeError); |
| 19 assertThrows(() => new datetimeformat.formatToParts(new Date()), TypeError); |
| 20 |
| 21 assertThrows(() => new Intl.DateTimeFormat.supportedLocalesOf('en'), TypeError); |
| 22 |
| 23 assertThrows(() => new "".localCompare(""), TypeError); |
| 24 |
| 25 assertThrows(() => new "".normalize(), TypeError); |
| 26 assertThrows(() => new "".toLocaleLowerCase(), TypeError); |
| 27 assertThrows(() => new "".toLocaleUpperCase(), TypeError); |
| 28 assertThrows(() => new "".toLowerCase(), TypeError); |
| 29 assertThrows(() => new "".toUpperCase(), TypeError); |
| 30 |
| 31 assertThrows(() => new 3..toLocaleString(), TypeError); |
| 32 assertThrows(() => new (new Date()).toLocaleString(), TypeError); |
| 33 assertThrows(() => new (new Date()).toLocaleDateString(), TypeError); |
| 34 assertThrows(() => new (new Date()).toLocaleTimeString(), TypeError); |
OLD | NEW |