summaryrefslogtreecommitdiff
path: root/src/channel.test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/channel.test.c')
-rw-r--r--src/channel.test.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/channel.test.c b/src/channel.test.c
index 532d153..4fddf45 100644
--- a/src/channel.test.c
+++ b/src/channel.test.c
@@ -81,6 +81,29 @@ void test_channel_reset()
}
+void test_channel_pause()
+{
+ struct channel_t chan;
+ chan.paused = false;
+
+ channel_pause(&chan);
+
+ lily_assert_int_equal(chan.paused, true);
+}
+
+
+void test_channel_resume()
+{
+ struct channel_t chan;
+ chan.paused = true;
+
+ channel_resume(&chan);
+
+ lily_assert_int_equal(chan.paused, false);
+}
+
+
+/* get_next_sample tests */
void test_channel_get_next_sample_inactive()
{
lily_mock_use(&mock_p_mutex_trylock);
@@ -192,6 +215,9 @@ void suite_channel()
{
lily_run_test(test_channel_init);
lily_run_test(test_channel_reset);
+ lily_run_test(test_channel_pause);
+ lily_run_test(test_channel_resume);
+
lily_run_test(test_channel_get_next_sample_inactive);
lily_run_test(test_channel_get_next_sample_paused);
lily_run_test(test_channel_get_next_sample_normal);