Figured out test failures, removed move test

We shouldn't be moving these `final_action`s around, that wasn't part of the C++CG design requirements.
Went back to the simple version of `final_action`.
This commit is contained in:
Herb Sutter
2021-02-24 16:42:58 -08:00
parent e9c575300e
commit f59cb795a0
2 changed files with 5 additions and 24 deletions
-19
View File
@@ -51,25 +51,6 @@ TEST(utils_tests, finally_lambda)
EXPECT_TRUE(i == 1);
}
TEST(utils_tests, finally_lambda_move)
{
int i = 0;
{
auto _1 = finally([&]() { f(i); });
{
auto _2 = std::move(_1);
EXPECT_TRUE(i == 0);
}
EXPECT_TRUE(i == 1);
{
auto _2 = std::move(_1);
EXPECT_TRUE(i == 1);
}
EXPECT_TRUE(i == 1);
}
EXPECT_TRUE(i == 1);
}
TEST(utils_tests, finally_const_lvalue_lambda)
{
int i = 0;