mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 21:36:13 +01:00
Add tests for Audio module
This commit is contained in:
1 parent
ae540e2396
commit
e7a41e864f
2 files changed
+36
No files matched your search
@@ -0,0 +1,29 @@
|
|||||||
|
#include <CSFML/Audio/SoundChannel.h>
|
||||||
|
|
||||||
|
#include <SFML/Audio/SoundChannel.hpp>
|
||||||
|
|
||||||
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
|
TEST_CASE("[Audio] sfSoundChannel")
|
||||||
|
{
|
||||||
|
STATIC_CHECK(sfSoundChannelUnspecified == static_cast<int>(sf::SoundChannel::Unspecified));
|
||||||
|
STATIC_CHECK(sfSoundChannelMono == static_cast<int>(sf::SoundChannel::Mono));
|
||||||
|
STATIC_CHECK(sfSoundChannelFrontLeft == static_cast<int>(sf::SoundChannel::FrontLeft));
|
||||||
|
STATIC_CHECK(sfSoundChannelFrontRight == static_cast<int>(sf::SoundChannel::FrontRight));
|
||||||
|
STATIC_CHECK(sfSoundChannelFrontCenter == static_cast<int>(sf::SoundChannel::FrontCenter));
|
||||||
|
STATIC_CHECK(sfSoundChannelFrontLeftOfCenter == static_cast<int>(sf::SoundChannel::FrontLeftOfCenter));
|
||||||
|
STATIC_CHECK(sfSoundChannelFrontRightOfCenter == static_cast<int>(sf::SoundChannel::FrontRightOfCenter));
|
||||||
|
STATIC_CHECK(sfSoundChannelLowFrequencyEffects == static_cast<int>(sf::SoundChannel::LowFrequencyEffects));
|
||||||
|
STATIC_CHECK(sfSoundChannelBackLeft == static_cast<int>(sf::SoundChannel::BackLeft));
|
||||||
|
STATIC_CHECK(sfSoundChannelBackRight == static_cast<int>(sf::SoundChannel::BackRight));
|
||||||
|
STATIC_CHECK(sfSoundChannelBackCenter == static_cast<int>(sf::SoundChannel::BackCenter));
|
||||||
|
STATIC_CHECK(sfSoundChannelSideLeft == static_cast<int>(sf::SoundChannel::SideLeft));
|
||||||
|
STATIC_CHECK(sfSoundChannelSideRight == static_cast<int>(sf::SoundChannel::SideRight));
|
||||||
|
STATIC_CHECK(sfSoundChannelTopCenter == static_cast<int>(sf::SoundChannel::TopCenter));
|
||||||
|
STATIC_CHECK(sfSoundChannelTopFrontLeft == static_cast<int>(sf::SoundChannel::TopFrontLeft));
|
||||||
|
STATIC_CHECK(sfSoundChannelTopFrontRight == static_cast<int>(sf::SoundChannel::TopFrontRight));
|
||||||
|
STATIC_CHECK(sfSoundChannelTopFrontCenter == static_cast<int>(sf::SoundChannel::TopFrontCenter));
|
||||||
|
STATIC_CHECK(sfSoundChannelTopBackLeft == static_cast<int>(sf::SoundChannel::TopBackLeft));
|
||||||
|
STATIC_CHECK(sfSoundChannelTopBackRight == static_cast<int>(sf::SoundChannel::TopBackRight));
|
||||||
|
STATIC_CHECK(sfSoundChannelTopBackCenter == static_cast<int>(sf::SoundChannel::TopBackCenter));
|
||||||
|
}
|
||||||
@@ -54,6 +54,13 @@ target_link_libraries(test-csfml-network PRIVATE csfml-network Catch2::Catch2Wit
|
|||||||
set_target_warnings(test-csfml-network)
|
set_target_warnings(test-csfml-network)
|
||||||
catch_discover_tests(test-csfml-network)
|
catch_discover_tests(test-csfml-network)
|
||||||
|
|
||||||
|
add_executable(test-csfml-audio
|
||||||
|
Audio/SoundChannel.test.cpp
|
||||||
|
)
|
||||||
|
target_link_libraries(test-csfml-audio PRIVATE csfml-audio Catch2::Catch2WithMain SFML::Audio)
|
||||||
|
set_target_warnings(test-csfml-audio)
|
||||||
|
catch_discover_tests(test-csfml-audio)
|
||||||
|
|
||||||
# Copy DLLs into the same directory
|
# Copy DLLs into the same directory
|
||||||
if(SFML_OS_WINDOWS AND NOT CSFML_LINK_SFML_STATICALLY)
|
if(SFML_OS_WINDOWS AND NOT CSFML_LINK_SFML_STATICALLY)
|
||||||
foreach(SFML_TARGET SFML::System SFML::Window SFML::Graphics SFML::Audio SFML::Network)
|
foreach(SFML_TARGET SFML::System SFML::Window SFML::Graphics SFML::Audio SFML::Network)
|
||||||
|
|||||||
Reference in new issue
Block a user