| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 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); |