From 8bfb195065bc9e4d71c663bf874fc8d8c81a4cd0 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Sat, 7 Feb 2015 17:48:06 +0100 Subject: cmocka: Add support for skipping a test Signed-off-by: Jakub Hrozek --- include/cmocka.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/cmocka.h') diff --git a/include/cmocka.h b/include/cmocka.h index 85e264f..a237142 100644 --- a/include/cmocka.h +++ b/include/cmocka.h @@ -1299,6 +1299,15 @@ void fail(void); #define fail() _fail(__FILE__, __LINE__) #endif +#ifdef DOXYGEN +/** + * @brief Forces the test to not be executed, but marked as skipped + */ +void skip(void); +#else +#define skip() _skip(__FILE__, __LINE__) +#endif + #ifdef DOXYGEN /** * @brief Forces the test to fail immediately and quit, printing the reason. @@ -1930,6 +1939,8 @@ void _test_free(void* const ptr, const char* file, const int line); void _fail(const char * const file, const int line); +void _skip(const char * const file, const int line); + int _run_test( const char * const function_name, const UnitTestFunction Function, void ** const volatile state, const UnitTestFunctionType function_type, -- cgit v1.2.3