Lines Matching refs:data

64   ZipEntry data;  in TEST_F()  local
65 ASSERT_EQ(0, FindEntry(handle, "file.txt", &data)); in TEST_F()
66 EXPECT_EQ(kCompressStored, data.method); in TEST_F()
67 EXPECT_EQ(0u, data.has_data_descriptor); in TEST_F()
68 EXPECT_EQ(strlen(expected), data.compressed_length); in TEST_F()
69 ASSERT_EQ(strlen(expected), data.uncompressed_length); in TEST_F()
70 ASSERT_TRUE(AssertFileEntryContentsEq(expected, handle, &data)); in TEST_F()
96 ZipEntry data; in TEST_F() local
98 ASSERT_EQ(0, FindEntry(handle, "file.txt", &data)); in TEST_F()
99 EXPECT_EQ(kCompressStored, data.method); in TEST_F()
100 EXPECT_EQ(2u, data.compressed_length); in TEST_F()
101 ASSERT_EQ(2u, data.uncompressed_length); in TEST_F()
102 ASSERT_TRUE(AssertFileEntryContentsEq("he", handle, &data)); in TEST_F()
104 ASSERT_EQ(0, FindEntry(handle, "file/file.txt", &data)); in TEST_F()
105 EXPECT_EQ(kCompressStored, data.method); in TEST_F()
106 EXPECT_EQ(3u, data.compressed_length); in TEST_F()
107 ASSERT_EQ(3u, data.uncompressed_length); in TEST_F()
108 ASSERT_TRUE(AssertFileEntryContentsEq("llo", handle, &data)); in TEST_F()
110 ASSERT_EQ(0, FindEntry(handle, "file/file2.txt", &data)); in TEST_F()
111 EXPECT_EQ(kCompressStored, data.method); in TEST_F()
112 EXPECT_EQ(0u, data.compressed_length); in TEST_F()
113 EXPECT_EQ(0u, data.uncompressed_length); in TEST_F()
131 ZipEntry data; in TEST_F() local
132 ASSERT_EQ(0, FindEntry(handle, "align.txt", &data)); in TEST_F()
133 EXPECT_EQ(0, data.offset & 0x03); in TEST_F()
165 ZipEntry data; in TEST_F() local
166 ASSERT_EQ(0, FindEntry(handle, "align.txt", &data)); in TEST_F()
167 EXPECT_EQ(0, data.offset & 0x03); in TEST_F()
169 struct tm mod = data.GetModificationTime(); in TEST_F()
193 ZipEntry data; in TEST_F() local
194 ASSERT_EQ(0, FindEntry(handle, "align.txt", &data)); in TEST_F()
195 EXPECT_EQ(0, data.offset & 0xfff); in TEST_F()
215 ZipEntry data; in TEST_F() local
216 ASSERT_EQ(0, FindEntry(handle, "align.txt", &data)); in TEST_F()
217 EXPECT_EQ(0, data.offset & 0xfff); in TEST_F()
219 struct tm mod = data.GetModificationTime(); in TEST_F()
243 ZipEntry data; in TEST_F() local
244 ASSERT_EQ(0, FindEntry(handle, "file.txt", &data)); in TEST_F()
245 EXPECT_EQ(kCompressDeflated, data.method); in TEST_F()
246 EXPECT_EQ(0u, data.has_data_descriptor); in TEST_F()
247 ASSERT_EQ(4u, data.uncompressed_length); in TEST_F()
248 ASSERT_TRUE(AssertFileEntryContentsEq("helo", handle, &data)); in TEST_F()
267 ASSERT_EQ(0, writer.WriteBytes(buffer.data(), buffer.size())); in TEST_F()
276 ZipEntry data; in TEST_F() local
277 ASSERT_EQ(0, FindEntry(handle, "file.txt", &data)); in TEST_F()
278 EXPECT_EQ(kCompressDeflated, data.method); in TEST_F()
279 EXPECT_EQ(kBufSize, data.uncompressed_length); in TEST_F()
282 memset(decompress.data(), 0, kBufSize); in TEST_F()
283 ASSERT_EQ(0, ExtractToMemory(handle, &data, decompress.data(), in TEST_F()
285 EXPECT_EQ(0, memcmp(decompress.data(), buffer.data(), kBufSize)) in TEST_F()
343 ZipEntry data; in TEST_F() local
344 ASSERT_EQ(0, FindEntry(handle, "keep.txt", &data)); in TEST_F()
345 ASSERT_TRUE(AssertFileEntryContentsEq(kKeepThis, handle, &data)); in TEST_F()
347 ASSERT_NE(0, FindEntry(handle, "drop.txt", &data)); in TEST_F()
349 ASSERT_EQ(0, FindEntry(handle, "replace.txt", &data)); in TEST_F()
350 ASSERT_TRUE(AssertFileEntryContentsEq(kReplaceWithThis, handle, &data)); in TEST_F()
368 ZipEntry data; in TEST_F() local
369 ASSERT_EQ(0, FindEntry(handle, "file.txt", &data)); in TEST_F()
370 EXPECT_EQ(kCompressStored, data.method); in TEST_F()
371 EXPECT_EQ(1u, data.has_data_descriptor); in TEST_F()
372 EXPECT_EQ(strlen(expected), data.compressed_length); in TEST_F()
373 ASSERT_EQ(strlen(expected), data.uncompressed_length); in TEST_F()
374 ASSERT_TRUE(AssertFileEntryContentsEq(expected, handle, &data)); in TEST_F()
388 std::vector<uint8_t> data; in TEST_F() local
389 data.resize(1024 * 1024, 0xef); in TEST_F()
390 ASSERT_EQ(0, writer.WriteBytes(data.data(), data.size())); in TEST_F()