[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:
adamk 2015-11-20 16:23:26 -08:00 committed by Commit bot
parent 8e2e69a4b5
commit 47920a472f
4 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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');

View File

@ -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

View File

@ -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');