summaryrefslogtreecommitdiff
path: root/libunwindstack/tests/MapInfoGetBuildIDTest.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2019-01-26 07:03:35 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-01-26 07:03:35 +0000
commit77487d109206f9c8b553374bd6ff89d0f08b4079 (patch)
treed8f02752ed46b8fe4956974478e786f6d6b1db95 /libunwindstack/tests/MapInfoGetBuildIDTest.cpp
parent2cab74a18c0e85fa80cf5fb232e620ff1f7537ad (diff)
parent87c54cdeff801732530249c8e494bc705e9bfaa2 (diff)
downloadunwinding-77487d109206f9c8b553374bd6ff89d0f08b4079.tar.gz
Merge "Add GetPrintableBuildID()."
Diffstat (limited to 'libunwindstack/tests/MapInfoGetBuildIDTest.cpp')
-rw-r--r--libunwindstack/tests/MapInfoGetBuildIDTest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libunwindstack/tests/MapInfoGetBuildIDTest.cpp b/libunwindstack/tests/MapInfoGetBuildIDTest.cpp
index 3b89c59..ea9befc 100644
--- a/libunwindstack/tests/MapInfoGetBuildIDTest.cpp
+++ b/libunwindstack/tests/MapInfoGetBuildIDTest.cpp
@@ -67,6 +67,7 @@ TEST_F(MapInfoGetBuildIDTest, no_elf_and_no_valid_elf_in_memory) {
MapInfo info(nullptr, 0x1000, 0x2000, 0, PROT_READ, "");
EXPECT_EQ("", info.GetBuildID());
+ EXPECT_EQ("", info.GetPrintableBuildID());
}
TEST_F(MapInfoGetBuildIDTest, from_elf) {
@@ -74,6 +75,7 @@ TEST_F(MapInfoGetBuildIDTest, from_elf) {
elf_interface_->FakeSetBuildID("FAKE_BUILD_ID");
EXPECT_EQ("FAKE_BUILD_ID", map_info_->GetBuildID());
+ EXPECT_EQ("46414b455f4255494c445f4944", map_info_->GetPrintableBuildID());
}
void MapInfoGetBuildIDTest::MultipleThreadTest(std::string expected_build_id) {
@@ -172,6 +174,7 @@ TEST_F(MapInfoGetBuildIDTest, from_memory) {
InitElfData(tf_->fd);
EXPECT_EQ("ELF_BUILDID", map_info_->GetBuildID());
+ EXPECT_EQ("454c465f4255494c444944", map_info_->GetPrintableBuildID());
}
TEST_F(MapInfoGetBuildIDTest, multiple_thread_elf_exists_in_memory) {