Debian Codegraph @

js/src/tests/test262/built-ins/parseInt/S15.1.2.2_A2_T3.js

raw
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: Operator remove leading StrWhiteSpaceChar
6 esid: sec-parseint-string-radix
7 description: "StrWhiteSpaceChar :: NBSB (U+00A0)"
8 ---*/
9
10 assert.sameValue(parseInt("\u00A01"), parseInt("1"), 'parseInt("\\u00A01") must return the same value returned by parseInt("1")');
11 assert.sameValue(parseInt("\u00A0\u00A0-1"), parseInt("-1"), 'parseInt("\\u00A0\\u00A0-1") must return the same value returned by parseInt("-1")');
12
13 //CHECK#3
14 assert.sameValue(parseInt("\u00A0"), NaN, 'parseInt("\\u00A0") must return NaN');
15
16 reportCompare(0, 0);