| 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
| 2 | * |
| 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
| 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 6 | |
| 7 | var gTestfile = 'fe-001-n.js'; |
| 8 | |
| 9 | DESCRIPTION = "Previous statement should have thrown a ReferenceError"; |
| 10 | EXPECTED = "error"; |
| 11 | |
| 12 | test(); |
| 13 | |
| 14 | function test() |
| 15 | { |
| 16 | enterFunc ("test"); |
| 17 | printStatus ("Function Expression test."); |
| 18 | |
| 19 | var x = function f(){return "inner";}(); |
| 20 | var y = f(); |
| 21 | reportCompare('PASS', 'FAIL', "Previous statement should have thrown a ReferenceError"); |
| 22 | |
| 23 | exitFunc ("test"); |
| 24 | } |