summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGennadiy Civil <gennadiycivil@users.noreply.github.com>2018-08-31 14:50:06 (GMT)
committerGitHub <noreply@github.com>2018-08-31 14:50:06 (GMT)
commit4005388b3b48e29e91ccd648addaa10ded1b5bf0 (patch)
tree5fc045ddda62d1fad7ad91028d444c6047012061
parentb8e2562086ef326a4a88089f85b29ce7b6f9464b (diff)
parent6dd60ec437e839b9fa5af2cebf2c1c62de08cdff (diff)
downloadgoogletest-4005388b3b48e29e91ccd648addaa10ded1b5bf0.zip
googletest-4005388b3b48e29e91ccd648addaa10ded1b5bf0.tar.gz
googletest-4005388b3b48e29e91ccd648addaa10ded1b5bf0.tar.bz2
Merge pull request #1799 from google/9A681768AABE08D1EFA5CA77528236A4
Googletest export
-rw-r--r--googlemock/include/gmock/gmock-matchers.h7
-rw-r--r--googletest/include/gtest/gtest-typed-test.h2
-rw-r--r--googletest/test/googletest-output-test-golden-lin.txt48
-rw-r--r--googletest/test/googletest-output-test_.cc16
-rw-r--r--googletest/test/gtest-typed-test_test.cc16
5 files changed, 45 insertions, 44 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h
index 9cd1a06..a7bcfc8 100644
--- a/googlemock/include/gmock/gmock-matchers.h
+++ b/googlemock/include/gmock/gmock-matchers.h
@@ -56,9 +56,10 @@
# include <initializer_list> // NOLINT -- must be after gtest.h
#endif
-GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 5046 \
-/* class A needs to have dll-interface to be used by clients of class B */ \
-/* Symbol involving type with internal linkage not defined */)
+GTEST_DISABLE_MSC_WARNINGS_PUSH_(
+ 4251 5046 /* class A needs to have dll-interface to be used by clients of
+ class B */
+ /* Symbol involving type with internal linkage not defined */)
namespace testing {
diff --git a/googletest/include/gtest/gtest-typed-test.h b/googletest/include/gtest/gtest-typed-test.h
index 29b0859..65be699 100644
--- a/googletest/include/gtest/gtest-typed-test.h
+++ b/googletest/include/gtest/gtest-typed-test.h
@@ -96,7 +96,7 @@ TYPED_TEST(FooTest, HasPropertyA) { ... }
// static std::string GetName(int) {
// if (std::is_same<T, char>()) return "char";
// if (std::is_same<T, int>()) return "int";
-// if (std::is_same<T, unsigned int>()) return "unsigned_int";
+// if (std::is_same<T, unsigned int>()) return "unsignedInt";
// }
// };
// TYPED_TEST_CASE(FooTest, MyTypes, MyTypeNames);
diff --git a/googletest/test/googletest-output-test-golden-lin.txt b/googletest/test/googletest-output-test-golden-lin.txt
index 7711cdc..86da845 100644
--- a/googletest/test/googletest-output-test-golden-lin.txt
+++ b/googletest/test/googletest-output-test-golden-lin.txt
@@ -606,24 +606,24 @@ Expected failure
Stack trace: (omitted)
[ FAILED ] TypedTest/0.Failure, where TypeParam = int
-[----------] 2 tests from TypedTestWithNames/char_0, where TypeParam = char
-[ RUN ] TypedTestWithNames/char_0.Success
-[ OK ] TypedTestWithNames/char_0.Success
-[ RUN ] TypedTestWithNames/char_0.Failure
+[----------] 2 tests from TypedTestWithNames/char0, where TypeParam = char
+[ RUN ] TypedTestWithNames/char0.Success
+[ OK ] TypedTestWithNames/char0.Success
+[ RUN ] TypedTestWithNames/char0.Failure
googletest-output-test_.cc:#: Failure
Failed
Stack trace: (omitted)
-[ FAILED ] TypedTestWithNames/char_0.Failure, where TypeParam = char
-[----------] 2 tests from TypedTestWithNames/int_1, where TypeParam = int
-[ RUN ] TypedTestWithNames/int_1.Success
-[ OK ] TypedTestWithNames/int_1.Success
-[ RUN ] TypedTestWithNames/int_1.Failure
+[ FAILED ] TypedTestWithNames/char0.Failure, where TypeParam = char
+[----------] 2 tests from TypedTestWithNames/int1, where TypeParam = int
+[ RUN ] TypedTestWithNames/int1.Success
+[ OK ] TypedTestWithNames/int1.Success
+[ RUN ] TypedTestWithNames/int1.Failure
googletest-output-test_.cc:#: Failure
Failed
Stack trace: (omitted)
-[ FAILED ] TypedTestWithNames/int_1.Failure, where TypeParam = int
+[ FAILED ] TypedTestWithNames/int1.Failure, where TypeParam = int
[----------] 2 tests from Unsigned/TypedTestP/0, where TypeParam = unsigned char
[ RUN ] Unsigned/TypedTestP/0.Success
[ OK ] Unsigned/TypedTestP/0.Success
@@ -652,10 +652,10 @@ Expected failure
Stack trace: (omitted)
[ FAILED ] Unsigned/TypedTestP/1.Failure, where TypeParam = unsigned int
-[----------] 2 tests from UnsignedCustomName/TypedTestP/unsigned_char_0, where TypeParam = unsigned char
-[ RUN ] UnsignedCustomName/TypedTestP/unsigned_char_0.Success
-[ OK ] UnsignedCustomName/TypedTestP/unsigned_char_0.Success
-[ RUN ] UnsignedCustomName/TypedTestP/unsigned_char_0.Failure
+[----------] 2 tests from UnsignedCustomName/TypedTestP/unsignedChar0, where TypeParam = unsigned char
+[ RUN ] UnsignedCustomName/TypedTestP/unsignedChar0.Success
+[ OK ] UnsignedCustomName/TypedTestP/unsignedChar0.Success
+[ RUN ] UnsignedCustomName/TypedTestP/unsignedChar0.Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
1U
@@ -665,11 +665,11 @@ Expected equality of these values:
Expected failure
Stack trace: (omitted)
-[ FAILED ] UnsignedCustomName/TypedTestP/unsigned_char_0.Failure, where TypeParam = unsigned char
-[----------] 2 tests from UnsignedCustomName/TypedTestP/unsigned_int_1, where TypeParam = unsigned int
-[ RUN ] UnsignedCustomName/TypedTestP/unsigned_int_1.Success
-[ OK ] UnsignedCustomName/TypedTestP/unsigned_int_1.Success
-[ RUN ] UnsignedCustomName/TypedTestP/unsigned_int_1.Failure
+[ FAILED ] UnsignedCustomName/TypedTestP/unsignedChar0.Failure, where TypeParam = unsigned char
+[----------] 2 tests from UnsignedCustomName/TypedTestP/unsignedInt1, where TypeParam = unsigned int
+[ RUN ] UnsignedCustomName/TypedTestP/unsignedInt1.Success
+[ OK ] UnsignedCustomName/TypedTestP/unsignedInt1.Success
+[ RUN ] UnsignedCustomName/TypedTestP/unsignedInt1.Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
1U
@@ -679,7 +679,7 @@ Expected equality of these values:
Expected failure
Stack trace: (omitted)
-[ FAILED ] UnsignedCustomName/TypedTestP/unsigned_int_1.Failure, where TypeParam = unsigned int
+[ FAILED ] UnsignedCustomName/TypedTestP/unsignedInt1.Failure, where TypeParam = unsigned int
[----------] 4 tests from ExpectFailureTest
[ RUN ] ExpectFailureTest.ExpectFatalFailure
(expecting 1 failure)
@@ -944,12 +944,12 @@ Stack trace: (omitted)
[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementReturns
[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementThrows
[ FAILED ] TypedTest/0.Failure, where TypeParam = int
-[ FAILED ] TypedTestWithNames/char_0.Failure, where TypeParam = char
-[ FAILED ] TypedTestWithNames/int_1.Failure, where TypeParam = int
+[ FAILED ] TypedTestWithNames/char0.Failure, where TypeParam = char
+[ FAILED ] TypedTestWithNames/int1.Failure, where TypeParam = int
[ FAILED ] Unsigned/TypedTestP/0.Failure, where TypeParam = unsigned char
[ FAILED ] Unsigned/TypedTestP/1.Failure, where TypeParam = unsigned int
-[ FAILED ] UnsignedCustomName/TypedTestP/unsigned_char_0.Failure, where TypeParam = unsigned char
-[ FAILED ] UnsignedCustomName/TypedTestP/unsigned_int_1.Failure, where TypeParam = unsigned int
+[ FAILED ] UnsignedCustomName/TypedTestP/unsignedChar0.Failure, where TypeParam = unsigned char
+[ FAILED ] UnsignedCustomName/TypedTestP/unsignedInt1.Failure, where TypeParam = unsigned int
[ FAILED ] ExpectFailureTest.ExpectFatalFailure
[ FAILED ] ExpectFailureTest.ExpectNonFatalFailure
[ FAILED ] ExpectFailureTest.ExpectFatalFailureOnAllThreads
diff --git a/googletest/test/googletest-output-test_.cc b/googletest/test/googletest-output-test_.cc
index 180630e..f6525ec 100644
--- a/googletest/test/googletest-output-test_.cc
+++ b/googletest/test/googletest-output-test_.cc
@@ -40,8 +40,8 @@
#include <stdlib.h>
#if _MSC_VER
- GTEST_DISABLE_MSC_WARNINGS_PUSH_(4127 /* conditional expression is constant */)
-#endif // . _MSC_VER
+GTEST_DISABLE_MSC_WARNINGS_PUSH_(4127 /* conditional expression is constant */)
+#endif // _MSC_VER
#if GTEST_IS_THREADSAFE
using testing::ScopedFakeTestPartResultReporter;
@@ -815,9 +815,9 @@ class TypedTestNames {
template <typename T>
static std::string GetName(int i) {
if (testing::internal::IsSame<T, char>::value)
- return std::string("char_") + ::testing::PrintToString(i);
+ return std::string("char") + ::testing::PrintToString(i);
if (testing::internal::IsSame<T, int>::value)
- return std::string("int_") + ::testing::PrintToString(i);
+ return std::string("int") + ::testing::PrintToString(i);
}
};
@@ -856,10 +856,10 @@ class TypedTestPNames {
template <typename T>
static std::string GetName(int i) {
if (testing::internal::IsSame<T, unsigned char>::value) {
- return std::string("unsigned_char_") + ::testing::PrintToString(i);
+ return std::string("unsignedChar") + ::testing::PrintToString(i);
}
if (testing::internal::IsSame<T, unsigned int>::value) {
- return std::string("unsigned_int_") + ::testing::PrintToString(i);
+ return std::string("unsignedInt") + ::testing::PrintToString(i);
}
}
};
@@ -1103,7 +1103,7 @@ int main(int argc, char **argv) {
testing::AddGlobalTestEnvironment(new FooEnvironment);
testing::AddGlobalTestEnvironment(new BarEnvironment);
#if _MSC_VER
- GTEST_DISABLE_MSC_WARNINGS_POP_() // 4127
-#endif // . _MSC_VER
+GTEST_DISABLE_MSC_WARNINGS_POP_() // 4127
+#endif // _MSC_VER
return RunAllTests();
}
diff --git a/googletest/test/gtest-typed-test_test.cc b/googletest/test/gtest-typed-test_test.cc
index c38bb94..4e39869 100644
--- a/googletest/test/gtest-typed-test_test.cc
+++ b/googletest/test/gtest-typed-test_test.cc
@@ -178,10 +178,10 @@ class TypedTestNames {
template <typename T>
static std::string GetName(int i) {
if (testing::internal::IsSame<T, char>::value) {
- return std::string("char_") + ::testing::PrintToString(i);
+ return std::string("char") + ::testing::PrintToString(i);
}
if (testing::internal::IsSame<T, int>::value) {
- return std::string("int_") + ::testing::PrintToString(i);
+ return std::string("int") + ::testing::PrintToString(i);
}
}
};
@@ -193,13 +193,13 @@ TYPED_TEST(TypedTestWithNames, TestCaseName) {
EXPECT_STREQ(::testing::UnitTest::GetInstance()
->current_test_info()
->test_case_name(),
- "TypedTestWithNames/char_0");
+ "TypedTestWithNames/char0");
}
if (testing::internal::IsSame<TypeParam, int>::value) {
EXPECT_STREQ(::testing::UnitTest::GetInstance()
->current_test_info()
->test_case_name(),
- "TypedTestWithNames/int_1");
+ "TypedTestWithNames/int1");
}
}
@@ -315,13 +315,13 @@ TYPED_TEST_P(TypeParametrizedTestWithNames, TestCaseName) {
EXPECT_STREQ(::testing::UnitTest::GetInstance()
->current_test_info()
->test_case_name(),
- "CustomName/TypeParametrizedTestWithNames/p_char_0");
+ "CustomName/TypeParametrizedTestWithNames/parChar0");
}
if (testing::internal::IsSame<TypeParam, int>::value) {
EXPECT_STREQ(::testing::UnitTest::GetInstance()
->current_test_info()
->test_case_name(),
- "CustomName/TypeParametrizedTestWithNames/p_int_1");
+ "CustomName/TypeParametrizedTestWithNames/parInt1");
}
}
@@ -332,10 +332,10 @@ class TypeParametrizedTestNames {
template <typename T>
static std::string GetName(int i) {
if (testing::internal::IsSame<T, char>::value) {
- return std::string("p_char_") + ::testing::PrintToString(i);
+ return std::string("parChar") + ::testing::PrintToString(i);
}
if (testing::internal::IsSame<T, int>::value) {
- return std::string("p_int_") + ::testing::PrintToString(i);
+ return std::string("parInt") + ::testing::PrintToString(i);
}
}
};