Commit 47920a47 authored by adamk's avatar adamk Committed by Commit bot

[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}
parent 8e2e69a4
...@@ -32,12 +32,12 @@ PASS class X { constructor() {} static set prototype() {} } threw exception Synt ...@@ -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; } } did not throw exception.
PASS class X { constructor() {} prototype() { return instanceMethodValue; } }; (new X).prototype() is instanceMethodValue PASS class X { constructor() {} prototype() { return instanceMethodValue; } }; (new X).prototype() is instanceMethodValue
PASS class X { constructor() {} set foo(a) {} } did not throw exception. 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() {} } 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() {} 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() {} } 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) {} } 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 PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // 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'); description('Tests for ES6 class syntax declarations');
......
...@@ -30,12 +30,12 @@ PASS x = class { constructor() {} static set prototype() {} } threw exception Sy ...@@ -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; } } did not throw exception.
PASS x = class { constructor() {} prototype() { return instanceMethodValue; } }; (new x).prototype() is instanceMethodValue PASS x = class { constructor() {} prototype() { return instanceMethodValue; } }; (new x).prototype() is instanceMethodValue
PASS x = class { constructor() {} set foo(a) {} } did not throw exception. 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() {} } 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() {} 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() {} } 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) {} } 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 PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // 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'); description('Tests for ES6 class syntax expressions');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment