From: <sv...@op...> - 2024-12-18 15:59:07
|
Author: manx Date: Wed Dec 18 16:58:55 2024 New Revision: 22569 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22569 Log: [Imp] Test: Print a message after a finished libopenmpt-test run. Modified: trunk/OpenMPT/libopenmpt/libopenmpt_test/libopenmpt_test.cpp trunk/OpenMPT/test/test.cpp trunk/OpenMPT/test/test.h Modified: trunk/OpenMPT/libopenmpt/libopenmpt_test/libopenmpt_test.cpp ============================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_test/libopenmpt_test.cpp Wed Dec 18 16:47:05 2024 (r22568) +++ trunk/OpenMPT/libopenmpt/libopenmpt_test/libopenmpt_test.cpp Wed Dec 18 16:58:55 2024 (r22569) @@ -44,6 +44,8 @@ using namespace OpenMPT; + Test::PrintHeader(); + // run test with "C" / classic() locale Test::DoTests(); @@ -65,6 +67,8 @@ // and now, run all tests once again Test::DoTests(); + Test::PrintFooter(); + } catch ( const std::exception & e ) { std::cerr << "TEST ERROR: exception: " << ( e.what() ? e.what() : "" ) << std::endl; return 255; Modified: trunk/OpenMPT/test/test.cpp ============================================================================== --- trunk/OpenMPT/test/test.cpp Wed Dec 18 16:47:05 2024 (r22568) +++ trunk/OpenMPT/test/test.cpp Wed Dec 18 16:58:55 2024 (r22569) @@ -166,6 +166,20 @@ } +void PrintHeader() +{ + #ifdef LIBOPENMPT_BUILD + std::cout << "libopenmpt test suite starting." << std::endl; + #endif +} + +void PrintFooter() +{ + #ifdef LIBOPENMPT_BUILD + std::cout << "libopenmpt test suite finished." << std::endl; + #endif +} + void DoTests() { @@ -175,7 +189,7 @@ std::clog << std::flush; std::cerr << std::flush; - std::cout << "libopenmpt test suite" << std::endl; + std::cout << "libopenmpt test run" << std::endl; std::cout << "Version: " << mpt::ToCharset(mpt::Charset::ASCII, Build::GetVersionString(Build::StringVersion | Build::StringRevision | Build::StringSourceInfo | Build::StringBuildFlags | Build::StringBuildFeatures)) << std::endl; std::cout << "Compiler: " << mpt::ToCharset(mpt::Charset::ASCII, Build::GetBuildCompilerString()) << std::endl; Modified: trunk/OpenMPT/test/test.h ============================================================================== --- trunk/OpenMPT/test/test.h Wed Dec 18 16:47:05 2024 (r22568) +++ trunk/OpenMPT/test/test.h Wed Dec 18 16:58:55 2024 (r22569) @@ -17,6 +17,10 @@ namespace Test { +void PrintHeader(); + +void PrintFooter(); + void DoTests(); } // namespace Test |