Title: [181975] trunk/LayoutTests
- Revision
- 181975
- Author
- [email protected]
- Date
- 2015-03-25 15:41:04 -0700 (Wed, 25 Mar 2015)
Log Message
Add a few more tests for Class names
https://bugs.webkit.org/show_bug.cgi?id=143060
Patch by Joseph Pecoraro <[email protected]> on 2015-03-25
Reviewed by Ryosuke Niwa.
Add a few more class name tests:
- const class name binding inside class _expression_
- mutable class name binding from class statement
* js/script-tests/class-syntax-name.js:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (181974 => 181975)
--- trunk/LayoutTests/ChangeLog 2015-03-25 22:38:58 UTC (rev 181974)
+++ trunk/LayoutTests/ChangeLog 2015-03-25 22:41:04 UTC (rev 181975)
@@ -1,5 +1,18 @@
2015-03-25 Joseph Pecoraro <[email protected]>
+ Add a few more tests for Class names
+ https://bugs.webkit.org/show_bug.cgi?id=143060
+
+ Reviewed by Ryosuke Niwa.
+
+ Add a few more class name tests:
+ - const class name binding inside class _expression_
+ - mutable class name binding from class statement
+
+ * js/script-tests/class-syntax-name.js:
+
+2015-03-25 Joseph Pecoraro <[email protected]>
+
ES6: Classes: Program level class statement throws exception in strict mode
https://bugs.webkit.org/show_bug.cgi?id=143038
Modified: trunk/LayoutTests/js/class-syntax-name-expected.txt (181974 => 181975)
--- trunk/LayoutTests/js/class-syntax-name-expected.txt 2015-03-25 22:38:58 UTC (rev 181974)
+++ trunk/LayoutTests/js/class-syntax-name-expected.txt 2015-03-25 22:41:04 UTC (rev 181975)
@@ -110,6 +110,10 @@
PASS 'use strict'; var result = A; result threw exception ReferenceError: Can't find variable: A.
FAIL var result = A; class A {}; result should throw an exception. Was undefined.
FAIL 'use strict'; var result = A; class A {}; result should throw an exception. Was undefined.
+PASS class A { constructor() { A = 1; } }; new A threw exception TypeError: Attempted to assign to readonly property..
+PASS 'use strict'; class A { constructor() { A = 1; } }; new A threw exception TypeError: Attempted to assign to readonly property..
+PASS class A { constructor() { } }; A = 1; A is 1
+PASS 'use strict'; class A { constructor() { } }; A = 1; A is 1
PASS class A {}; var result = A; result did not throw exception.
PASS 'use strict'; class A {}; var result = A; result did not throw exception.
PASS eval('var Foo = 10'); Foo is 10
Modified: trunk/LayoutTests/js/script-tests/class-syntax-name.js (181974 => 181975)
--- trunk/LayoutTests/js/script-tests/class-syntax-name.js 2015-03-25 22:38:58 UTC (rev 181974)
+++ trunk/LayoutTests/js/script-tests/class-syntax-name.js 2015-03-25 22:41:04 UTC (rev 181975)
@@ -81,6 +81,8 @@
debug(''); debug('Class statement binding in other circumstances');
runTestShouldThrow("var result = A; result");
runTestShouldThrow("var result = A; class A {}; result");
+runTestShouldThrow("class A { constructor() { A = 1; } }; new A");
+runTestShouldBe("class A { constructor() { } }; A = 1; A", "1");
runTestShouldNotThrow("class A {}; var result = A; result");
shouldBe("eval('var Foo = 10'); Foo", "10");
shouldThrow("'use strict'; eval('var Foo = 10'); Foo");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes