Skip to content

Commit 6de1537

Browse files
authored
[NFC][libc++][test] Minor updates to generated header version test. (#134543)
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 2b270df commit 6de1537

File tree

76 files changed

+18089
-18733
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

+18089
-18733
lines changed

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

Lines changed: 402 additions & 417 deletions
Large diffs are not rendered by default.

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

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,70 +5,68 @@
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
//
8+
99
// WARNING: This test was generated by generate_feature_test_macro_components.py
1010
// and should not be edited manually.
11-
//
12-
// clang-format off
1311

1412
// <any>
1513

1614
// Test the feature test macros defined by <any>
1715

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

2218
#include <any>
2319
#include "test_macros.h"
2420

2521
#if TEST_STD_VER < 14
2622

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

3127
#elif TEST_STD_VER == 14
3228

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

3733
#elif TEST_STD_VER == 17
3834

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
35+
# ifndef __cpp_lib_any
36+
# error "__cpp_lib_any should be defined in c++17"
37+
# endif
38+
# if __cpp_lib_any != 201606L
39+
# error "__cpp_lib_any should have the value 201606L in c++17"
40+
# endif
4541

4642
#elif TEST_STD_VER == 20
4743

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
44+
# ifndef __cpp_lib_any
45+
# error "__cpp_lib_any should be defined in c++20"
46+
# endif
47+
# if __cpp_lib_any != 201606L
48+
# error "__cpp_lib_any should have the value 201606L in c++20"
49+
# endif
5450

5551
#elif TEST_STD_VER == 23
5652

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
53+
# ifndef __cpp_lib_any
54+
# error "__cpp_lib_any should be defined in c++23"
55+
# endif
56+
# if __cpp_lib_any != 201606L
57+
# error "__cpp_lib_any should have the value 201606L in c++23"
58+
# endif
6359

6460
#elif TEST_STD_VER > 23
6561

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
62+
# ifndef __cpp_lib_any
63+
# error "__cpp_lib_any should be defined in c++26"
64+
# endif
65+
# if __cpp_lib_any != 201606L
66+
# error "__cpp_lib_any should have the value 201606L in c++26"
67+
# endif
7268

7369
#endif // TEST_STD_VER > 23
7470

71+
// clang-format on
72+

0 commit comments

Comments
 (0)