argument-is-Symbol.js (773B)
1 // Copyright (C) 2015 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 es6id: 21.1.2.2 5 description: > 6 Return abrupt from ToNumber(next). 7 info: | 8 String.fromCodePoint ( ...codePoints ) 9 10 1. Let result be the empty String. 11 2. For each element next of codePoints, do 12 a. Let nextCP be ? ToNumber(next). 13 b. If nextCP is not an integral Number, throw a RangeError exception. 14 c. If ℝ(nextCP) < 0 or ℝ(nextCP) > 0x10FFFF, throw a RangeError exception. 15 ... 16 features: [Symbol, String.fromCodePoint] 17 ---*/ 18 19 assert.throws(TypeError, function() { 20 String.fromCodePoint(Symbol()); 21 }); 22 23 assert.throws(TypeError, function() { 24 String.fromCodePoint(42, Symbol()); 25 }); 26 27 reportCompare(0, 0);