mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-02 08:26:29 +00:00
Don't pass a null pointer to cast<> in its unit tests.
llvm-svn: 162310
This commit is contained in:
parent
a2d387ae5e
commit
2735d2748d
@ -95,8 +95,9 @@ TEST(CastingTest, cast) {
|
||||
EXPECT_NE(&F5, null_foo);
|
||||
const foo *F6 = cast<foo>(B4);
|
||||
EXPECT_NE(F6, null_foo);
|
||||
foo *F7 = cast<foo>(fub());
|
||||
EXPECT_EQ(F7, null_foo);
|
||||
// Can't pass null pointer to cast<>.
|
||||
// foo *F7 = cast<foo>(fub());
|
||||
// EXPECT_EQ(F7, null_foo);
|
||||
foo *F8 = B1.baz();
|
||||
EXPECT_NE(F8, null_foo);
|
||||
}
|
||||
@ -121,7 +122,8 @@ TEST(CastingTest, dyn_cast) {
|
||||
EXPECT_NE(F2, null_foo);
|
||||
const foo *F3 = dyn_cast<foo>(B4);
|
||||
EXPECT_NE(F3, null_foo);
|
||||
// foo *F4 = dyn_cast<foo>(fub()); // not permittible
|
||||
// Can't pass null pointer to dyn_cast<>.
|
||||
// foo *F4 = dyn_cast<foo>(fub());
|
||||
// EXPECT_EQ(F4, null_foo);
|
||||
foo *F5 = B1.daz();
|
||||
EXPECT_NE(F5, null_foo);
|
||||
|
Loading…
Reference in New Issue
Block a user