blob: e35db5dffebc578d30482adacc00324eeceab543 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright 2012 Google Inc. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* @description Tests properties of Intl object.
*/
// We keep Intl extensible and not frozen.
if (Object.isFrozen(Intl) === true) {
$ERROR('isFrozen(Intl) returns true.');
}
if (Object.isExtensible(Intl) === false) {
$ERROR('isExtensible(Intl) returns false.');
}
var falsey;
// Intl can't be constructed.
try {
falsey = new Intl();
} catch (e) {
}
if (!!falsey) {
$ERROR('Intl object should not be constructable.');
}
// Intl can't be called as a function.
try {
/*jshint newcap:false*/
falsey = Intl();
} catch (e) {
}
if (!!falsey) {
$ERROR('Intl should not be callable.');
}
|