diff options
Diffstat (limited to 'llvm/unittests/Support')
-rw-r--r-- | llvm/unittests/Support/FileOutputBufferTest.cpp | 12 | ||||
-rw-r--r-- | llvm/unittests/Support/Path.cpp | 3 |
2 files changed, 2 insertions, 13 deletions
diff --git a/llvm/unittests/Support/FileOutputBufferTest.cpp b/llvm/unittests/Support/FileOutputBufferTest.cpp index 0801f853990..2ce9e71f852 100644 --- a/llvm/unittests/Support/FileOutputBufferTest.cpp +++ b/llvm/unittests/Support/FileOutputBufferTest.cpp @@ -46,11 +46,7 @@ TEST(FileOutputBuffer, Test) { // Commit buffer. ASSERT_NO_ERROR(Buffer->commit()); } - // Verify file exists and starts with special header. - bool MagicMatches = false; - ASSERT_NO_ERROR(fs::has_magic(Twine(File1), Twine("AABBCCDDEEFFGGHHIIJJ"), - MagicMatches)); - EXPECT_TRUE(MagicMatches); + // Verify file is correct size. uint64_t File1Size; ASSERT_NO_ERROR(fs::file_size(Twine(File1), File1Size)); @@ -86,11 +82,7 @@ TEST(FileOutputBuffer, Test) { // Commit buffer, but size down to smaller size ASSERT_NO_ERROR(Buffer->commit(5000)); } - // Verify file exists and starts with special header. - bool MagicMatches3 = false; - ASSERT_NO_ERROR(fs::has_magic(Twine(File3), Twine("AABBCCDDEEFFGGHHIIJJ"), - MagicMatches3)); - EXPECT_TRUE(MagicMatches3); + // Verify file is correct size. uint64_t File3Size; ASSERT_NO_ERROR(fs::file_size(Twine(File3), File3Size)); diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp index d116acae2aa..f5fb81539b6 100644 --- a/llvm/unittests/Support/Path.cpp +++ b/llvm/unittests/Support/Path.cpp @@ -539,9 +539,6 @@ TEST_F(FileSystemTest, Magic) { StringRef magic(i->magic_str, i->magic_str_len); file << magic; file.close(); - bool res = false; - ASSERT_NO_ERROR(fs::has_magic(file_pathname.c_str(), magic, res)); - EXPECT_TRUE(res); EXPECT_EQ(i->magic, fs::identify_magic(magic)); ASSERT_NO_ERROR(fs::remove(Twine(file_pathname))); } |