Debian Codegraph @

rhino/testsrc/tests/ecma_3/String/regress-304376.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 var gTestfile = 'regress-304376.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 304376;
9 var summary = 'String.prototype should be readonly and permanent';
10 var actual = '';
11 var expect = '';
12 printBugNumber(BUGNUMBER);
13 printStatus (summary);
14
15 expect = 'TypeError';
16
17 var saveString = String;
18
19 String = Array;
20
21 try
22 {
23 // see if we can crash...
24 "".join();
25 String = saveString;
26 actual = 'No Error';
27 }
28 catch(ex)
29 {
30 String = saveString;
31 actual = ex.name;
32 printStatus(ex + '');
33 }
34
35 reportCompare(expect, actual, summary);