diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-07-20 16:38:12 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-07-20 16:38:12 +0000 |
commit | 3eae1b3b4b6916bbd30c8c41c4516ab11b30c2e7 (patch) | |
tree | e2c653c78e6ffe0bcbfbf4cbdd32bb20e49c6188 /llvm/unittests/Support/Casting.cpp | |
parent | 191f2e4dbdb23469a5bc44e572df620150f92fe3 (diff) | |
download | llvm-3eae1b3b4b6916bbd30c8c41c4516ab11b30c2e7.zip llvm-3eae1b3b4b6916bbd30c8c41c4516ab11b30c2e7.tar.gz llvm-3eae1b3b4b6916bbd30c8c41c4516ab11b30c2e7.tar.bz2 |
isa<> tests
llvm-svn: 108851
Diffstat (limited to 'llvm/unittests/Support/Casting.cpp')
-rw-r--r-- | llvm/unittests/Support/Casting.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/unittests/Support/Casting.cpp b/llvm/unittests/Support/Casting.cpp index d7e89f8..3a3af7e 100644 --- a/llvm/unittests/Support/Casting.cpp +++ b/llvm/unittests/Support/Casting.cpp @@ -22,8 +22,14 @@ namespace { extern bar &B1; extern const bar *B2; -TEST(CastingTest, Basics) { +TEST(CastingTest, isa) { + // test various configurations of const + const bar &B3 = B1; + const bar *const B4 = B2; EXPECT_TRUE(isa<foo>(B1)); + EXPECT_TRUE(isa<foo>(B2)); + EXPECT_TRUE(isa<foo>(B3)); + EXPECT_TRUE(isa<foo>(B4)); } bar B; |