Skip to content

Commit

Permalink
Cleanup unit test names
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiashienzsch committed Feb 17, 2024
1 parent 9c0343d commit 09203b6
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 33 deletions.
6 changes: 3 additions & 3 deletions lib/grit/audio/airwindows/airwindows_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ auto test() -> void
}
}

TEMPLATE_TEST_CASE("grit/audio/airwindows: AirWindowsFireAmp", "", float, double)
TEMPLATE_TEST_CASE("audio/airwindows: AirWindowsFireAmp", "", float, double)
{
test<grit::AirWindowsFireAmp<TestType>>();
}

TEMPLATE_TEST_CASE("grit/audio/airwindows: AirWindowsGrindAmp", "", float, double)
TEMPLATE_TEST_CASE("audio/airwindows: AirWindowsGrindAmp", "", float, double)
{
test<grit::AirWindowsGrindAmp<TestType>>();
}

TEMPLATE_TEST_CASE("grit/audio/airwindows: AirWindowsVinylDither", "", float, double)
TEMPLATE_TEST_CASE("audio/airwindows: AirWindowsVinylDither", "", float, double)
{
using Float = TestType;

Expand Down
2 changes: 1 addition & 1 deletion lib/grit/audio/dynamic/transient_shaper_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <catch2/catch_approx.hpp>
#include <catch2/catch_template_test_macros.hpp>

TEMPLATE_TEST_CASE("grit/audio/dynamic: TransientShaper", "", float, double)
TEMPLATE_TEST_CASE("audio/dynamic: TransientShaper", "", float, double)
{
using Float = TestType;

Expand Down
2 changes: 1 addition & 1 deletion lib/grit/audio/envelope/envelope_follower_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <catch2/catch_approx.hpp>
#include <catch2/catch_template_test_macros.hpp>

TEMPLATE_TEST_CASE("grit/audio/envelope: EnvelopeFollower", "", float, double)
TEMPLATE_TEST_CASE("audio/envelope: EnvelopeFollower", "", float, double)
{
using Float = TestType;

Expand Down
2 changes: 1 addition & 1 deletion lib/grit/audio/music/note_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <catch2/catch_approx.hpp>
#include <catch2/catch_template_test_macros.hpp>

TEMPLATE_TEST_CASE("grit/audio/music: noteToHertz", "", float, double)
TEMPLATE_TEST_CASE("audio/music: noteToHertz", "", float, double)
{
using Float = TestType;

Expand Down
2 changes: 1 addition & 1 deletion lib/grit/audio/noise/white_noise_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <catch2/catch_approx.hpp>
#include <catch2/catch_template_test_macros.hpp>

TEMPLATE_TEST_CASE("grit/audio/noise: WhiteNoise", "", float, double)
TEMPLATE_TEST_CASE("audio/noise: WhiteNoise", "", float, double)
{
using Float = TestType;

Expand Down
18 changes: 9 additions & 9 deletions lib/grit/audio/stereo/stereo_frame_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,45 @@

using namespace grit;

TEMPLATE_TEST_CASE("grit/audio/stereo: StereoFrame", "[stereo]", float, double)
TEMPLATE_TEST_CASE("audio/stereo: StereoFrame", "[stereo]", float, double)
{
using T = TestType;
STATIC_REQUIRE(etl::same_as<typename StereoFrame<T>::value_type, T>);
}

TEMPLATE_TEST_CASE("grit/audio/stereo: operator+(StereoFrame)", "[stereo]", float, double)
TEMPLATE_TEST_CASE("audio/stereo: operator+(StereoFrame)", "[stereo]", float, double)
{
using T = TestType;
auto const result = StereoFrame<T>{T(1), T(2)} + T(1);
REQUIRE(result.left == Catch::Approx(2));
REQUIRE(result.right == Catch::Approx(3));
}

TEMPLATE_TEST_CASE("grit/audio/stereo: operator-(StereoFrame)", "[stereo]", float, double)
TEMPLATE_TEST_CASE("audio/stereo: operator-(StereoFrame)", "[stereo]", float, double)
{
using T = TestType;
auto const result = StereoFrame<T>{T(1), T(2)} - T(1);
REQUIRE(result.left == Catch::Approx(0));
REQUIRE(result.right == Catch::Approx(1));
}

TEMPLATE_TEST_CASE("grit/audio/stereo: operator*(StereoFrame)", "[stereo]", float, double)
TEMPLATE_TEST_CASE("audio/stereo: operator*(StereoFrame)", "[stereo]", float, double)
{
using T = TestType;
auto const result = StereoFrame<T>{T(1), T(2)} * T(2);
REQUIRE(result.left == Catch::Approx(2));
REQUIRE(result.right == Catch::Approx(4));
}

TEMPLATE_TEST_CASE("grit/audio/stereo: operator/(StereoFrame)", "[stereo]", float, double)
TEMPLATE_TEST_CASE("audio/stereo: operator/(StereoFrame)", "[stereo]", float, double)
{
using T = TestType;
auto const result = StereoFrame<T>{T(1), T(2)} / T(2);
REQUIRE(result.left == Catch::Approx(0.5));
REQUIRE(result.right == Catch::Approx(1));
}

TEMPLATE_TEST_CASE("grit/audio/stereo: operator+=(StereoFrame)", "[stereo]", float, double)
TEMPLATE_TEST_CASE("audio/stereo: operator+=(StereoFrame)", "[stereo]", float, double)
{
using T = TestType;
auto result = StereoFrame<T>{T(1), T(2)};
Expand All @@ -54,7 +54,7 @@ TEMPLATE_TEST_CASE("grit/audio/stereo: operator+=(StereoFrame)", "[stereo]", flo
REQUIRE(result.right == Catch::Approx(3));
}

TEMPLATE_TEST_CASE("grit/audio/stereo: operator-=(StereoFrame)", "[stereo]", float, double)
TEMPLATE_TEST_CASE("audio/stereo: operator-=(StereoFrame)", "[stereo]", float, double)
{
using T = TestType;
auto result = StereoFrame<T>{T(1), T(2)};
Expand All @@ -63,7 +63,7 @@ TEMPLATE_TEST_CASE("grit/audio/stereo: operator-=(StereoFrame)", "[stereo]", flo
REQUIRE(result.right == Catch::Approx(1));
}

TEMPLATE_TEST_CASE("grit/audio/stereo: operator*=(StereoFrame)", "[stereo]", float, double)
TEMPLATE_TEST_CASE("audio/stereo: operator*=(StereoFrame)", "[stereo]", float, double)
{
using T = TestType;
auto result = StereoFrame<T>{T(1), T(2)};
Expand All @@ -72,7 +72,7 @@ TEMPLATE_TEST_CASE("grit/audio/stereo: operator*=(StereoFrame)", "[stereo]", flo
REQUIRE(result.right == Catch::Approx(4));
}

TEMPLATE_TEST_CASE("grit/audio/stereo: operator/=(StereoFrame)", "[stereo]", float, double)
TEMPLATE_TEST_CASE("audio/stereo: operator/=(StereoFrame)", "[stereo]", float, double)
{
using T = TestType;
auto result = StereoFrame<T>{T(1), T(2)};
Expand Down
4 changes: 2 additions & 2 deletions lib/grit/audio/waveshape/diode_rectifier_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <catch2/catch_approx.hpp>
#include <catch2/catch_template_test_macros.hpp>

TEMPLATE_TEST_CASE("grit/audio/waveshape: DiodeRectifier", "", double)
TEMPLATE_TEST_CASE("audio/waveshape: DiodeRectifier", "", double)
{
using Float = TestType;

Expand All @@ -16,7 +16,7 @@ TEMPLATE_TEST_CASE("grit/audio/waveshape: DiodeRectifier", "", double)
REQUIRE(shaper(Float(+1.0)) == Catch::Approx(+0.9978904933));
}

TEMPLATE_TEST_CASE("grit/audio/waveshape: DiodeRectifierADAA1", "", float, double)
TEMPLATE_TEST_CASE("audio/waveshape: DiodeRectifierADAA1", "", float, double)
{
using Float = TestType;

Expand Down
2 changes: 1 addition & 1 deletion lib/grit/audio/waveshape/full_wave_rectifier_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <catch2/catch_approx.hpp>
#include <catch2/catch_template_test_macros.hpp>

TEMPLATE_TEST_CASE("grit/audio/waveshape: FullWaveRectifier", "", float, double)
TEMPLATE_TEST_CASE("audio/waveshape: FullWaveRectifier", "", float, double)
{
using Float = TestType;

Expand Down
2 changes: 1 addition & 1 deletion lib/grit/audio/waveshape/half_wave_rectifier_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <catch2/catch_approx.hpp>
#include <catch2/catch_template_test_macros.hpp>

TEMPLATE_TEST_CASE("grit/audio/waveshape: HalfWaveRectifier", "", float, double)
TEMPLATE_TEST_CASE("audio/waveshape: HalfWaveRectifier", "", float, double)
{
using Float = TestType;

Expand Down
2 changes: 1 addition & 1 deletion lib/grit/audio/waveshape/hard_clipper_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <catch2/catch_approx.hpp>
#include <catch2/catch_template_test_macros.hpp>

TEMPLATE_TEST_CASE("grit/audio/waveshape: HardClipper", "", float, double)
TEMPLATE_TEST_CASE("audio/waveshape: HardClipper", "", float, double)
{
using Float = TestType;

Expand Down
4 changes: 2 additions & 2 deletions lib/grit/audio/waveshape/tanh_clipper_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <catch2/catch_approx.hpp>
#include <catch2/catch_template_test_macros.hpp>

TEMPLATE_TEST_CASE("grit/audio/waveshape: TanhClipper", "", float, double)
TEMPLATE_TEST_CASE("audio/waveshape: TanhClipper", "", float, double)
{
using Float = TestType;

Expand All @@ -19,7 +19,7 @@ TEMPLATE_TEST_CASE("grit/audio/waveshape: TanhClipper", "", float, double)
REQUIRE(shaper(Float(+1.0)) == Catch::Approx(+0.7615941559));
}

TEMPLATE_TEST_CASE("grit/audio/waveshape: TanhClipperADAA1", "", float, double)
TEMPLATE_TEST_CASE("audio/waveshape: TanhClipperADAA1", "", float, double)
{
using Float = TestType;

Expand Down
4 changes: 2 additions & 2 deletions lib/grit/eurorack_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <etl/algorithm.hpp>
#include <etl/random.hpp>

TEST_CASE("grit/audio/eurorack: Hades")
TEST_CASE("audio/eurorack: Hades")
{
static constexpr auto blockSize = 32;

Expand Down Expand Up @@ -85,7 +85,7 @@ TEST_CASE("grit/audio/eurorack: Hades")
}
}

TEST_CASE("grit/audio/eurorack: Amp")
TEST_CASE("audio/eurorack: Amp")
{
static constexpr auto blockSize = 32;

Expand Down
4 changes: 2 additions & 2 deletions lib/grit/fft/fft_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ auto testComplexPlan() -> void
}
}

TEMPLATE_TEST_CASE("grit/fft: ComplexPlan", "", etl::complex<float>, etl::complex<double>)
TEMPLATE_TEST_CASE("fft: ComplexPlan", "", etl::complex<float>, etl::complex<double>)
{
testComplexPlan<grit::fft::ComplexPlan<TestType, 64>>();
testComplexPlan<grit::fft::ComplexPlan<TestType, 128>>();
Expand All @@ -39,7 +39,7 @@ TEMPLATE_TEST_CASE("grit/fft: ComplexPlan", "", etl::complex<float>, etl::comple
testComplexPlan<grit::fft::ComplexPlan<TestType, 1024>>();
}

TEMPLATE_TEST_CASE("grit/fft: ComplexPlanV2", "", etl::complex<float>, etl::complex<double>)
TEMPLATE_TEST_CASE("fft: ComplexPlanV2", "", etl::complex<float>, etl::complex<double>)
{
testComplexPlan<grit::fft::ComplexPlanV2<TestType, 64>>();
testComplexPlan<grit::fft::ComplexPlanV2<TestType, 128>>();
Expand Down
2 changes: 1 addition & 1 deletion lib/grit/math/normalizable_range_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <catch2/catch_approx.hpp>
#include <catch2/catch_template_test_macros.hpp>

TEMPLATE_TEST_CASE("grit/math: NormalizableRange", "", float, double)
TEMPLATE_TEST_CASE("math: NormalizableRange", "", float, double)
{
using Float = TestType;
using Range = grit::NormalizableRange<Float>;
Expand Down
2 changes: 1 addition & 1 deletion lib/grit/math/power_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ TEMPLATE_TEST_CASE(
REQUIRE(grit::power<3>(Int(3)) == 27);
}

TEMPLATE_TEST_CASE("grit/math: power", "", float, double)
TEMPLATE_TEST_CASE("math: power", "", float, double)
{
using Float = TestType;

Expand Down
4 changes: 2 additions & 2 deletions lib/grit/math/static_lookup_table_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <catch2/catch_approx.hpp>
#include <catch2/catch_template_test_macros.hpp>

TEMPLATE_TEST_CASE("grit/math: StaticLookupTable", "", float, double)
TEMPLATE_TEST_CASE("math: StaticLookupTable", "", float, double)
{
using Float = TestType;

Expand All @@ -23,7 +23,7 @@ TEMPLATE_TEST_CASE("grit/math: StaticLookupTable", "", float, double)
REQUIRE(lut.at(Float(128)) == Catch::Approx(126.0));
}

TEMPLATE_TEST_CASE("grit/math: StaticLookupTableTransform", "", float, double)
TEMPLATE_TEST_CASE("math: StaticLookupTableTransform", "", float, double)
{
using Float = TestType;

Expand Down
4 changes: 2 additions & 2 deletions lib/grit/unit/decibel_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <catch2/catch_approx.hpp>
#include <catch2/catch_template_test_macros.hpp>

TEMPLATE_TEST_CASE("grit/unit: toDecibels/fromDecibels", "", float, double)
TEMPLATE_TEST_CASE("unit: toDecibels/fromDecibels", "", float, double)
{
using Float = TestType;

Expand All @@ -18,7 +18,7 @@ TEMPLATE_TEST_CASE("grit/unit: toDecibels/fromDecibels", "", float, double)
REQUIRE(grit::toDecibels(grit::fromDecibels(Float(-12))) == Catch::Approx(Float(-12)));
}

TEMPLATE_TEST_CASE("grit/unit: Decibels", "", float, double)
TEMPLATE_TEST_CASE("unit: Decibels", "", float, double)
{
using Float = TestType;

Expand Down

0 comments on commit 09203b6

Please sign in to comment.