aboutsummaryrefslogtreecommitdiff
path: root/tests/src/pcm_params_test.cc
diff options
context:
space:
mode:
authordvdli <dvdli@google.com>2020-12-02 15:20:20 +0800
committerdvdli <dvdli@google.com>2020-12-02 15:20:20 +0800
commit69d41f144ad82d652f148c303a168cd07d222d41 (patch)
tree8e902ae95c75c7a83428db4f16f4224c1ce2442b /tests/src/pcm_params_test.cc
parentee672bb4b3919ba8e411ca5bba95e22b288f2831 (diff)
fix typo, add comments to describe the tests and fix the loopback test
Diffstat (limited to 'tests/src/pcm_params_test.cc')
-rw-r--r--tests/src/pcm_params_test.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/src/pcm_params_test.cc b/tests/src/pcm_params_test.cc
index 18c3c2c..c8151e1 100644
--- a/tests/src/pcm_params_test.cc
+++ b/tests/src/pcm_params_test.cc
@@ -40,8 +40,9 @@ namespace tinyalsa {
namespace testing {
static inline unsigned int OrAllBits(const pcm_mask *mask) {
+ static constexpr size_t kTotalMaskBytes = 32;
unsigned int res = 0;
- for (uint32_t i = 0; i < 32 / sizeof(unsigned int); ++i) {
+ for (uint32_t i = 0; i < kTotalMaskBytes / sizeof(pcm_mask::bits[0]); ++i) {
res |= mask->bits[i];
}
return res;
@@ -218,4 +219,4 @@ TEST(PcmParamsTest, GetPlaybackDeviceParams) {
}
} // namespace testing
-} // namespace tinyalse
+} // namespace tinyalsa