diff --git a/lib/cgo/tests/check_util.datetime.c b/lib/cgo/tests/check_util.datetime.c new file mode 100644 index 0000000..7309b2d --- /dev/null +++ b/lib/cgo/tests/check_util.datetime.c @@ -0,0 +1,32 @@ +#include +#include + +#include +#include +#include + +#include "fcassert.h" +#include "fcerrors.h" +#include "fcstring.h" +#include "fctest.h" +#include "libfibercrypto.h" + +START_TEST(TestParseDate) +{ + printf("Load TestParseDate \n"); + GoUint64_ some_date = 1577665665; + time_t datetime = time(some_date); + printf("The value is %d\n", datetime); +} +END_TEST + +Suite *check_util_datetime(void) +{ + Suite *s = suite_create("Load check_util_datetime"); + TCase *tc; + tc = tcase_create("check_util_datetime"); + tcase_add_checked_fixture(tc, setup, teardown); + tcase_add_test(tc, TestParseDate); + suite_add_tcase(s, tc); + return s; +} diff --git a/lib/cgo/tests/test_main.c b/lib/cgo/tests/test_main.c index 53b28ea..31410b3 100644 --- a/lib/cgo/tests/test_main.c +++ b/lib/cgo/tests/test_main.c @@ -1,9 +1,11 @@ #include "test_main.h" #include // run suite -int main(void) { +int main(void) +{ int number_failed = 0; SRunner *sr = srunner_create(check_util_cipher()); + srunner_add_suite(sr, check_util_datetime()); srunner_set_fork_status(sr, CK_NOFORK); srunner_run_all(sr, CK_VERBOSE); number_failed = srunner_ntests_failed(sr); diff --git a/lib/cgo/tests/test_main.h b/lib/cgo/tests/test_main.h index e7d1240..39065f1 100644 --- a/lib/cgo/tests/test_main.h +++ b/lib/cgo/tests/test_main.h @@ -11,5 +11,6 @@ #include Suite *check_util_cipher(void); +Suite *check_util_datetime(void); #endif \ No newline at end of file