Skip to content

Commit be039bc

Browse files
committed
[Imp] Test: Print a message after a finished libopenmpt-test run.
git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@22569 56274372-70c3-4bfc-bfc3-4c3a0b034d27
1 parent ff6df8e commit be039bc

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

libopenmpt/libopenmpt_test/libopenmpt_test.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ static mpt::uint8 main() {
4444

4545
using namespace OpenMPT;
4646

47+
Test::PrintHeader();
48+
4749
// run test with "C" / classic() locale
4850
Test::DoTests();
4951

@@ -65,6 +67,8 @@ static mpt::uint8 main() {
6567
// and now, run all tests once again
6668
Test::DoTests();
6769

70+
Test::PrintFooter();
71+
6872
} catch ( const std::exception & e ) {
6973
std::cerr << "TEST ERROR: exception: " << ( e.what() ? e.what() : "" ) << std::endl;
7074
return 255;

test/test.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,20 @@ mpt::PathString GetPathPrefix()
166166
}
167167

168168

169+
void PrintHeader()
170+
{
171+
#ifdef LIBOPENMPT_BUILD
172+
std::cout << "libopenmpt test suite starting." << std::endl;
173+
#endif
174+
}
175+
176+
void PrintFooter()
177+
{
178+
#ifdef LIBOPENMPT_BUILD
179+
std::cout << "libopenmpt test suite finished." << std::endl;
180+
#endif
181+
}
182+
169183
void DoTests()
170184
{
171185

@@ -175,7 +189,7 @@ void DoTests()
175189
std::clog << std::flush;
176190
std::cerr << std::flush;
177191

178-
std::cout << "libopenmpt test suite" << std::endl;
192+
std::cout << "libopenmpt test run" << std::endl;
179193

180194
std::cout << "Version: " << mpt::ToCharset(mpt::Charset::ASCII, Build::GetVersionString(Build::StringVersion | Build::StringRevision | Build::StringSourceInfo | Build::StringBuildFlags | Build::StringBuildFeatures)) << std::endl;
181195
std::cout << "Compiler: " << mpt::ToCharset(mpt::Charset::ASCII, Build::GetBuildCompilerString()) << std::endl;

test/test.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ OPENMPT_NAMESPACE_BEGIN
1717

1818
namespace Test {
1919

20+
void PrintHeader();
21+
22+
void PrintFooter();
23+
2024
void DoTests();
2125

2226
} // namespace Test

0 commit comments

Comments
 (0)