diff options
author | Aki <please@ignore.pl> | 2024-03-07 23:59:51 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2024-03-07 23:59:51 +0100 |
commit | 3f857bb284d3c8aa99bcd61980e0f0cab2dd8e19 (patch) | |
tree | 4a2724f89ce213b1834d5550229243cccfad9fb3 /StarsEx/test/AudioConfig.cpp | |
parent | 1ef05b8b227194ec32ae49f0eaf3e483ef35bb6b (diff) | |
download | starshatter-3f857bb284d3c8aa99bcd61980e0f0cab2dd8e19.zip starshatter-3f857bb284d3c8aa99bcd61980e0f0cab2dd8e19.tar.gz starshatter-3f857bb284d3c8aa99bcd61980e0f0cab2dd8e19.tar.bz2 |
Added gtest to the project and a stub test for showcase
Diffstat (limited to 'StarsEx/test/AudioConfig.cpp')
-rw-r--r-- | StarsEx/test/AudioConfig.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/StarsEx/test/AudioConfig.cpp b/StarsEx/test/AudioConfig.cpp new file mode 100644 index 0000000..f6a05d4 --- /dev/null +++ b/StarsEx/test/AudioConfig.cpp @@ -0,0 +1,16 @@ +#include <gtest/gtest.h> + +#include <AudioConfig.h> + + +TEST(StarsEx, AudioConfig) +{ + AudioConfig audio; // as a side-effect constructor sets the static instance + ASSERT_EQ(&audio, AudioConfig::GetInstance()); + audio.SetMenuMusic(100); + ASSERT_EQ(0, AudioConfig::MenuMusic()); + audio.SetMenuMusic(50); + ASSERT_EQ(-2500, AudioConfig::MenuMusic()); + audio.SetMenuMusic(0); + ASSERT_EQ(-5000, AudioConfig::MenuMusic()); +} |