Debian Codegraph @

rhino/testsrc/tests/ecma/Math/15.8.2.14.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 gTestfile = '15.8.2.14.js';
7
8 /**
9 File Name: 15.8.2.14.js
10 ECMA Section: 15.8.2.14 Math.random()
11 returns a number value x with a positive sign
12 with 1 > x >= 0 with approximately uniform
13 distribution over that range, using an
14 implementation-dependent algorithm or strategy.
15 This function takes no arguments.
16
17 Description:
18 Author: [email protected]
19 Date: 16 september 1997
20 */
21
22 var SECTION = "15.8.2.14";
23 var VERSION = "ECMA_1";
24 startTest();
25 var TITLE = "Math.random()";
26
27 writeHeaderToLog( SECTION + " "+ TITLE);
28
29 for ( var item = 0; item < 100; item++ ) {
30 var testcase = new TestCase( SECTION,
31 "Math.random()",
32 "pass",
33 null );
34 testcase.reason = Math.random();
35 testcase.actual = "pass";
36
37 if ( ! ( testcase.reason >= 0) ) {
38 testcase.actual = "fail";
39 }
40
41 if ( ! (testcase.reason < 1) ) {
42 testcase.actual = "fail";
43 }
44 }
45
46 test();