Lines Matching refs:ASSERT_EQ
53 ASSERT_EQ(0, writer.StartEntry("file.txt", 0)); in TEST_F()
54 ASSERT_EQ(0, writer.WriteBytes("he", 2)); in TEST_F()
55 ASSERT_EQ(0, writer.WriteBytes("llo", 3)); in TEST_F()
56 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
57 ASSERT_EQ(0, writer.Finish()); in TEST_F()
62 ASSERT_EQ(0, OpenArchiveFd(fd_, "temp", &handle, false)); in TEST_F()
65 ASSERT_EQ(0, FindEntry(handle, "file.txt", &data)); in TEST_F()
69 ASSERT_EQ(strlen(expected), data.uncompressed_length); in TEST_F()
78 ASSERT_EQ(0, writer.StartEntry("file.txt", 0)); in TEST_F()
79 ASSERT_EQ(0, writer.WriteBytes("he", 2)); in TEST_F()
80 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
82 ASSERT_EQ(0, writer.StartEntry("file/file.txt", 0)); in TEST_F()
83 ASSERT_EQ(0, writer.WriteBytes("llo", 3)); in TEST_F()
84 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
86 ASSERT_EQ(0, writer.StartEntry("file/file2.txt", 0)); in TEST_F()
87 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
89 ASSERT_EQ(0, writer.Finish()); in TEST_F()
94 ASSERT_EQ(0, OpenArchiveFd(fd_, "temp", &handle, false)); in TEST_F()
98 ASSERT_EQ(0, FindEntry(handle, "file.txt", &data)); in TEST_F()
101 ASSERT_EQ(2u, data.uncompressed_length); in TEST_F()
104 ASSERT_EQ(0, FindEntry(handle, "file/file.txt", &data)); in TEST_F()
107 ASSERT_EQ(3u, data.uncompressed_length); in TEST_F()
110 ASSERT_EQ(0, FindEntry(handle, "file/file2.txt", &data)); in TEST_F()
121 ASSERT_EQ(0, writer.StartEntry("align.txt", ZipWriter::kAlign32)); in TEST_F()
122 ASSERT_EQ(0, writer.WriteBytes("he", 2)); in TEST_F()
123 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
124 ASSERT_EQ(0, writer.Finish()); in TEST_F()
129 ASSERT_EQ(0, OpenArchiveFd(fd_, "temp", &handle, false)); in TEST_F()
132 ASSERT_EQ(0, FindEntry(handle, "align.txt", &data)); in TEST_F()
155 ASSERT_EQ(0, writer.StartEntryWithTime("align.txt", ZipWriter::kAlign32, time)); in TEST_F()
156 ASSERT_EQ(0, writer.WriteBytes("he", 2)); in TEST_F()
157 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
158 ASSERT_EQ(0, writer.Finish()); in TEST_F()
163 ASSERT_EQ(0, OpenArchiveFd(fd_, "temp", &handle, false)); in TEST_F()
166 ASSERT_EQ(0, FindEntry(handle, "align.txt", &data)); in TEST_F()
183 ASSERT_EQ(0, writer.StartAlignedEntry("align.txt", 0, 4096)); in TEST_F()
184 ASSERT_EQ(0, writer.WriteBytes("he", 2)); in TEST_F()
185 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
186 ASSERT_EQ(0, writer.Finish()); in TEST_F()
191 ASSERT_EQ(0, OpenArchiveFd(fd_, "temp", &handle, false)); in TEST_F()
194 ASSERT_EQ(0, FindEntry(handle, "align.txt", &data)); in TEST_F()
205 ASSERT_EQ(0, writer.StartAlignedEntryWithTime("align.txt", 0, time, 4096)); in TEST_F()
206 ASSERT_EQ(0, writer.WriteBytes("he", 2)); in TEST_F()
207 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
208 ASSERT_EQ(0, writer.Finish()); in TEST_F()
213 ASSERT_EQ(0, OpenArchiveFd(fd_, "temp", &handle, false)); in TEST_F()
216 ASSERT_EQ(0, FindEntry(handle, "align.txt", &data)); in TEST_F()
233 ASSERT_EQ(0, writer.StartEntry("file.txt", ZipWriter::kCompress)); in TEST_F()
234 ASSERT_EQ(0, writer.WriteBytes("helo", 4)); in TEST_F()
235 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
236 ASSERT_EQ(0, writer.Finish()); in TEST_F()
241 ASSERT_EQ(0, OpenArchiveFd(fd_, "temp", &handle, false)); in TEST_F()
244 ASSERT_EQ(0, FindEntry(handle, "file.txt", &data)); in TEST_F()
247 ASSERT_EQ(4u, data.uncompressed_length); in TEST_F()
266 ASSERT_EQ(0, writer.StartEntry("file.txt", ZipWriter::kCompress)); in TEST_F()
267 ASSERT_EQ(0, writer.WriteBytes(buffer.data(), buffer.size())); in TEST_F()
268 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
269 ASSERT_EQ(0, writer.Finish()); in TEST_F()
274 ASSERT_EQ(0, OpenArchiveFd(fd_, "temp", &handle, false)); in TEST_F()
277 ASSERT_EQ(0, FindEntry(handle, "file.txt", &data)); in TEST_F()
283 ASSERT_EQ(0, ExtractToMemory(handle, &data, decompress.data(), in TEST_F()
294 ASSERT_EQ(-5, writer.StartAlignedEntry("align.txt", ZipWriter::kAlign32, 4096)); in TEST_F()
295 ASSERT_EQ(-6, writer.StartAlignedEntry("align.txt", 0, 3)); in TEST_F()
308 ASSERT_EQ(0, writer.StartEntry("keep.txt", 0)); in TEST_F()
309 ASSERT_EQ(0, writer.WriteBytes(kKeepThis, strlen(kKeepThis))); in TEST_F()
310 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
312 ASSERT_EQ(0, writer.GetLastEntry(&entry)); in TEST_F()
315 ASSERT_EQ(0, writer.StartEntry("drop.txt", 0)); in TEST_F()
316 ASSERT_EQ(0, writer.WriteBytes(kDropThis, strlen(kDropThis))); in TEST_F()
317 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
319 ASSERT_EQ(0, writer.GetLastEntry(&entry)); in TEST_F()
322 ASSERT_EQ(0, writer.DiscardLastEntry()); in TEST_F()
324 ASSERT_EQ(0, writer.GetLastEntry(&entry)); in TEST_F()
327 ASSERT_EQ(0, writer.StartEntry("replace.txt", 0)); in TEST_F()
328 ASSERT_EQ(0, writer.WriteBytes(kReplaceWithThis, strlen(kReplaceWithThis))); in TEST_F()
329 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
331 ASSERT_EQ(0, writer.GetLastEntry(&entry)); in TEST_F()
334 ASSERT_EQ(0, writer.Finish()); in TEST_F()
341 ASSERT_EQ(0, OpenArchiveFd(fd_, "temp", &handle, false)); in TEST_F()
344 ASSERT_EQ(0, FindEntry(handle, "keep.txt", &data)); in TEST_F()
349 ASSERT_EQ(0, FindEntry(handle, "replace.txt", &data)); in TEST_F()
360 ASSERT_EQ(0, writer.StartEntry("file.txt", 0)); in TEST_F()
361 ASSERT_EQ(0, writer.WriteBytes(expected, strlen(expected))); in TEST_F()
362 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
363 ASSERT_EQ(0, writer.Finish()); in TEST_F()
367 ASSERT_EQ(0, OpenArchiveFd(fd_, "temp", &handle, false)); in TEST_F()
369 ASSERT_EQ(0, FindEntry(handle, "file.txt", &data)); in TEST_F()
373 ASSERT_EQ(strlen(expected), data.uncompressed_length); in TEST_F()
383 ASSERT_EQ(0, writer.StartEntry("small.txt", 0)); in TEST_F()
384 ASSERT_EQ(0, writer.WriteBytes(kSmall, strlen(kSmall))); in TEST_F()
385 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
387 ASSERT_EQ(0, writer.StartEntry("large.txt", 0)); in TEST_F()
390 ASSERT_EQ(0, writer.WriteBytes(data.data(), data.size())); in TEST_F()
391 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
396 ASSERT_EQ(0, writer.GetLastEntry(&entry)); in TEST_F()
397 ASSERT_EQ(0, writer.DiscardLastEntry()); in TEST_F()
399 ASSERT_EQ(0, writer.Finish()); in TEST_F()