UnitTests: Rename .cpp (it was confusing the debugger)

This commit is contained in:
Jérôme Leclercq
2021-06-04 14:12:26 +02:00
parent 7c9bc16535
commit 8fe11711a3
49 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#include <Nazara/Audio/Algorithm.hpp>
#include <Catch/catch.hpp>
#include <array>
TEST_CASE("MixToMono", "[AUDIO][ALGORITHM]")
{
SECTION("Mix two channels together")
{
std::array<int, 4> input = { { 1, 3, 5, 3 } };
std::array<int, 2> output = { { 0, 0 } };
// Two channels and two frames !
Nz::MixToMono(input.data(), output.data(), 2, 2);
std::array<int, 2> theoric = { { 2, 4 } }; // It's the mean of the two channels
CHECK(output == theoric);
}
}