[asterisk-commits] dvossel: branch dvossel/test_api r235224 - /team/dvossel/test_api/include/ast...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 15 17:29:51 CST 2009


Author: dvossel
Date: Tue Dec 15 17:29:50 2009
New Revision: 235224

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=235224
Log:
test documentation tweaks

Modified:
    team/dvossel/test_api/include/asterisk/test.h

Modified: team/dvossel/test_api/include/asterisk/test.h
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/test_api/include/asterisk/test.h?view=diff&rev=235224&r1=235223&r2=235224
==============================================================================
--- team/dvossel/test_api/include/asterisk/test.h (original)
+++ team/dvossel/test_api/include/asterisk/test.h Tue Dec 15 17:29:50 2009
@@ -39,13 +39,12 @@
         .
         .
         if (fail) {                 \\ the following is just some example logic
-            ast_str_set(error_str, 0 , "an error occured because....");
+            ast_str_set(error_str, 0 , "an error occured because...");
             res = AST_RESULT_FAIL;
         } else {
-        res = AST_RESULT_PASS
-    }
-                                    \\ result must be of type enum ast_test_result_state
-    return res;
+            res = AST_RESULT_PASS
+        }
+        return res;                 \\ result must be of type enum ast_test_result_state
     })
 
     Every callback function is passed a string buffer which allows
@@ -66,11 +65,11 @@
                       "main/test",           \\ Test's Catagory
                       "this is sample test", \\ Brief summary of test
                       "Sample test designed for test purposes", \\ Verbose discription of test
-                       sample_test_cb);       \\ Test callback function defined by AST_TEST_DEFINE
+                       sample_test_cb);      \\ Test callback function defined by AST_TEST_DEFINE
 
     Tests are unregestered by using the AST_TEST_UNREGISTER macro.
 
-    AST_TEST_REGISTER(sample_test_cb); \\ Test callback function to match registered test 
+    AST_TEST_UNREGISTER(sample_test_cb); \\ Remove a registered test by callback function 
 
 3. EXECUTE: Execute and generate test results via CLI commands
 
@@ -139,7 +138,7 @@
 int ast_test_register(const char *name, const char *catagory, const char *summary, const char *description, ast_test_cb_t *cb);
 
 /*!
- * \brief Runs test suit
+ * \brief Executes registered unit tests
  * 
  * \param name of test to run (optional)
  * \param test catagory to run (optional)
@@ -148,8 +147,8 @@
  * \return number of tests executed. 
  *
  * \note This function has three modes of operation
- * 1. When given a name and catagory that individual test will execute if found.
- * 2. When given only a catagory all tests within that catagory will execute.
+ * 1. When given a name and catagory, a matching individual test will execute if found.
+ * 2. When given only a catagory all matching tests within that catagory will execute.
  * 3. If given no name or catagory all registered tests will execute.
  */
 int ast_test_execute(const char *name, const char *catagory, struct ast_cli_args *a);




More information about the asterisk-commits mailing list