supportedLocalesOf.js (1300B)
1 // Copyright 2016 Mozilla Corporation. All rights reserved. 2 // This code is governed by the license found in the LICENSE file. 3 4 /*--- 5 esid: sec-Intl.PluralRules.supportedLocalesOf 6 description: > 7 Tests that Intl.PluralRules.supportedLocalesOf meets the requirements for 8 built-in objects defined by the introduction of chapter 17 of the 9 ECMAScript Language Specification. 10 author: Zibi Braniecki 11 includes: [isConstructor.js] 12 features: [Reflect.construct] 13 ---*/ 14 15 assert.sameValue(Object.prototype.toString.call(Intl.PluralRules.supportedLocalesOf), "[object Function]", 16 "The [[Class]] internal property of a built-in function must be " + 17 "\"Function\"."); 18 19 assert(Object.isExtensible(Intl.PluralRules.supportedLocalesOf), 20 "Built-in objects must be extensible."); 21 22 assert.sameValue(Object.getPrototypeOf(Intl.PluralRules.supportedLocalesOf), Function.prototype); 23 24 assert.sameValue(Intl.PluralRules.supportedLocalesOf.hasOwnProperty("prototype"), false, 25 "Built-in functions that aren't constructors must not have a prototype property."); 26 27 assert.sameValue(isConstructor(Intl.PluralRules.supportedLocalesOf), false, 28 "Built-in functions don't implement [[Construct]] unless explicitly specified."); 29 30 reportCompare(0, 0);