diff options
Diffstat (limited to 'init/subcontext_test.cpp')
-rw-r--r-- | init/subcontext_test.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/init/subcontext_test.cpp b/init/subcontext_test.cpp index 230203ae0..c0662a471 100644 --- a/init/subcontext_test.cpp +++ b/init/subcontext_test.cpp @@ -69,7 +69,7 @@ TEST(subcontext, CheckDifferentPid) { auto result = subcontext.Execute(std::vector<std::string>{"return_pids_as_error"}); ASSERT_FALSE(result); - auto pids = Split(result.error_string(), " "); + auto pids = Split(result.error().as_string, " "); ASSERT_EQ(2U, pids.size()); auto our_pid = std::to_string(getpid()); EXPECT_NE(our_pid, pids[0]); @@ -116,7 +116,7 @@ TEST(subcontext, MultipleCommands) { auto result = subcontext.Execute(std::vector<std::string>{"return_words_as_error"}); ASSERT_FALSE(result); - EXPECT_EQ(Join(expected_words, " "), result.error_string()); + EXPECT_EQ(Join(expected_words, " "), result.error().as_string); EXPECT_EQ(first_pid, subcontext.pid()); }); } @@ -130,7 +130,7 @@ TEST(subcontext, RecoverAfterAbort) { auto result2 = subcontext.Execute(std::vector<std::string>{"generate_sane_error"}); ASSERT_FALSE(result2); - EXPECT_EQ("Sane error!", result2.error_string()); + EXPECT_EQ("Sane error!", result2.error().as_string); EXPECT_NE(subcontext.pid(), first_pid); }); } @@ -139,7 +139,7 @@ TEST(subcontext, ContextString) { RunTest([](auto& subcontext, auto& context_string) { auto result = subcontext.Execute(std::vector<std::string>{"return_context_as_error"}); ASSERT_FALSE(result); - ASSERT_EQ(context_string, result.error_string()); + ASSERT_EQ(context_string, result.error().as_string); }); } @@ -167,7 +167,7 @@ TEST(subcontext, ExpandArgsFailure) { }; auto result = subcontext.ExpandArgs(args); ASSERT_FALSE(result); - EXPECT_EQ("Failed to expand '" + args[1] + "'", result.error_string()); + EXPECT_EQ("Failed to expand '" + args[1] + "'", result.error().as_string); }); } |