diff options
Diffstat (limited to 'libs/phoenix/test/scope/let_tests.cpp')
-rw-r--r-- | libs/phoenix/test/scope/let_tests.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libs/phoenix/test/scope/let_tests.cpp b/libs/phoenix/test/scope/let_tests.cpp index 89170418b..34350ea7c 100644 --- a/libs/phoenix/test/scope/let_tests.cpp +++ b/libs/phoenix/test/scope/let_tests.cpp @@ -109,9 +109,9 @@ main() { int x = 999; - + /* BOOST_TEST( - let(_x = val(_1)) // _x holds x by value + let(_x = val(_1)) // _x holds x by value [ _x += 888 ] @@ -119,9 +119,9 @@ main() ); BOOST_TEST(x == 999); - + */ BOOST_TEST( - let(_x = val(_1)) // _x holds x by value + let(_x = val(_1)) // _x holds x by value [ val(_x += 888) ] @@ -152,8 +152,11 @@ main() { // show that we can return a local from an outer scope int y = 0; +#if defined(__OPTIMIZE__) && __OPTIMIZE__ + int x = (let(_a = _2)[let(_b = _1)[ _a ]])(y,1); +#else int x = (let(_a = 1)[let(_b = _1)[ _a ]])(y); - +#endif BOOST_TEST(x == 1); } |