summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-10-19 05:35:13 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-10-19 05:35:13 +0200
commit3e645a9b8b3595d97f143fbf1276ef338c57ecd1 (patch)
tree744189d771e9e88b5a29eb6f18783d9da771aef5
parentMerge "Clean up bootloader_message usage in recovery" am: 94f4494613 am: 7691800c2e (diff)
parentMerge "Add a unit test for applypatch_check" am: 06603c76c5 (diff)
downloadandroid_bootable_recovery-3e645a9b8b3595d97f143fbf1276ef338c57ecd1.tar
android_bootable_recovery-3e645a9b8b3595d97f143fbf1276ef338c57ecd1.tar.gz
android_bootable_recovery-3e645a9b8b3595d97f143fbf1276ef338c57ecd1.tar.bz2
android_bootable_recovery-3e645a9b8b3595d97f143fbf1276ef338c57ecd1.tar.lz
android_bootable_recovery-3e645a9b8b3595d97f143fbf1276ef338c57ecd1.tar.xz
android_bootable_recovery-3e645a9b8b3595d97f143fbf1276ef338c57ecd1.tar.zst
android_bootable_recovery-3e645a9b8b3595d97f143fbf1276ef338c57ecd1.zip
-rw-r--r--tests/component/applypatch_test.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/component/applypatch_test.cpp b/tests/component/applypatch_test.cpp
index 75f2e1014..908a9f5f5 100644
--- a/tests/component/applypatch_test.cpp
+++ b/tests/component/applypatch_test.cpp
@@ -200,6 +200,11 @@ std::vector<Value*> ApplyPatchFullTest::patches;
TemporaryFile* ApplyPatchFullTest::output_f;
std::string ApplyPatchFullTest::output_loc;
+TEST_F(ApplyPatchTest, CheckModeSkip) {
+ std::vector<std::string> sha1s;
+ ASSERT_EQ(0, applypatch_check(&old_file[0], sha1s));
+}
+
TEST_F(ApplyPatchTest, CheckModeSingle) {
std::vector<std::string> sha1s = { old_sha1 };
ASSERT_EQ(0, applypatch_check(&old_file[0], sha1s));