aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dtmf/dtmf_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dtmf/dtmf_test.c')
-rw-r--r--tests/dtmf/dtmf_test.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/dtmf/dtmf_test.c b/tests/dtmf/dtmf_test.c
index 2759920..d92011c 100644
--- a/tests/dtmf/dtmf_test.c
+++ b/tests/dtmf/dtmf_test.c
@@ -119,19 +119,29 @@ static void test_queue_single_pop(void)
dtmf_state_add(&state, '0');
dtmf_state_add(&state, '1');
dtmf_state_add(&state, '2');
+ ASSERT(dtmf_tones_queued(&state), 3);
ASSERT(dtmf_state_pop_tone(&state), '0');
+ ASSERT(dtmf_tones_queued(&state), 2);
ASSERT(dtmf_state_pop_tone(&state), '1');
+ ASSERT(dtmf_tones_queued(&state), 1);
ASSERT(dtmf_state_pop_tone(&state), '2');
+ ASSERT(dtmf_tones_queued(&state), 0);
ASSERT(dtmf_state_pop_tone(&state), CHAR_MAX);
dtmf_state_add(&state, '3');
dtmf_state_add(&state, '4');
dtmf_state_add(&state, '5');
+ ASSERT(dtmf_tones_queued(&state), 3);
ASSERT(dtmf_state_pop_tone(&state), '3');
+ ASSERT(dtmf_tones_queued(&state), 2);
ASSERT(dtmf_state_pop_tone(&state), '4');
+ ASSERT(dtmf_tones_queued(&state), 1);
dtmf_state_add(&state, '6');
+ ASSERT(dtmf_tones_queued(&state), 2);
ASSERT(dtmf_state_pop_tone(&state), '5');
+ ASSERT(dtmf_tones_queued(&state), 1);
ASSERT(dtmf_state_pop_tone(&state), '6');
+ ASSERT(dtmf_tones_queued(&state), 0);
ASSERT(dtmf_state_pop_tone(&state), CHAR_MAX);
}