style: reformat C/C++ sources and headers with clang-format
Run clang-format over all project C/C++ source and header files (.c, .cpp, .cc, .h, .hpp, .hh, .m, .mm) under app/ and tests/. Non-source files (svg, qm, qrc, etc.) were not touched.
This commit is contained in:
@@ -4,49 +4,49 @@
|
||||
|
||||
TEST(CommonDecibel, FromLinearZeroReturnsMinimum)
|
||||
{
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::fromLinear(0.0), olive::Decibel::MINIMUM);
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::fromLinear(0.0), olive::Decibel::MINIMUM);
|
||||
}
|
||||
|
||||
TEST(CommonDecibel, FromLinearOneReturnsZero)
|
||||
{
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::fromLinear(1.0), 0.0);
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::fromLinear(1.0), 0.0);
|
||||
}
|
||||
|
||||
TEST(CommonDecibel, FromLinearTenReturnsTwenty)
|
||||
{
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::fromLinear(10.0), 20.0);
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::fromLinear(10.0), 20.0);
|
||||
}
|
||||
|
||||
TEST(CommonDecibel, ToLinearZeroReturnsOne)
|
||||
{
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::toLinear(0.0), 1.0);
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::toLinear(0.0), 1.0);
|
||||
}
|
||||
|
||||
TEST(CommonDecibel, ToLinearMinimumReturnsZero)
|
||||
{
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::toLinear(olive::Decibel::MINIMUM), 0.0);
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::toLinear(olive::Decibel::MINIMUM), 0.0);
|
||||
}
|
||||
|
||||
TEST(CommonDecibel, ToLinearTwentyReturnsTen)
|
||||
{
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::toLinear(20.0), 10.0);
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::toLinear(20.0), 10.0);
|
||||
}
|
||||
|
||||
TEST(CommonDecibel, FromLogarithmicAtEdges)
|
||||
{
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::fromLogarithmic(0.0),
|
||||
olive::Decibel::MINIMUM);
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::fromLogarithmic(1.0), 0.0);
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::fromLogarithmic(0.0),
|
||||
olive::Decibel::MINIMUM);
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::fromLogarithmic(1.0), 0.0);
|
||||
}
|
||||
|
||||
TEST(CommonDecibel, ToLogarithmicAtEdges)
|
||||
{
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::toLogarithmic(0.0), 1.0);
|
||||
EXPECT_DOUBLE_EQ(olive::Decibel::toLogarithmic(0.0), 1.0);
|
||||
}
|
||||
|
||||
TEST(CommonDecibel, LinearLogarithmicRoundTrip)
|
||||
{
|
||||
EXPECT_NEAR(olive::Decibel::LogarithmicToLinear(
|
||||
olive::Decibel::LinearToLogarithmic(0.5)),
|
||||
0.5, 1e-6);
|
||||
EXPECT_NEAR(olive::Decibel::LogarithmicToLinear(
|
||||
olive::Decibel::LinearToLogarithmic(0.5)),
|
||||
0.5, 1e-6);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user