michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: /** michael@0: File Name: 15.8.2.14.js michael@0: ECMA Section: 15.8.2.14 Math.random() michael@0: returns a number value x with a positive sign michael@0: with 1 > x >= 0 with approximately uniform michael@0: distribution over that range, using an michael@0: implementation-dependent algorithm or strategy. michael@0: This function takes no arguments. michael@0: michael@0: Description: michael@0: Author: christine@netscape.com michael@0: Date: 16 september 1997 michael@0: */ michael@0: michael@0: var SECTION = "15.8.2.14"; michael@0: var VERSION = "ECMA_1"; michael@0: startTest(); michael@0: var TITLE = "Math.random()"; michael@0: michael@0: writeHeaderToLog( SECTION + " "+ TITLE); michael@0: michael@0: for ( var item = 0; item < 100; item++ ) { michael@0: var testcase = new TestCase( SECTION, michael@0: "Math.random()", michael@0: "pass", michael@0: null ); michael@0: testcase.reason = Math.random(); michael@0: testcase.actual = "pass"; michael@0: michael@0: if ( ! ( testcase.reason >= 0) ) { michael@0: testcase.actual = "fail"; michael@0: } michael@0: michael@0: if ( ! (testcase.reason < 1) ) { michael@0: testcase.actual = "fail"; michael@0: } michael@0: } michael@0: michael@0: test();