Lines Matching refs:tmp_file
396 TemporaryFile tmp_file; in TEST() local
397 ASSERT_NE(-1, tmp_file.fd); in TEST()
400 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, leading_garbage.c_str(), in TEST()
405 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, valid_content.c_str(), valid_content.size())); in TEST()
408 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, ending_garbage.c_str(), in TEST()
412 ASSERT_EQ(0, lseek(tmp_file.fd, 0, SEEK_SET)); in TEST()
413 ASSERT_EQ(0, OpenArchiveFdRange(tmp_file.fd, "OpenArchiveFdRange", &handle, in TEST()
499 TemporaryFile tmp_file; in TEST() local
500 ASSERT_NE(-1, tmp_file.fd); in TEST()
501 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, kEmptyEntriesZip, sizeof(kEmptyEntriesZip))); in TEST()
504 ASSERT_EQ(0, OpenArchiveFd(tmp_file.fd, "EmptyEntriesTest", &handle, false)); in TEST()
525 TemporaryFile tmp_file; in TEST() local
526 ASSERT_NE(-1, tmp_file.fd); in TEST()
527 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, reinterpret_cast<const uint8_t*>(kAbZip), in TEST()
530 ASSERT_EQ(0, OpenArchiveFd(tmp_file.fd, "EntryLargerThan32KTest", &handle, false)); in TEST()
566 TemporaryFile tmp_file; in TEST() local
567 ASSERT_NE(-1, tmp_file.fd); in TEST()
571 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, kEmptyEntriesZip, sizeof(kEmptyEntriesZip))); in TEST()
572 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, trailer, sizeof(trailer))); in TEST()
575 ASSERT_GT(0, OpenArchiveFd(tmp_file.fd, "EmptyEntriesTest", &handle, false)); in TEST()
579 TemporaryFile tmp_file; in TEST() local
580 ASSERT_NE(-1, tmp_file.fd); in TEST()
584 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, data, data_size)); in TEST()
591 ASSERT_EQ(0, ExtractEntryToFile(handle, &entry, tmp_file.fd)); in TEST()
595 ASSERT_EQ(0, lseek(tmp_file.fd, 0, SEEK_SET)); in TEST()
596 ASSERT_TRUE(android::base::ReadFully(tmp_file.fd, read_buffer, data_size)); in TEST()
601 ASSERT_TRUE(android::base::ReadFully(tmp_file.fd, uncompressed_data.data(), in TEST()
607 lseek(tmp_file.fd, 0, SEEK_END)); in TEST()
777 TemporaryFile tmp_file; in ExtractEntryToMemory() local
778 ASSERT_NE(-1, tmp_file.fd); in ExtractEntryToMemory()
779 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, &zip_data[0], zip_data.size())); in ExtractEntryToMemory()
781 ASSERT_EQ(0, OpenArchiveFd(tmp_file.fd, "ExtractEntryToMemory", &handle, false)); in ExtractEntryToMemory()
881 TemporaryFile tmp_file; in TEST() local
882 ASSERT_NE(-1, tmp_file.fd); in TEST()
883 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, &kZipFileWithBrokenLfhSignature[0], in TEST()
886 ASSERT_EQ(kInvalidFile, OpenArchiveFd(tmp_file.fd, "LeadingNonZipBytes", &handle, false)); in TEST()