diff options
author | billydonahue <billydonahue@google.com> | 2014-05-19 17:54:51 +0000 |
---|---|---|
committer | billydonahue <billydonahue@google.com> | 2014-05-19 17:54:51 +0000 |
commit | 1f5fdea417f1a55cffcfc0711d345d1d8ca2bc01 (patch) | |
tree | f05cabf6742496f8709c9df23aae8b8d002ea08f /include/gmock/internal | |
parent | bd0188320de5aab1b09718e2c466387099d43cfb (diff) | |
download | googletest-1f5fdea417f1a55cffcfc0711d345d1d8ca2bc01.tar.gz googletest-1f5fdea417f1a55cffcfc0711d345d1d8ca2bc01.tar.bz2 googletest-1f5fdea417f1a55cffcfc0711d345d1d8ca2bc01.zip |
Push several shanges:
Make single argument constructors explicit in macros.
Remove NOMINMAX macro.
Add macros for disabling Microsoft Visual C++ warnings.
Add WhenDynamicCastTo<T> matcher.
A matcher that matches a pointer that matches inner_matcher when
dynamic_cast<T> is applied.
Add IWYU export pragmas to the tuple include lines.
Fix NativeArray to not require a copy constructor unless we ask for one.
This allows ElementsAre() to support non-copyable types.
Examine WINAPI_FAMILY_PARTITION macros to better distinguish windows platforms.
Author: martin@martin.st
From: https://codereview.appspot.com/57220043/
Diffstat (limited to 'include/gmock/internal')
-rw-r--r-- | include/gmock/internal/gmock-internal-utils.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/gmock/internal/gmock-internal-utils.h b/include/gmock/internal/gmock-internal-utils.h index 6110dd7b..e2ddb05c 100644 --- a/include/gmock/internal/gmock-internal-utils.h +++ b/include/gmock/internal/gmock-internal-utils.h @@ -447,16 +447,17 @@ class StlContainerView<Element[N]> { // ConstReference(const char * (&)[4])') // (and though the N parameter type is mismatched in the above explicit // conversion of it doesn't help - only the conversion of the array). - return type(const_cast<Element*>(&array[0]), N, kReference); + return type(const_cast<Element*>(&array[0]), N, + RelationToSourceReference()); #else - return type(array, N, kReference); + return type(array, N, RelationToSourceReference()); #endif // GTEST_OS_SYMBIAN } static type Copy(const Element (&array)[N]) { #if GTEST_OS_SYMBIAN - return type(const_cast<Element*>(&array[0]), N, kCopy); + return type(const_cast<Element*>(&array[0]), N, RelationToSourceCopy()); #else - return type(array, N, kCopy); + return type(array, N, RelationToSourceCopy()); #endif // GTEST_OS_SYMBIAN } }; @@ -473,10 +474,10 @@ class StlContainerView< ::testing::tuple<ElementPointer, Size> > { static const_reference ConstReference( const ::testing::tuple<ElementPointer, Size>& array) { - return type(get<0>(array), get<1>(array), kReference); + return type(get<0>(array), get<1>(array), RelationToSourceReference()); } static type Copy(const ::testing::tuple<ElementPointer, Size>& array) { - return type(get<0>(array), get<1>(array), kCopy); + return type(get<0>(array), get<1>(array), RelationToSourceCopy()); } }; @@ -507,3 +508,4 @@ struct BooleanConstant {}; } // namespace testing #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_ + |