diff options
author | Chun-Min Chang <[email protected]> | 2017-03-29 12:06:26 +0800 |
---|---|---|
committer | Matthew Gregan <[email protected]> | 2017-04-06 20:14:00 +1200 |
commit | 2612c2075b38e94756bea0c8c9941b834c08f26c (patch) | |
tree | 044fbca0824dd6dfcca1fbefe8a9f23944fc3dd4 /test/test_duplex.cpp | |
parent | 04826edb13c23a2b53732d63b09b24e05ca83d87 (diff) | |
download | cubeb-2612c2075b38e94756bea0c8c9941b834c08f26c.tar.gz cubeb-2612c2075b38e94756bea0c8c9941b834c08f26c.zip |
Using RAII helpers for cubeb context and stream but leaving test_sanity for explicit flow control
Diffstat (limited to 'test/test_duplex.cpp')
-rw-r--r-- | test/test_duplex.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test_duplex.cpp b/test/test_duplex.cpp index 9620a1e..a4a938b 100644 --- a/test/test_duplex.cpp +++ b/test/test_duplex.cpp @@ -88,6 +88,8 @@ TEST(cubeb, duplex) ASSERT_EQ(r, CUBEB_OK); } + cubeb_cleaner cleanup_cubeb_at_exit(ctx); + /* This test needs an available input device, skip it if this host does not * have one. */ if (!has_available_input_device(ctx)) { @@ -119,12 +121,11 @@ TEST(cubeb, duplex) ASSERT_EQ(r, CUBEB_OK); } + cubeb_stream_cleaner cleanup_stream_at_exit(stream); + cubeb_stream_start(stream); delay(500); cubeb_stream_stop(stream); - cubeb_stream_destroy(stream); - cubeb_destroy(ctx); - ASSERT_TRUE(stream_state.seen_audio); } |