diff options
Diffstat (limited to 'unittests/Support/Casting.cpp')
-rw-r--r-- | unittests/Support/Casting.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/unittests/Support/Casting.cpp b/unittests/Support/Casting.cpp index 0445178895..228c90bb8b 100644 --- a/unittests/Support/Casting.cpp +++ b/unittests/Support/Casting.cpp @@ -77,12 +77,16 @@ using namespace llvm; // Test the peculiar behavior of Use in simplify_type. -int Check1[is_same<simplify_type<Use>::SimpleType, Value *>::value ? 1 : -1]; -int Check2[is_same<simplify_type<Use *>::SimpleType, Value *>::value ? 1 : -1]; +static_assert(std::is_same<simplify_type<Use>::SimpleType, Value *>::value, + "Use doesn't simplify correctly!"); +static_assert(std::is_same<simplify_type<Use *>::SimpleType, Value *>::value, + "Use doesn't simplify correctly!"); // Test that a regular class behaves as expected. -int Check3[is_same<simplify_type<foo>::SimpleType, int>::value ? 1 : -1]; -int Check4[is_same<simplify_type<foo *>::SimpleType, foo *>::value ? 1 : -1]; +static_assert(std::is_same<simplify_type<foo>::SimpleType, int>::value, + "Unexpected simplify_type result!"); +static_assert(std::is_same<simplify_type<foo *>::SimpleType, foo *>::value, + "Unexpected simplify_type result!"); namespace { |