FileFd fd;
ASSERT_TRUE(fd.Open(tempfile, FileFd::WriteOnly | FileFd::Empty, compress));
ASSERT_TRUE(fd.IsOpen());
FileFd fd;
ASSERT_TRUE(fd.Open(tempfile, FileFd::WriteOnly | FileFd::Empty, compress));
ASSERT_TRUE(fd.IsOpen());
ASSERT_TRUE(input.IsOpen());
ASSERT_NE(0, input.FileSize());
ASSERT_TRUE(CopyFile(input, fd));
ASSERT_TRUE(input.IsOpen());
ASSERT_NE(0, input.FileSize());
ASSERT_TRUE(CopyFile(input, fd));
SHA512SumValue sha512(summation);
EXPECT_EQ(sha512.Value(), summation);
SHA512SumValue sha512(summation);
EXPECT_EQ(sha512.Value(), summation);
EXPECT_TRUE(fd.IsOpen());
std::string FileSize;
strprintf(FileSize, "%llu", fd.FileSize());
EXPECT_TRUE(fd.IsOpen());
std::string FileSize;
strprintf(FileSize, "%llu", fd.FileSize());
EXPECT_EQ(sha2file, sha2file);
EXPECT_TRUE(sha2file == sha2file);
EXPECT_NE(sha2file, sha2wrong);
EXPECT_TRUE(sha2file != sha2wrong);
HashString sha2big("SHA256", sha256.Value());
EXPECT_EQ(sha2file, sha2file);
EXPECT_TRUE(sha2file == sha2file);
EXPECT_NE(sha2file, sha2wrong);
EXPECT_TRUE(sha2file != sha2wrong);
HashString sha2big("SHA256", sha256.Value());
EXPECT_EQ(sha2big, sha2small);
EXPECT_TRUE(sha2big == sha2small);
EXPECT_FALSE(sha2big != sha2small);
EXPECT_EQ(sha2big, sha2small);
EXPECT_TRUE(sha2big == sha2small);
EXPECT_FALSE(sha2big != sha2small);
EXPECT_EQ(2, hashes.size());
EXPECT_FALSE(hashes.push_back(sha2wrong));
EXPECT_EQ(2, hashes.size());
EXPECT_EQ(2, hashes.size());
EXPECT_FALSE(hashes.push_back(sha2wrong));
EXPECT_EQ(2, hashes.size());
EXPECT_EQ(similar, hashes);
EXPECT_TRUE(similar == hashes);
EXPECT_EQ(similar, hashes);
EXPECT_TRUE(similar == hashes);