Debian Codegraph @

rhino/testsrc/tests/js1_3/Script/delete-001.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 = 'delete-001.js';
7
8 /**
9 File Name: delete-001.js
10 Section: regress
11 Description:
12
13 Regression test for
14 http://scopus.mcom.com/bugsplat/show_bug.cgi?id=108736
15
16 Author: [email protected]
17 Date: 12 november 1997
18 */
19
20 var SECTION = "JS1_2";
21 var VERSION = "JS1_2";
22 var TITLE = "The variable statement";
23
24 startTest();
25 writeHeaderToLog( SECTION + " "+ TITLE);
26
27 // delete all properties of the global object
28 // per ecma, this does not affect variables in the global object declared
29 // with var or functions
30
31 for ( p in this ) {
32 delete p;
33 }
34
35 var result ="";
36
37 for ( p in this ) {
38 result += String( p );
39 }
40
41 // not too picky here... just want to make sure we didn't crash or something
42
43 new TestCase( SECTION,
44 "delete all properties of the global object",
45 "PASSED",
46 result == "" ? "FAILED" : "PASSED" );
47
48
49 test();
50