From 8181d203b28f10f623dd4261ef65911707cc60d9 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Wed, 11 Jan 2017 22:02:51 +0000 Subject: [PATCH] Use EXPECT_EQ instead of ASSERT_EQ in a unit test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291713 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Support/TarWriterTest.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/unittests/Support/TarWriterTest.cpp b/unittests/Support/TarWriterTest.cpp index 4a088835d1c..84005de56c1 100644 --- a/unittests/Support/TarWriterTest.cpp +++ b/unittests/Support/TarWriterTest.cpp @@ -61,28 +61,28 @@ static UstarHeader create(StringRef Base, StringRef Filename) { TEST_F(TarWriterTest, Basics) { UstarHeader Hdr = create("base", "file"); - ASSERT_EQ("ustar", StringRef(Hdr.Magic)); - ASSERT_EQ("00", StringRef(Hdr.Version, 2)); - ASSERT_EQ("base/file", StringRef(Hdr.Name)); - ASSERT_EQ("00000000010", StringRef(Hdr.Size)); + EXPECT_EQ("ustar", StringRef(Hdr.Magic)); + EXPECT_EQ("00", StringRef(Hdr.Version, 2)); + EXPECT_EQ("base/file", StringRef(Hdr.Name)); + EXPECT_EQ("00000000010", StringRef(Hdr.Size)); } TEST_F(TarWriterTest, LongFilename) { UstarHeader Hdr1 = create( "012345678", std::string(99, 'x') + "/" + std::string(44, 'x') + "/foo"); - ASSERT_EQ("foo", StringRef(Hdr1.Name)); - ASSERT_EQ("012345678/" + std::string(99, 'x') + "/" + std::string(44, 'x'), + EXPECT_EQ("foo", StringRef(Hdr1.Name)); + EXPECT_EQ("012345678/" + std::string(99, 'x') + "/" + std::string(44, 'x'), StringRef(Hdr1.Prefix)); UstarHeader Hdr2 = create( "012345678", std::string(99, 'x') + "/" + std::string(45, 'x') + "/foo"); - ASSERT_EQ("foo", StringRef(Hdr2.Name)); - ASSERT_EQ("012345678/" + std::string(99, 'x') + "/" + std::string(45, 'x'), + EXPECT_EQ("foo", StringRef(Hdr2.Name)); + EXPECT_EQ("012345678/" + std::string(99, 'x') + "/" + std::string(45, 'x'), StringRef(Hdr2.Prefix)); UstarHeader Hdr3 = create( "012345678", std::string(99, 'x') + "/" + std::string(46, 'x') + "/foo"); - ASSERT_EQ(std::string(46, 'x') + "/foo", StringRef(Hdr3.Name)); - ASSERT_EQ("012345678/" + std::string(99, 'x'), StringRef(Hdr3.Prefix)); + EXPECT_EQ(std::string(46, 'x') + "/foo", StringRef(Hdr3.Name)); + EXPECT_EQ("012345678/" + std::string(99, 'x'), StringRef(Hdr3.Prefix)); } } -- 2.50.1