[svn-commits] kmoore: branch kmoore/cel_transfers r394060 - in /team/kmoore/cel_transfers: ...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Jul 11 07:23:54 CDT 2013
Author: kmoore
Date: Thu Jul 11 07:23:51 2013
New Revision: 394060
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394060
Log:
Resovle merge conflict
Modified:
team/kmoore/cel_transfers/ (props changed)
team/kmoore/cel_transfers/tests/test_cel.c
Propchange: team/kmoore/cel_transfers/
------------------------------------------------------------------------------
automerge = *
Propchange: team/kmoore/cel_transfers/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jul 11 07:23:51 2013
@@ -1,1 +1,1 @@
-/trunk:1-394024
+/trunk:1-394049
Modified: team/kmoore/cel_transfers/tests/test_cel.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/cel_transfers/tests/test_cel.c?view=diff&rev=394060&r1=394059&r2=394060
==============================================================================
--- team/kmoore/cel_transfers/tests/test_cel.c (original)
+++ team/kmoore/cel_transfers/tests/test_cel.c Thu Jul 11 07:23:51 2013
@@ -1832,8 +1832,11 @@
/*!
* \internal \brief Callback function called after each test executes
+ * In addition to cleanup, this function also performs verification
+ * that the events received during a test match the events that were
+ * expected to have been generated during the test.
*/
-static int test_cel_cleanup_cb(struct ast_test_info *info, struct ast_test *test)
+static int cel_verify_and_cleanup_cb(struct ast_test_info *info, struct ast_test *test)
{
struct ast_event *sync;
RAII_VAR(struct ao2_container *, local_expected, cel_expected_events, ao2_cleanup);
@@ -1864,9 +1867,6 @@
/* stop the CEL event callback and clean up storage structures*/
ast_event_unsubscribe(event_sub);
event_sub = NULL;
-
- cel_expected_events = NULL;
- cel_received_events = NULL;
/* Restore the real CEL config */
ast_cel_set_config(saved_config);
@@ -1951,6 +1951,8 @@
cel_test_config->events |= 1<<AST_CEL_ATTENDEDTRANSFER;
cel_test_config->events |= 1<<AST_CEL_PICKUP;
+ ast_channel_register(&test_cel_chan_tech);
+
AST_TEST_REGISTER(test_cel_channel_creation);
AST_TEST_REGISTER(test_cel_unanswered_inbound_call);
AST_TEST_REGISTER(test_cel_unanswered_outbound_call);
@@ -1980,10 +1982,10 @@
AST_TEST_REGISTER(test_cel_dial_pickup);
+ /* ast_test_register_* has to happen after AST_TEST_REGISTER */
+ /* Verify received vs expected events and clean things up after every test */
ast_test_register_init(TEST_CATEGORY, test_cel_init_cb);
- ast_test_register_cleanup(TEST_CATEGORY, test_cel_cleanup_cb);
-
- ast_channel_register(&test_cel_chan_tech);
+ ast_test_register_cleanup(TEST_CATEGORY, cel_verify_and_cleanup_cb);
return AST_MODULE_LOAD_SUCCESS;
}
More information about the svn-commits
mailing list