Lines Matching refs:string
38 static void verify_patch_header(const std::string& patch, size_t* num_normal, size_t* num_raw, in verify_patch_header()
44 ASSERT_EQ("IMGDIFF2", std::string(data, 8)); in verify_patch_header()
83 static void GenerateTarget(const std::string& src, const std::string& patch, std::string* patched) { in GenerateTarget()
93 static void verify_patched_image(const std::string& src, const std::string& patch, in verify_patched_image()
94 const std::string& tgt) { in verify_patched_image()
95 std::string patched; in verify_patched_image()
118 const std::string src("abcdefg"); in TEST()
122 const std::string tgt("abcdefgxyz"); in TEST()
133 std::string patch; in TEST()
154 const std::string src_content("abcdefg"); in TEST()
164 const std::string tgt_content("abcdefgxyz"); in TEST()
178 std::string tgt; in TEST()
180 std::string src; in TEST()
182 std::string patch; in TEST()
199 std::string random_data; in TEST()
208 const std::string src_content = random_data; in TEST()
218 const std::string tgt_content = random_data + "extra contents"; in TEST()
232 std::string tgt; in TEST()
234 std::string src; in TEST()
236 std::string patch; in TEST()
256 const std::string src_content = "abcdefg"; in TEST()
267 const std::string tgt_content; in TEST()
280 std::string tgt; in TEST()
282 std::string src; in TEST()
284 std::string patch; in TEST()
292 std::string random_data; in TEST()
301 const std::string src_content = random_data; in TEST()
311 const std::string tgt_content = random_data + "abcdefg"; in TEST()
328 std::string tgt; in TEST()
330 std::string src; in TEST()
332 std::string patch; in TEST()
348 std::string gzipped_source_path = from_testdata_base("gzipped_source"); in TEST()
349 std::string gzipped_source; in TEST()
352 const std::string src = "abcdefg" + gzipped_source; in TEST()
356 std::string gzipped_target_path = from_testdata_base("gzipped_target"); in TEST()
357 std::string gzipped_target; in TEST()
359 const std::string tgt = "abcdefgxyz" + gzipped_target; in TEST()
371 std::string patch; in TEST()
393 const std::string src(src_data.cbegin(), src_data.cend()); in TEST()
403 const std::string tgt(tgt_data.cbegin(), tgt_data.cend()); in TEST()
414 std::string patch; in TEST()
428 const std::string src(src_data.cbegin(), src_data.cend()); in TEST()
438 const std::string tgt(tgt_data.cbegin(), tgt_data.cend()); in TEST()
451 std::string gzipped_source_path = from_testdata_base("gzipped_source"); in TEST()
452 std::string gzipped_source; in TEST()
455 const std::string src = "abcdefg" + gzipped_source; in TEST()
460 std::string gzipped_target_path = from_testdata_base("gzipped_target"); in TEST()
461 std::string gzipped_target; in TEST()
464 const std::string tgt = gzipped_target + "abcdefgxyz"; in TEST()
478 std::string patch; in TEST()
498 const std::string src(src_data.cbegin(), src_data.cend()); in TEST()
504 const std::string tgt(tgt_data.cbegin(), tgt_data.cend()); in TEST()
515 std::string patch; in TEST()
534 const std::string src(src_data.cbegin(), src_data.cend()); in TEST()
540 const std::string tgt(tgt_data.cbegin(), tgt_data.cend()); in TEST()
551 std::string patch; in TEST()
570 const std::string src(src_data.cbegin(), src_data.cend()); in TEST()
576 const std::string tgt(tgt_data.cbegin(), tgt_data.cend()); in TEST()
587 std::string patch; in TEST()
607 const std::string src(src_data.cbegin(), src_data.cend()); in TEST()
615 const std::string tgt(tgt_data.cbegin(), tgt_data.cend()); in TEST()
626 std::string patch; in TEST()
648 const std::string src(src_data.cbegin(), src_data.cend()); in TEST()
658 const std::string tgt(tgt_data.cbegin(), tgt_data.cend()); in TEST()
669 std::string patch; in TEST()
680 static void construct_store_entry(const std::vector<std::tuple<std::string, size_t, char>>& info, in construct_store_entry() argument
685 const std::string content(std::get<1>(t) * 4096, std::get<2>(t)); in construct_store_entry()
691 static void construct_deflate_entry(const std::vector<std::tuple<std::string, size_t, size_t>>& inf… in construct_deflate_entry() argument
692 ZipWriter* writer, const std::string& data) { in construct_deflate_entry()
704 static void GenerateAndCheckSplitTarget(const std::string& debug_dir, size_t count, in GenerateAndCheckSplitTarget()
705 const std::string& tgt) { in GenerateAndCheckSplitTarget()
706 std::string patched; in GenerateAndCheckSplitTarget()
708 std::string split_src_path = android::base::StringPrintf("%s/src-%zu", debug_dir.c_str(), i); in GenerateAndCheckSplitTarget()
709 std::string split_src; in GenerateAndCheckSplitTarget()
713 std::string split_patch_path = in GenerateAndCheckSplitTarget()
715 std::string split_patch; in GenerateAndCheckSplitTarget()
719 std::string split_tgt; in GenerateAndCheckSplitTarget()
729 const std::vector<uint8_t>& content, const std::vector<std::tuple<std::string, size_t>>& info) { in ConstructImageChunks() argument
831 std::string split_info_arg = android::base::StringPrintf("--split-info=%s", split_info_file.path); in TEST()
832 std::string debug_dir_arg = android::base::StringPrintf("--debug-dir=%s", debug_dir.path); in TEST()
839 std::string tgt; in TEST()
855 std::string tgt_path = from_testdata_base("deflate_tgt.zip"); in TEST()
856 std::string src_path = from_testdata_base("deflate_src.zip"); in TEST()
902 std::string split_info_string; in TEST()
904 std::vector<std::string> info_list = in TEST()
911 std::string tgt; in TEST()
914 std::vector<std::string> tgt_file_ranges = { in TEST()
920 std::string path = android::base::StringPrintf("%s/patch-%zu", debug_dir.path, i); in TEST()
931 std::string random_data; in TEST()
957 std::string split_info_arg = android::base::StringPrintf("--split-info=%s", split_info_file.path); in TEST()
958 std::string debug_dir_arg = android::base::StringPrintf("--debug-dir=%s", debug_dir.path); in TEST()
965 std::string tgt; in TEST()
974 std::string random_data; in TEST()
999 std::string split_info_arg = android::base::StringPrintf("--split-info=%s", split_info_file.path); in TEST()
1000 std::string debug_dir_arg = android::base::StringPrintf("--debug-dir=%s", debug_dir.path); in TEST()
1007 std::string tgt; in TEST()
1021 std::string small_chunk("a", 2000); in TEST()
1044 std::string split_info_arg = android::base::StringPrintf("--split-info=%s", split_info_file.path); in TEST()
1045 std::string debug_dir_arg = android::base::StringPrintf("--debug-dir=%s", debug_dir.path); in TEST()
1052 std::string tgt; in TEST()
1075 std::string small_chunk("b", 1); in TEST()
1098 std::string split_info_arg = android::base::StringPrintf("--split-info=%s", split_info_file.path); in TEST()
1099 std::string debug_dir_arg = android::base::StringPrintf("--debug-dir=%s", debug_dir.path); in TEST()
1106 std::string tgt; in TEST()