summaryrefslogtreecommitdiff
path: root/src/channel.test.c
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-08-28 23:41:58 -0500
committersanine <sanine.not@pm.me>2022-08-28 23:41:58 -0500
commita0e405532e276bc1b2c9cae0e44295b17d987151 (patch)
tree06567f45b861756456c03651d07b78127d46a68f /src/channel.test.c
parentd232fd1b3add3a93b81fc040d8b7e165590930cf (diff)
add channel_pause() and channel_resume()
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);