Skip to content

Commit 1afa959

Browse files
committed
[NFC][libc++][test] Minor updates to generated header version test.
Adjusting the existing script to match the new output makes it easy to review the new script works correctly. This adjusts the tests to match the changes in the new tests, Notably - removes the synopsis uses 2 spaces indent in `# if` It does not implement the conditional include part. This would be quite some effort and these diffs are easy to review manually. Note there are no tests for the changes; the existing script will be phased out when the next generators are complete.
1 parent 00cf2e7 commit 1afa959

File tree

76 files changed

+18289
-18857
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+18289
-18857
lines changed

libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp

+404-418
Large diffs are not rendered by default.

libcxx/test/std/language.support/support.limits/support.limits.general/any.version.compile.pass.cpp

+36-37
Original file line numberDiff line numberDiff line change
@@ -5,70 +5,69 @@
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
//
9-
// WARNING: This test was generated by generate_feature_test_macro_components.py
8+
9+
// WARNING: This test was generated by
10+
// generate_feature_test_macro_components.py
1011
// and should not be edited manually.
11-
//
12-
// clang-format off
1312

1413
// <any>
1514

1615
// Test the feature test macros defined by <any>
1716

18-
/* Constant Value
19-
__cpp_lib_any 201606L [C++17]
20-
*/
17+
// clang-format off
2118

2219
#include <any>
2320
#include "test_macros.h"
2421

2522
#if TEST_STD_VER < 14
2623

27-
# ifdef __cpp_lib_any
28-
# error "__cpp_lib_any should not be defined before c++17"
29-
# endif
24+
# ifdef __cpp_lib_any
25+
# error "__cpp_lib_any should not be defined before c++17"
26+
# endif
3027

3128
#elif TEST_STD_VER == 14
3229

33-
# ifdef __cpp_lib_any
34-
# error "__cpp_lib_any should not be defined before c++17"
35-
# endif
30+
# ifdef __cpp_lib_any
31+
# error "__cpp_lib_any should not be defined before c++17"
32+
# endif
3633

3734
#elif TEST_STD_VER == 17
3835

39-
# ifndef __cpp_lib_any
40-
# error "__cpp_lib_any should be defined in c++17"
41-
# endif
42-
# if __cpp_lib_any != 201606L
43-
# error "__cpp_lib_any should have the value 201606L in c++17"
44-
# endif
36+
# ifndef __cpp_lib_any
37+
# error "__cpp_lib_any should be defined in c++17"
38+
# endif
39+
# if __cpp_lib_any != 201606L
40+
# error "__cpp_lib_any should have the value 201606L in c++17"
41+
# endif
4542

4643
#elif TEST_STD_VER == 20
4744

48-
# ifndef __cpp_lib_any
49-
# error "__cpp_lib_any should be defined in c++20"
50-
# endif
51-
# if __cpp_lib_any != 201606L
52-
# error "__cpp_lib_any should have the value 201606L in c++20"
53-
# endif
45+
# ifndef __cpp_lib_any
46+
# error "__cpp_lib_any should be defined in c++20"
47+
# endif
48+
# if __cpp_lib_any != 201606L
49+
# error "__cpp_lib_any should have the value 201606L in c++20"
50+
# endif
5451

5552
#elif TEST_STD_VER == 23
5653

57-
# ifndef __cpp_lib_any
58-
# error "__cpp_lib_any should be defined in c++23"
59-
# endif
60-
# if __cpp_lib_any != 201606L
61-
# error "__cpp_lib_any should have the value 201606L in c++23"
62-
# endif
54+
# ifndef __cpp_lib_any
55+
# error "__cpp_lib_any should be defined in c++23"
56+
# endif
57+
# if __cpp_lib_any != 201606L
58+
# error "__cpp_lib_any should have the value 201606L in c++23"
59+
# endif
6360

6461
#elif TEST_STD_VER > 23
6562

66-
# ifndef __cpp_lib_any
67-
# error "__cpp_lib_any should be defined in c++26"
68-
# endif
69-
# if __cpp_lib_any != 201606L
70-
# error "__cpp_lib_any should have the value 201606L in c++26"
71-
# endif
63+
# ifndef __cpp_lib_any
64+
# error "__cpp_lib_any should be defined in c++26"
65+
# endif
66+
# if __cpp_lib_any != 201606L
67+
# error "__cpp_lib_any should have the value 201606L in c++26"
68+
# endif
7269

7370
#endif // TEST_STD_VER > 23
7471

72+
// clang-format on
73+

0 commit comments

Comments
 (0)