SFML/test/Audio/SoundFileReader.test.cpp

25 lines
808 B
C++
Raw Permalink Normal View History

2024-04-17 04:55:52 +08:00
#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);
}
}