diff --git a/test/Audio/SoundFileReader.test.cpp b/test/Audio/SoundFileReader.test.cpp new file mode 100644 index 000000000..906901073 --- /dev/null +++ b/test/Audio/SoundFileReader.test.cpp @@ -0,0 +1,24 @@ +#include + +#include + +TEST_CASE("[Audio] sf::SoundFileReader") +{ + SECTION("Type traits") + { + STATIC_CHECK(!std::is_constructible_v); + STATIC_CHECK(!std::is_copy_constructible_v); + STATIC_CHECK(std::is_copy_assignable_v); + STATIC_CHECK(!std::is_nothrow_move_constructible_v); + STATIC_CHECK(std::is_nothrow_move_assignable_v); + STATIC_CHECK(std::has_virtual_destructor_v); + } + + SECTION("Info") + { + const sf::SoundFileReader::Info info; + CHECK(info.sampleCount == 0); + CHECK(info.channelCount == 0); + CHECK(info.sampleRate == 0); + } +} diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f5a81ec17..4051c4cbe 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -138,6 +138,7 @@ set(AUDIO_SRC Audio/SoundBuffer.test.cpp Audio/SoundBufferRecorder.test.cpp Audio/SoundFileFactory.test.cpp + Audio/SoundFileReader.test.cpp Audio/SoundRecorder.test.cpp Audio/SoundSource.test.cpp Audio/SoundStream.test.cpp