forked from OSchip/llvm-project
[gtest] The way EXPECT_TEST now works after upgrading gtest triggers an
ODR use. These traits don't have a definition as they're intended to be used strictly at compile time. Change the tests to use static_assert to move the entire thing into compile-time. llvm-svn: 291036
This commit is contained in:
parent
e2f2d1edef
commit
5b717f3439
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue