Lines Matching refs:ASSERT_EQ
51 ASSERT_EQ(name_str.size(), name.name_length);
52 ASSERT_EQ(0, memcmp(name_str.c_str(), name.name, name.name_length));
57 ASSERT_EQ(0, OpenArchiveWrapper(kValidZip, &handle));
67 ASSERT_EQ(-1, GetFileDescriptor(handle));
72 ASSERT_EQ(0, OpenArchiveWrapper(kValidZip, &handle));
75 ASSERT_EQ(0, StartIteration(handle, &iteration_cookie, NULL));
81 ASSERT_EQ(0, Next(iteration_cookie, &data, &name));
85 ASSERT_EQ(0, Next(iteration_cookie, &data, &name));
89 ASSERT_EQ(0, Next(iteration_cookie, &data, &name));
93 ASSERT_EQ(0, Next(iteration_cookie, &data, &name));
97 ASSERT_EQ(0, Next(iteration_cookie, &data, &name));
101 ASSERT_EQ(-1, Next(iteration_cookie, &data, &name));
108 ASSERT_EQ(0, OpenArchiveWrapper(kValidZip, &handle));
111 ASSERT_EQ(0, FindEntry(handle, "a.txt", &data));
114 ASSERT_EQ(63, data.offset);
115 ASSERT_EQ(kCompressDeflated, data.method);
116 ASSERT_EQ(static_cast<uint32_t>(17), data.uncompressed_length);
117 ASSERT_EQ(static_cast<uint32_t>(13), data.compressed_length);
118 ASSERT_EQ(0x950821c5, data.crc32);
128 ASSERT_EQ(0, OpenArchiveWrapper(kValidZip, &handle));
132 ASSERT_EQ(0, FindEntry(handle, "a.txt", &data));
134 ASSERT_EQ(a_size, sizeof(kATxtContents));
136 ASSERT_EQ(0, ExtractToMemory(handle, &data, buffer, a_size));
137 ASSERT_EQ(0, memcmp(buffer, kATxtContents, a_size));
141 ASSERT_EQ(0, FindEntry(handle, "b.txt", &data));
143 ASSERT_EQ(b_size, sizeof(kBTxtContents));
145 ASSERT_EQ(0, ExtractToMemory(handle, &data, buffer, b_size));
146 ASSERT_EQ(0, memcmp(buffer, kBTxtContents, b_size));
181 ASSERT_EQ(file_size, TEMP_FAILURE_RETRY(write(fd, kEmptyEntriesZip, file_size)));
184 ASSERT_EQ(0, OpenArchiveFd(fd, "EmptyEntriesTest", &handle));
187 ASSERT_EQ(0, FindEntry(handle, "empty.txt", &entry));
188 ASSERT_EQ(static_cast<uint32_t>(0), entry.uncompressed_length);
190 ASSERT_EQ(0, ExtractToMemory(handle, &entry, buffer, 1));
195 ASSERT_EQ(0, ExtractEntryToFile(handle, &entry, output_fd));
198 ASSERT_EQ(0, fstat(output_fd, &stat_buf));
199 ASSERT_EQ(0, stat_buf.st_size);
214 ASSERT_EQ(file_size, TEMP_FAILURE_RETRY(write(fd, kEmptyEntriesZip, file_size)));
215 ASSERT_EQ(trailer_size, TEMP_FAILURE_RETRY(write(fd, trailer, trailer_size)));
228 ASSERT_EQ(data_size, TEMP_FAILURE_RETRY(write(fd, data, data_size)));
231 ASSERT_EQ(0, OpenArchiveWrapper(kValidZip, &handle));
234 ASSERT_EQ(0, FindEntry(handle, "a.txt", &entry));
235 ASSERT_EQ(0, ExtractEntryToFile(handle, &entry, fd));
240 ASSERT_EQ(0, lseek64(fd, 0, SEEK_SET));
241 ASSERT_EQ(data_size, TEMP_FAILURE_RETRY(read(fd, read_buffer, data_size)));
242 ASSERT_EQ(0, memcmp(read_buffer, data, data_size));
246 ASSERT_EQ(static_cast<ssize_t>(entry.uncompressed_length),
249 ASSERT_EQ(0, memcmp(&uncompressed_data[0], kATxtContents,
253 ASSERT_EQ(data_size + static_cast<ssize_t>(sizeof(kATxtContents)),