aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-25 11:56:50 -0700
committerKazu Hirata <kazu@google.com>2022-06-25 11:56:50 -0700
commit3b7c3a654c9175f41ac871a937cbcae73dfb3c5d (patch)
tree21094939ea6c8b726c481d7b28eaf4ea27c64008 /lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
parentaa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d (diff)
downloadllvm-3b7c3a654c9175f41ac871a937cbcae73dfb3c5d.zip
llvm-3b7c3a654c9175f41ac871a937cbcae73dfb3c5d.tar.gz
llvm-3b7c3a654c9175f41ac871a937cbcae73dfb3c5d.tar.bz2
Revert "Don't use Optional::hasValue (NFC)"
This reverts commit aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.
Diffstat (limited to 'lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp')
-rw-r--r--lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp b/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
index b80c44d..d15b852 100644
--- a/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
+++ b/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
@@ -190,14 +190,14 @@ TEST_F(GDBRemoteCommunicationClientTest, GetModulesInfo) {
R"("file_path":"/foo/bar.so","file_offset":0,"file_size":1234}]])");
auto result = async_result.get();
- ASSERT_TRUE(result.has_value());
+ ASSERT_TRUE(result.hasValue());
ASSERT_EQ(1u, result->size());
- EXPECT_EQ("/foo/bar.so", result.value()[0].GetFileSpec().GetPath());
- EXPECT_EQ(triple, result.value()[0].GetArchitecture().GetTriple());
+ EXPECT_EQ("/foo/bar.so", result.getValue()[0].GetFileSpec().GetPath());
+ EXPECT_EQ(triple, result.getValue()[0].GetArchitecture().GetTriple());
EXPECT_EQ(UUID::fromData("@ABCDEFGHIJKLMNO", 16),
- result.value()[0].GetUUID());
- EXPECT_EQ(0u, result.value()[0].GetObjectOffset());
- EXPECT_EQ(1234u, result.value()[0].GetObjectSize());
+ result.getValue()[0].GetUUID());
+ EXPECT_EQ(0u, result.getValue()[0].GetObjectOffset());
+ EXPECT_EQ(1234u, result.getValue()[0].GetObjectSize());
}
TEST_F(GDBRemoteCommunicationClientTest, GetModulesInfo_UUID20) {
@@ -215,14 +215,14 @@ TEST_F(GDBRemoteCommunicationClientTest, GetModulesInfo_UUID20) {
R"("file_path":"/foo/bar.so","file_offset":0,"file_size":1234}]])");
auto result = async_result.get();
- ASSERT_TRUE(result.has_value());
+ ASSERT_TRUE(result.hasValue());
ASSERT_EQ(1u, result->size());
- EXPECT_EQ("/foo/bar.so", result.value()[0].GetFileSpec().GetPath());
- EXPECT_EQ(triple, result.value()[0].GetArchitecture().GetTriple());
+ EXPECT_EQ("/foo/bar.so", result.getValue()[0].GetFileSpec().GetPath());
+ EXPECT_EQ(triple, result.getValue()[0].GetArchitecture().GetTriple());
EXPECT_EQ(UUID::fromData("@ABCDEFGHIJKLMNOPQRS", 20),
- result.value()[0].GetUUID());
- EXPECT_EQ(0u, result.value()[0].GetObjectOffset());
- EXPECT_EQ(1234u, result.value()[0].GetObjectSize());
+ result.getValue()[0].GetUUID());
+ EXPECT_EQ(0u, result.getValue()[0].GetObjectOffset());
+ EXPECT_EQ(1234u, result.getValue()[0].GetObjectSize());
}
TEST_F(GDBRemoteCommunicationClientTest, GetModulesInfoInvalidResponse) {