|
21 | 21 |
|
22 | 22 | class Test(unittest.TestCase):
|
23 | 23 | def setUp(self):
|
24 |
| - self.ftm = FeatureTestMacros(TEST_DATA) |
| 24 | + self.ftm = FeatureTestMacros(TEST_DATA, ["charconv"]) |
25 | 25 | self.maxDiff = None # This causes the diff to be printed when the test fails
|
26 | 26 |
|
27 | 27 | def test_implementation(self):
|
28 | 28 | expected = {
|
29 | 29 | "__cpp_lib_any": Metadata(
|
30 |
| - headers=["any"], test_suite_guard=None, libcxx_guard=None |
| 30 | + headers=["any"], |
| 31 | + available_since="c++17", |
| 32 | + test_suite_guard=None, |
| 33 | + libcxx_guard=None, |
31 | 34 | ),
|
32 | 35 | "__cpp_lib_barrier": Metadata(
|
33 | 36 | headers=["barrier"],
|
| 37 | + available_since="c++20", |
34 | 38 | test_suite_guard="!defined(_LIBCPP_VERSION) || (_LIBCPP_HAS_THREADS && _LIBCPP_AVAILABILITY_HAS_SYNC)",
|
35 | 39 | libcxx_guard="_LIBCPP_HAS_THREADS && _LIBCPP_AVAILABILITY_HAS_SYNC",
|
36 | 40 | ),
|
| 41 | + "__cpp_lib_clamp": Metadata( |
| 42 | + headers=["algorithm"], |
| 43 | + available_since="c++17", |
| 44 | + test_suite_guard=None, |
| 45 | + libcxx_guard=None, |
| 46 | + ), |
37 | 47 | "__cpp_lib_format": Metadata(
|
38 |
| - headers=["format"], test_suite_guard=None, libcxx_guard=None |
| 48 | + headers=["format"], |
| 49 | + available_since="c++20", |
| 50 | + test_suite_guard=None, |
| 51 | + libcxx_guard=None, |
39 | 52 | ),
|
40 | 53 | "__cpp_lib_parallel_algorithm": Metadata(
|
41 | 54 | headers=["algorithm", "numeric"],
|
| 55 | + available_since="c++17", |
| 56 | + test_suite_guard=None, |
| 57 | + libcxx_guard=None, |
| 58 | + ), |
| 59 | + "__cpp_lib_to_chars": Metadata( |
| 60 | + headers=["charconv"], |
| 61 | + available_since="c++17", |
42 | 62 | test_suite_guard=None,
|
43 | 63 | libcxx_guard=None,
|
44 | 64 | ),
|
45 | 65 | "__cpp_lib_variant": Metadata(
|
46 |
| - headers=["variant"], test_suite_guard=None, libcxx_guard=None |
| 66 | + headers=["variant"], |
| 67 | + available_since="c++17", |
| 68 | + test_suite_guard=None, |
| 69 | + libcxx_guard=None, |
47 | 70 | ),
|
48 |
| - "__cpp_lib_missing_FTM_in_older_standard": Metadata( |
49 |
| - headers=[], test_suite_guard=None, libcxx_guard=None |
| 71 | + "__cpp_lib_zz_missing_FTM_in_older_standard": Metadata( |
| 72 | + headers=[], |
| 73 | + available_since="c++17", |
| 74 | + test_suite_guard=None, |
| 75 | + libcxx_guard=None, |
50 | 76 | ),
|
51 | 77 | }
|
52 | 78 | self.assertEqual(self.ftm.ftm_metadata, expected)
|
|
0 commit comments