From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- js/src/tests/ecma/ExecutionContexts/10.1.5-1.js | 84 +++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 js/src/tests/ecma/ExecutionContexts/10.1.5-1.js (limited to 'js/src/tests/ecma/ExecutionContexts/10.1.5-1.js') diff --git a/js/src/tests/ecma/ExecutionContexts/10.1.5-1.js b/js/src/tests/ecma/ExecutionContexts/10.1.5-1.js new file mode 100644 index 000000000..17dae58b1 --- /dev/null +++ b/js/src/tests/ecma/ExecutionContexts/10.1.5-1.js @@ -0,0 +1,84 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + + +/** + File Name: 10.1.5-1.js + ECMA Section: 10.1.5 Global Object + Description: + There is a unique global object which is created before control enters + any execution context. Initially the global object has the following + properties: + + Built-in objects such as Math, String, Date, parseInt, etc. These have + attributes { DontEnum }. + + Additional host defined properties. This may include a property whose + value is the global object itself, for example window in HTML. + + As control enters execution contexts, and as ECMAScript code is executed, + additional properties may be added to the global object and the initial + properties may be changed. + + Author: christine@netscape.com + Date: 12 november 1997 +*/ +var SECTION = "10.5.1-1"; +var VERSION = "ECMA_1"; +startTest(); + +writeHeaderToLog( SECTION + " Global Object"); + + +new TestCase( "SECTION", "Global Code check" ); + +if ( Object == null ) { + gTestcases[0].reason += " Object == null" ; +} +if ( Function == null ) { + gTestcases[0].reason += " Function == null"; +} +if ( String == null ) { + gTestcases[0].reason += " String == null"; +} +if ( Array == null ) { + gTestcases[0].reason += " Array == null"; +} +if ( Number == null ) { + gTestcases[0].reason += " Function == null"; +} +if ( Math == null ) { + gTestcases[0].reason += " Math == null"; +} +if ( Boolean == null ) { + gTestcases[0].reason += " Boolean == null"; +} +if ( Date == null ) { + gTestcases[0].reason += " Date == null"; +} +/* + if ( NaN == null ) { + gTestcases[0].reason += " NaN == null"; + } + if ( Infinity == null ) { + gTestcases[0].reason += " Infinity == null"; + } +*/ +if ( eval == null ) { + gTestcases[0].reason += " eval == null"; +} +if ( parseInt == null ) { + gTestcases[0].reason += " parseInt == null"; +} + +if ( gTestcases[0].reason != "" ) { + gTestcases[0].actual = "fail"; +} else { + gTestcases[0].actual = "pass"; +} +gTestcases[0].expect = "pass"; + +test(); + -- cgit v1.2.3