From a7b60528b9735a58440114cc3817bf958e24aca5 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 3 Feb 2016 16:52:25 +0000 Subject: [PATCH] Eo tests: Add tests for eo_init()/shutdown() cycles. We needed to fix the issue and remove a workaround in the test suite before we could add these tests. Now they are here and they test that init/shutdown cycles work as expected. --- src/tests/eo/suite/eo_test_init.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/tests/eo/suite/eo_test_init.c b/src/tests/eo/suite/eo_test_init.c index de4c55d4a5..daccf7e0f1 100644 --- a/src/tests/eo/suite/eo_test_init.c +++ b/src/tests/eo/suite/eo_test_init.c @@ -16,7 +16,20 @@ START_TEST(eo_simple) } END_TEST +START_TEST(eo_init_shutdown) +{ + fail_if(!eo_init()); + ck_assert_str_eq("Eo_Base", eo_class_name_get(EO_BASE_CLASS)); + fail_if(eo_shutdown()); + + fail_if(!eo_init()); + ck_assert_str_eq("Eo_Base", eo_class_name_get(EO_BASE_CLASS)); + fail_if(eo_shutdown()); +} +END_TEST + void eo_test_init(TCase *tc) { tcase_add_test(tc, eo_simple); + tcase_add_test(tc, eo_init_shutdown); }