diff options
Diffstat (limited to 'googlemock/test/gmock-internal-utils_test.cc')
-rw-r--r-- | googlemock/test/gmock-internal-utils_test.cc | 39 |
1 files changed, 11 insertions, 28 deletions
diff --git a/googlemock/test/gmock-internal-utils_test.cc b/googlemock/test/gmock-internal-utils_test.cc index a76e777..67b7077 100644 --- a/googlemock/test/gmock-internal-utils_test.cc +++ b/googlemock/test/gmock-internal-utils_test.cc @@ -33,16 +33,20 @@ // This file tests the internal utilities. #include "gmock/internal/gmock-internal-utils.h" + #include <stdlib.h> + #include <map> #include <memory> -#include <string> #include <sstream> +#include <string> +#include <type_traits> #include <vector> + #include "gmock/gmock.h" #include "gmock/internal/gmock-port.h" -#include "gtest/gtest.h" #include "gtest/gtest-spi.h" +#include "gtest/gtest.h" // Indicates that this translation unit is part of Google Test's // implementation. It must come before gtest-internal-inl.h is @@ -504,33 +508,12 @@ TEST(LogTest, OnlyWarningsArePrintedWhenVerbosityIsInvalid) { #endif // GTEST_HAS_STREAM_REDIRECTION -TEST(TypeTraitsTest, true_type) { - EXPECT_TRUE(true_type::value); -} - -TEST(TypeTraitsTest, false_type) { - EXPECT_FALSE(false_type::value); -} - -TEST(TypeTraitsTest, is_reference) { - EXPECT_FALSE(is_reference<int>::value); - EXPECT_FALSE(is_reference<char*>::value); - EXPECT_TRUE(is_reference<const int&>::value); -} - -TEST(TypeTraitsTest, type_equals) { - EXPECT_FALSE((type_equals<int, const int>::value)); - EXPECT_FALSE((type_equals<int, int&>::value)); - EXPECT_FALSE((type_equals<int, double>::value)); - EXPECT_TRUE((type_equals<char, char>::value)); -} - TEST(TypeTraitsTest, remove_reference) { - EXPECT_TRUE((type_equals<char, remove_reference<char&>::type>::value)); - EXPECT_TRUE((type_equals<const int, - remove_reference<const int&>::type>::value)); - EXPECT_TRUE((type_equals<int, remove_reference<int>::type>::value)); - EXPECT_TRUE((type_equals<double*, remove_reference<double*>::type>::value)); + EXPECT_TRUE((std::is_same<char, remove_reference<char&>::type>::value)); + EXPECT_TRUE( + (std::is_same<const int, remove_reference<const int&>::type>::value)); + EXPECT_TRUE((std::is_same<int, remove_reference<int>::type>::value)); + EXPECT_TRUE((std::is_same<double*, remove_reference<double*>::type>::value)); } #if GTEST_HAS_STREAM_REDIRECTION |