michael@0: // Copyright 2009 the Sputnik authors. All rights reserved. michael@0: // This code is governed by the BSD license found in the LICENSE file. michael@0: michael@0: /** michael@0: * If ToNumber(value) is +0, -0, +Infinity, or -Infinity, michael@0: * return ToNumber(value) michael@0: * michael@0: * @path ch09/9.4/S9.4_A2.js michael@0: * @description Check what position is defined by Number.NaN in string "abc": "abc".charAt(Number.NaN) michael@0: */ michael@0: michael@0: // CHECK#1 michael@0: if ("abc".charAt(0.0) !== "a") { michael@0: $ERROR('#1: "abc".charAt(0.0) === "a". Actual: ' + ("abc".charAt(0.0))); michael@0: } michael@0: michael@0: // CHECK#2 michael@0: if ("abc".charAt(-0.0) !== "a") { michael@0: $ERROR('#2: "abc".charAt(-0.0) === "a". Actual: ' + ("abc".charAt(-0.0))); michael@0: } michael@0: