mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Add tests for sf::SoundFileReader
This commit is contained in:
parent
7bb97a85b1
commit
cb651c063c
24
test/Audio/SoundFileReader.test.cpp
Normal file
24
test/Audio/SoundFileReader.test.cpp
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#include <SFML/Audio/SoundFileReader.hpp>
|
||||||
|
|
||||||
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
|
TEST_CASE("[Audio] sf::SoundFileReader")
|
||||||
|
{
|
||||||
|
SECTION("Type traits")
|
||||||
|
{
|
||||||
|
STATIC_CHECK(!std::is_constructible_v<sf::SoundFileReader>);
|
||||||
|
STATIC_CHECK(!std::is_copy_constructible_v<sf::SoundFileReader>);
|
||||||
|
STATIC_CHECK(std::is_copy_assignable_v<sf::SoundFileReader>);
|
||||||
|
STATIC_CHECK(!std::is_nothrow_move_constructible_v<sf::SoundFileReader>);
|
||||||
|
STATIC_CHECK(std::is_nothrow_move_assignable_v<sf::SoundFileReader>);
|
||||||
|
STATIC_CHECK(std::has_virtual_destructor_v<sf::SoundFileReader>);
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("Info")
|
||||||
|
{
|
||||||
|
const sf::SoundFileReader::Info info;
|
||||||
|
CHECK(info.sampleCount == 0);
|
||||||
|
CHECK(info.channelCount == 0);
|
||||||
|
CHECK(info.sampleRate == 0);
|
||||||
|
}
|
||||||
|
}
|
@ -138,6 +138,7 @@ set(AUDIO_SRC
|
|||||||
Audio/SoundBuffer.test.cpp
|
Audio/SoundBuffer.test.cpp
|
||||||
Audio/SoundBufferRecorder.test.cpp
|
Audio/SoundBufferRecorder.test.cpp
|
||||||
Audio/SoundFileFactory.test.cpp
|
Audio/SoundFileFactory.test.cpp
|
||||||
|
Audio/SoundFileReader.test.cpp
|
||||||
Audio/SoundRecorder.test.cpp
|
Audio/SoundRecorder.test.cpp
|
||||||
Audio/SoundSource.test.cpp
|
Audio/SoundSource.test.cpp
|
||||||
Audio/SoundStream.test.cpp
|
Audio/SoundStream.test.cpp
|
||||||
|
Loading…
Reference in New Issue
Block a user