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: * The MV of StrUnsignedDecimalLiteral::: Infinity is 1010000 michael@0: * (a value so large that it will round to +∞) michael@0: * michael@0: * @path ch09/9.3/9.3.1/S9.3.1_A6_T2.js michael@0: * @description Compare Number('Infi'+'nity') with Number.POSITIVE_INFINITY, 10e10000, 10E10000 and Number("10e10000") michael@0: */ michael@0: michael@0: function dynaString(s1, s2){ michael@0: return String(s1)+String(s2); michael@0: } michael@0: michael@0: michael@0: // CHECK#1 michael@0: if (Number(dynaString("Infi", "nity")) !== Number.POSITIVE_INFINITY) { michael@0: $ERROR('#1: Number("Infi"+"nity") === Number.POSITIVE_INFINITY'); michael@0: } michael@0: michael@0: // CHECK#2 michael@0: if (Number(dynaString("Infi", "nity")) !== 10e10000) { michael@0: $ERROR('#2: Number("Infi"+"nity") === 10e10000'); michael@0: } michael@0: michael@0: // CHECK#3 michael@0: if (Number(dynaString("Infi", "nity")) !== 10E10000) { michael@0: $ERROR('#3: Number("Infi"+"nity") === 10E10000'); michael@0: } michael@0: michael@0: // CHECK#4 michael@0: if (Number(dynaString("Infi", "nity")) !== Number("10e10000")) { michael@0: $ERROR('#4: Number("Infi"+"nity") === Number("10e10000")'); michael@0: } michael@0: