| OLD | NEW |
| (Empty) |
| 1 This test checks that const declarations in JavaScript work and are readonly. | |
| 2 | |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
| 4 | |
| 5 | |
| 6 FAIL const redef='a'; const redef='a'; should throw an exception. Was undefined. | |
| 7 PASS x is "RIGHT" | |
| 8 PASS y is "RIGHT" | |
| 9 PASS a is 1 | |
| 10 PASS one is 1 | |
| 11 PASS a is 1 | |
| 12 PASS one is 1 | |
| 13 PASS a is 2 | |
| 14 PASS one is 1 | |
| 15 PASS a is 0 | |
| 16 PASS one is 1 | |
| 17 PASS a is 3 | |
| 18 PASS one is 1 | |
| 19 PASS a is 2 | |
| 20 PASS one is 1 | |
| 21 PASS function f() { const one = 1; one++; return one; } f(); is 1 | |
| 22 PASS function f() { const oneString = '1'; return oneString++; } f(); is 1 | |
| 23 PASS function f() { const one = 1; return one++; } f(); is 1 | |
| 24 PASS function f() { const one = 1; one--; return one; } f(); is 1 | |
| 25 PASS function f() { const oneString = '1'; return oneString--; } f(); is 1 | |
| 26 PASS function f() { const one = 1; return one--; } f(); is 1 | |
| 27 PASS function f() { const one = 1; ++one; return one; } f(); is 1 | |
| 28 PASS function f() { const one = 1; return ++one; } f(); is 2 | |
| 29 PASS function f() { const one = 1; --one; return one; } f(); is 1 | |
| 30 PASS function f() { const one = 1; return --one; } f(); is 0 | |
| 31 PASS function f() { const one = 1; one += 2; return one; } f(); is 1 | |
| 32 PASS function f() { const one = 1; return one += 2; } f(); is 3 | |
| 33 PASS function f() { const one = 1; one = 2; return one; } f(); is 1 | |
| 34 PASS function f() { const one = 1; return one = 2; } f(); is 2 | |
| 35 PASS one++ is 1 | |
| 36 PASS one is 1 | |
| 37 PASS one-- is 1 | |
| 38 PASS one is 1 | |
| 39 PASS ++one is 2 | |
| 40 PASS one is 1 | |
| 41 PASS --one is 0 | |
| 42 PASS one is 1 | |
| 43 PASS one += 1 is 2 | |
| 44 PASS one is 1 | |
| 45 PASS one = 2 is 2 | |
| 46 PASS one is 1 | |
| 47 PASS object.inWith1 is 'RIGHT' | |
| 48 PASS inWith2 is 'RIGHT' | |
| 49 PASS (function(){ one = 2; return one; })() is 1 | |
| 50 PASS f() is f | |
| 51 PASS const a; is undefined | |
| 52 PASS bodyId is document.getElementById('bodyId') | |
| 53 PASS ranConstInitialiser is true | |
| 54 PASS tryCatch1Result is 5 | |
| 55 PASS tryCatch2Result is 5 | |
| 56 PASS with1Result is 5 | |
| 57 PASS with2Result is 5 | |
| 58 PASS successfullyParsed is true | |
| 59 | |
| 60 TEST COMPLETE | |
| 61 | |
| OLD | NEW |