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 e0d99ec139fd09338ff4ab2ffd0d5019c5aa7837..4d993af4a3652186a221cc0619d72b59a99e332f 100644 |
--- a/test/cctest/test-func-name-inference.cc |
+++ b/test/cctest/test-func-name-inference.cc |
@@ -288,19 +288,28 @@ TEST(MultipleAssignments) { |
v8::HandleScope scope; |
v8::Handle<v8::Script> script = Compile( |
- "var fun1 = fun2 = function () { return 1; }"); |
+ "var fun1 = fun2 = function () { return 1; }\n" |
+ "var bar1 = bar2 = bar3 = function () { return 2; }\n" |
+ "foo1 = foo2 = function () { return 3; }\n" |
+ "baz1 = baz2 = baz3 = function () { return 4; }"); |
CheckFunctionName(script, "return 1", "fun2"); |
+ CheckFunctionName(script, "return 2", "bar3"); |
+ CheckFunctionName(script, "return 3", "foo2"); |
+ CheckFunctionName(script, "return 4", "baz3"); |
} |
-TEST(PassedAsConstructorParameter) { |
+TEST(AsConstructorParameter) { |
InitializeVM(); |
v8::HandleScope scope; |
v8::Handle<v8::Script> script = Compile( |
"function Foo() {}\n" |
- "var foo = new Foo(function() { return 1; })"); |
+ "var foo = new Foo(function() { return 1; })\n" |
+ "var bar = new Foo(function() { return 2; }, function() { return 3; })"); |
CheckFunctionName(script, "return 1", ""); |
+ CheckFunctionName(script, "return 2", ""); |
+ CheckFunctionName(script, "return 3", ""); |
} |