1 CONSOLE ERROR: line 1: Uncaught TypeError: Identifier 'bar' has already been declared
2 This test checks that const declarations in JavaScript work and are readonly.
4 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
7 PASS const redef='a'; const redef='a'; threw exception TypeError: Identifier 'redef' has already been declared.
22 PASS function f() { const one = 1; one++; return one; } f(); is 1
23 PASS function f() { const oneString = '1'; return oneString++; } f(); is 1
24 PASS function f() { const one = 1; return one++; } f(); is 1
25 PASS function f() { const one = 1; one--; return one; } f(); is 1
26 PASS function f() { const oneString = '1'; return oneString--; } f(); is 1
27 PASS function f() { const one = 1; return one--; } f(); is 1
28 PASS function f() { const one = 1; ++one; return one; } f(); is 1
29 PASS function f() { const one = 1; return ++one; } f(); is 2
30 PASS function f() { const one = 1; --one; return one; } f(); is 1
31 PASS function f() { const one = 1; return --one; } f(); is 0
32 PASS function f() { const one = 1; one += 2; return one; } f(); is 1
33 PASS function f() { const one = 1; return one += 2; } f(); is 3
34 PASS function f() { const one = 1; one = 2; return one; } f(); is 1
35 PASS function f() { const one = 1; return one = 2; } f(); is 2
48 PASS object.inWith1 is 'RIGHT'
49 PASS inWith2 is 'RIGHT'
50 PASS (function(){ one = 2; return one; })() is 1
52 PASS const a; is undefined
53 FAIL bodyId should be [object HTMLBodyElement] (of type object). Was Const initialiser overwrote existing property (of type string).
54 PASS ranConstInitialiser is true
55 FAIL successfullyParsed should be true. Was false.