dovecot-2.2: lib-test: make internal helpers static

dovecot at dovecot.org dovecot at dovecot.org
Mon Jul 28 13:54:30 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/ec534d652137
changeset: 17656:ec534d652137
user:      Phil Carmody <phil at dovecot.fi>
date:      Mon Jul 28 16:45:33 2014 +0300
description:
lib-test: make internal helpers static
These functions should only be called from within test_run(), as some of the
test-suite sanity checks can be subvirted if these are exposed.

Signed-off-by: Phil Carmody <phil at dovecot.fi>

diffstat:

 src/lib-test/test-common.c |  6 +++---
 src/lib-test/test-common.h |  4 ----
 2 files changed, 3 insertions(+), 7 deletions(-)

diffs (42 lines):

diff -r 9f765c38fd79 -r ec534d652137 src/lib-test/test-common.c
--- a/src/lib-test/test-common.c	Mon Jul 28 16:45:33 2014 +0300
+++ b/src/lib-test/test-common.c	Mon Jul 28 16:45:33 2014 +0300
@@ -257,7 +257,7 @@
 	test_success = FALSE;
 }
 
-void test_init(void)
+static void test_init(void)
 {
 	test_prefix = NULL;
 	failure_count = 0;
@@ -267,7 +267,7 @@
 	i_set_error_handler(test_error_handler);
 }
 
-int test_deinit(void)
+static int test_deinit(void)
 {
 	i_assert(test_prefix == NULL);
 	printf("%u / %u tests failed\n", failure_count, total_count);
@@ -275,7 +275,7 @@
 	return failure_count == 0 ? 0 : 1;
 }
 
-void test_run_funcs(void (*test_functions[])(void))
+static void test_run_funcs(void (*test_functions[])(void))
 {
 	unsigned int i;
 
diff -r 9f765c38fd79 -r ec534d652137 src/lib-test/test-common.h
--- a/src/lib-test/test-common.h	Mon Jul 28 16:45:33 2014 +0300
+++ b/src/lib-test/test-common.h	Mon Jul 28 16:45:33 2014 +0300
@@ -29,8 +29,4 @@
 
 int test_run(void (*test_functions[])(void));
 
-void test_init(void);
-int test_deinit(void);
-void test_run_funcs(void (*test_functions[])(void));
-
 #endif


More information about the dovecot-cvs mailing list