Lines Matching refs:string
39 static void verify_patch_header(const std::string& patch, size_t* num_normal, size_t* num_raw, in verify_patch_header()
45 ASSERT_EQ("IMGDIFF2", std::string(data, 8)); in verify_patch_header()
84 static void GenerateTarget(const std::string& src, const std::string& patch, std::string* patched) { in GenerateTarget()
94 static void verify_patched_image(const std::string& src, const std::string& patch, in verify_patched_image()
95 const std::string& tgt) { in verify_patched_image()
96 std::string patched; in verify_patched_image()
119 const std::string src("abcdefg"); in TEST()
123 const std::string tgt("abcdefgxyz"); in TEST()
134 std::string patch; in TEST()
155 const std::string src_content("abcdefg"); in TEST()
165 const std::string tgt_content("abcdefgxyz"); in TEST()
179 std::string tgt; in TEST()
181 std::string src; in TEST()
183 std::string patch; in TEST()
200 std::string random_data; in TEST()
209 const std::string src_content = random_data; in TEST()
219 const std::string tgt_content = random_data + "extra contents"; in TEST()
233 std::string tgt; in TEST()
235 std::string src; in TEST()
237 std::string patch; in TEST()
257 const std::string src_content = "abcdefg"; in TEST()
268 const std::string tgt_content; in TEST()
281 std::string tgt; in TEST()
283 std::string src; in TEST()
285 std::string patch; in TEST()
293 std::string random_data; in TEST()
302 const std::string src_content = random_data; in TEST()
312 const std::string tgt_content = random_data + "abcdefg"; in TEST()
329 std::string tgt; in TEST()
331 std::string src; in TEST()
333 std::string patch; in TEST()
349 std::string gzipped_source_path = from_testdata_base("gzipped_source"); in TEST()
350 std::string gzipped_source; in TEST()
353 const std::string src = "abcdefg" + gzipped_source; in TEST()
357 std::string gzipped_target_path = from_testdata_base("gzipped_target"); in TEST()
358 std::string gzipped_target; in TEST()
360 const std::string tgt = "abcdefgxyz" + gzipped_target; in TEST()
372 std::string patch; in TEST()
394 const std::string src(src_data.cbegin(), src_data.cend()); in TEST()
404 const std::string tgt(tgt_data.cbegin(), tgt_data.cend()); in TEST()
415 std::string patch; in TEST()
429 const std::string src(src_data.cbegin(), src_data.cend()); in TEST()
439 const std::string tgt(tgt_data.cbegin(), tgt_data.cend()); in TEST()
452 std::string gzipped_source_path = from_testdata_base("gzipped_source"); in TEST()
453 std::string gzipped_source; in TEST()
456 const std::string src = "abcdefg" + gzipped_source; in TEST()
461 std::string gzipped_target_path = from_testdata_base("gzipped_target"); in TEST()
462 std::string gzipped_target; in TEST()
465 const std::string tgt = gzipped_target + "abcdefgxyz"; in TEST()
479 std::string patch; in TEST()
499 const std::string src(src_data.cbegin(), src_data.cend()); in TEST()
505 const std::string tgt(tgt_data.cbegin(), tgt_data.cend()); in TEST()
516 std::string patch; in TEST()
535 const std::string src(src_data.cbegin(), src_data.cend()); in TEST()
541 const std::string tgt(tgt_data.cbegin(), tgt_data.cend()); in TEST()
552 std::string patch; in TEST()
571 const std::string src(src_data.cbegin(), src_data.cend()); in TEST()
577 const std::string tgt(tgt_data.cbegin(), tgt_data.cend()); in TEST()
588 std::string patch; in TEST()
608 const std::string src(src_data.cbegin(), src_data.cend()); in TEST()
616 const std::string tgt(tgt_data.cbegin(), tgt_data.cend()); in TEST()
627 std::string patch; in TEST()
649 const std::string src(src_data.cbegin(), src_data.cend()); in TEST()
659 const std::string tgt(tgt_data.cbegin(), tgt_data.cend()); in TEST()
670 std::string patch; in TEST()
681 static void construct_store_entry(const std::vector<std::tuple<std::string, size_t, char>>& info, in construct_store_entry() argument
686 const std::string content(std::get<1>(t) * 4096, std::get<2>(t)); in construct_store_entry()
692 static void construct_deflate_entry(const std::vector<std::tuple<std::string, size_t, size_t>>& inf… in construct_deflate_entry() argument
693 ZipWriter* writer, const std::string& data) { in construct_deflate_entry()
705 static void GenerateAndCheckSplitTarget(const std::string& debug_dir, size_t count, in GenerateAndCheckSplitTarget()
706 const std::string& tgt) { in GenerateAndCheckSplitTarget()
707 std::string patched; in GenerateAndCheckSplitTarget()
709 std::string split_src_path = android::base::StringPrintf("%s/src-%zu", debug_dir.c_str(), i); in GenerateAndCheckSplitTarget()
710 std::string split_src; in GenerateAndCheckSplitTarget()
714 std::string split_patch_path = in GenerateAndCheckSplitTarget()
716 std::string split_patch; in GenerateAndCheckSplitTarget()
720 std::string split_tgt; in GenerateAndCheckSplitTarget()
730 const std::vector<uint8_t>& content, const std::vector<std::tuple<std::string, size_t>>& info) { in ConstructImageChunks() argument
832 std::string split_info_arg = android::base::StringPrintf("--split-info=%s", split_info_file.path); in TEST()
833 std::string debug_dir_arg = android::base::StringPrintf("--debug-dir=%s", debug_dir.path); in TEST()
840 std::string tgt; in TEST()
856 std::string tgt_path = from_testdata_base("deflate_tgt.zip"); in TEST()
857 std::string src_path = from_testdata_base("deflate_src.zip"); in TEST()
903 std::string split_info_string; in TEST()
905 std::vector<std::string> info_list = in TEST()
912 std::string tgt; in TEST()
915 std::vector<std::string> tgt_file_ranges = { in TEST()
921 std::string path = android::base::StringPrintf("%s/patch-%zu", debug_dir.path, i); in TEST()
932 std::string random_data; in TEST()
958 std::string split_info_arg = android::base::StringPrintf("--split-info=%s", split_info_file.path); in TEST()
959 std::string debug_dir_arg = android::base::StringPrintf("--debug-dir=%s", debug_dir.path); in TEST()
966 std::string tgt; in TEST()
975 std::string random_data; in TEST()
1000 std::string split_info_arg = android::base::StringPrintf("--split-info=%s", split_info_file.path); in TEST()
1001 std::string debug_dir_arg = android::base::StringPrintf("--debug-dir=%s", debug_dir.path); in TEST()
1008 std::string tgt; in TEST()
1022 std::string small_chunk("a", 2000); in TEST()
1045 std::string split_info_arg = android::base::StringPrintf("--split-info=%s", split_info_file.path); in TEST()
1046 std::string debug_dir_arg = android::base::StringPrintf("--debug-dir=%s", debug_dir.path); in TEST()
1053 std::string tgt; in TEST()
1076 std::string small_chunk("b", 1); in TEST()
1099 std::string split_info_arg = android::base::StringPrintf("--split-info=%s", split_info_file.path); in TEST()
1100 std::string debug_dir_arg = android::base::StringPrintf("--debug-dir=%s", debug_dir.path); in TEST()
1107 std::string tgt; in TEST()