diff options
author | Bryce Van Dyk <[email protected]> | 2018-01-18 14:20:52 -0500 |
---|---|---|
committer | Matthew Gregan <[email protected]> | 2018-01-23 08:50:28 +1300 |
commit | 09863992b941802b4fcb5240f4badc81e9a809ef (patch) | |
tree | 236fbca0e1251a1e5749920836351b251c9b3a77 /test/test_loopback.cpp | |
parent | 4945f4a7b20b4af9fd27248c23330c60f8e1f653 (diff) | |
download | cubeb-09863992b941802b4fcb5240f4badc81e9a809ef.tar.gz cubeb-09863992b941802b4fcb5240f4badc81e9a809ef.zip |
Update loopback test to check that output is not passed in data callback
Diffstat (limited to 'test/test_loopback.cpp')
-rw-r--r-- | test/test_loopback.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_loopback.cpp b/test/test_loopback.cpp index b2035da..91b7cf0 100644 --- a/test/test_loopback.cpp +++ b/test/test_loopback.cpp @@ -186,6 +186,12 @@ long data_cb_loop_input_only(cubeb_stream * stream, void * user, const void * in struct user_state_loopback * u = (struct user_state_loopback *) user; T * ib = (T *) inputbuffer; + if (outputbuffer != NULL) { + // Can't assert as it needs to return, so expect to fail instead + EXPECT_EQ(outputbuffer, (void *) NULL) << "outputbuffer should be null in input only callback"; + return CUBEB_ERROR; + } + if (stream == NULL || inputbuffer == NULL) { return CUBEB_ERROR; } |