Rename QDeclarative symbols to QQuick and QQml
[profile/ivi/qtdeclarative.git] / tests / auto / qml / parserstress / tests / ecma / Math / 15.8.1.js
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4  *
5  * The contents of this file are subject to the Mozilla Public License Version
6  * 1.1 (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  * http://www.mozilla.org/MPL/
9  *
10  * Software distributed under the License is distributed on an "AS IS" basis,
11  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12  * for the specific language governing rights and limitations under the
13  * License.
14  *
15  * The Original Code is Mozilla Communicator client code, released
16  * March 31, 1998.
17  *
18  * The Initial Developer of the Original Code is
19  * Netscape Communications Corporation.
20  * Portions created by the Initial Developer are Copyright (C) 1998
21  * the Initial Developer. All Rights Reserved.
22  *
23  * Contributor(s):
24  *
25  * Alternatively, the contents of this file may be used under the terms of
26  * either the GNU General Public License Version 2 or later (the "GPL"), or
27  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28  * in which case the provisions of the GPL or the LGPL are applicable instead
29  * of those above. If you wish to allow use of your version of this file only
30  * under the terms of either the GPL or the LGPL, and not to allow others to
31  * use your version of this file under the terms of the MPL, indicate your
32  * decision by deleting the provisions above and replace them with the notice
33  * and other provisions required by the GPL or the LGPL. If you do not delete
34  * the provisions above, a recipient may use your version of this file under
35  * the terms of any one of the MPL, the GPL or the LGPL.
36  *
37  * ***** END LICENSE BLOCK ***** */
38
39 gTestfile = '15.8.1.js';
40
41 /**
42    File Name:          15.8.1.js
43    ECMA Section:       15.8.1.js   Value Properties of the Math Object
44    15.8.1.1    E
45    15.8.1.2    LN10
46    15.8.1.3    LN2
47    15.8.1.4    LOG2E
48    15.8.1.5    LOG10E
49    15.8.1.6    PI
50    15.8.1.7    SQRT1_2
51    15.8.1.8    SQRT2
52    Description:        verify the values of some math constants
53    Author:             christine@netscape.com
54    Date:               7 july 1997
55
56 */
57 var SECTION = "15.8.1"
58   var VERSION = "ECMA_1";
59 startTest();
60 var TITLE   = "Value Properties of the Math Object";
61
62 writeHeaderToLog( SECTION + " "+ TITLE);
63
64
65 new TestCase( "15.8.1.1", "Math.E",            
66               2.7182818284590452354, 
67               Math.E );
68
69 new TestCase( "15.8.1.1",
70               "typeof Math.E",     
71               "number",              
72               typeof Math.E );
73
74 new TestCase( "15.8.1.2",
75               "Math.LN10",         
76               2.302585092994046,     
77               Math.LN10 );
78
79 new TestCase( "15.8.1.2",
80               "typeof Math.LN10",  
81               "number",              
82               typeof Math.LN10 );
83
84 new TestCase( "15.8.1.3",
85               "Math.LN2",         
86               0.6931471805599453,    
87               Math.LN2 );
88
89 new TestCase( "15.8.1.3",
90               "typeof Math.LN2",   
91               "number",              
92               typeof Math.LN2 );
93
94 new TestCase( "15.8.1.4",
95               "Math.LOG2E",        
96               1.4426950408889634,    
97               Math.LOG2E );
98
99 new TestCase( "15.8.1.4",
100               "typeof Math.LOG2E", 
101               "number",              
102               typeof Math.LOG2E );
103
104 new TestCase( "15.8.1.5",
105               "Math.LOG10E",       
106               0.4342944819032518,    
107               Math.LOG10E);
108
109 new TestCase( "15.8.1.5",
110               "typeof Math.LOG10E",
111               "number",              
112               typeof Math.LOG10E);
113
114 new TestCase( "15.8.1.6",
115               "Math.PI",           
116               3.14159265358979323846,
117               Math.PI );
118
119 new TestCase( "15.8.1.6",
120               "typeof Math.PI",    
121               "number",              
122               typeof Math.PI );
123
124 new TestCase( "15.8.1.7",
125               "Math.SQRT1_2",      
126               0.7071067811865476,    
127               Math.SQRT1_2);
128
129 new TestCase( "15.8.1.7",
130               "typeof Math.SQRT1_2",
131               "number",             
132               typeof Math.SQRT1_2);
133
134 new TestCase( "15.8.1.8",
135               "Math.SQRT2",        
136               1.4142135623730951,    
137               Math.SQRT2 );
138
139 new TestCase( "15.8.1.8",
140               "typeof Math.SQRT2", 
141               "number",              
142               typeof Math.SQRT2 );
143
144 new TestCase( SECTION, 
145               "var MATHPROPS='';for( p in Math ){ MATHPROPS +=p; };MATHPROPS",
146               "",
147               eval("var MATHPROPS='';for( p in Math ){ MATHPROPS +=p; };MATHPROPS") );
148
149 test();