1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
12 #include <type_traits>
14 #include "test_macros.h"
17 #error NULL not defined
20 #ifndef CLOCKS_PER_SEC
21 #error CLOCKS_PER_SEC not defined
26 clock_t c
= 0; ((void)c
);
30 static_assert((std::is_same
<decltype(clock()), clock_t>::value
), "");
31 static_assert((std::is_same
<decltype(difftime(t
,t
)), double>::value
), "");
32 static_assert((std::is_same
<decltype(mktime(&tmv
)), time_t>::value
), "");
33 static_assert((std::is_same
<decltype(time(&t
)), time_t>::value
), "");
34 static_assert((std::is_same
<decltype(asctime(&tmv
)), char*>::value
), "");
35 static_assert((std::is_same
<decltype(ctime(&t
)), char*>::value
), "");
36 static_assert((std::is_same
<decltype(gmtime(&t
)), tm
*>::value
), "");
37 static_assert((std::is_same
<decltype(localtime(&t
)), tm
*>::value
), "");
40 static_assert((std::is_same
<decltype(strftime(c1
,s
,c2
,&tmv
)), size_t>::value
), "");