style: adjust clang-format rules (#2186)

Co-authored-by: Vithorio Polten <reach@vithor.io>
This commit is contained in:
ReenigneArcher
2025-01-19 22:34:47 -05:00
committed by GitHub
parent f57aee9025
commit c2420427b1
158 changed files with 8754 additions and 9994 deletions

View File

@@ -2,15 +2,14 @@
* @file tests/unit/test_audio.cpp
* @brief Test src/audio.*.
*/
#include <src/audio.h>
#include "../tests_common.h"
#include <src/audio.h>
using namespace audio;
struct AudioTest: PlatformTestSuite, testing::WithParamInterface<std::tuple<std::basic_string_view<char>, config_t>> {
void
SetUp() override {
void SetUp() override {
m_config = std::get<1>(GetParam());
m_mail = std::make_shared<safe::mail_raw_t>();
}
@@ -19,8 +18,7 @@ struct AudioTest: PlatformTestSuite, testing::WithParamInterface<std::tuple<std:
safe::mail_t m_mail;
};
constexpr std::bitset<config_t::MAX_FLAGS>
config_flags(int flag = -1) {
constexpr std::bitset<config_t::MAX_FLAGS> config_flags(int flag = -1) {
std::bitset<3> result = std::bitset<config_t::MAX_FLAGS>();
if (flag >= 0) {
result.set(flag);
@@ -32,11 +30,15 @@ INSTANTIATE_TEST_SUITE_P(
Configurations,
AudioTest,
testing::Values(
std::make_tuple("HIGH_STEREO", config_t { 5, 2, 0x3, { 0 }, config_flags(config_t::HIGH_QUALITY) }),
std::make_tuple("SURROUND51", config_t { 5, 6, 0x3F, { 0 }, config_flags() }),
std::make_tuple("SURROUND71", config_t { 5, 8, 0x63F, { 0 }, config_flags() }),
std::make_tuple("SURROUND51_CUSTOM", config_t { 5, 6, 0x3F, { 6, 4, 2, { 0, 1, 4, 5, 2, 3 } }, config_flags(config_t::CUSTOM_SURROUND_PARAMS) })),
[](const auto &info) { return std::string(std::get<0>(info.param)); });
std::make_tuple("HIGH_STEREO", config_t {5, 2, 0x3, {0}, config_flags(config_t::HIGH_QUALITY)}),
std::make_tuple("SURROUND51", config_t {5, 6, 0x3F, {0}, config_flags()}),
std::make_tuple("SURROUND71", config_t {5, 8, 0x63F, {0}, config_flags()}),
std::make_tuple("SURROUND51_CUSTOM", config_t {5, 6, 0x3F, {6, 4, 2, {0, 1, 4, 5, 2, 3}}, config_flags(config_t::CUSTOM_SURROUND_PARAMS)})
),
[](const auto &info) {
return std::string(std::get<0>(info.param));
}
);
TEST_P(AudioTest, TestEncode) {
std::thread timer([&] {