summaryrefslogtreecommitdiffstats
path: root/googletest/test
diff options
context:
space:
mode:
authorHosein Ghahremanzadeh <hgsilverman@gmail.com>2019-09-12 14:36:44 (GMT)
committerShaindel Schwartz <shaindel@google.com>2019-09-12 16:10:41 (GMT)
commitac24edd6e06114818b1a29c99bb81153514f7fb2 (patch)
treee2340b84ae36b4d498eeba21e3591fdadb494569 /googletest/test
parent274afe50cf57630ef9d34e702cf77f1854358581 (diff)
downloadgoogletest-ac24edd6e06114818b1a29c99bb81153514f7fb2.zip
googletest-ac24edd6e06114818b1a29c99bb81153514f7fb2.tar.gz
googletest-ac24edd6e06114818b1a29c99bb81153514f7fb2.tar.bz2
Googletest export
Merge 4c9ef099b29d2c840c04643cd9662fd7be712f7b into 565f1b848215b77c3732bca345fe76a0431d8b34 Closes #2403 COPYBARA_INTEGRATE_REVIEW=https://github.com/google/googletest/pull/2403 from IYP-Programer-Yeah:remove-compile-assert-type-equal 4c9ef099b29d2c840c04643cd9662fd7be712f7b PiperOrigin-RevId: 268681883
Diffstat (limited to 'googletest/test')
-rw-r--r--googletest/test/gtest_unittest.cc14
1 files changed, 4 insertions, 10 deletions
diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc
index 12c5a87..2c0552d 100644
--- a/googletest/test/gtest_unittest.cc
+++ b/googletest/test/gtest_unittest.cc
@@ -233,7 +233,6 @@ using testing::internal::AppendUserMessage;
using testing::internal::ArrayAwareFind;
using testing::internal::ArrayEq;
using testing::internal::CodePointToUtf8;
-using testing::internal::CompileAssertTypesEqual;
using testing::internal::CopyArray;
using testing::internal::CountIf;
using testing::internal::EqFailure;
@@ -7102,18 +7101,12 @@ TEST(IsAProtocolMessageTest, ValueIsFalseWhenTypeIsNotAProtocolMessage) {
EXPECT_FALSE(IsAProtocolMessage<const ConversionHelperBase>::value);
}
-// Tests that CompileAssertTypesEqual compiles when the type arguments are
-// equal.
-TEST(CompileAssertTypesEqual, CompilesWhenTypesAreEqual) {
- CompileAssertTypesEqual<void, void>();
- CompileAssertTypesEqual<int*, int*>();
-}
-
// Tests GTEST_REMOVE_REFERENCE_AND_CONST_.
template <typename T1, typename T2>
void TestGTestRemoveReferenceAndConst() {
- CompileAssertTypesEqual<T1, GTEST_REMOVE_REFERENCE_AND_CONST_(T2)>();
+ static_assert(std::is_same<T1, GTEST_REMOVE_REFERENCE_AND_CONST_(T2)>::value,
+ "GTEST_REMOVE_REFERENCE_AND_CONST_ failed.");
}
TEST(RemoveReferenceToConstTest, Works) {
@@ -7128,7 +7121,8 @@ TEST(RemoveReferenceToConstTest, Works) {
template <typename T1, typename T2>
void TestGTestReferenceToConst() {
- CompileAssertTypesEqual<T1, GTEST_REFERENCE_TO_CONST_(T2)>();
+ static_assert(std::is_same<T1, GTEST_REFERENCE_TO_CONST_(T2)>::value,
+ "GTEST_REFERENCE_TO_CONST_ failed.");
}
TEST(GTestReferenceToConstTest, Works) {