[asterisk-commits] dlee: branch dlee/jansson r378649 - /team/dlee/jansson/include/asterisk/test.h

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 7 11:18:42 CST 2013


Author: dlee
Date: Mon Jan  7 11:18:38 2013
New Revision: 378649

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=378649
Log:
Adding docs for ast_test_check

Modified:
    team/dlee/jansson/include/asterisk/test.h

Modified: team/dlee/jansson/include/asterisk/test.h
URL: http://svnview.digium.com/svn/asterisk/team/dlee/jansson/include/asterisk/test.h?view=diff&rev=378649&r1=378648&r2=378649
==============================================================================
--- team/dlee/jansson/include/asterisk/test.h (original)
+++ team/dlee/jansson/include/asterisk/test.h Mon Jan  7 11:18:38 2013
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 2009-2010, Digium, Inc.
+ * Copyright (C) 2009-2013, Digium, Inc.
  *
  * David Vossel <dvossel at digium.com>
  * Russell Bryant <russell at digium.com>
@@ -284,8 +284,21 @@
  */
 #define ast_test_status_update(t, f, ...) __ast_test_status_update(__FILE__, __PRETTY_FUNCTION__, __LINE__, (t), (f), ## __VA_ARGS__)
 
+/*!
+ * \ref ast_test_check
+ */
 enum ast_test_result_state __ast_test_check(const char *file, const char *function, int line, struct ast_test *test, const char *condition_str, enum ast_test_result_state current_res, int condition);
 
+/*!
+ * \brief Accumulate test results for a test.
+ *
+ * This macro evaluates \a condition, then updates \a res and the test status accordingly. If the condition evaluates to
+ * true (non-zero), nothing happens. If it evaluates to false (zero), then res is set to \a AST_TEST_FAIL and the failure
+ * is printed using \ref ast_test_status_update.
+ *
+ * \param \a res Local variable of type \a ast_test_result_state.
+ * \param \a condition Boolean condition to check.
+ */
 #define ast_test_check(res, condition) res = __ast_test_check( __FILE__, __PRETTY_FUNCTION__, __LINE__, test, #condition, (res), (condition))
 
 #endif /* TEST_FRAMEWORK */




More information about the asterisk-commits mailing list