diff options
author | dvdli <dvdli@google.com> | 2020-12-02 15:20:20 +0800 |
---|---|---|
committer | dvdli <dvdli@google.com> | 2020-12-02 15:20:20 +0800 |
commit | 69d41f144ad82d652f148c303a168cd07d222d41 (patch) | |
tree | 8e902ae95c75c7a83428db4f16f4224c1ce2442b /tests/src/pcm_params_test.cc | |
parent | ee672bb4b3919ba8e411ca5bba95e22b288f2831 (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.cc | 5 |
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 |