[tests] Fix webkit class syntax tests to handle destructuring binding
R=littledan@chromium.org Review URL: https://codereview.chromium.org/1448183002 Cr-Commit-Position: refs/heads/master@{#32156}
This commit is contained in:
parent
8e2e69a4b5
commit
47920a472f
@ -32,12 +32,12 @@ PASS class X { constructor() {} static set prototype() {} } threw exception Synt
|
||||
PASS class X { constructor() {} prototype() { return instanceMethodValue; } } did not throw exception.
|
||||
PASS class X { constructor() {} prototype() { return instanceMethodValue; } }; (new X).prototype() is instanceMethodValue
|
||||
PASS class X { constructor() {} set foo(a) {} } did not throw exception.
|
||||
FAIL class X { constructor() {} set foo({x, y}) {} } should not throw exception. Threw exception SyntaxError: Unexpected token {.
|
||||
PASS class X { constructor() {} set foo({x, y}) {} } did not throw exception.
|
||||
PASS class X { constructor() {} set foo() {} } threw exception SyntaxError: Setter must have exactly one formal parameter..
|
||||
PASS class X { constructor() {} set foo(a, b) {} } threw exception SyntaxError: Setter must have exactly one formal parameter..
|
||||
PASS class X { constructor() {} get foo() {} } did not throw exception.
|
||||
PASS class X { constructor() {} get foo(x) {} } threw exception SyntaxError: Getter must not have any formal parameters..
|
||||
PASS class X { constructor() {} get foo({x, y}) {} } threw exception SyntaxError: Unexpected token {.
|
||||
PASS class X { constructor() {} get foo({x, y}) {} } threw exception SyntaxError: Getter must not have any formal parameters..
|
||||
PASS successfullyParsed is true
|
||||
|
||||
TEST COMPLETE
|
||||
|
@ -21,7 +21,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Flags: --harmony-sloppy
|
||||
// Flags: --harmony-sloppy --harmony-destructuring-bind
|
||||
|
||||
description('Tests for ES6 class syntax declarations');
|
||||
|
||||
|
@ -30,12 +30,12 @@ PASS x = class { constructor() {} static set prototype() {} } threw exception Sy
|
||||
PASS x = class { constructor() {} prototype() { return instanceMethodValue; } } did not throw exception.
|
||||
PASS x = class { constructor() {} prototype() { return instanceMethodValue; } }; (new x).prototype() is instanceMethodValue
|
||||
PASS x = class { constructor() {} set foo(a) {} } did not throw exception.
|
||||
FAIL x = class { constructor() {} set foo({x, y}) {} } should not throw exception. Threw exception SyntaxError: Unexpected token {.
|
||||
PASS x = class { constructor() {} set foo({x, y}) {} } did not throw exception.
|
||||
PASS x = class { constructor() {} set foo() {} } threw exception SyntaxError: Setter must have exactly one formal parameter..
|
||||
PASS x = class { constructor() {} set foo(a, b) {} } threw exception SyntaxError: Setter must have exactly one formal parameter..
|
||||
PASS x = class { constructor() {} get foo() {} } did not throw exception.
|
||||
PASS x = class { constructor() {} get foo(x) {} } threw exception SyntaxError: Getter must not have any formal parameters..
|
||||
PASS x = class { constructor() {} get foo({x, y}) {} } threw exception SyntaxError: Unexpected token {.
|
||||
PASS x = class { constructor() {} get foo({x, y}) {} } threw exception SyntaxError: Getter must not have any formal parameters..
|
||||
PASS successfullyParsed is true
|
||||
|
||||
TEST COMPLETE
|
||||
|
@ -21,7 +21,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Flags: --harmony-sloppy
|
||||
// Flags: --harmony-sloppy --harmony-destructuring-bind
|
||||
|
||||
description('Tests for ES6 class syntax expressions');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user