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 | af8e2ef649b90e88f9d595a638279e3bc4892845 (patch) | |
tree | bebb1fa27cb098ab936801608a3e0c5d8304e397 | |
parent | b7391fadfff3a3d2a0883fac3f7ba09def086b94 (diff) | |
download | external_llvm-af8e2ef649b90e88f9d595a638279e3bc4892845.zip external_llvm-af8e2ef649b90e88f9d595a638279e3bc4892845.tar.gz external_llvm-af8e2ef649b90e88f9d595a638279e3bc4892845.tar.bz2 |
isa<> tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108851 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | unittests/Support/Casting.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/unittests/Support/Casting.cpp b/unittests/Support/Casting.cpp index d7e89f8..3a3af7e 100644 --- a/unittests/Support/Casting.cpp +++ b/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; |