Lines Matching refs:patch_data
58 std::vector<uint8_t>* patch_data) {
59 EXPECT_EQ(static_cast<size_t>(8), patch_data->size());
65 std::copy(buf, buf + sizeof(buf), std::back_inserter(*patch_data));
68 void ConstructPatchData(std::vector<uint8_t>* patch_data) {
71 new_file_size_, patch_data);
76 std::back_inserter(*patch_data));
79 std::back_inserter(*patch_data));
82 std::back_inserter(*patch_data));
85 void VerifyPatch(const std::vector<uint8_t>& patch_data) {
87 EXPECT_TRUE(patch_reader.Init(patch_data.data(), patch_data.size()));
115 std::vector<uint8_t> patch_data;
117 std::back_inserter(patch_data));
118 patch_data.push_back(static_cast<uint8_t>(CompressorType::kBrotli));
119 patch_data.push_back(static_cast<uint8_t>(CompressorType::kBrotli));
120 patch_data.push_back(static_cast<uint8_t>(CompressorType::kBrotli));
121 ConstructPatchHeader(ctrl_size, diff_size, new_size, &patch_data);
122 patch_data.resize(patch_data.size() + compressed_size);
125 EXPECT_FALSE(patch_reader.Init(patch_data.data(), patch_data.size()))
150 std::vector<uint8_t> patch_data;
152 std::back_inserter(patch_data));
153 ConstructPatchData(&patch_data);
155 VerifyPatch(patch_data);
166 std::vector<uint8_t> patch_data;
168 std::back_inserter(patch_data));
169 patch_data.push_back(static_cast<uint8_t>(CompressorType::kBZ2));
170 patch_data.push_back(static_cast<uint8_t>(CompressorType::kBrotli));
171 patch_data.push_back(static_cast<uint8_t>(CompressorType::kBrotli));
172 ConstructPatchData(&patch_data);
174 VerifyPatch(patch_data);
200 std::vector<uint8_t> patch_data;
202 std::back_inserter(patch_data));
204 patch_data.push_back(99);
205 patch_data.push_back(static_cast<uint8_t>(CompressorType::kBrotli));
206 patch_data.push_back(static_cast<uint8_t>(CompressorType::kBrotli));
207 ConstructPatchHeader(10, 10, 10, &patch_data);
208 patch_data.resize(patch_data.size() + 30);
211 EXPECT_FALSE(patch_reader.Init(patch_data.data(), patch_data.size()));
230 std::vector<uint8_t> patch_data;
232 std::back_inserter(patch_data));
233 patch_data.push_back(static_cast<uint8_t>(CompressorType::kBZ2));
234 patch_data.push_back(static_cast<uint8_t>(CompressorType::kBrotli));
235 patch_data.push_back(static_cast<uint8_t>(CompressorType::kBrotli));
236 ConstructPatchData(&patch_data);
239 EXPECT_TRUE(patch_reader.Init(patch_data.data(), patch_data.size()));