Chromium Code Reviews| Index: test/cctest/compiler/test-run-jsops.cc |
| diff --git a/test/cctest/compiler/test-run-jsops.cc b/test/cctest/compiler/test-run-jsops.cc |
| index eb39760ff7ea945d438827230edee4b20672ebaa..81965810db851cbd79795ef665bb52ccaafff991 100644 |
| --- a/test/cctest/compiler/test-run-jsops.cc |
| +++ b/test/cctest/compiler/test-run-jsops.cc |
| @@ -522,3 +522,23 @@ TEST(RegExpLiteral) { |
| T.CheckTrue(T.Val("abc")); |
| T.CheckFalse(T.Val("xyz")); |
| } |
| + |
| + |
| +TEST(ClassLiteral) { |
| + FLAG_harmony_classes = true; |
| + FLAG_harmony_sloppy = true; |
| + FLAG_harmony_object_literals = true; |
| + const char* src = |
| + "(function(a,b) {" |
| + " class C {" |
| + " x() { return a; }" |
|
rossberg
2015/01/15 15:31:19
Maybe throw in a constructor, too.
Michael Starzinger
2015/01/16 09:43:54
Done.
|
| + " static y() { return b; }" |
| + " get z() { return 0; }" |
| + " }" |
| + " return new C().x() + C.y();" |
| + "})"; |
| + FunctionTester T(src); |
| + |
| + T.CheckCall(T.Val(65), T.Val(23), T.Val(42)); |
| + T.CheckCall(T.Val("ab"), T.Val("a"), T.Val("b")); |
| +} |