| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
var gTestfile = 'regress-253150.js'; |
| 7 |
|
| 8 |
var BUGNUMBER = 253150; |
| 9 |
var summary = 'Do not warn on detecting properties'; |
| 10 |
var actual = ''; |
| 11 |
var expect = 'No warning'; |
| 12 |
|
| 13 |
printBugNumber(BUGNUMBER); |
| 14 |
printStatus (summary); |
| 15 |
|
| 16 |
var testobject = {}; |
| 17 |
|
| 18 |
options('strict'); |
| 19 |
options('werror'); |
| 20 |
|
| 21 |
try |
| 22 |
{ |
| 23 |
var testresult = testobject.foo; |
| 24 |
actual = 'No warning'; |
| 25 |
} |
| 26 |
catch(ex) |
| 27 |
{ |
| 28 |
actual = ex + ''; |
| 29 |
} |
| 30 |
|
| 31 |
reportCompare(expect, actual, summary + ': 1'); |
| 32 |
|
| 33 |
try |
| 34 |
{ |
| 35 |
if (testobject.foo) |
| 36 |
{ |
| 37 |
; |
| 38 |
} |
| 39 |
actual = 'No warning'; |
| 40 |
} |
| 41 |
catch(ex) |
| 42 |
{ |
| 43 |
actual = ex + ''; |
| 44 |
} |
| 45 |
|
| 46 |
reportCompare(expect, actual, summary + ': 2'); |
| 47 |
|
| 48 |
try |
| 49 |
{ |
| 50 |
if (typeof testobject.foo == 'undefined') |
| 51 |
{ |
| 52 |
; |
| 53 |
} |
| 54 |
actual = 'No warning'; |
| 55 |
} |
| 56 |
catch(ex) |
| 57 |
{ |
| 58 |
actual = ex + ''; |
| 59 |
} |
| 60 |
|
| 61 |
reportCompare(expect, actual, summary + ': 3'); |
| 62 |
|
| 63 |
try |
| 64 |
{ |
| 65 |
if (testobject.foo == null) |
| 66 |
{ |
| 67 |
; |
| 68 |
} |
| 69 |
actual = 'No warning'; |
| 70 |
} |
| 71 |
catch(ex) |
| 72 |
{ |
| 73 |
actual = ex + ''; |
| 74 |
} |
| 75 |
|
| 76 |
reportCompare(expect, actual, summary + ': 4'); |
| 77 |
|
| 78 |
try |
| 79 |
{ |
| 80 |
if (testobject.foo == undefined) |
| 81 |
{ |
| 82 |
; |
| 83 |
} |
| 84 |
actual = 'No warning'; |
| 85 |
} |
| 86 |
catch(ex) |
| 87 |
{ |
| 88 |
actual = ex + ''; |
| 89 |
} |
| 90 |
|
| 91 |
reportCompare(expect, actual, summary + ': 3'); |