From 7e2c793a2b5c746344652b6579e958ee42fafdcc Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 27 Sep 2012 09:59:43 +0000 Subject: Fix a typo 'iff' => 'if' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164767 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../googletest/include/gtest/internal/gtest-internal.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'utils/unittest/googletest/include/gtest/internal/gtest-internal.h') diff --git a/utils/unittest/googletest/include/gtest/internal/gtest-internal.h b/utils/unittest/googletest/include/gtest/internal/gtest-internal.h index f8a5cc9..c92a16f 100644 --- a/utils/unittest/googletest/include/gtest/internal/gtest-internal.h +++ b/utils/unittest/googletest/include/gtest/internal/gtest-internal.h @@ -287,7 +287,7 @@ GTEST_FORMAT_CHAR_PTR_IMPL_(const wchar_t) // expected_value: "5" // actual_value: "6" // -// The ignoring_case parameter is true iff the assertion is a +// The ignoring_case parameter is true if the assertion is a // *_STRCASEEQ*. When it's true, the string " (ignoring case)" will // be inserted into the message. GTEST_API_ AssertionResult EqFailure(const char* expected_expression, @@ -413,14 +413,14 @@ class FloatingPoint { // Returns the sign bit of this number. Bits sign_bit() const { return kSignBitMask & u_.bits_; } - // Returns true iff this is NAN (not a number). + // Returns true if this is NAN (not a number). bool is_nan() const { // It's a NAN if the exponent bits are all ones and the fraction // bits are not entirely zeros. return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0); } - // Returns true iff this number is at most kMaxUlps ULP's away from + // Returns true if this number is at most kMaxUlps ULP's away from // rhs. In particular, this function: // // - returns false if either number is (or both are) NAN. @@ -784,7 +784,7 @@ class GTEST_API_ Random { }; // Defining a variable of type CompileAssertTypesEqual will cause a -// compiler error iff T1 and T2 are different types. +// compiler error if T1 and T2 are different types. template struct CompileAssertTypesEqual; @@ -860,7 +860,7 @@ struct AddReference { typedef T& type; }; // NOLINT GTEST_ADD_REFERENCE_(const GTEST_REMOVE_REFERENCE_(T)) // ImplicitlyConvertible::value is a compile-time bool -// constant that's true iff type From can be implicitly converted to +// constant that's true if type From can be implicitly converted to // type To. template class ImplicitlyConvertible { @@ -913,7 +913,7 @@ template const bool ImplicitlyConvertible::value; // IsAProtocolMessage::value is a compile-time bool constant that's -// true iff T is type ProtocolMessage, proto2::Message, or a subclass +// true if T is type ProtocolMessage, proto2::Message, or a subclass // of those. template struct IsAProtocolMessage -- cgit v1.1 From 94c22716d60ff5edf6a98a3c67e0faa001be1142 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 27 Sep 2012 10:14:43 +0000 Subject: Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164768 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../googletest/include/gtest/internal/gtest-internal.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'utils/unittest/googletest/include/gtest/internal/gtest-internal.h') diff --git a/utils/unittest/googletest/include/gtest/internal/gtest-internal.h b/utils/unittest/googletest/include/gtest/internal/gtest-internal.h index c92a16f..f8a5cc9 100644 --- a/utils/unittest/googletest/include/gtest/internal/gtest-internal.h +++ b/utils/unittest/googletest/include/gtest/internal/gtest-internal.h @@ -287,7 +287,7 @@ GTEST_FORMAT_CHAR_PTR_IMPL_(const wchar_t) // expected_value: "5" // actual_value: "6" // -// The ignoring_case parameter is true if the assertion is a +// The ignoring_case parameter is true iff the assertion is a // *_STRCASEEQ*. When it's true, the string " (ignoring case)" will // be inserted into the message. GTEST_API_ AssertionResult EqFailure(const char* expected_expression, @@ -413,14 +413,14 @@ class FloatingPoint { // Returns the sign bit of this number. Bits sign_bit() const { return kSignBitMask & u_.bits_; } - // Returns true if this is NAN (not a number). + // Returns true iff this is NAN (not a number). bool is_nan() const { // It's a NAN if the exponent bits are all ones and the fraction // bits are not entirely zeros. return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0); } - // Returns true if this number is at most kMaxUlps ULP's away from + // Returns true iff this number is at most kMaxUlps ULP's away from // rhs. In particular, this function: // // - returns false if either number is (or both are) NAN. @@ -784,7 +784,7 @@ class GTEST_API_ Random { }; // Defining a variable of type CompileAssertTypesEqual will cause a -// compiler error if T1 and T2 are different types. +// compiler error iff T1 and T2 are different types. template struct CompileAssertTypesEqual; @@ -860,7 +860,7 @@ struct AddReference { typedef T& type; }; // NOLINT GTEST_ADD_REFERENCE_(const GTEST_REMOVE_REFERENCE_(T)) // ImplicitlyConvertible::value is a compile-time bool -// constant that's true if type From can be implicitly converted to +// constant that's true iff type From can be implicitly converted to // type To. template class ImplicitlyConvertible { @@ -913,7 +913,7 @@ template const bool ImplicitlyConvertible::value; // IsAProtocolMessage::value is a compile-time bool constant that's -// true if T is type ProtocolMessage, proto2::Message, or a subclass +// true iff T is type ProtocolMessage, proto2::Message, or a subclass // of those. template struct IsAProtocolMessage -- cgit v1.1 From 57f7dafcb769852a21870148e91535421c45d037 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Thu, 6 Dec 2012 23:04:41 +0000 Subject: Modify the LLVM checkout of googletest: 1) don't delete gtest-all.cc (which is used to gather all gtest source files in a single file) 2) make including LLVMSupport headers optional (on by default). Sanitizer tools may want to use their own versions of googletest compiled with specific flags, instead of the common googletest library used for all other LLVM/Clang unittests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169559 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../unittest/googletest/include/gtest/internal/gtest-internal.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'utils/unittest/googletest/include/gtest/internal/gtest-internal.h') diff --git a/utils/unittest/googletest/include/gtest/internal/gtest-internal.h b/utils/unittest/googletest/include/gtest/internal/gtest-internal.h index f8a5cc9..a94bf28 100644 --- a/utils/unittest/googletest/include/gtest/internal/gtest-internal.h +++ b/utils/unittest/googletest/include/gtest/internal/gtest-internal.h @@ -56,7 +56,9 @@ #include "gtest/internal/gtest-filepath.h" #include "gtest/internal/gtest-type-util.h" +#if !GTEST_NO_LLVM_RAW_OSTREAM #include "llvm/Support/raw_os_ostream.h" +#endif // Due to C++ preprocessor weirdness, we need double indirection to // concatenate two tokens when one of them is __LINE__. Writing @@ -100,6 +102,7 @@ // std::ostream with an implicit conversion to raw_ostream& and stream // to that. This causes the compiler to prefer std::ostream overloads // but still find raw_ostream& overloads. +#if !GTEST_NO_LLVM_RAW_OSTREAM namespace llvm { class convertible_fwd_ostream : public std::ostream { raw_os_ostream ros_; @@ -115,6 +118,12 @@ inline void GTestStreamToHelper(std::ostream* os, const T& val) { llvm::convertible_fwd_ostream cos(*os); cos << val; } +#else +template +inline void GTestStreamToHelper(std::ostream* os, const T& val) { + *os << val; +} +#endif class ProtocolMessage; namespace proto2 { class Message; } -- cgit v1.1