| 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 | gTestfile = 'exception-010-n.js'; |
| 8 | |
| 9 | var SECTION = "exception-010"; |
| 10 | var VERSION = "ECMA_2"; |
| 11 | startTest(); |
| 12 | var TITLE = "Don't Crash throwing null"; |
| 13 | |
| 14 | writeHeaderToLog( SECTION + " "+ TITLE); |
| 15 | print("Null throw test."); |
| 16 | print("BUGNUMBER: 21799"); |
| 17 | |
| 18 | DESCRIPTION = "throw null"; |
| 19 | EXPECTED = "error"; |
| 20 | |
| 21 | new TestCase( SECTION, "throw null", "error", eval("throw null" )); |
| 22 | |
| 23 | test(); |
| 24 | |
| 25 | print("FAILED!: Should have exited with uncaught exception."); |
| 26 | |
| 27 |