aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test_sanity.cpp
diff options
context:
space:
mode:
authorChun-Min Chang <[email protected]>2017-04-26 16:08:19 +0800
committerMatthew Gregan <[email protected]>2017-05-26 18:01:23 +1200
commitf401f7ef69d2d66415fb3d4ad6ebc079ba02b665 (patch)
tree646c6f7129e0ed8f5c2494b20ff2dc407deb0742 /test/test_sanity.cpp
parent66f0e16a638837af6b85754075251873e1b1cf93 (diff)
downloadcubeb-f401f7ef69d2d66415fb3d4ad6ebc079ba02b665.tar.gz
cubeb-f401f7ef69d2d66415fb3d4ad6ebc079ba02b665.zip
cubeb_get_preferred_channel_layout should be verified in test_sanity instead of test_latency
Diffstat (limited to 'test/test_sanity.cpp')
-rw-r--r--test/test_sanity.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_sanity.cpp b/test/test_sanity.cpp
index eb7fc6f..9838106 100644
--- a/test/test_sanity.cpp
+++ b/test/test_sanity.cpp
@@ -114,6 +114,7 @@ TEST(cubeb, context_variables)
int r;
cubeb * ctx;
uint32_t value;
+ cubeb_channel_layout layout;
cubeb_stream_params params;
r = common_init(&ctx, "test_context_variables");
@@ -139,6 +140,11 @@ TEST(cubeb, context_variables)
ASSERT_TRUE(value > 0);
}
+ r = cubeb_get_preferred_channel_layout(ctx, &layout);
+ ASSERT_TRUE(r == CUBEB_ERROR_NOT_SUPPORTED ||
+ (r == CUBEB_OK && layout != CUBEB_LAYOUT_UNDEFINED) ||
+ (r == CUBEB_ERROR && layout == CUBEB_LAYOUT_UNDEFINED));
+
cubeb_destroy(ctx);
}