| Index: test/mjsunit/strict-mode.js
|
| diff --git a/test/mjsunit/strict-mode.js b/test/mjsunit/strict-mode.js
|
| index 924b34f936c274684e0e3cc2921b2563fb76aa05..759fd7c64f838085a6055688b4e7c8c8ff23ad50 100644
|
| --- a/test/mjsunit/strict-mode.js
|
| +++ b/test/mjsunit/strict-mode.js
|
| @@ -115,3 +115,21 @@ function NotStrict(eval) {
|
| }
|
| with ({}) {};
|
| }
|
| +
|
| +// Duplicate data properties.
|
| +CheckStrictMode("var x = { dupe : 1, nondupe: 3, dupe : 2 };", SyntaxError)
|
| +
|
| +// Two getters (non-strict)
|
| +assertThrows("var x = { get foo() { }, get foo() { } };", SyntaxError)
|
| +
|
| +// Two setters (non-strict)
|
| +assertThrows("var x = { set foo(v) { }, set foo(v) { } };", SyntaxError)
|
| +
|
| +// Setter and data (non-strict)
|
| +assertThrows("var x = { foo: 'data', set foo(v) { } };", SyntaxError)
|
| +assertThrows("var x = { set foo(v) { }, foo: 'data' };", SyntaxError)
|
| +
|
| +// Getter and data (non-strict)
|
| +assertThrows("var x = { foo: 'data', get foo() { } };", SyntaxError)
|
| +assertThrows("var x = { get foo() { }, foo: 'data' };", SyntaxError)
|
| +
|
|
|