1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/test262/ch11/11.2/11.2.1/S11.2.1_A4_T8.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,65 @@ 1.4 +// Copyright 2009 the Sputnik authors. All rights reserved. 1.5 +// This code is governed by the BSD license found in the LICENSE file. 1.6 + 1.7 +/** 1.8 + * Check type of various properties 1.9 + * 1.10 + * @path ch11/11.2/11.2.1/S11.2.1_A4_T8.js 1.11 + * @description Checking properties of the Math Object 1.12 + */ 1.13 + 1.14 +//CHECK#1-52 1.15 +if (typeof Math.E !== "number") $ERROR('#1: typeof Math.E === "number". Actual: ' + (typeof Math.E )); 1.16 +if (typeof Math['E'] !== "number") $ERROR('#2: typeof Math["E"] === "number". Actual: ' + (typeof Math["E"] )); 1.17 +if (typeof Math.LN10 !== "number") $ERROR('#3: typeof Math.LN10 === "number". Actual: ' + (typeof Math.LN10 )); 1.18 +if (typeof Math['LN10'] !== "number") $ERROR('#4: typeof Math["LN10"] === "number". Actual: ' + (typeof Math["LN10"] )); 1.19 +if (typeof Math.LN2 !== "number") $ERROR('#5: typeof Math.LN2 === "number". Actual: ' + (typeof Math.LN2 )); 1.20 +if (typeof Math['LN2'] !== "number") $ERROR('#6: typeof Math["LN2"] === "number". Actual: ' + (typeof Math["LN2"] )); 1.21 +if (typeof Math.LOG2E !== "number") $ERROR('#7: typeof Math.LOG2E === "number". Actual: ' + (typeof Math.LOG2E )); 1.22 +if (typeof Math['LOG2E'] !== "number") $ERROR('#8: typeof Math["LOG2E"] === "number". Actual: ' + (typeof Math["LOG2E"] )); 1.23 +if (typeof Math.LOG10E !== "number") $ERROR('#9: typeof Math.LOG10E === "number". Actual: ' + (typeof Math.LOG10E )); 1.24 +if (typeof Math['LOG10E'] !== "number") $ERROR('#10: typeof Math["LOG10E"] === "number". Actual: ' + (typeof Math["LOG10E"] )); 1.25 +if (typeof Math.PI !== "number") $ERROR('#11: typeof Math.PI === "number". Actual: ' + (typeof Math.PI )); 1.26 +if (typeof Math['PI'] !== "number") $ERROR('#12: typeof Math["PI"] === "number". Actual: ' + (typeof Math["PI"] )); 1.27 +if (typeof Math.SQRT1_2 !== "number") $ERROR('#13: typeof Math.SQRT1_2 === "number". Actual: ' + (typeof Math.SQRT1_2 )); 1.28 +if (typeof Math['SQRT1_2'] !== "number") $ERROR('#14: typeof Math["SQRT1_2"] === "number". Actual: ' + (typeof Math["SQRT1_2"] )); 1.29 +if (typeof Math.SQRT2 !== "number") $ERROR('#15: typeof Math.SQRT2 === "number". Actual: ' + (typeof Math.SQRT2 )); 1.30 +if (typeof Math['SQRT2'] !== "number") $ERROR('#16: typeof Math["SQRT2"] === "number". Actual: ' + (typeof Math["SQRT2"] )); 1.31 +if (typeof Math.abs !== "function") $ERROR('#17: typeof Math.abs === "function". Actual: ' + (typeof Math.abs )); 1.32 +if (typeof Math['abs'] !== "function") $ERROR('#18: typeof Math["abs"] === "function". Actual: ' + (typeof Math["abs"] )); 1.33 +if (typeof Math.acos !== "function") $ERROR('#19: typeof Math.acos === "function". Actual: ' + (typeof Math.acos )); 1.34 +if (typeof Math['acos'] !== "function") $ERROR('#20: typeof Math["acos"] === "function". Actual: ' + (typeof Math["acos"] )); 1.35 +if (typeof Math.asin !== "function") $ERROR('#21: typeof Math.asin === "function". Actual: ' + (typeof Math.asin )); 1.36 +if (typeof Math['asin'] !== "function") $ERROR('#22: typeof Math["asin"] === "function". Actual: ' + (typeof Math["asin"] )); 1.37 +if (typeof Math.atan !== "function") $ERROR('#23: typeof Math.atan === "function". Actual: ' + (typeof Math.atan )); 1.38 +if (typeof Math['atan'] !== "function") $ERROR('#24: typeof Math["atan"] === "function". Actual: ' + (typeof Math["atan"] )); 1.39 +if (typeof Math.atan2 !== "function") $ERROR('#25: typeof Math.atan2 === "function". Actual: ' + (typeof Math.atan2 )); 1.40 +if (typeof Math['atan2'] !== "function") $ERROR('#26: typeof Math["atan2"] === "function". Actual: ' + (typeof Math["atan2"] )); 1.41 +if (typeof Math.ceil !== "function") $ERROR('#27: typeof Math.ceil === "function". Actual: ' + (typeof Math.ceil )); 1.42 +if (typeof Math['ceil'] !== "function") $ERROR('#28: typeof Math["ceil"] === "function". Actual: ' + (typeof Math["ceil"] )); 1.43 +if (typeof Math.cos !== "function") $ERROR('#29: typeof Math.cos === "function". Actual: ' + (typeof Math.cos )); 1.44 +if (typeof Math['cos'] !== "function") $ERROR('#30: typeof Math["cos"] === "function". Actual: ' + (typeof Math["cos"] )); 1.45 +if (typeof Math.exp !== "function") $ERROR('#31: typeof Math.exp === "function". Actual: ' + (typeof Math.exp )); 1.46 +if (typeof Math['exp'] !== "function") $ERROR('#32: typeof Math["exp"] === "function". Actual: ' + (typeof Math["exp"] )); 1.47 +if (typeof Math.floor !== "function") $ERROR('#33: typeof Math.floor === "function". Actual: ' + (typeof Math.floor )); 1.48 +if (typeof Math['floor'] !== "function") $ERROR('#34: typeof Math["floor"] === "function". Actual: ' + (typeof Math["floor"] )); 1.49 +if (typeof Math.log !== "function") $ERROR('#35: typeof Math.log === "function". Actual: ' + (typeof Math.log )); 1.50 +if (typeof Math['log'] !== "function") $ERROR('#36: typeof Math["log"] === "function". Actual: ' + (typeof Math["log"] )); 1.51 +if (typeof Math.max !== "function") $ERROR('#37: typeof Math.max === "function". Actual: ' + (typeof Math.max )); 1.52 +if (typeof Math['max'] !== "function") $ERROR('#38: typeof Math["max"] === "function". Actual: ' + (typeof Math["max"] )); 1.53 +if (typeof Math.min !== "function") $ERROR('#39: typeof Math.min === "function". Actual: ' + (typeof Math.min )); 1.54 +if (typeof Math['min'] !== "function") $ERROR('#40: typeof Math["min"] === "function". Actual: ' + (typeof Math["min"] )); 1.55 +if (typeof Math.pow !== "function") $ERROR('#41: typeof Math.pow === "function". Actual: ' + (typeof Math.pow )); 1.56 +if (typeof Math['pow'] !== "function") $ERROR('#42: typeof Math["pow"] === "function". Actual: ' + (typeof Math["pow"] )); 1.57 +if (typeof Math.random !== "function") $ERROR('#43: typeof Math.random === "function". Actual: ' + (typeof Math.random )); 1.58 +if (typeof Math['random'] !== "function") $ERROR('#44: typeof Math["random"] === "function". Actual: ' + (typeof Math["random"] )); 1.59 +if (typeof Math.round !== "function") $ERROR('#45: typeof Math.round === "function". Actual: ' + (typeof Math.round )); 1.60 +if (typeof Math['round'] !== "function") $ERROR('#46: typeof Math["round"] === "function". Actual: ' + (typeof Math["round"] )); 1.61 +if (typeof Math.sin !== "function") $ERROR('#47: typeof Math.sin === "function". Actual: ' + (typeof Math.sin )); 1.62 +if (typeof Math['sin'] !== "function") $ERROR('#48: typeof Math["sin"] === "function". Actual: ' + (typeof Math["sin"] )); 1.63 +if (typeof Math.sqrt !== "function") $ERROR('#49: typeof Math.sqrt === "function". Actual: ' + (typeof Math.sqrt )); 1.64 +if (typeof Math['sqrt'] !== "function") $ERROR('#50: typeof Math["sqrt"] === "function". Actual: ' + (typeof Math["sqrt"] )); 1.65 +if (typeof Math.tan !== "function") $ERROR('#51: typeof Math.tan === "function". Actual: ' + (typeof Math.tan )); 1.66 +if (typeof Math['tan'] !== "function") $ERROR('#52: typeof Math["tan"] === "function". Actual: ' + (typeof Math["tan"] )); 1.67 + 1.68 +