summaryrefslogtreecommitdiff
path: root/libunwindstack/tests/MemoryXzTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libunwindstack/tests/MemoryXzTest.cpp')
-rw-r--r--libunwindstack/tests/MemoryXzTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libunwindstack/tests/MemoryXzTest.cpp b/libunwindstack/tests/MemoryXzTest.cpp
index 17562dc..6597240 100644
--- a/libunwindstack/tests/MemoryXzTest.cpp
+++ b/libunwindstack/tests/MemoryXzTest.cpp
@@ -32,8 +32,8 @@ class MemoryXzTest : public ::testing::Test {
std::string data; // NB: It is actually binary data.
EXPECT_TRUE(android::base::ReadFileToString(dir + filename, &data)) << filename;
EXPECT_GT(data.size(), 0u);
- auto memory = std::make_unique<MemoryBuffer>();
- EXPECT_TRUE(memory->Resize(data.size()));
+ auto memory = std::make_unique<MemoryBuffer>(data.size());
+ EXPECT_EQ(data.size(), memory->Size());
memcpy(memory->GetPtr(0), data.data(), data.size());
return memory;
}