From 9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74 Mon Sep 17 00:00:00 2001 From: rdivacky Date: Tue, 13 Jul 2010 17:19:57 +0000 Subject: Update LLVM to r108243. --- .../unittest/googletest/include/gtest/gtest-message.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'utils/unittest/googletest/include/gtest/gtest-message.h') diff --git a/utils/unittest/googletest/include/gtest/gtest-message.h b/utils/unittest/googletest/include/gtest/gtest-message.h index 7effd08..f135b69 100644 --- a/utils/unittest/googletest/include/gtest/gtest-message.h +++ b/utils/unittest/googletest/include/gtest/gtest-message.h @@ -46,6 +46,8 @@ #ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ #define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ +#include + #include #include @@ -77,7 +79,7 @@ namespace testing { // latter (it causes an access violation if you do). The Message // class hides this difference by treating a NULL char pointer as // "(null)". -class Message { +class GTEST_API_ Message { private: // The type of basic IO manipulators (endl, ends, and flush) for // narrow streams. @@ -89,7 +91,11 @@ class Message { // ASSERT/EXPECT in a procedure adds over 200 bytes to the procedure's // stack frame leading to huge stack frames in some cases; gcc does not reuse // the stack space. - Message() : ss_(new internal::StrStream) {} + Message() : ss_(new internal::StrStream) { + // By default, we want there to be enough precision when printing + // a double to a Message. + *ss_ << std::setprecision(std::numeric_limits::digits10 + 2); + } // Copy constructor. Message(const Message& msg) : ss_(new internal::StrStream) { // NOLINT @@ -102,7 +108,7 @@ class Message { } ~Message() { delete ss_; } -#ifdef GTEST_OS_SYMBIAN +#if GTEST_OS_SYMBIAN // Streams a value (either a pointer or not) to this object. template inline Message& operator <<(const T& value) { @@ -187,13 +193,13 @@ class Message { } private: -#ifdef GTEST_OS_SYMBIAN +#if GTEST_OS_SYMBIAN // These are needed as the Nokia Symbian Compiler cannot decide between // const T& and const T* in a function template. The Nokia compiler _can_ // decide between class template specializations for T and T*, so a // tr1::type_traits-like is_pointer works, and we can overload on that. template - inline void StreamHelper(internal::true_type dummy, T* pointer) { + inline void StreamHelper(internal::true_type /*dummy*/, T* pointer) { if (pointer == NULL) { *ss_ << "(null)"; } else { @@ -201,7 +207,7 @@ class Message { } } template - inline void StreamHelper(internal::false_type dummy, const T& value) { + inline void StreamHelper(internal::false_type /*dummy*/, const T& value) { ::GTestStreamToHelper(ss_, value); } #endif // GTEST_OS_SYMBIAN -- cgit v1.1