summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-07-20 16:38:12 +0000
committerGabor Greif <ggreif@gmail.com>2010-07-20 16:38:12 +0000
commitaf8e2ef649b90e88f9d595a638279e3bc4892845 (patch)
treebebb1fa27cb098ab936801608a3e0c5d8304e397 /unittests
parentb7391fadfff3a3d2a0883fac3f7ba09def086b94 (diff)
downloadllvm-af8e2ef649b90e88f9d595a638279e3bc4892845.tar.gz
llvm-af8e2ef649b90e88f9d595a638279e3bc4892845.tar.bz2
llvm-af8e2ef649b90e88f9d595a638279e3bc4892845.tar.xz
isa<> tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108851 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Support/Casting.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/unittests/Support/Casting.cpp b/unittests/Support/Casting.cpp
index d7e89f802b..3a3af7e046 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;