summaryrefslogtreecommitdiff
path: root/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/ASTMatchers/ASTMatchersTraversalTest.cpp')
-rw-r--r--unittests/ASTMatchers/ASTMatchersTraversalTest.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp b/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
index 67a4a3b2fc09..5957c7fa41da 100644
--- a/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
+++ b/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
@@ -222,9 +222,12 @@ TEST(HasDeclaration, HasDeclarationOfEnumType) {
}
TEST(HasDeclaration, HasGetDeclTraitTest) {
- EXPECT_TRUE(internal::has_getDecl<TypedefType>::value);
- EXPECT_TRUE(internal::has_getDecl<RecordType>::value);
- EXPECT_FALSE(internal::has_getDecl<TemplateSpecializationType>::value);
+ static_assert(internal::has_getDecl<TypedefType>::value,
+ "Expected TypedefType to have a getDecl.");
+ static_assert(internal::has_getDecl<RecordType>::value,
+ "Expected RecordType to have a getDecl.");
+ static_assert(!internal::has_getDecl<TemplateSpecializationType>::value,
+ "Expected TemplateSpecializationType to *not* have a getDecl.");
}
TEST(HasDeclaration, HasDeclarationOfTypeWithDecl) {