summaryrefslogtreecommitdiff
path: root/init/subcontext_test.cpp
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-05-28 03:12:05 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-05-28 03:12:05 +0000
commit6220136528a29e96838bf6e18ea81dad9995cecc (patch)
tree62d78b6f2b3873de7c078a44a0f7b294e68cdd7e /init/subcontext_test.cpp
parent8c2ad73742ead5dd9cec3ac78be9ca002ca8ee38 (diff)
parent0e68ab18fbef221e1a18fbf63babfd5d17bf3b2c (diff)
Snap for 5608795 from 0e68ab18fbef221e1a18fbf63babfd5d17bf3b2c to rvc-release
Change-Id: I43f1c8b8baeaab87a6a5eb0d4821df44124bb622
Diffstat (limited to 'init/subcontext_test.cpp')
-rw-r--r--init/subcontext_test.cpp10
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);
});
}