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.mil...@linaro.org>
---
 test/validation/odp_thread.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/test/validation/odp_thread.c b/test/validation/odp_thread.c
index 96d624c..e08a284 100644
--- a/test/validation/odp_thread.c
+++ b/test/validation/odp_thread.c
@@ -10,33 +10,33 @@
 /* Helper macro for CU_TestInfo initialization */
 #define _CU_TEST_INFO(test_func) {#test_func, test_func}
 
-static void test_odp_cpu_id(void)
+static void thread_test_odp_cpu_id(void)
 {
        (void) odp_cpu_id();
        CU_PASS();
 }
 
-static void test_odp_thread_id(void)
+static void thread_test_odp_thread_id(void)
 {
        (void) odp_thread_id();
        CU_PASS();
 }
 
-static void test_odp_thread_count(void)
+static void thread_test_odp_thread_count(void)
 {
        (void) odp_thread_count();
        CU_PASS();
 }
 
-static CU_TestInfo test_odp_thread[] = {
-       _CU_TEST_INFO(test_odp_cpu_id),
-       _CU_TEST_INFO(test_odp_thread_id),
-       _CU_TEST_INFO(test_odp_thread_count),
+static CU_TestInfo thread_suite[] = {
+       _CU_TEST_INFO(thread_test_odp_cpu_id),
+       _CU_TEST_INFO(thread_test_odp_thread_id),
+       _CU_TEST_INFO(thread_test_odp_thread_count),
        CU_TEST_INFO_NULL,
 };
 
 static CU_SuiteInfo thread_suites[] = {
-       {"thread", NULL, NULL, NULL, NULL, test_odp_thread},
+       {"thread", NULL, NULL, NULL, NULL, thread_suite},
        CU_SUITE_INFO_NULL,
 };
 
-- 
1.9.1

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to