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_tone.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_tone.cpp')
-rw-r--r-- | test/test_tone.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test_tone.cpp b/test/test_tone.cpp index 2881c09..22c5be2 100644 --- a/test/test_tone.cpp +++ b/test/test_tone.cpp @@ -107,6 +107,8 @@ TEST(cubeb, tone) ASSERT_EQ(r, CUBEB_OK); } + cubeb_cleaner cleanup_cubeb_at_exit(ctx); + params.format = STREAM_FORMAT; params.rate = SAMPLE_FREQUENCY; params.channels = 1; @@ -126,13 +128,12 @@ TEST(cubeb, tone) 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(user_data->position); free(user_data); |