diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-07-22 15:28:30 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-07-22 15:28:30 +0000 |
commit | 46a35015f5268bf72150eb1b1517337e245e38e5 (patch) | |
tree | fb300d0673c5c4ef782929d1fe167ecbe6f2a0f4 | |
parent | d159467ad66b21172d6d88a9f8e496c5b6c2ba4e (diff) |
tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109110 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | unittests/Support/Casting.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/unittests/Support/Casting.cpp b/unittests/Support/Casting.cpp index 962215c8f2..678dec42f2 100644 --- a/unittests/Support/Casting.cpp +++ b/unittests/Support/Casting.cpp @@ -109,20 +109,16 @@ TEST(CastingTest, cast_or_null) { } TEST(CastingTest, dyn_cast) { - // foo &F1 = dyn_cast<foo>(B1); - // EXPECT_NE(&F1, null_foo); - const foo *F3 = dyn_cast<foo>(B2); + const foo *F1 = dyn_cast<foo>(B2); + EXPECT_NE(F1, null_foo); + const foo *F2 = dyn_cast<foo>(B2); + EXPECT_NE(F2, null_foo); + const foo *F3 = dyn_cast<foo>(B4); EXPECT_NE(F3, null_foo); - const foo *F4 = dyn_cast<foo>(B2); - EXPECT_NE(F4, null_foo); - // const foo &F5 = dyn_cast<foo>(B3); - // EXPECT_NE(&F5, null_foo); - const foo *F6 = dyn_cast<foo>(B4); - EXPECT_NE(F6, null_foo); - foo *F7 = dyn_cast<foo>(fub()); - EXPECT_EQ(F7, null_foo); - // foo *F8 = B1.daz(); - // EXPECT_NE(F8, null_foo); + foo *F4 = dyn_cast<foo>(fub()); + EXPECT_EQ(F4, null_foo); + // foo *F5 = B1.daz(); + // EXPECT_NE(F5, null_foo); } // These lines are errors... |