summaryrefslogtreecommitdiffstats
path: root/src/test/enginefilterbiquadtest.cpp
blob: bc3e37c851f000c82775be30d7255e38daaba911 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <gtest/gtest.h>

#include "engine/filters/enginefilterbiquad1.h"

namespace {

class EngineFilterBiquadTest : public testing::Test {
};

TEST_F(EngineFilterBiquadTest, fidlibInputRespectsLocale) {
    char spec[FIDSPEC_LENGTH];

    format_fidspec(spec, sizeof(spec), "%.10f", 1.22);
    ASSERT_DOUBLE_EQ(1.22, strtod(spec, NULL));
}

TEST_F(EngineFilterBiquadTest, fidspecLengthIsLongEnough) {
    // negative sign adds an extra char
    ASSERT_TRUE(FIDSPEC_LENGTH > strlen("LsBq/1.2200000000/-12.0000000000"));
}

} // namespace