| Index: test/cctest/test-decls.cc
|
| diff --git a/test/cctest/test-decls.cc b/test/cctest/test-decls.cc
|
| index 619839185e651aab3e16787145ea154872357404..643e60a7d6f8710d22791244e27deb66b8d108de 100644
|
| --- a/test/cctest/test-decls.cc
|
| +++ b/test/cctest/test-decls.cc
|
| @@ -285,18 +285,18 @@ TEST(Present) {
|
|
|
| { PresentPropertyContext context;
|
| context.Check("const x; x",
|
| + 1, // access
|
| 0,
|
| - 0,
|
| - 1, // (re-)declaration
|
| - EXPECT_EXCEPTION); // x has already been declared!
|
| + 2, // (re-)declaration + initialization
|
| + EXPECT_EXCEPTION); // x is not defined!
|
| }
|
|
|
| { PresentPropertyContext context;
|
| context.Check("const x = 0; x",
|
| + 1, // access
|
| 0,
|
| - 0,
|
| - 1, // (re-)declaration
|
| - EXPECT_EXCEPTION); // x has already been declared!
|
| + 2, // (re-)declaration + initialization
|
| + EXPECT_EXCEPTION); // x is not defined!
|
| }
|
| }
|
|
|
| @@ -429,18 +429,20 @@ TEST(Appearing) {
|
|
|
| { AppearingPropertyContext context;
|
| context.Check("const x; x",
|
| - 0,
|
| + 1, // access
|
| 1, // declaration
|
| 2, // declaration + initialization
|
| - EXPECT_EXCEPTION); // x has already been declared!
|
| + EXPECT_RESULT, Undefined());
|
| }
|
|
|
| { AppearingPropertyContext context;
|
| context.Check("const x = 0; x",
|
| - 0,
|
| + 1, // access
|
| 1, // declaration
|
| 2, // declaration + initialization
|
| - EXPECT_EXCEPTION); // x has already been declared!
|
| + EXPECT_RESULT, Undefined());
|
| + // Result is undefined because declaration succeeded but
|
| + // initialization to 0 failed (due to context behavior).
|
| }
|
| }
|
|
|
| @@ -498,7 +500,7 @@ TEST(Reappearing) {
|
| 0,
|
| 2, // var declaration + const initialization
|
| 4, // 2 x declaration + 2 x initialization
|
| - EXPECT_EXCEPTION); // x has already been declared!
|
| + EXPECT_RESULT, Undefined());
|
| }
|
| }
|
|
|
|
|