blob: 53fc8f9210f36ad1f2fe7d3fd8a4dbcf86f4cd36 [file] [log] [blame]
This test checks the behavior of computed property names in object literals.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS ({[a]: true}.propertyName) is true
PASS 'use strict';({[a]: true}.propertyName) is true
PASS ({[a+1]: true}.propertyName1) is true
PASS 'use strict';({[a+1]: true}.propertyName1) is true
PASS ({propertyName: false, [a]: true}.propertyName) is true
PASS 'use strict';({propertyName: false, [a]: true}.propertyName) is true
PASS ({[a]: false, propertyName: true}.propertyName) is true
PASS 'use strict';({[a]: false, propertyName: true}.propertyName) is true
PASS ({get propertyName(){ return false; }, [a]: true}.propertyName) is true
PASS 'use strict';({get propertyName(){ return false; }, [a]: true}.propertyName) is true
PASS ({[a]: false, get propertyName(){ return true; }}.propertyName) is true
PASS 'use strict';({[a]: false, get propertyName(){ return true; }}.propertyName) is true
PASS ({__proto__: {get propertyName(){ return false; }}, [a]: true}.propertyName) is true
PASS 'use strict';({__proto__: {get propertyName(){ return false; }}, [a]: true}.propertyName) is true
PASS ({__proto__: {get propertyName(){ return false; }}, propertyName: true}.propertyName) is true
PASS 'use strict';({__proto__: {get propertyName(){ return false; }}, propertyName: true}.propertyName) is true
PASS ({[a]: true}[0]) is true
PASS 'use strict';({[a]: true}[0]) is true
PASS ({[a+1]: true}[1]) is true
PASS 'use strict';({[a+1]: true}[1]) is true
PASS ({0: false, [a]: true}[0]) is true
PASS 'use strict';({0: false, [a]: true}[0]) is true
PASS ({[a]: false, 0: true}[0]) is true
PASS 'use strict';({[a]: false, 0: true}[0]) is true
PASS ({get '0'(){ return false; }, [a]: true}[0]) is true
PASS 'use strict';({get '0'(){ return false; }, [a]: true}[0]) is true
PASS ({[a]: true, get '0'(){ return false; }}[0]) is true
PASS 'use strict';({[a]: true, get '0'(){ return false; }}[0]) is true
PASS ({__proto__: {get '0'(){ return false; }}, [a]: true}[0]) is true
PASS 'use strict';({__proto__: {get '0'(){ return false; }}, [a]: true}[0]) is true
PASS successfullyParsed is true
TEST COMPLETE