diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-08-04 20:10:10 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-08-04 20:10:10 +0000 |
commit | a9bc2d88736cc4d2f2963915e3de66b93585f479 (patch) | |
tree | 33f32417ccbd1af6a714bda55862322d92f1fb2c /tests/main.cpp | |
parent | deb9e8bc74e67ec14a39dd977afbfe345d5586f6 (diff) |
tests: Fixed tests for wchar_t mode, added dummy std::cout/wcout usage for MSVC in order to create locales beforehand (avoids memory leaks during tests), minor additional test fixes
git-svn-id: http://pugixml.googlecode.com/svn/trunk@629 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/main.cpp')
-rw-r--r-- | tests/main.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/main.cpp b/tests/main.cpp index 03ad2f5..2af0a55 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -3,6 +3,7 @@ #include <new> #include <exception> +#include <iostream> #include <stdio.h> #include <float.h> @@ -52,7 +53,7 @@ static void replace_memory_management() pugi::set_memory_management_functions(custom_allocate, custom_deallocate); } -#ifdef __GNUC__ +#if defined(__GNUC__) || defined(__INTEL_COMPILER) #define DECL_THROW(e) throw(e) #define DECL_NOTHROW() throw() #else @@ -179,6 +180,11 @@ int main() #ifdef __BORLANDC__ _control87(MCW_EM | PC_53, MCW_EM | MCW_PC); #endif + +#if defined(_MSC_VER) && !defined(__GNUC__) + std::cout.flush(); + std::wcout.flush(); +#endif replace_memory_management(); |