diff options
author | Tom Cherry <tomcherry@google.com> | 2019-05-27 10:56:44 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-05-27 10:56:44 -0700 |
commit | 0e68ab18fbef221e1a18fbf63babfd5d17bf3b2c (patch) | |
tree | 62d78b6f2b3873de7c078a44a0f7b294e68cdd7e /init/subcontext_test.cpp | |
parent | 8c261482b8cbf3219cfc646b62a7404951d69905 (diff) | |
parent | 13775b21afcdde6bb88d7390030d39a9cd6165ea (diff) |
Merge "init: replace Result<> with expected<>" am: 7d1f11759a am: b1012c9de8 am: eb87c4be66
am: 13775b21af
Change-Id: I426e4ea8314a46025596614beb88ca68a99a6a92
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); }); } |