From 881a092f9b69e1c91b341fd5c7fa583fd3984492 Mon Sep 17 00:00:00 2001 From: Maykel Arias Torres Date: Sat, 28 Mar 2020 19:03:16 -0400 Subject: [PATCH] [test] refs #5 Initial test util.coin --- lib/cgo/tests/check_util.coin.c | 28 ++++++++++++++++++++++++++++ lib/cgo/tests/check_util.datetime.c | 6 ++---- lib/cgo/tests/test_main.c | 4 ++-- lib/cgo/tests/test_main.h | 1 + 4 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 lib/cgo/tests/check_util.coin.c diff --git a/lib/cgo/tests/check_util.coin.c b/lib/cgo/tests/check_util.coin.c new file mode 100644 index 0000000..ab8b72e --- /dev/null +++ b/lib/cgo/tests/check_util.coin.c @@ -0,0 +1,28 @@ +#include +#include + +#include +#include +#include + +#include "fcassert.h" +#include "fcerrors.h" +#include "fcstring.h" +#include "fctest.h" +#include "libfibercrypto.h" + +START_TEST(TestNewGenericOutput) { + printf("Load TestNewGenericOutput \n"); + core__AltcoinMetadata fakeMeta; +} +END_TEST + +Suite *check_util_coin(void) { + Suite *s = suite_create("Load check_util_coin"); + TCase *tc; + tc = tcase_create("check_util_coin"); + tcase_add_checked_fixture(tc, setup, teardown); + tcase_add_test(tc, TestNewGenericOutput); + suite_add_tcase(s, tc); + return s; +} diff --git a/lib/cgo/tests/check_util.datetime.c b/lib/cgo/tests/check_util.datetime.c index 56decf1..b4a0c60 100644 --- a/lib/cgo/tests/check_util.datetime.c +++ b/lib/cgo/tests/check_util.datetime.c @@ -11,8 +11,7 @@ #include "fctest.h" #include "libfibercrypto.h" -START_TEST(TestParseDate) -{ +START_TEST(TestParseDate) { printf("Load TestParseDate \n"); GoUint64_ some_date = 1577665665; GoInt ny, nm, nd, nh, nmin, ns; @@ -22,8 +21,7 @@ START_TEST(TestParseDate) } END_TEST -Suite *check_util_datetime(void) -{ +Suite *check_util_datetime(void) { Suite *s = suite_create("Load check_util_datetime"); TCase *tc; tc = tcase_create("check_util_datetime"); diff --git a/lib/cgo/tests/test_main.c b/lib/cgo/tests/test_main.c index 31410b3..54b8b71 100644 --- a/lib/cgo/tests/test_main.c +++ b/lib/cgo/tests/test_main.c @@ -1,11 +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_add_suite(sr, check_util_coin()); 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 39065f1..6dfd72e 100644 --- a/lib/cgo/tests/test_main.h +++ b/lib/cgo/tests/test_main.h @@ -12,5 +12,6 @@ Suite *check_util_cipher(void); Suite *check_util_datetime(void); +Suite *check_util_coin(void); #endif \ No newline at end of file