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 //===----------------------------------------------------------------------===//
13 #include "test_macros.h"
16 #error NULL not defined
19 #ifndef CLOCKS_PER_SEC
20 #error CLOCKS_PER_SEC not defined
29 ASSERT_SAME_TYPE(clock_t, decltype(clock()));
30 ASSERT_SAME_TYPE(double, decltype(difftime(t
, t
)));
31 ASSERT_SAME_TYPE(time_t, decltype(mktime(&tmv
)));
32 ASSERT_SAME_TYPE(time_t, decltype(time(&t
)));
33 ASSERT_SAME_TYPE(char*, decltype(asctime(&tmv
)));
34 ASSERT_SAME_TYPE(char*, decltype(ctime(&t
)));
35 ASSERT_SAME_TYPE(tm
*, decltype(gmtime(&t
)));
36 ASSERT_SAME_TYPE(tm
*, decltype(localtime(&t
)));
37 ASSERT_SAME_TYPE(size_t, decltype(strftime(c1
, s
, c2
, &tmv
)));