111 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// WARNING: This test was generated by generate_feature_test_macro_components.py10// and should not be edited manually.11 12// <chrono>13 14// Test the feature test macros defined by <chrono>15 16// clang-format off17 18#include <chrono>19#include "test_macros.h"20 21#if TEST_STD_VER < 1422 23# ifdef __cpp_lib_chrono24# error "__cpp_lib_chrono should not be defined before c++17"25# endif26 27# ifdef __cpp_lib_chrono_udls28# error "__cpp_lib_chrono_udls should not be defined before c++14"29# endif30 31#elif TEST_STD_VER == 1432 33# ifdef __cpp_lib_chrono34# error "__cpp_lib_chrono should not be defined before c++17"35# endif36 37# ifndef __cpp_lib_chrono_udls38# error "__cpp_lib_chrono_udls should be defined in c++14"39# endif40# if __cpp_lib_chrono_udls != 201304L41# error "__cpp_lib_chrono_udls should have the value 201304L in c++14"42# endif43 44#elif TEST_STD_VER == 1745 46# ifndef __cpp_lib_chrono47# error "__cpp_lib_chrono should be defined in c++17"48# endif49# if __cpp_lib_chrono != 201611L50# error "__cpp_lib_chrono should have the value 201611L in c++17"51# endif52 53# ifndef __cpp_lib_chrono_udls54# error "__cpp_lib_chrono_udls should be defined in c++17"55# endif56# if __cpp_lib_chrono_udls != 201304L57# error "__cpp_lib_chrono_udls should have the value 201304L in c++17"58# endif59 60#elif TEST_STD_VER == 2061 62# ifndef __cpp_lib_chrono63# error "__cpp_lib_chrono should be defined in c++20"64# endif65# if __cpp_lib_chrono != 201611L66# error "__cpp_lib_chrono should have the value 201611L in c++20"67# endif68 69# ifndef __cpp_lib_chrono_udls70# error "__cpp_lib_chrono_udls should be defined in c++20"71# endif72# if __cpp_lib_chrono_udls != 201304L73# error "__cpp_lib_chrono_udls should have the value 201304L in c++20"74# endif75 76#elif TEST_STD_VER == 2377 78# ifndef __cpp_lib_chrono79# error "__cpp_lib_chrono should be defined in c++23"80# endif81# if __cpp_lib_chrono != 201611L82# error "__cpp_lib_chrono should have the value 201611L in c++23"83# endif84 85# ifndef __cpp_lib_chrono_udls86# error "__cpp_lib_chrono_udls should be defined in c++23"87# endif88# if __cpp_lib_chrono_udls != 201304L89# error "__cpp_lib_chrono_udls should have the value 201304L in c++23"90# endif91 92#elif TEST_STD_VER > 2393 94# ifndef __cpp_lib_chrono95# error "__cpp_lib_chrono should be defined in c++26"96# endif97# if __cpp_lib_chrono != 201611L98# error "__cpp_lib_chrono should have the value 201611L in c++26"99# endif100 101# ifndef __cpp_lib_chrono_udls102# error "__cpp_lib_chrono_udls should be defined in c++26"103# endif104# if __cpp_lib_chrono_udls != 201304L105# error "__cpp_lib_chrono_udls should have the value 201304L in c++26"106# endif107 108#endif // TEST_STD_VER > 23109 110// clang-format on111