| Index: test/cctest/test-func-name-inference.cc
|
| diff --git a/test/cctest/test-func-name-inference.cc b/test/cctest/test-func-name-inference.cc
|
| index e423c0f26203a347d5280a476674d9ff24c8f67b..d01a938590fddc4a6e50610bb49aaeac0628881c 100644
|
| --- a/test/cctest/test-func-name-inference.cc
|
| +++ b/test/cctest/test-func-name-inference.cc
|
| @@ -87,6 +87,8 @@ static void CheckFunctionName(v8::Handle<v8::Script> script,
|
| // Verify inferred function name.
|
| SmartArrayPointer<char> inferred_name =
|
| shared_func_info->inferred_name()->ToCString();
|
| + i::PrintF("expected: %s, found: %s\n", ref_inferred_name,
|
| + inferred_name.get());
|
| CHECK_EQ(0, strcmp(ref_inferred_name, inferred_name.get()));
|
| }
|
|
|
| @@ -222,6 +224,44 @@ TEST(ObjectLiteral) {
|
| }
|
|
|
|
|
| +TEST(UpperCaseClass) {
|
| + CcTest::InitializeVM();
|
| + v8::HandleScope scope(CcTest::isolate());
|
| +
|
| + v8::Handle<v8::Script> script = Compile(CcTest::isolate(),
|
| + "'use strict';\n"
|
| + "class MyClass {\n"
|
| + " constructor() {\n"
|
| + " this.value = 1;\n"
|
| + " }\n"
|
| + " method() {\n"
|
| + " this.value = 2;\n"
|
| + " }\n"
|
| + "}");
|
| + CheckFunctionName(script, "this.value = 1", "MyClass");
|
| + CheckFunctionName(script, "this.value = 2", "MyClass.method");
|
| +}
|
| +
|
| +
|
| +TEST(LowerCaseClass) {
|
| + CcTest::InitializeVM();
|
| + v8::HandleScope scope(CcTest::isolate());
|
| +
|
| + v8::Handle<v8::Script> script = Compile(CcTest::isolate(),
|
| + "'use strict';\n"
|
| + "class myclass {\n"
|
| + " constructor() {\n"
|
| + " this.value = 1;\n"
|
| + " }\n"
|
| + " method() {\n"
|
| + " this.value = 2;\n"
|
| + " }\n"
|
| + "}");
|
| + CheckFunctionName(script, "this.value = 1", "myclass");
|
| + CheckFunctionName(script, "this.value = 2", "myclass.method");
|
| +}
|
| +
|
| +
|
| TEST(AsParameter) {
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
|
|