S15.5.2.1_A2_T1.js (777B)
1 // Copyright 2009 the Sputnik authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: | 6 The [[Prototype]] property of the newly constructed object is set to the 7 original String prototype object 8 es5id: 15.5.2.1_A2_T1 9 description: Creating string object with "new String(string)" to check prototype 10 ---*/ 11 12 var __str__obj = new String("abba"); 13 14 ////////////////////////////////////////////////////////////////////////////// 15 //CHECK#1 16 if (!(String.prototype.isPrototypeOf(__str__obj))) { 17 throw new Test262Error('#1: var __str__obj = new String("abba"); String.prototype.isPrototypeOf(__str__obj)===true'); 18 } 19 // 20 ////////////////////////////////////////////////////////////////////////////// 21 22 reportCompare(0, 0);