summaryrefslogtreecommitdiff
path: root/tests/test_voicemail_api.c
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2017-01-21 07:41:53 +0200
committerRichard Mudgett <rmudgett@digium.com>2017-01-23 11:14:58 -0600
commitf3f9175df09afb5304fa0a75c7162bae4b9e1e31 (patch)
tree3aa7acb15a020fb322dda2ba70e6e590e1408fe0 /tests/test_voicemail_api.c
parentb4fa17f51637f3e3fe9e46cbc29690ea867aca09 (diff)
test_voicemail_api: order of params to VERIFY macros
Fix order of parameters in calls to VM_API_INT_VERIFY and VM_API_STRING_VERIFY ASTERISK-26739 #close Change-Id: I30dc6b36893aadad6012be3f16f93aa5720870d6 Note: status: builds. Not tested any further.
Diffstat (limited to 'tests/test_voicemail_api.c')
-rw-r--r--tests/test_voicemail_api.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/tests/test_voicemail_api.c b/tests/test_voicemail_api.c
index 9cadf2394..848c6bf1e 100644
--- a/tests/test_voicemail_api.c
+++ b/tests/test_voicemail_api.c
@@ -240,7 +240,7 @@
return AST_TEST_FAIL; \
} \
VM_API_SNAPSHOT_CREATE((mailbox), (context), (folder), 0, AST_VM_SNAPSHOT_SORT_BY_TIME, 0); \
- VM_API_INT_VERIFY(test_mbox_snapshot->total_msg_num, 0); \
+ VM_API_INT_VERIFY(0, test_mbox_snapshot->total_msg_num); \
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot); \
} while (0)
@@ -1002,10 +1002,10 @@ AST_TEST_DEFINE(voicemail_api_nominal_move)
test_vm_api_update_test_snapshots(test_mbox_snapshot);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
- VM_API_STRING_FIELD_VERIFY(test_snapshots[0]->folder_name, "Family");
- VM_API_STRING_FIELD_VERIFY(test_snapshots[1]->folder_name, "Family");
- VM_API_INT_VERIFY(test_snapshots[1]->msg_number, 0);
- VM_API_INT_VERIFY(test_snapshots[0]->msg_number, 1);
+ VM_API_STRING_FIELD_VERIFY("Family", test_snapshots[0]->folder_name);
+ VM_API_STRING_FIELD_VERIFY("Family", test_snapshots[1]->folder_name);
+ VM_API_INT_VERIFY(0, test_snapshots[1]->msg_number);
+ VM_API_INT_VERIFY(1, test_snapshots[0]->msg_number);
/* Move both of the 2345 messages to Family */
ast_test_status_update(test, "Test move of test_vm_api_2345 messages from Inbox to Family\n");
@@ -1016,8 +1016,8 @@ AST_TEST_DEFINE(voicemail_api_nominal_move)
test_vm_api_update_test_snapshots(test_mbox_snapshot);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
- VM_API_STRING_FIELD_VERIFY(test_snapshots[2]->folder_name, "Family");
- VM_API_STRING_FIELD_VERIFY(test_snapshots[3]->folder_name, "Family");
+ VM_API_STRING_FIELD_VERIFY("Family", test_snapshots[2]->folder_name);
+ VM_API_STRING_FIELD_VERIFY("Family", test_snapshots[3]->folder_name);
ast_test_status_update(test, "Test move of test_vm_api_2345 message from Family to INBOX\n");
VM_API_MOVE_MESSAGE("test_vm_api_2345", "default", 2, "Family", multi_msg_ids, "INBOX");
@@ -1026,8 +1026,8 @@ AST_TEST_DEFINE(voicemail_api_nominal_move)
test_vm_api_update_test_snapshots(test_mbox_snapshot);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
- VM_API_STRING_FIELD_VERIFY(test_snapshots[2]->folder_name, "INBOX");
- VM_API_STRING_FIELD_VERIFY(test_snapshots[3]->folder_name, "INBOX");
+ VM_API_STRING_FIELD_VERIFY("INBOX", test_snapshots[2]->folder_name);
+ VM_API_STRING_FIELD_VERIFY("INBOX", test_snapshots[3]->folder_name);
VM_API_TEST_CLEANUP;
@@ -1248,12 +1248,12 @@ AST_TEST_DEFINE(voicemail_api_nominal_forward)
/* Make sure we didn't delete the message */
VM_API_SNAPSHOT_CREATE("test_vm_api_1234", "default", "INBOX", 0, AST_VM_SNAPSHOT_SORT_BY_TIME, 0);
- VM_API_INT_VERIFY(test_mbox_snapshot->total_msg_num, 1);
+ VM_API_INT_VERIFY(1, test_mbox_snapshot->total_msg_num);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
/* We should now have a total of 3 messages in test_vm_api_2345 INBOX */
VM_API_SNAPSHOT_CREATE("test_vm_api_2345", "default", "INBOX", 0, AST_VM_SNAPSHOT_SORT_BY_TIME, 0);
- VM_API_INT_VERIFY(test_mbox_snapshot->total_msg_num, 3);
+ VM_API_INT_VERIFY(3, test_mbox_snapshot->total_msg_num);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
ast_test_status_update(test, "Test forwarding message 0 from test_vm_api_1234 INBOX with default context to test_vm_api_2345 INBOX\n");
@@ -1261,12 +1261,12 @@ AST_TEST_DEFINE(voicemail_api_nominal_forward)
/* Make sure we didn't delete the message */
VM_API_SNAPSHOT_CREATE("test_vm_api_1234", "default", "INBOX", 0, AST_VM_SNAPSHOT_SORT_BY_TIME, 0);
- VM_API_INT_VERIFY(test_mbox_snapshot->total_msg_num, 1);
+ VM_API_INT_VERIFY(1, test_mbox_snapshot->total_msg_num);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
/* We should now have a total of 4 messages in test_vm_api_2345 INBOX */
VM_API_SNAPSHOT_CREATE("test_vm_api_2345", "default", "INBOX", 0, AST_VM_SNAPSHOT_SORT_BY_TIME, 0);
- VM_API_INT_VERIFY(test_mbox_snapshot->total_msg_num, 4);
+ VM_API_INT_VERIFY(4, test_mbox_snapshot->total_msg_num);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
ast_test_status_update(test, "Test forwarding message 0 from test_vm_api_1234 INBOX to test_vm_api_2345 INBOX with default context\n");
@@ -1274,12 +1274,12 @@ AST_TEST_DEFINE(voicemail_api_nominal_forward)
/* Make sure we didn't delete the message */
VM_API_SNAPSHOT_CREATE("test_vm_api_1234", "default", "INBOX", 0, AST_VM_SNAPSHOT_SORT_BY_TIME, 0);
- VM_API_INT_VERIFY(test_mbox_snapshot->total_msg_num, 1);
+ VM_API_INT_VERIFY(1, test_mbox_snapshot->total_msg_num);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
/* We should now have a total of 5 messages in test_vm_api_2345 INBOX */
VM_API_SNAPSHOT_CREATE("test_vm_api_2345", "default", "INBOX", 0, AST_VM_SNAPSHOT_SORT_BY_TIME, 0);
- VM_API_INT_VERIFY(test_mbox_snapshot->total_msg_num, 5);
+ VM_API_INT_VERIFY(5, test_mbox_snapshot->total_msg_num);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
ast_test_status_update(test, "Test forwarding message 0 from test_vm_api_1234 INBOX to test_vm_api_2345 INBOX, deleting original\n");
@@ -1287,12 +1287,12 @@ AST_TEST_DEFINE(voicemail_api_nominal_forward)
/* Make sure we deleted the message */
VM_API_SNAPSHOT_CREATE("test_vm_api_1234", "default", "INBOX", 0, AST_VM_SNAPSHOT_SORT_BY_TIME, 0);
- VM_API_INT_VERIFY(test_mbox_snapshot->total_msg_num, 0);
+ VM_API_INT_VERIFY(0, test_mbox_snapshot->total_msg_num);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
/* We should now have a total of 6 messages in test_vm_api_2345 INBOX */
VM_API_SNAPSHOT_CREATE("test_vm_api_2345", "default", "INBOX", 0, AST_VM_SNAPSHOT_SORT_BY_TIME, 0);
- VM_API_INT_VERIFY(test_mbox_snapshot->total_msg_num, 6);
+ VM_API_INT_VERIFY(6, test_mbox_snapshot->total_msg_num);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
ast_test_status_update(test, "Test forwarding 2 messages from test_vm_api_2345 INBOX to test_vm_api_1234 INBOX");
@@ -1300,24 +1300,24 @@ AST_TEST_DEFINE(voicemail_api_nominal_forward)
/* Make sure we didn't delete the messages */
VM_API_SNAPSHOT_CREATE("test_vm_api_2345", "default", "INBOX", 0, AST_VM_SNAPSHOT_SORT_BY_TIME, 0);
- VM_API_INT_VERIFY(test_mbox_snapshot->total_msg_num, 6);
+ VM_API_INT_VERIFY(6, test_mbox_snapshot->total_msg_num);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
/* We should now have a total of 2 messages in test_vm_api_1234 INBOX */
VM_API_SNAPSHOT_CREATE("test_vm_api_1234", "default", "INBOX", 0, AST_VM_SNAPSHOT_SORT_BY_TIME, 0);
- VM_API_INT_VERIFY(test_mbox_snapshot->total_msg_num, 2);
+ VM_API_INT_VERIFY(2, test_mbox_snapshot->total_msg_num);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
ast_test_status_update(test, "Test forwarding 2 messages from test_vm_api_2345 INBOX to test_vm_api_1234 Family, deleting original\n");
VM_API_FORWARD_MESSAGE("test_vm_api_2345", "default", "INBOX", "test_vm_api_1234", "default", "Family", 2, multi_msg_ids, 1);
/* Make sure we deleted the messages */
VM_API_SNAPSHOT_CREATE("test_vm_api_2345", "default", "INBOX", 0, AST_VM_SNAPSHOT_SORT_BY_TIME, 0);
- VM_API_INT_VERIFY(test_mbox_snapshot->total_msg_num, 4);
+ VM_API_INT_VERIFY(4, test_mbox_snapshot->total_msg_num);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
/* We should now have a total of 2 messages in test_vm_api_1234 Family */
VM_API_SNAPSHOT_CREATE("test_vm_api_1234", "default", "Family", 0, AST_VM_SNAPSHOT_SORT_BY_TIME, 0);
- VM_API_INT_VERIFY(test_mbox_snapshot->total_msg_num, 2);
+ VM_API_INT_VERIFY(2, test_mbox_snapshot->total_msg_num);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
VM_API_TEST_CLEANUP;
@@ -1447,20 +1447,20 @@ AST_TEST_DEFINE(voicemail_api_nominal_msg_playback)
ast_test_status_update(test, "Playing back message from test_vm_api_2345 to callback function\n");
VM_API_PLAYBACK_MESSAGE(test_channel, "test_vm_api_2345", "default", "INBOX", message_id_2345[0], &message_playback_callback_fn);
- VM_API_INT_VERIFY(global_entered_playback_callback, 1);
+ VM_API_INT_VERIFY(1, global_entered_playback_callback);
global_entered_playback_callback = 0;
ast_test_status_update(test, "Playing back message from test_vm_api_2345 to callback function with default context\n");
VM_API_PLAYBACK_MESSAGE(test_channel, "test_vm_api_2345", NULL, "INBOX", message_id_2345[1], &message_playback_callback_fn);
- VM_API_INT_VERIFY(global_entered_playback_callback, 1);
+ VM_API_INT_VERIFY(1, global_entered_playback_callback);
global_entered_playback_callback = 0;
VM_API_SNAPSHOT_CREATE("test_vm_api_1234", "default", "Old", 0, AST_VM_SNAPSHOT_SORT_BY_TIME, 0);
- VM_API_INT_VERIFY(test_mbox_snapshot->total_msg_num, 2);
+ VM_API_INT_VERIFY(2, test_mbox_snapshot->total_msg_num);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
VM_API_SNAPSHOT_CREATE("test_vm_api_2345", "default", "Old", 0, AST_VM_SNAPSHOT_SORT_BY_TIME, 0);
- VM_API_INT_VERIFY(test_mbox_snapshot->total_msg_num, 2);
+ VM_API_INT_VERIFY(2, test_mbox_snapshot->total_msg_num);
test_mbox_snapshot = ast_vm_mailbox_snapshot_destroy(test_mbox_snapshot);
ast_hangup(test_channel);