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..df65afa6c50e80333bff4eac97546450e27a3379 100644 |
--- a/test/cctest/compiler/test-run-jsops.cc |
+++ b/test/cctest/compiler/test-run-jsops.cc |
@@ -522,3 +522,24 @@ 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; }" |
+ " static y() { return b; }" |
+ " get z() { return 0; }" |
+ " constructor() {}" |
+ " }" |
+ " 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")); |
+} |