summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2019-06-21 19:14:10 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-06-21 19:14:10 +0200
commit090b62832f1e4507a864373b3e393aaa021a1f12 (patch)
tree79e1d688513da13dcb08a551fa689b17a1b7f2e3 /tests
parentMerge "Implement the TargetFile and BuildInfo" (diff)
parentSupport starting fuse from a block map (diff)
downloadandroid_bootable_recovery-090b62832f1e4507a864373b3e393aaa021a1f12.tar
android_bootable_recovery-090b62832f1e4507a864373b3e393aaa021a1f12.tar.gz
android_bootable_recovery-090b62832f1e4507a864373b3e393aaa021a1f12.tar.bz2
android_bootable_recovery-090b62832f1e4507a864373b3e393aaa021a1f12.tar.lz
android_bootable_recovery-090b62832f1e4507a864373b3e393aaa021a1f12.tar.xz
android_bootable_recovery-090b62832f1e4507a864373b3e393aaa021a1f12.tar.zst
android_bootable_recovery-090b62832f1e4507a864373b3e393aaa021a1f12.zip
Diffstat (limited to '')
-rw-r--r--tests/unit/fuse_provider_test.cpp3
-rw-r--r--tests/unit/fuse_sideload_test.cpp4
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/unit/fuse_provider_test.cpp b/tests/unit/fuse_provider_test.cpp
index c5995dd7d..37f99f92e 100644
--- a/tests/unit/fuse_provider_test.cpp
+++ b/tests/unit/fuse_provider_test.cpp
@@ -44,7 +44,8 @@ TEST(FuseBlockMapTest, CreateFromBlockMap_smoke) {
ASSERT_TRUE(block_map_data);
ASSERT_EQ(10000, block_map_data->file_size());
ASSERT_EQ(4096, block_map_data->fuse_block_size());
- ASSERT_EQ(RangeSet({ { 10, 11 }, { 20, 21 }, { 22, 23 } }), block_map_data->ranges());
+ ASSERT_EQ(RangeSet({ { 10, 11 }, { 20, 21 }, { 22, 23 } }),
+ static_cast<FuseBlockDataProvider*>(block_map_data.get())->ranges());
}
TEST(FuseBlockMapTest, ReadBlockAlignedData_smoke) {
diff --git a/tests/unit/fuse_sideload_test.cpp b/tests/unit/fuse_sideload_test.cpp
index 6add99f41..ea895038c 100644
--- a/tests/unit/fuse_sideload_test.cpp
+++ b/tests/unit/fuse_sideload_test.cpp
@@ -40,6 +40,10 @@ class FuseTestDataProvider : public FuseDataProvider {
bool ReadBlockAlignedData(uint8_t*, uint32_t, uint32_t) const override {
return true;
}
+
+ bool Valid() const override {
+ return true;
+ }
};
TEST(SideloadTest, run_fuse_sideload_wrong_parameters) {