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,22 @@
#include <Nazara/Audio/SoundBuffer.hpp>
#include <Catch/catch.hpp>
std::filesystem::path GetResourceDir();
SCENARIO("SoundBuffer", "[AUDIO][SOUNDBUFFER]")
{
GIVEN("A sound buffer")
{
WHEN("We load our sound")
{
std::shared_ptr<Nz::SoundBuffer> soundBuffer = Nz::SoundBuffer::LoadFromFile(GetResourceDir() / "Engine/Audio/Cat.flac");
REQUIRE(soundBuffer);
THEN("We can ask the informations of the file")
{
REQUIRE(soundBuffer->GetDuration() <= 8500); // 8s = 8000ms
REQUIRE(soundBuffer->GetDuration() >= 8000);
}
}
}
}