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