summaryrefslogtreecommitdiff
path: root/include/cmocka.h
diff options
context:
space:
mode:
authorJakub Hrozek <jakub.hrozek@posteo.se>2015-02-07 17:48:06 +0100
committerAndreas Schneider <asn@cryptomilk.org>2015-02-09 09:22:26 +0100
commit8bfb195065bc9e4d71c663bf874fc8d8c81a4cd0 (patch)
tree646a8f7106ea9360fedbf62f507cb7c3953a1bec /include/cmocka.h
parente940df1c2b14b045083eca74334ed6147ddeee7e (diff)
downloadcmocka-8bfb195065bc9e4d71c663bf874fc8d8c81a4cd0.tar.gz
cmocka-8bfb195065bc9e4d71c663bf874fc8d8c81a4cd0.tar.bz2
cmocka-8bfb195065bc9e4d71c663bf874fc8d8c81a4cd0.zip
cmocka: Add support for skipping a test
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Diffstat (limited to 'include/cmocka.h')
-rw-r--r--include/cmocka.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/cmocka.h b/include/cmocka.h
index 85e264f..a237142 100644
--- a/include/cmocka.h
+++ b/include/cmocka.h
@@ -1301,6 +1301,15 @@ void fail(void);
#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.
*
* @code
@@ -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,