summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Hrozek <jakub.hrozek@posteo.se>2015-02-09 21:52:30 +0100
committerAndreas Schneider <asn@cryptomilk.org>2015-02-10 07:59:57 +0100
commitbdf5366ca650e5f4452d8a74320d4a524b935b7d (patch)
treea55fe42e345070d997ab9baadde84ab9bfba1b74 /include
parenta0f172b035a10996124a965783a4a52d83611c57 (diff)
downloadcmocka-bdf5366ca650e5f4452d8a74320d4a524b935b7d.tar.gz
cmocka-bdf5366ca650e5f4452d8a74320d4a524b935b7d.tar.bz2
cmocka-bdf5366ca650e5f4452d8a74320d4a524b935b7d.zip
docs: Mark the old test runner functions as deprecated
Marks the old test runner functions as @deprecated in the doxygen config Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Diffstat (limited to 'include')
-rw-r--r--include/cmocka.h40
1 files changed, 30 insertions, 10 deletions
diff --git a/include/cmocka.h b/include/cmocka.h
index a237142..3b6b45c 100644
--- a/include/cmocka.h
+++ b/include/cmocka.h
@@ -142,7 +142,7 @@ cast_to_largest_integral_type(cast_to_pointer_integral_type(value))
* real objects. Instead of calling the real objects, the tested object calls a
* mock object that merely asserts that the correct methods were called, with
* the expected parameters, in the correct order.
- *
+ *
* <ul>
* <li><strong>will_return(function, value)</strong> - The will_return() macro
* pushes a value onto a stack of mock values. This macro is intended to be
@@ -1278,12 +1278,12 @@ void assert_not_in_set(uintmax_t value, uintmax_t values[], size_t count);
*
* int main(void)
* {
- * const UnitTest tests[] = {
- * unit_test(Test0),
- * unit_test(Test1),
+ * const struct CMUnitTest tests[] = {
+ * cmocka_unit_test(Test0),
+ * cmocka_unit_test(Test1),
* };
*
- * return run_tests(tests);
+ * return cmocka_run_group_tests(tests, NULL, NULL);
* }
* @endcode
*
@@ -1335,6 +1335,8 @@ void fail_msg(const char *msg, ...);
/**
* @brief Generic method to run a single test.
*
+ * @deprecated This function was deprecated in favor of cmocka_run_group_tests
+ *
* @param[in] #function The function to test.
*
* @return 0 on success, 1 if an error occured.
@@ -1358,13 +1360,19 @@ static inline void _unit_test_dummy(void **state) {
(void)state;
}
-/** Initializes a UnitTest structure. */
+/** Initializes a UnitTest structure.
+ *
+ * @deprecated This function was deprecated in favor of cmocka_unit_test
+ */
#define unit_test(f) { #f, f, UNIT_TEST_FUNCTION_TYPE_TEST }
#define _unit_test_setup(test, setup) \
{ #test "_" #setup, setup, UNIT_TEST_FUNCTION_TYPE_SETUP }
-/** Initializes a UnitTest structure with a setup function. */
+/** Initializes a UnitTest structure with a setup function.
+ *
+ * @deprecated This function was deprecated in favor of cmocka_unit_test_setup
+ */
#define unit_test_setup(test, setup) \
_unit_test_setup(test, setup), \
unit_test(test), \
@@ -1373,23 +1381,35 @@ static inline void _unit_test_dummy(void **state) {
#define _unit_test_teardown(test, teardown) \
{ #test "_" #teardown, teardown, UNIT_TEST_FUNCTION_TYPE_TEARDOWN }
-/** Initializes a UnitTest structure with a teardown function. */
+/** Initializes a UnitTest structure with a teardown function.
+ *
+ * @deprecated This function was deprecated in favor of cmocka_unit_test_teardown
+ */
#define unit_test_teardown(test, teardown) \
_unit_test_setup(test, _unit_test_dummy), \
unit_test(test), \
_unit_test_teardown(test, teardown)
-/** Initializes a UnitTest structure for a group setup function. */
+/** Initializes a UnitTest structure for a group setup function.
+ *
+ * @deprecated This function was deprecated in favor of cmocka_run_group_tests
+ */
#define group_test_setup(setup) \
{ "group_" #setup, setup, UNIT_TEST_FUNCTION_TYPE_GROUP_SETUP }
-/** Initializes a UnitTest structure for a group teardown function. */
+/** Initializes a UnitTest structure for a group teardown function.
+ *
+ * @deprecated This function was deprecated in favor of cmocka_run_group_tests
+ */
#define group_test_teardown(teardown) \
{ "group_" #teardown, teardown, UNIT_TEST_FUNCTION_TYPE_GROUP_TEARDOWN }
/**
* Initialize an array of UnitTest structures with a setup function for a test
* and a teardown function. Either setup or teardown can be NULL.
+ *
+ * @deprecated This function was deprecated in favor of
+ * cmocka_unit_test_setup_teardown
*/
#define unit_test_setup_teardown(test, setup, teardown) \
_unit_test_setup(test, setup), \