| 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-002.js'; |
| 8 | |
| 9 | function f() |
| 10 | { |
| 11 | return "outer"; |
| 12 | } |
| 13 | |
| 14 | function test() |
| 15 | { |
| 16 | enterFunc ("test"); |
| 17 | printStatus ("Function Expression test."); |
| 18 | |
| 19 | var x = function f(){return "inner";}(); |
| 20 | |
| 21 | reportCompare ("outer", f(), |
| 22 | "Inner function statement should not have been called."); |
| 23 | |
| 24 | exitFunc ("test"); |
| 25 | } |
| 26 | |
| 27 | test(); |