diff options
author | Bartosz Golaszewski <bartekgola@gmail.com> | 2014-06-22 16:30:41 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2014-06-22 16:30:41 +0200 |
commit | 3ed81cf0529145d04299c4cd48b1aaab2fe36193 (patch) | |
tree | f8d40bf4c55c9dadba0773543048a5d69b695002 /include/platform.h | |
parent | 5d2e409ef8224dc32fde59702e8ec90b231441ed (diff) | |
download | busybox-w32-3ed81cf0529145d04299c4cd48b1aaab2fe36193.tar.gz busybox-w32-3ed81cf0529145d04299c4cd48b1aaab2fe36193.tar.bz2 busybox-w32-3ed81cf0529145d04299c4cd48b1aaab2fe36193.zip |
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 <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include/platform.h')
-rw-r--r-- | include/platform.h | 3 |
1 files changed, 3 insertions, 0 deletions
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 @@ | |||
76 | # define UNUSED_PARAM_RESULT | 76 | # define UNUSED_PARAM_RESULT |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | /* used by unit test machinery to run registration functions */ | ||
80 | #define INIT_LAST __attribute__ ((constructor(2000))) | ||
81 | |||
79 | /* -fwhole-program makes all symbols local. The attribute externally_visible | 82 | /* -fwhole-program makes all symbols local. The attribute externally_visible |
80 | * forces a symbol global. */ | 83 | * forces a symbol global. */ |
81 | #if __GNUC_PREREQ(4,1) | 84 | #if __GNUC_PREREQ(4,1) |