| 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.1-1-n.js'; |
| 7 | |
| 8 | /** |
| 9 | File Name: 15.1-1-n.js |
| 10 | ECMA Section: The global object |
| 11 | Description: |
| 12 | |
| 13 | The global object does not have a [[Construct]] property; it is not |
| 14 | possible to use the global object as a constructor with the new operator. |
| 15 | |
| 16 | |
| 17 | Author: [email protected] |
| 18 | Date: 12 november 1997 |
| 19 | */ |
| 20 | |
| 21 | var SECTION = "15.1-1-n"; |
| 22 | var VERSION = "ECMA_1"; |
| 23 | startTest(); |
| 24 | var TITLE = "The Global Object"; |
| 25 | |
| 26 | writeHeaderToLog( SECTION + " "+ TITLE); |
| 27 | |
| 28 | DESCRIPTION = "var MY_GLOBAL = new this()"; |
| 29 | EXPECTED = "error"; |
| 30 | |
| 31 | new TestCase( SECTION, |
| 32 | "var MY_GLOBAL = new this()", |
| 33 | "error", |
| 34 | eval("var MY_GLOBAL = new this()") ); |
| 35 | |
| 36 | test(); |
| 37 |