123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #include "openmpt/all/BuildSettings.hpp"
- #include "libopenmpt_internal.h"
- #include "test/test.h"
- #include <iostream>
- #include <locale>
- #include <clocale>
- #include <cstdlib>
- using namespace OpenMPT;
- #if defined( LIBOPENMPT_BUILD_TEST )
- #if (defined(_WIN32) || defined(WIN32)) && (defined(_UNICODE) || defined(UNICODE))
- #if defined(__GNUC__) || (defined(__clang__) && !defined(_MSC_VER))
- extern "C" int wmain( int , wchar_t * [] );
- extern "C"
- #endif
- int wmain( int , wchar_t * [] ) {
- #else
- int main( int , char * [] ) {
- #endif
- try {
-
-
- Test::DoTests();
-
- setlocale( LC_ALL, "" );
-
-
- Test::DoTests();
-
-
- try {
- std::locale old = std::locale::global( std::locale( "" ) );
- (void)old;
- } catch ( ... ) {
-
-
- }
-
-
- Test::DoTests();
- } catch ( const std::exception & e ) {
- std::cerr << "TEST ERROR: exception: " << ( e.what() ? e.what() : "" ) << std::endl;
- return -1;
- } catch ( ... ) {
- std::cerr << "TEST ERROR: unknown exception" << std::endl;
- return -1;
- }
- return 0;
- }
- #endif
|