diff mbox

[2/4] validation: renaming in odp_random.c

Message ID 1435063343-16657-3-git-send-email-christophe.milard@linaro.org
State Superseded
Headers show

Commit Message

Christophe Milard June 23, 2015, 12:42 p.m. UTC
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/odp_random.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/test/validation/odp_random.c b/test/validation/odp_random.c
index 4c58d32..428af78 100644
--- a/test/validation/odp_random.c
+++ b/test/validation/odp_random.c
@@ -10,7 +10,7 @@ 
 /* Helper macro for CU_TestInfo initialization */
 #define _CU_TEST_INFO(test_func) {#test_func, test_func}
 
-static void random_get_size(void)
+static void random_test_get_size(void)
 {
 	int32_t ret;
 	uint8_t buf[32];
@@ -19,13 +19,13 @@  static void random_get_size(void)
 	CU_ASSERT(ret == sizeof(buf));
 }
 
-static CU_TestInfo test_odp_random[] = {
-	_CU_TEST_INFO(random_get_size),
+static CU_TestInfo random_suite[] = {
+	_CU_TEST_INFO(random_test_get_size),
 	CU_TEST_INFO_NULL,
 };
 
 static CU_SuiteInfo random_suites[] = {
-	{"Random", NULL, NULL, NULL, NULL, test_odp_random},
+	{"Random", NULL, NULL, NULL, NULL, random_suite},
 	CU_SUITE_INFO_NULL,
 };