diff options
author | Josh Gao <jmgao@google.com> | 2017-10-18 11:44:51 -0700 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2017-11-15 15:38:13 -0800 |
commit | ef35aa5d40b6404baf702a58527f1cd3a9f42f19 (patch) | |
tree | 99f7797b05c934a10fdcb058b025a0304ca2b6f5 /libunwindstack/tests/MemoryLocalTest.cpp | |
parent | 29c5378e91720b7befabc91fbab0f25d59a23bf1 (diff) |
unwindstack: rename Memory::Read to ReadFully.
Rename Memory::Read to ReadFully to match its semantics with that of
android::base. ReadPartially will be renamed to Read in a follow up
commit, kept intentionally separate so that there aren't any callers
accidentally switched from ReadFully to Read.
Test: treehugger
Change-Id: I7d845ac5244c3025d92c8512e960e5d0d1da05af
Diffstat (limited to 'libunwindstack/tests/MemoryLocalTest.cpp')
-rw-r--r-- | libunwindstack/tests/MemoryLocalTest.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libunwindstack/tests/MemoryLocalTest.cpp b/libunwindstack/tests/MemoryLocalTest.cpp index 957b239a6..c483b74dc 100644 --- a/libunwindstack/tests/MemoryLocalTest.cpp +++ b/libunwindstack/tests/MemoryLocalTest.cpp @@ -33,14 +33,14 @@ TEST(MemoryLocalTest, read) { MemoryLocal local; std::vector<uint8_t> dst(1024); - ASSERT_TRUE(local.Read(reinterpret_cast<uint64_t>(src.data()), dst.data(), 1024)); + ASSERT_TRUE(local.ReadFully(reinterpret_cast<uint64_t>(src.data()), dst.data(), 1024)); ASSERT_EQ(0, memcmp(src.data(), dst.data(), 1024)); for (size_t i = 0; i < 1024; i++) { ASSERT_EQ(0x4cU, dst[i]); } memset(src.data(), 0x23, 512); - ASSERT_TRUE(local.Read(reinterpret_cast<uint64_t>(src.data()), dst.data(), 1024)); + ASSERT_TRUE(local.ReadFully(reinterpret_cast<uint64_t>(src.data()), dst.data(), 1024)); ASSERT_EQ(0, memcmp(src.data(), dst.data(), 1024)); for (size_t i = 0; i < 512; i++) { ASSERT_EQ(0x23U, dst[i]); @@ -54,8 +54,8 @@ TEST(MemoryLocalTest, read_illegal) { MemoryLocal local; std::vector<uint8_t> dst(100); - ASSERT_FALSE(local.Read(0, dst.data(), 1)); - ASSERT_FALSE(local.Read(0, dst.data(), 100)); + ASSERT_FALSE(local.ReadFully(0, dst.data(), 1)); + ASSERT_FALSE(local.ReadFully(0, dst.data(), 100)); } TEST(MemoryLocalTest, read_overflow) { @@ -65,7 +65,7 @@ TEST(MemoryLocalTest, read_overflow) { // version will always go through the overflow check. std::vector<uint8_t> dst(100); uint64_t value; - ASSERT_FALSE(local.Read(reinterpret_cast<uint64_t>(&value), dst.data(), SIZE_MAX)); + ASSERT_FALSE(local.ReadFully(reinterpret_cast<uint64_t>(&value), dst.data(), SIZE_MAX)); } TEST(MemoryLocalTest, ReadPartially) { |