From a9bc2d88736cc4d2f2963915e3de66b93585f479 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Wed, 4 Aug 2010 20:10:10 +0000 Subject: 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 --- tests/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/main.cpp') 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 #include +#include #include #include @@ -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(); -- cgit v1.2.3