Debian Codegraph @

rhino/testsrc/tests/js1_5/extensions/regress-354541-01.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-354541-01.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 354541;
9 var summary = 'Regression to standard class constructors in case labels';
10 var actual = '';
11 var expect = '';
12
13
14 printBugNumber(BUGNUMBER);
15 printStatus (summary + ': top level');
16
17 String.prototype.trim = function() { print('hallo'); };
18
19 const S = String;
20 const Sp = String.prototype;
21
22 expect = 'No Error';
23 actual = 'No Error';
24
25 if (typeof Script == 'undefined')
26 {
27 print('Test skipped. Script not defined.');
28 }
29 else
30 {
31 var s = Script('var tmp = function(o) { switch(o) { case String: case 1: return ""; } }; print(String === S); print(String.prototype === Sp); "".trim();');
32 s();
33 }
34
35 reportCompare(expect, actual, summary);