Skip to content

Commit 5d8b788

Browse files
Add generated 'stacktrace.version.compile.pass.cpp' test
1 parent 614d654 commit 5d8b788

File tree

1 file changed

+120
-0
lines changed

1 file changed

+120
-0
lines changed
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
// WARNING: This test was generated by generate_feature_test_macro_components.py
10+
// and should not be edited manually.
11+
12+
// <stacktrace>
13+
14+
// Test the feature test macros defined by <stacktrace>
15+
16+
// clang-format off
17+
18+
#include <stacktrace>
19+
#include "test_macros.h"
20+
21+
#if TEST_STD_VER < 14
22+
23+
# ifdef __cpp_lib_formatters
24+
# error "__cpp_lib_formatters should not be defined before c++23"
25+
# endif
26+
27+
# ifdef __cpp_lib_stacktrace
28+
# error "__cpp_lib_stacktrace should not be defined before c++23"
29+
# endif
30+
31+
#elif TEST_STD_VER == 14
32+
33+
# ifdef __cpp_lib_formatters
34+
# error "__cpp_lib_formatters should not be defined before c++23"
35+
# endif
36+
37+
# ifdef __cpp_lib_stacktrace
38+
# error "__cpp_lib_stacktrace should not be defined before c++23"
39+
# endif
40+
41+
#elif TEST_STD_VER == 17
42+
43+
# ifdef __cpp_lib_formatters
44+
# error "__cpp_lib_formatters should not be defined before c++23"
45+
# endif
46+
47+
# ifdef __cpp_lib_stacktrace
48+
# error "__cpp_lib_stacktrace should not be defined before c++23"
49+
# endif
50+
51+
#elif TEST_STD_VER == 20
52+
53+
# ifdef __cpp_lib_formatters
54+
# error "__cpp_lib_formatters should not be defined before c++23"
55+
# endif
56+
57+
# ifdef __cpp_lib_stacktrace
58+
# error "__cpp_lib_stacktrace should not be defined before c++23"
59+
# endif
60+
61+
#elif TEST_STD_VER == 23
62+
63+
# if !defined(_LIBCPP_VERSION)
64+
# ifndef __cpp_lib_formatters
65+
# error "__cpp_lib_formatters should be defined in c++23"
66+
# endif
67+
# if __cpp_lib_formatters != 202302L
68+
# error "__cpp_lib_formatters should have the value 202302L in c++23"
69+
# endif
70+
# else
71+
# ifdef __cpp_lib_formatters
72+
# error "__cpp_lib_formatters should not be defined because it is unimplemented in libc++!"
73+
# endif
74+
# endif
75+
76+
# if !defined(_LIBCPP_VERSION)
77+
# ifndef __cpp_lib_stacktrace
78+
# error "__cpp_lib_stacktrace should be defined in c++23"
79+
# endif
80+
# if __cpp_lib_stacktrace != 202011L
81+
# error "__cpp_lib_stacktrace should have the value 202011L in c++23"
82+
# endif
83+
# else
84+
# ifdef __cpp_lib_stacktrace
85+
# error "__cpp_lib_stacktrace should not be defined because it is unimplemented in libc++!"
86+
# endif
87+
# endif
88+
89+
#elif TEST_STD_VER > 23
90+
91+
# if !defined(_LIBCPP_VERSION)
92+
# ifndef __cpp_lib_formatters
93+
# error "__cpp_lib_formatters should be defined in c++26"
94+
# endif
95+
# if __cpp_lib_formatters != 202302L
96+
# error "__cpp_lib_formatters should have the value 202302L in c++26"
97+
# endif
98+
# else
99+
# ifdef __cpp_lib_formatters
100+
# error "__cpp_lib_formatters should not be defined because it is unimplemented in libc++!"
101+
# endif
102+
# endif
103+
104+
# if !defined(_LIBCPP_VERSION)
105+
# ifndef __cpp_lib_stacktrace
106+
# error "__cpp_lib_stacktrace should be defined in c++26"
107+
# endif
108+
# if __cpp_lib_stacktrace != 202011L
109+
# error "__cpp_lib_stacktrace should have the value 202011L in c++26"
110+
# endif
111+
# else
112+
# ifdef __cpp_lib_stacktrace
113+
# error "__cpp_lib_stacktrace should not be defined because it is unimplemented in libc++!"
114+
# endif
115+
# endif
116+
117+
#endif // TEST_STD_VER > 23
118+
119+
// clang-format on
120+

0 commit comments

Comments
 (0)