diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-21 20:03:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-21 20:03:51 +0300 |
commit | 76667ef0fa911fc8bf37df72896645dbfbbc0763 (patch) | |
tree | 4868b15a1c7e9d74e3c2ece0fff49ae61ff49be7 /src | |
parent | 9534d791fe73868c17ff3723d3eacee020a4a215 (diff) | |
download | plus-76667ef0fa911fc8bf37df72896645dbfbbc0763.tar.gz plus-76667ef0fa911fc8bf37df72896645dbfbbc0763.tar.bz2 plus-76667ef0fa911fc8bf37df72896645dbfbbc0763.tar.xz plus-76667ef0fa911fc8bf37df72896645dbfbbc0763.zip |
Add sdl mixer version into libs version dump.
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/dumplibs.cpp | 6 | ||||
-rw-r--r-- | src/utils/dumplibs_unittest.cc | 17 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/utils/dumplibs.cpp b/src/utils/dumplibs.cpp index 8fb7036bf..34b63e71a 100644 --- a/src/utils/dumplibs.cpp +++ b/src/utils/dumplibs.cpp @@ -26,6 +26,7 @@ #include <png.h> #include <SDL_image.h> +#include <SDL_mixer.h> PRAGMACLANG6(GCC diagnostic push) PRAGMACLANG6(GCC diagnostic ignored "-Wold-style-cast") #include <SDL_net.h> @@ -127,6 +128,7 @@ void dumpLibs() dumpCompiledSdlVersion("SDL", SDL); dumpCompiledSdlVersion("SDL_net", SDL_NET); dumpCompiledSdlVersion("SDL_image", SDL_IMAGE); + dumpCompiledSdlVersion("SDL_mixer", SDL_MIXER); dumpCompiledSdlVersion("SDL_ttf", SDL_TTF); logger->log("Linked with:"); @@ -154,6 +156,7 @@ void dumpLibs() #endif // USE_SDL2 dumpLinkedSdlVersion("SDL_net", SDLNet_Linked_Version()); dumpLinkedSdlVersion("SDL_image", IMG_Linked_Version()); + dumpLinkedSdlVersion("SDL_mixer", Mix_Linked_Version()); dumpLinkedSdlVersion("SDL_ttf", TTF_Linked_Version()); compareVersions("zLib", ZLIB_VERSION, zlibVersion()); @@ -170,6 +173,9 @@ void dumpLibs() compareSDLVersions("SDL_image", sdlVersionJoin(SDL_IMAGE), IMG_Linked_Version()); + compareSDLVersions("SDL_mixer", + sdlVersionJoin(SDL_MIXER), + Mix_Linked_Version()); compareSDLVersions("SDL_ttf", sdlVersionJoin(SDL_TTF), TTF_Linked_Version()); diff --git a/src/utils/dumplibs_unittest.cc b/src/utils/dumplibs_unittest.cc index d89dee5fd..aca0f91f3 100644 --- a/src/utils/dumplibs_unittest.cc +++ b/src/utils/dumplibs_unittest.cc @@ -25,6 +25,7 @@ #include "utils/stringutils.h" #include <SDL_image.h> +#include <SDL_mixer.h> PRAGMACLANG6(GCC diagnostic push) PRAGMACLANG6(GCC diagnostic ignored "-Wold-style-cast") #include <SDL_net.h> @@ -123,6 +124,22 @@ TEST_CASE("dumplibs tests") REQUIRE(build == link); } + SECTION("sdl_mixer") + { + const SDL_version *const linkVersion = Mix_Linked_Version(); + + const std::string build = strprintf("%d.%d.%d", + SDL_MIXER_MAJOR_VERSION, + SDL_MIXER_MINOR_VERSION, + SDL_MIXER_PATCHLEVEL); + const std::string link = strprintf("%d.%d.%d", + linkVersion->major, + linkVersion->minor, + linkVersion->patch); + + REQUIRE(build == link); + } + SECTION("sdl_ttf") { const SDL_version *const linkVersion = TTF_Linked_Version(); |