mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Use EXPECT_EQ instead of ASSERT_EQ in a unit test.
llvm-svn: 291713
This commit is contained in:
parent
39c0008ba2
commit
635a70fbaf
@ -61,28 +61,28 @@ static UstarHeader create(StringRef Base, StringRef Filename) {
|
|||||||
|
|
||||||
TEST_F(TarWriterTest, Basics) {
|
TEST_F(TarWriterTest, Basics) {
|
||||||
UstarHeader Hdr = create("base", "file");
|
UstarHeader Hdr = create("base", "file");
|
||||||
ASSERT_EQ("ustar", StringRef(Hdr.Magic));
|
EXPECT_EQ("ustar", StringRef(Hdr.Magic));
|
||||||
ASSERT_EQ("00", StringRef(Hdr.Version, 2));
|
EXPECT_EQ("00", StringRef(Hdr.Version, 2));
|
||||||
ASSERT_EQ("base/file", StringRef(Hdr.Name));
|
EXPECT_EQ("base/file", StringRef(Hdr.Name));
|
||||||
ASSERT_EQ("00000000010", StringRef(Hdr.Size));
|
EXPECT_EQ("00000000010", StringRef(Hdr.Size));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(TarWriterTest, LongFilename) {
|
TEST_F(TarWriterTest, LongFilename) {
|
||||||
UstarHeader Hdr1 = create(
|
UstarHeader Hdr1 = create(
|
||||||
"012345678", std::string(99, 'x') + "/" + std::string(44, 'x') + "/foo");
|
"012345678", std::string(99, 'x') + "/" + std::string(44, 'x') + "/foo");
|
||||||
ASSERT_EQ("foo", StringRef(Hdr1.Name));
|
EXPECT_EQ("foo", StringRef(Hdr1.Name));
|
||||||
ASSERT_EQ("012345678/" + std::string(99, 'x') + "/" + std::string(44, 'x'),
|
EXPECT_EQ("012345678/" + std::string(99, 'x') + "/" + std::string(44, 'x'),
|
||||||
StringRef(Hdr1.Prefix));
|
StringRef(Hdr1.Prefix));
|
||||||
|
|
||||||
UstarHeader Hdr2 = create(
|
UstarHeader Hdr2 = create(
|
||||||
"012345678", std::string(99, 'x') + "/" + std::string(45, 'x') + "/foo");
|
"012345678", std::string(99, 'x') + "/" + std::string(45, 'x') + "/foo");
|
||||||
ASSERT_EQ("foo", StringRef(Hdr2.Name));
|
EXPECT_EQ("foo", StringRef(Hdr2.Name));
|
||||||
ASSERT_EQ("012345678/" + std::string(99, 'x') + "/" + std::string(45, 'x'),
|
EXPECT_EQ("012345678/" + std::string(99, 'x') + "/" + std::string(45, 'x'),
|
||||||
StringRef(Hdr2.Prefix));
|
StringRef(Hdr2.Prefix));
|
||||||
|
|
||||||
UstarHeader Hdr3 = create(
|
UstarHeader Hdr3 = create(
|
||||||
"012345678", std::string(99, 'x') + "/" + std::string(46, 'x') + "/foo");
|
"012345678", std::string(99, 'x') + "/" + std::string(46, 'x') + "/foo");
|
||||||
ASSERT_EQ(std::string(46, 'x') + "/foo", StringRef(Hdr3.Name));
|
EXPECT_EQ(std::string(46, 'x') + "/foo", StringRef(Hdr3.Name));
|
||||||
ASSERT_EQ("012345678/" + std::string(99, 'x'), StringRef(Hdr3.Prefix));
|
EXPECT_EQ("012345678/" + std::string(99, 'x'), StringRef(Hdr3.Prefix));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user