@@ -24,7 +24,7 @@ int tests_global_term(void)
return 0;
}
-static void test_odp_init_global(void)
+static void init_test_odp_init_global(void)
{
int status;
@@ -35,13 +35,13 @@ static void test_odp_init_global(void)
CU_ASSERT(status == 0);
}
-static CU_TestInfo test_odp_init[] = {
- {"test_odp_init_global", test_odp_init_global},
+static CU_TestInfo init_suite_ok[] = {
+ {"test_odp_init_global", init_test_odp_init_global},
CU_TEST_INFO_NULL,
};
static CU_SuiteInfo init_suites_ok[] = {
- {"Init", NULL, NULL, NULL, NULL, test_odp_init},
+ {"Init", NULL, NULL, NULL, NULL, init_suite_ok},
CU_SUITE_INFO_NULL,
};
@@ -25,7 +25,7 @@ int tests_global_term(void)
static void odp_init_abort(void) ODP_NORETURN;
-static void test_odp_init_global_replace_abort(void)
+static void init_test_odp_init_global_replace_abort(void)
{
int status;
struct odp_init_t init_data;
@@ -40,13 +40,13 @@ static void test_odp_init_global_replace_abort(void)
CU_ASSERT(status == 0);
}
-static CU_TestInfo test_odp_init[] = {
- {"replace abort", test_odp_init_global_replace_abort},
+static CU_TestInfo init_suite_abort[] = {
+ {"replace abort", init_test_odp_init_global_replace_abort},
CU_TEST_INFO_NULL,
};
static CU_SuiteInfo init_suites_abort[] = {
- {"Init", NULL, NULL, NULL, NULL, test_odp_init},
+ {"Init", NULL, NULL, NULL, NULL, init_suite_abort},
CU_SUITE_INFO_NULL,
};
@@ -26,7 +26,7 @@ int tests_global_term(void)
ODP_PRINTF_FORMAT(2, 3)
static int odp_init_log(odp_log_level_e level, const char *fmt, ...);
-static void test_odp_init_global_replace_log(void)
+static void init_test_odp_init_global_replace_log(void)
{
int status;
struct odp_init_t init_data;
@@ -45,13 +45,13 @@ static void test_odp_init_global_replace_log(void)
CU_ASSERT(status == 0);
}
-static CU_TestInfo test_odp_init[] = {
- {"replace log", test_odp_init_global_replace_log},
+static CU_TestInfo init_suite_log[] = {
+ {"replace log", init_test_odp_init_global_replace_log},
CU_TEST_INFO_NULL,
};
static CU_SuiteInfo init_suites_log[] = {
- {"Init", NULL, NULL, NULL, NULL, test_odp_init},
+ {"Init", NULL, NULL, NULL, NULL, init_suite_log},
CU_SUITE_INFO_NULL,
};
Renaming of things which may be, one day, exported in a lib. This renaming is important, as it creates consistency between test symbols, which is needed if things get eventually exported in the lib. Also, tests are often created from other tests: Fixing the first exemples will help geting future tests better. Things that are candidate to be exported in the lib in the future have been named as follows: -Tests, i.e. functions which are used in CUNIT testsuites are named: <Module>_test_* -Test arrays, i.e. arrays of CU_TestInfo, listing the test functions belonging to a suite, are called: <Module>_suite[_*] where the possible suffix can be used if many suites are declared. -CUNIT suite init and termination functions are called: <Module>_suite[_*]_init() and <Module>_suite[_*]_term() respectively. -Suite arrays, i.e. arrays of CU_SuiteInfo used in executables are called: <Module>_suites[_*] where the possible suffix identifies the executable using it, if many. -Main function(s), are called: <Module>_main[_*] where the possible suffix identifies the executable using it Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- test/validation/init/odp_init.c | 8 ++++---- test/validation/init/odp_init_abort.c | 8 ++++---- test/validation/init/odp_init_log.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-)