From: <sv...@op...> - 2025-03-10 14:40:52
|
Author: manx Date: Mon Mar 10 15:40:34 2025 New Revision: 23012 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23012 Log: [Mod] Test: Display libopenmpt version and source information when running test suite. This makes use of the public API, ensuring that libopenmpt_impl.cpp and wrappers get included in the libopenmpt-test build. Modified: trunk/OpenMPT/test/test.cpp Modified: trunk/OpenMPT/test/test.cpp ============================================================================== --- trunk/OpenMPT/test/test.cpp Mon Mar 10 15:27:09 2025 (r23011) +++ trunk/OpenMPT/test/test.cpp Mon Mar 10 15:40:34 2025 (r23012) @@ -117,6 +117,10 @@ #include "TestTools.h" +#if defined(LIBOPENMPT_BUILD) +#include "../libopenmpt/libopenmpt.hpp" +#endif + // enable tests which may fail spuriously //#define FLAKY_TESTS @@ -171,6 +175,19 @@ { #ifdef LIBOPENMPT_BUILD std::cout << "libopenmpt test suite starting." << std::endl; + std::cout << "libopenmpt library version: " << std::hex << std::setfill('0') << std::setw(8) << openmpt::get_library_version() << std::endl; + std::cout << "libopenmpt core version: " << std::hex << std::setfill('0') << std::setw(8) << openmpt::get_core_version() << std::endl; + std::cout << "libopenmpt library_version: " << openmpt::string::get("library_version") << std::endl; + std::cout << "libopenmpt library_features: " << openmpt::string::get("library_features") << std::endl; + std::cout << "libopenmpt core_version: " << openmpt::string::get("core_version") << std::endl; + std::cout << "libopenmpt source_url: " << openmpt::string::get("source_url") << std::endl; + std::cout << "libopenmpt source_date: " << openmpt::string::get("source_date") << std::endl; + std::cout << "libopenmpt source_revision: " << openmpt::string::get("source_revision") << std::endl; + std::cout << "libopenmpt source_is_modified: " << openmpt::string::get("source_is_modified") << std::endl; + std::cout << "libopenmpt source_has_mixed_revisions: " << openmpt::string::get("source_has_mixed_revisions") << std::endl; + std::cout << "libopenmpt source_is_package: " << openmpt::string::get("source_is_package") << std::endl; + std::cout << "libopenmpt build: " << openmpt::string::get("build") << std::endl; + std::cout << "libopenmpt build_compiler: " << openmpt::string::get("build_compiler") << std::endl; #endif } |