From 3ed81cf0529145d04299c4cd48b1aaab2fe36193 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Sun, 22 Jun 2014 16:30:41 +0200 Subject: unit-tests: implement the unit-testing framework This set of patches adds a simple unit-testing framework to Busybox unit-tests: add some helper macros for unit-test framework implementation unit-tests: implement the unit-testing framework unit-tests: add basic documentation on writing the unit test cases unit-tests: modify the Makefile 'test' target to run unit-tests too unit-tests: add two example test cases unit-tests: modify the existing strrstr test code to use the unit-test framework Signed-off-by: Bartosz Golaszewski Signed-off-by: Denys Vlasenko --- include/platform.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/platform.h') diff --git a/include/platform.h b/include/platform.h index 92f775551..413c2224c 100644 --- a/include/platform.h +++ b/include/platform.h @@ -76,6 +76,9 @@ # define UNUSED_PARAM_RESULT #endif +/* used by unit test machinery to run registration functions */ +#define INIT_LAST __attribute__ ((constructor(2000))) + /* -fwhole-program makes all symbols local. The attribute externally_visible * forces a symbol global. */ #if __GNUC_PREREQ(4,1) -- cgit v1.2.3