Merge "Add a unit test for applypatch_check"

am: 06603c76c5

Change-Id: Ieb8dd72e88d01d2067ba35369791d038260a4d49
This commit is contained in:
Tianjie Xu
2016-10-19 03:19:12 +00:00
committed by android-build-merger
+5
View File
@@ -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));