Debian Codegraph @

js/src/tests/test262/built-ins/String/S9.8.1_A2.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: If m is +0 or -0, return the string "0"
6 es5id: 9.8.1_A2
7 description: +0 and -0 convert to String by explicit transformation
8 ---*/
9
10 // CHECK#1
11 if (String(+0) !== "0") {
12 throw new Test262Error('#1: String(+0) === "0". Actual: ' + (String(+0)));
13 }
14
15 // CHECK#2
16 if (String(-0) !== "0") {
17 throw new Test262Error('#2: String(-0) === "0". Actual: ' + (String(-0)));
18 }
19
20 reportCompare(0, 0);