mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-10-08 11:44:05 +00:00
[libc++] Move all the remaining .fail.cpp tests to .verify.cpp
I made sure they all had some expected-error output in them. Many of these tests would be better implemented as a positive test using SFINAE, but this is beyond the scope of this patch. Differential Revision: https://reviews.llvm.org/D153980
This commit is contained in:
parent
60a6a0d17a
commit
b82dcb624e
@ -17,22 +17,15 @@
|
||||
// UNSUPPORTED: stdlib=libstdc++
|
||||
|
||||
#include <utility>
|
||||
#include <type_traits>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
typedef std::make_integer_sequence<int, -3> MakeSeqT;
|
||||
typedef std::make_integer_sequence<int, -3> MakeSeqT;
|
||||
|
||||
// std::make_integer_sequence is implemented using a compiler builtin if available.
|
||||
// this builtin has different diagnostic messages than the fallback implementation.
|
||||
#if TEST_HAS_BUILTIN(__make_integer_seq) && !defined(_LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
|
||||
MakeSeqT i; // expected-error@*:* {{integer sequences must have non-negative sequence length}}
|
||||
// std::make_integer_sequence is implemented using a compiler builtin if available.
|
||||
// this builtin has different diagnostic messages than the fallback implementation.
|
||||
#if TEST_HAS_BUILTIN(__make_integer_seq)
|
||||
MakeSeqT i; // expected-error@*:* {{integer sequences must have non-negative sequence length}}
|
||||
#else
|
||||
MakeSeqT i; // expected-error-re@*:* {{{{(static_assert|static assertion)}} failed{{.*}}std::make_integer_sequence must have a non-negative sequence length}}
|
||||
MakeSeqT i; // expected-error-re@*:* {{{{(static_assert|static assertion)}} failed{{.*}}std::make_integer_sequence must have a non-negative sequence length}}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
@ -16,5 +16,9 @@
|
||||
// This test hangs during recursive template instantiation with libstdc++
|
||||
// UNSUPPORTED: stdlib=libstdc++
|
||||
|
||||
#define _LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE
|
||||
#include "make_integer_seq.fail.cpp"
|
||||
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE
|
||||
|
||||
#include <utility>
|
||||
|
||||
typedef std::make_integer_sequence<int, -3> MakeSeqT;
|
||||
MakeSeqT i; // expected-error-re@*:* {{{{(static_assert|static assertion)}} failed{{.*}}std::make_integer_sequence must have a non-negative sequence length}}
|
Loading…
Reference in New Issue
Block a user