Debian Codegraph @

js/src/tests/test262/built-ins/parseInt/S15.1.2.2_A3.1_T6.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 use ToNumber
6 es5id: 15.1.2.2_A3.1_T6
7 description: Checking for String object
8 esid: sec-parseint-string-radix
9 ---*/
10
11 assert.sameValue(
12 parseInt("11", new String("2")),
13 parseInt("11", 2),
14 'parseInt("11", new String("2")) must return the same value returned by parseInt("11", 2)'
15 );
16
17 assert.sameValue(
18 parseInt("11", new String("Infinity")),
19 parseInt("11", Infinity),
20 'parseInt("11", new String("Infinity")) must return the same value returned by parseInt("11", Infinity)'
21 );
22
23 reportCompare(0, 0);