Debian Codegraph @

js/src/tests/test262/built-ins/isNaN/return-abrupt-from-tonumber-number-symbol.js

raw
1 // Copyright (C) 2016 The V8 Project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-isnan-number
6 description: >
7 Throws a TypeError if number is a Symbol
8 info: |
9 isNaN (number)
10
11 1. Let num be ? ToNumber(number).
12 features: [Symbol]
13 ---*/
14
15 var s = Symbol(1);
16
17 assert.throws(TypeError, function() {
18 isNaN(s);
19 });
20
21 reportCompare(0, 0);