diff options
author | Tao Bao <tbao@google.com> | 2017-05-03 01:47:33 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-03 01:47:33 +0200 |
commit | 08d9ede8f2776e416133f66f202dd847bdbca779 (patch) | |
tree | 8e47eb4eab95da0b23a2372f1af34c2f932e9905 /tests/unit/zip_test.cpp | |
parent | Merge "recovery: Change install_package() to take std::string." (diff) | |
parent | Merge "Move sysMapFile and sysReleaseMap into MemMapping class." (diff) | |
download | android_bootable_recovery-08d9ede8f2776e416133f66f202dd847bdbca779.tar android_bootable_recovery-08d9ede8f2776e416133f66f202dd847bdbca779.tar.gz android_bootable_recovery-08d9ede8f2776e416133f66f202dd847bdbca779.tar.bz2 android_bootable_recovery-08d9ede8f2776e416133f66f202dd847bdbca779.tar.lz android_bootable_recovery-08d9ede8f2776e416133f66f202dd847bdbca779.tar.xz android_bootable_recovery-08d9ede8f2776e416133f66f202dd847bdbca779.tar.zst android_bootable_recovery-08d9ede8f2776e416133f66f202dd847bdbca779.zip |
Diffstat (limited to 'tests/unit/zip_test.cpp')
-rw-r--r-- | tests/unit/zip_test.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/unit/zip_test.cpp b/tests/unit/zip_test.cpp index 4a1a49b97..df4e38cae 100644 --- a/tests/unit/zip_test.cpp +++ b/tests/unit/zip_test.cpp @@ -66,9 +66,9 @@ TEST(ZipTest, ExtractPackageRecursive) { } TEST(ZipTest, OpenFromMemory) { - MemMapping map; std::string zip_path = from_testdata_base("ziptest_dummy-update.zip"); - ASSERT_EQ(0, sysMapFile(zip_path.c_str(), &map)); + MemMapping map; + ASSERT_TRUE(map.MapFile(zip_path)); // Map an update package into memory and open the archive from there. ZipArchiveHandle handle; @@ -85,6 +85,5 @@ TEST(ZipTest, OpenFromMemory) { ASSERT_EQ(0, ExtractEntryToFile(handle, &binary_entry, tmp_binary.fd)); CloseArchive(handle); - sysReleaseMap(&map); } |