| OLD | NEW |
| 1 Tests for ES6 class syntax declarations | 1 Tests for ES6 class syntax declarations |
| 2 | 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 | 4 |
| 5 | 5 |
| 6 PASS constructorCallCount is 0 | 6 PASS constructorCallCount is 0 |
| 7 PASS A.someStaticMethod() is staticMethodValue | 7 PASS A.someStaticMethod() is staticMethodValue |
| 8 PASS A.someStaticGetter is getterValue | 8 PASS A.someStaticGetter is getterValue |
| 9 PASS setterValue = undefined; A.someStaticSetter = 123; setterValue is 123 | 9 PASS setterValue = undefined; A.someStaticSetter = 123; setterValue is 123 |
| 10 PASS (new A).someInstanceMethod() is instanceMethodValue | 10 PASS (new A).someInstanceMethod() is instanceMethodValue |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 PASS class X { get constructor() {} } threw exception SyntaxError: Class constru
ctor may not be an accessor. | 25 PASS class X { get constructor() {} } threw exception SyntaxError: Class constru
ctor may not be an accessor. |
| 26 PASS class X { set constructor() {} } threw exception SyntaxError: Class constru
ctor may not be an accessor. | 26 PASS class X { set constructor() {} } threw exception SyntaxError: Class constru
ctor may not be an accessor. |
| 27 PASS class X { constructor() {} static constructor() { return staticMethodValue;
} } did not throw exception. | 27 PASS class X { constructor() {} static constructor() { return staticMethodValue;
} } did not throw exception. |
| 28 PASS class X { constructor() {} static constructor() { return staticMethodValue;
} }; X.constructor() is staticMethodValue | 28 PASS class X { constructor() {} static constructor() { return staticMethodValue;
} }; X.constructor() is staticMethodValue |
| 29 PASS class X { constructor() {} static prototype() {} } threw exception SyntaxEr
ror: Classes may not have static property named prototype. | 29 PASS class X { constructor() {} static prototype() {} } threw exception SyntaxEr
ror: Classes may not have static property named prototype. |
| 30 PASS class X { constructor() {} static get prototype() {} } threw exception Synt
axError: Classes may not have static property named prototype. | 30 PASS class X { constructor() {} static get prototype() {} } threw exception Synt
axError: Classes may not have static property named prototype. |
| 31 PASS class X { constructor() {} static set prototype() {} } threw exception Synt
axError: Classes may not have static property named prototype. | 31 PASS class X { constructor() {} static set prototype() {} } threw exception Synt
axError: Classes may not have static property named prototype. |
| 32 PASS class X { constructor() {} prototype() { return instanceMethodValue; } } di
d not throw exception. | 32 PASS class X { constructor() {} prototype() { return instanceMethodValue; } } di
d not throw exception. |
| 33 PASS class X { constructor() {} prototype() { return instanceMethodValue; } }; (
new X).prototype() is instanceMethodValue | 33 PASS class X { constructor() {} prototype() { return instanceMethodValue; } }; (
new X).prototype() is instanceMethodValue |
| 34 PASS class X { constructor() {} set foo(a) {} } did not throw exception. | 34 PASS class X { constructor() {} set foo(a) {} } did not throw exception. |
| 35 FAIL class X { constructor() {} set foo({x, y}) {} } should not throw exception.
Threw exception SyntaxError: Unexpected token {. | 35 PASS class X { constructor() {} set foo({x, y}) {} } did not throw exception. |
| 36 PASS class X { constructor() {} set foo() {} } threw exception SyntaxError: Sett
er must have exactly one formal parameter.. | 36 PASS class X { constructor() {} set foo() {} } threw exception SyntaxError: Sett
er must have exactly one formal parameter.. |
| 37 PASS class X { constructor() {} set foo(a, b) {} } threw exception SyntaxError:
Setter must have exactly one formal parameter.. | 37 PASS class X { constructor() {} set foo(a, b) {} } threw exception SyntaxError:
Setter must have exactly one formal parameter.. |
| 38 PASS class X { constructor() {} get foo() {} } did not throw exception. | 38 PASS class X { constructor() {} get foo() {} } did not throw exception. |
| 39 PASS class X { constructor() {} get foo(x) {} } threw exception SyntaxError: Get
ter must not have any formal parameters.. | 39 PASS class X { constructor() {} get foo(x) {} } threw exception SyntaxError: Get
ter must not have any formal parameters.. |
| 40 PASS class X { constructor() {} get foo({x, y}) {} } threw exception SyntaxError
: Unexpected token {. | 40 PASS class X { constructor() {} get foo({x, y}) {} } threw exception SyntaxError
: Getter must not have any formal parameters.. |
| 41 PASS successfullyParsed is true | 41 PASS successfullyParsed is true |
| 42 | 42 |
| 43 TEST COMPLETE | 43 TEST COMPLETE |
| OLD | NEW |