S9.8_A4_T1.js (668B)
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 Result of String conversion from string value is the input argument (no 7 conversion) 8 es5id: 9.8_A4_T1 9 description: Some strings convert to String with explicit transformation 10 ---*/ 11 12 // CHECK#1 13 var x1 = "abc"; 14 if (String(x1) !== x1) { 15 throw new Test262Error('#1: String("abc") === "abc". Actual: ' + (String("abc"))); 16 } 17 18 // CHECK#2 19 var x2 = "abc"; 20 if (typeof String(x2) !== typeof x2) { 21 throw new Test262Error('#2: typeof String("abc") === "string". Actual: ' + (typeof String("abc"))); 22 } 23 24 reportCompare(0, 0);