Debian Codegraph @

rhino/testsrc/tests/ecma/Types/8.1.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 = '8.1.js';
7
8 /**
9 File Name: 8.1.js
10 ECMA Section: The undefined type
11 Description:
12
13 The Undefined type has exactly one value, called undefined. Any variable
14 that has not been assigned a value is of type Undefined.
15
16 Author: [email protected]
17 Date: 12 november 1997
18 */
19
20 var SECTION = "8.1";
21 var VERSION = "ECMA_1";
22 startTest();
23 var TITLE = "The undefined type";
24
25 writeHeaderToLog( SECTION + " "+ TITLE);
26
27 new TestCase( SECTION,
28 "var x; typeof x",
29 "undefined",
30 eval("var x; typeof x") );
31
32 new TestCase( SECTION,
33 "var x; typeof x == 'undefined",
34 true,
35 eval("var x; typeof x == 'undefined'") );
36
37 new TestCase( SECTION,
38 "var x; x == void 0",
39 true,
40 eval("var x; x == void 0") );
41 test();
42