2019-07-02 00:00:07 +08:00
|
|
|
/*
|
2020-08-02 02:25:58 +08:00
|
|
|
* Copyright 2019-2020 Peter Bigot Consulting
|
2019-07-02 00:00:07 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef TIMEUTIL_TEST_H
|
|
|
|
#define TIMEUTIL_TEST_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <sys/timeutil.h>
|
|
|
|
|
|
|
|
struct timeutil_test_data {
|
2019-10-14 22:23:18 +08:00
|
|
|
time_t ux;
|
2019-07-02 00:00:07 +08:00
|
|
|
const char *civil;
|
|
|
|
struct tm tm;
|
|
|
|
};
|
|
|
|
|
|
|
|
void timeutil_check(const struct timeutil_test_data *tp,
|
|
|
|
size_t count);
|
|
|
|
|
|
|
|
void test_gmtime(void);
|
|
|
|
void test_s32(void);
|
|
|
|
void test_s64(void);
|
2020-08-02 02:25:58 +08:00
|
|
|
void test_sync(void);
|
2019-07-02 00:00:07 +08:00
|
|
|
|
|
|
|
#endif /* TIMEUTIL_TEST_H */
|