SFML/test/Audio/SoundStream.test.cpp
Chris Thrasher d6e1961112 Ensure struct data members are given an initial value
While I don't suspect there are any uninitialize variable bugs
present, it's still good to err on the side of safety and provide
an initial value nonetheless.
2024-04-16 19:14:38 -06:00

25 lines
697 B
C++

#include <SFML/Audio/SoundStream.hpp>
#include <catch2/catch_test_macros.hpp>
#include <type_traits>
TEST_CASE("[Audio] sf::SoundStream")
{
SECTION("Type traits")
{
STATIC_CHECK(!std::is_constructible_v<sf::SoundStream>);
STATIC_CHECK(!std::is_copy_constructible_v<sf::SoundStream>);
STATIC_CHECK(!std::is_copy_assignable_v<sf::SoundStream>);
STATIC_CHECK(!std::is_nothrow_move_constructible_v<sf::SoundStream>);
STATIC_CHECK(!std::is_nothrow_move_assignable_v<sf::SoundStream>);
}
SECTION("Chunk")
{
const sf::SoundStream::Chunk chunk;
CHECK(chunk.samples == nullptr);
CHECK(chunk.sampleCount == 0);
}
}