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: * Result of appying "typeof" operator to number is "number" michael@0: * michael@0: * @path ch11/11.4/11.4.3/S11.4.3_A3.4.js michael@0: * @description typeof (number value) === "number" michael@0: */ michael@0: michael@0: //CHECK#1 michael@0: if (typeof 1 !== "number") { michael@0: $ERROR('#1: typeof 1 === "number". Actual: ' + (typeof 1)); michael@0: } michael@0: michael@0: //CHECK#2 michael@0: if (typeof Number.NaN !== "number") { michael@0: $ERROR('#2: typeof NaN === "number". Actual: ' + (typeof NaN)); michael@0: } michael@0: michael@0: //CHECK#3 michael@0: if (typeof Number.POSITIVE_INFINITY !== "number") { michael@0: $ERROR('#3: typeof Infinity === "number". Actual: ' + (typeof Infinity)); michael@0: } michael@0: michael@0: //CHECK#4 michael@0: if (typeof Number.NEGATIVE_INFINITY !== "number") { michael@0: $ERROR('#4: typeof -Infinity === "number". Actual: ' + (typeof -Infinity)); michael@0: } michael@0: michael@0: //CHECK#5 michael@0: if (typeof Math.PI !== "number") { michael@0: $ERROR('#5: typeof Math.PI === "number". Actual: ' + (typeof Math.PI)); michael@0: } michael@0: