From 93bfdde0eeac83fb51b856dc4dc9c38c408b0ee0 Mon Sep 17 00:00:00 2001 From: Adrian Moran Date: Wed, 11 Jul 2018 14:59:01 +0200 Subject: Fix issue #1654. Signed-off-by: Adrian Moran --- googlemock/test/gmock_ex_test.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'googlemock/test') diff --git a/googlemock/test/gmock_ex_test.cc b/googlemock/test/gmock_ex_test.cc index 3afed86a..8c83890f 100644 --- a/googlemock/test/gmock_ex_test.cc +++ b/googlemock/test/gmock_ex_test.cc @@ -37,7 +37,9 @@ namespace { using testing::HasSubstr; +#if GTEST_HAS_EXCEPTIONS using testing::internal::GoogleTestFailureException; +#endif // A type that cannot be default constructed. class NonDefaultConstructible { -- cgit v1.2.3 From 0acdf796420e4562ef7399b8610d23eda3256a5a Mon Sep 17 00:00:00 2001 From: Adrian Moran Date: Thu, 12 Jul 2018 15:10:08 +0200 Subject: Avoid full test in no exceptions are enabled. Signed-off-by: Adrian Moran --- googlemock/test/gmock_ex_test.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'googlemock/test') diff --git a/googlemock/test/gmock_ex_test.cc b/googlemock/test/gmock_ex_test.cc index 8c83890f..5a299dae 100644 --- a/googlemock/test/gmock_ex_test.cc +++ b/googlemock/test/gmock_ex_test.cc @@ -31,15 +31,14 @@ // Tests Google Mock's functionality that depends on exceptions. +#if GTEST_HAS_EXCEPTIONS #include "gmock/gmock.h" #include "gtest/gtest.h" namespace { using testing::HasSubstr; -#if GTEST_HAS_EXCEPTIONS using testing::internal::GoogleTestFailureException; -#endif // A type that cannot be default constructed. class NonDefaultConstructible { @@ -54,7 +53,6 @@ class MockFoo { MOCK_METHOD0(GetNonDefaultConstructible, NonDefaultConstructible()); }; -#if GTEST_HAS_EXCEPTIONS TEST(DefaultValueTest, ThrowsRuntimeErrorWhenNoDefaultValue) { MockFoo mock; @@ -78,6 +76,5 @@ TEST(DefaultValueTest, ThrowsRuntimeErrorWhenNoDefaultValue) { } } -#endif - } // unnamed namespace +#endif -- cgit v1.2.3 From cbd07191f4b7a3498fd0d1d7c58c4c39cccb8fb8 Mon Sep 17 00:00:00 2001 From: Adrian Moran Date: Fri, 13 Jul 2018 08:53:03 +0200 Subject: Put ifdef guard after the includes. Signed-off-by: Adrian Moran --- googlemock/test/gmock_ex_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'googlemock/test') diff --git a/googlemock/test/gmock_ex_test.cc b/googlemock/test/gmock_ex_test.cc index 5a299dae..99268b31 100644 --- a/googlemock/test/gmock_ex_test.cc +++ b/googlemock/test/gmock_ex_test.cc @@ -31,10 +31,10 @@ // Tests Google Mock's functionality that depends on exceptions. -#if GTEST_HAS_EXCEPTIONS #include "gmock/gmock.h" #include "gtest/gtest.h" +#if GTEST_HAS_EXCEPTIONS namespace { using testing::HasSubstr; -- cgit v1.2.3 From 8d07cfd0532352379c624ce8844aeca0dc68a585 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Wed, 18 Jul 2018 11:30:36 -0400 Subject: Code sync, mostly formatting and removing outdates --- googlemock/test/gmock-actions_test.cc | 202 ---------------------------------- googlemock/test/gmock_ex_test.cc | 3 +- 2 files changed, 2 insertions(+), 203 deletions(-) (limited to 'googlemock/test') diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc index 7fbb50d3..e8bdbee7 100644 --- a/googlemock/test/gmock-actions_test.cc +++ b/googlemock/test/gmock-actions_test.cc @@ -88,10 +88,6 @@ using testing::tuple_element; using testing::SetErrnoAndReturn; #endif -#if GTEST_HAS_PROTOBUF_ -using testing::internal::TestMessage; -#endif // GTEST_HAS_PROTOBUF_ - // Tests that BuiltInDefaultValue::Get() returns NULL. TEST(BuiltInDefaultValueTest, IsNullForPointerTypes) { EXPECT_TRUE(BuiltInDefaultValue::Get() == NULL); @@ -895,105 +891,6 @@ TEST(SetArgPointeeTest, AcceptsWideCharPointer) { # endif } -#if GTEST_HAS_PROTOBUF_ - -// Tests that SetArgPointee(proto_buffer) sets the v1 protobuf -// variable pointed to by the N-th (0-based) argument to proto_buffer. -TEST(SetArgPointeeTest, SetsTheNthPointeeOfProtoBufferType) { - TestMessage* const msg = new TestMessage; - msg->set_member("yes"); - TestMessage orig_msg; - orig_msg.CopyFrom(*msg); - - Action a = SetArgPointee<1>(*msg); - // SetArgPointee(proto_buffer) makes a copy of proto_buffer - // s.t. the action works even when the original proto_buffer has - // died. We ensure this behavior by deleting msg before using the - // action. - delete msg; - - TestMessage dest; - EXPECT_FALSE(orig_msg.Equals(dest)); - a.Perform(make_tuple(true, &dest)); - EXPECT_TRUE(orig_msg.Equals(dest)); -} - -// Tests that SetArgPointee(proto_buffer) sets the -// ::ProtocolMessage variable pointed to by the N-th (0-based) -// argument to proto_buffer. -TEST(SetArgPointeeTest, SetsTheNthPointeeOfProtoBufferBaseType) { - TestMessage* const msg = new TestMessage; - msg->set_member("yes"); - TestMessage orig_msg; - orig_msg.CopyFrom(*msg); - - Action a = SetArgPointee<1>(*msg); - // SetArgPointee(proto_buffer) makes a copy of proto_buffer - // s.t. the action works even when the original proto_buffer has - // died. We ensure this behavior by deleting msg before using the - // action. - delete msg; - - TestMessage dest; - ::ProtocolMessage* const dest_base = &dest; - EXPECT_FALSE(orig_msg.Equals(dest)); - a.Perform(make_tuple(true, dest_base)); - EXPECT_TRUE(orig_msg.Equals(dest)); -} - -// Tests that SetArgPointee(proto2_buffer) sets the v2 -// protobuf variable pointed to by the N-th (0-based) argument to -// proto2_buffer. -TEST(SetArgPointeeTest, SetsTheNthPointeeOfProto2BufferType) { - using testing::internal::FooMessage; - FooMessage* const msg = new FooMessage; - msg->set_int_field(2); - msg->set_string_field("hi"); - FooMessage orig_msg; - orig_msg.CopyFrom(*msg); - - Action a = SetArgPointee<1>(*msg); - // SetArgPointee(proto2_buffer) makes a copy of - // proto2_buffer s.t. the action works even when the original - // proto2_buffer has died. We ensure this behavior by deleting msg - // before using the action. - delete msg; - - FooMessage dest; - dest.set_int_field(0); - a.Perform(make_tuple(true, &dest)); - EXPECT_EQ(2, dest.int_field()); - EXPECT_EQ("hi", dest.string_field()); -} - -// Tests that SetArgPointee(proto2_buffer) sets the -// proto2::Message variable pointed to by the N-th (0-based) argument -// to proto2_buffer. -TEST(SetArgPointeeTest, SetsTheNthPointeeOfProto2BufferBaseType) { - using testing::internal::FooMessage; - FooMessage* const msg = new FooMessage; - msg->set_int_field(2); - msg->set_string_field("hi"); - FooMessage orig_msg; - orig_msg.CopyFrom(*msg); - - Action a = SetArgPointee<1>(*msg); - // SetArgPointee(proto2_buffer) makes a copy of - // proto2_buffer s.t. the action works even when the original - // proto2_buffer has died. We ensure this behavior by deleting msg - // before using the action. - delete msg; - - FooMessage dest; - dest.set_int_field(0); - ::proto2::Message* const dest_base = &dest; - a.Perform(make_tuple(true, dest_base)); - EXPECT_EQ(2, dest.int_field()); - EXPECT_EQ("hi", dest.string_field()); -} - -#endif // GTEST_HAS_PROTOBUF_ - // Tests that SetArgumentPointee(v) sets the variable pointed to by // the N-th (0-based) argument to v. TEST(SetArgumentPointeeTest, SetsTheNthPointee) { @@ -1014,105 +911,6 @@ TEST(SetArgumentPointeeTest, SetsTheNthPointee) { EXPECT_EQ('a', ch); } -#if GTEST_HAS_PROTOBUF_ - -// Tests that SetArgumentPointee(proto_buffer) sets the v1 protobuf -// variable pointed to by the N-th (0-based) argument to proto_buffer. -TEST(SetArgumentPointeeTest, SetsTheNthPointeeOfProtoBufferType) { - TestMessage* const msg = new TestMessage; - msg->set_member("yes"); - TestMessage orig_msg; - orig_msg.CopyFrom(*msg); - - Action a = SetArgumentPointee<1>(*msg); - // SetArgumentPointee(proto_buffer) makes a copy of proto_buffer - // s.t. the action works even when the original proto_buffer has - // died. We ensure this behavior by deleting msg before using the - // action. - delete msg; - - TestMessage dest; - EXPECT_FALSE(orig_msg.Equals(dest)); - a.Perform(make_tuple(true, &dest)); - EXPECT_TRUE(orig_msg.Equals(dest)); -} - -// Tests that SetArgumentPointee(proto_buffer) sets the -// ::ProtocolMessage variable pointed to by the N-th (0-based) -// argument to proto_buffer. -TEST(SetArgumentPointeeTest, SetsTheNthPointeeOfProtoBufferBaseType) { - TestMessage* const msg = new TestMessage; - msg->set_member("yes"); - TestMessage orig_msg; - orig_msg.CopyFrom(*msg); - - Action a = SetArgumentPointee<1>(*msg); - // SetArgumentPointee(proto_buffer) makes a copy of proto_buffer - // s.t. the action works even when the original proto_buffer has - // died. We ensure this behavior by deleting msg before using the - // action. - delete msg; - - TestMessage dest; - ::ProtocolMessage* const dest_base = &dest; - EXPECT_FALSE(orig_msg.Equals(dest)); - a.Perform(make_tuple(true, dest_base)); - EXPECT_TRUE(orig_msg.Equals(dest)); -} - -// Tests that SetArgumentPointee(proto2_buffer) sets the v2 -// protobuf variable pointed to by the N-th (0-based) argument to -// proto2_buffer. -TEST(SetArgumentPointeeTest, SetsTheNthPointeeOfProto2BufferType) { - using testing::internal::FooMessage; - FooMessage* const msg = new FooMessage; - msg->set_int_field(2); - msg->set_string_field("hi"); - FooMessage orig_msg; - orig_msg.CopyFrom(*msg); - - Action a = SetArgumentPointee<1>(*msg); - // SetArgumentPointee(proto2_buffer) makes a copy of - // proto2_buffer s.t. the action works even when the original - // proto2_buffer has died. We ensure this behavior by deleting msg - // before using the action. - delete msg; - - FooMessage dest; - dest.set_int_field(0); - a.Perform(make_tuple(true, &dest)); - EXPECT_EQ(2, dest.int_field()); - EXPECT_EQ("hi", dest.string_field()); -} - -// Tests that SetArgumentPointee(proto2_buffer) sets the -// proto2::Message variable pointed to by the N-th (0-based) argument -// to proto2_buffer. -TEST(SetArgumentPointeeTest, SetsTheNthPointeeOfProto2BufferBaseType) { - using testing::internal::FooMessage; - FooMessage* const msg = new FooMessage; - msg->set_int_field(2); - msg->set_string_field("hi"); - FooMessage orig_msg; - orig_msg.CopyFrom(*msg); - - Action a = SetArgumentPointee<1>(*msg); - // SetArgumentPointee(proto2_buffer) makes a copy of - // proto2_buffer s.t. the action works even when the original - // proto2_buffer has died. We ensure this behavior by deleting msg - // before using the action. - delete msg; - - FooMessage dest; - dest.set_int_field(0); - ::proto2::Message* const dest_base = &dest; - a.Perform(make_tuple(true, dest_base)); - EXPECT_EQ(2, dest.int_field()); - EXPECT_EQ("hi", dest.string_field()); -} - -#endif // GTEST_HAS_PROTOBUF_ - // Sample functions and functors for testing Invoke() and etc. int Nullary() { return 1; } diff --git a/googlemock/test/gmock_ex_test.cc b/googlemock/test/gmock_ex_test.cc index 99268b31..b03de82e 100644 --- a/googlemock/test/gmock_ex_test.cc +++ b/googlemock/test/gmock_ex_test.cc @@ -38,6 +38,7 @@ namespace { using testing::HasSubstr; + using testing::internal::GoogleTestFailureException; // A type that cannot be default constructed. @@ -53,7 +54,6 @@ class MockFoo { MOCK_METHOD0(GetNonDefaultConstructible, NonDefaultConstructible()); }; - TEST(DefaultValueTest, ThrowsRuntimeErrorWhenNoDefaultValue) { MockFoo mock; try { @@ -76,5 +76,6 @@ TEST(DefaultValueTest, ThrowsRuntimeErrorWhenNoDefaultValue) { } } + } // unnamed namespace #endif -- cgit v1.2.3 From 3530ab9e437b57e9d6778f646d5b88343cae5e02 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Wed, 18 Jul 2018 11:51:14 -0400 Subject: Code sync --- googlemock/test/gmock-matchers_test.cc | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'googlemock/test') diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index 87b2ad5c..a4518425 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -2680,7 +2680,7 @@ TEST(AllOfTest, ExplainsResult) { } // Helper to allow easy testing of AnyOf matchers with num parameters. -void AnyOfMatches(int num, const Matcher& m) { +static void AnyOfMatches(int num, const Matcher& m) { SCOPED_TRACE(Describe(m)); EXPECT_FALSE(m.Matches(0)); for (int i = 1; i <= num; ++i) { @@ -2689,6 +2689,18 @@ void AnyOfMatches(int num, const Matcher& m) { EXPECT_FALSE(m.Matches(num + 1)); } +#if GTEST_LANG_CXX11 +static void AnyOfStringMatches(int num, const Matcher& m) { + SCOPED_TRACE(Describe(m)); + EXPECT_FALSE(m.Matches(std::to_string(0))); + + for (int i = 1; i <= num; ++i) { + EXPECT_TRUE(m.Matches(std::to_string(i))); + } + EXPECT_FALSE(m.Matches(std::to_string(num + 1))); +} +#endif + // Tests that AnyOf(m1, ..., mn) matches any value that matches at // least one of the given matchers. TEST(AnyOfTest, MatchesWhenAnyMatches) { @@ -2746,6 +2758,12 @@ TEST(AnyOfTest, VariadicMatchesWhenAnyMatches) { 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50)); + AnyOfStringMatches( + 50, AnyOf("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", + "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", + "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", + "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", + "43", "44", "45", "46", "47", "48", "49", "50")); } // Tests the variadic version of the ElementsAreMatcher @@ -4570,7 +4588,7 @@ TEST(ResultOfTest, WorksForFunctors) { } // Tests that ResultOf(f, ...) compiles and works as expected when f is a -// functor with more then one operator() defined. ResultOf() must work +// functor with more than one operator() defined. ResultOf() must work // for each defined operator(). struct PolymorphicFunctor { typedef int result_type; @@ -6764,4 +6782,3 @@ TEST(NotTest, WorksOnMoveOnlyType) { } // namespace gmock_matchers_test } // namespace testing - -- cgit v1.2.3 From 0c17888bcfa7a05ae2cb14c1f5e2451ea9745211 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Thu, 19 Jul 2018 12:42:39 -0400 Subject: code sync --- googlemock/test/gmock-matchers_test.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'googlemock/test') diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index a4518425..f9dfd3c1 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -2795,6 +2795,7 @@ TEST(ElementsAreTest, HugeMatcherUnordered) { #endif // GTEST_LANG_CXX11 + // Tests that AnyOf(m1, ..., mn) describes itself properly. TEST(AnyOfTest, CanDescribeSelf) { Matcher m; -- cgit v1.2.3 From a02af2f689426aa9622b06643f53ed27fa6dc8a5 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Fri, 20 Jul 2018 11:28:58 -0400 Subject: code merge --- googlemock/test/gmock-matchers_test.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'googlemock/test') diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index f9dfd3c1..9f1a5471 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -2795,7 +2795,6 @@ TEST(ElementsAreTest, HugeMatcherUnordered) { #endif // GTEST_LANG_CXX11 - // Tests that AnyOf(m1, ..., mn) describes itself properly. TEST(AnyOfTest, CanDescribeSelf) { Matcher m; @@ -4239,13 +4238,17 @@ TEST(PropertyTest, WorksForReferenceToConstProperty) { // ref-qualified. TEST(PropertyTest, WorksForRefQualifiedProperty) { Matcher m = Property(&AClass::s_ref, StartsWith("hi")); + Matcher m_with_name = + Property("s", &AClass::s_ref, StartsWith("hi")); AClass a; a.set_s("hill"); EXPECT_TRUE(m.Matches(a)); + EXPECT_TRUE(m_with_name.Matches(a)); a.set_s("hole"); EXPECT_FALSE(m.Matches(a)); + EXPECT_FALSE(m_with_name.Matches(a)); } #endif -- cgit v1.2.3 From ed1edf641dc5a04dc559df763ca71a5d6d05d939 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Wed, 25 Jul 2018 10:24:13 -0400 Subject: Formatting changes, code sync --- googlemock/test/gmock_stress_test.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'googlemock/test') diff --git a/googlemock/test/gmock_stress_test.cc b/googlemock/test/gmock_stress_test.cc index b9fdc45c..e4e61f0f 100644 --- a/googlemock/test/gmock_stress_test.cc +++ b/googlemock/test/gmock_stress_test.cc @@ -33,13 +33,12 @@ // threads concurrently. #include "gmock/gmock.h" - #include "gtest/gtest.h" namespace testing { namespace { -// From "gtest/internal/gtest-port.h". +// From gtest-port.h. using ::testing::internal::ThreadWithParam; // The maximum number of test threads (not including helper threads) -- cgit v1.2.3 From 539ee4bc549846e3bd98b77f85d0aff8410ef8c0 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Wed, 1 Aug 2018 11:07:22 -0400 Subject: Formatting changes and upstreaming one test --- googlemock/test/gmock_leak_test.py | 2 -- googlemock/test/gmock_output_test.py | 1 - 2 files changed, 3 deletions(-) (limited to 'googlemock/test') diff --git a/googlemock/test/gmock_leak_test.py b/googlemock/test/gmock_leak_test.py index 997680ce..a2fee4b6 100755 --- a/googlemock/test/gmock_leak_test.py +++ b/googlemock/test/gmock_leak_test.py @@ -33,10 +33,8 @@ __author__ = 'wan@google.com (Zhanyong Wan)' - import gmock_test_utils - PROGRAM_PATH = gmock_test_utils.GetTestExecutablePath('gmock_leak_test_') TEST_WITH_EXPECT_CALL = [PROGRAM_PATH, '--gtest_filter=*ExpectCall*'] TEST_WITH_ON_CALL = [PROGRAM_PATH, '--gtest_filter=*OnCall*'] diff --git a/googlemock/test/gmock_output_test.py b/googlemock/test/gmock_output_test.py index 9d73d570..8f57d46c 100755 --- a/googlemock/test/gmock_output_test.py +++ b/googlemock/test/gmock_output_test.py @@ -43,7 +43,6 @@ __author__ = 'wan@google.com (Zhanyong Wan)' import os import re import sys - import gmock_test_utils -- cgit v1.2.3 From 24edf4e3bfc132fe21509ed5fba394ddcc02cb5f Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 6 Aug 2018 15:40:21 -0400 Subject: automatic code sync mgt, comment only --- googlemock/test/gmock-actions_test.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'googlemock/test') diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc index e8bdbee7..2d169f88 100644 --- a/googlemock/test/gmock-actions_test.cc +++ b/googlemock/test/gmock-actions_test.cc @@ -937,6 +937,8 @@ class Foo { int value_; }; +// GOOGLETEST_CM0005 DO NOT DELETE + // Tests InvokeWithoutArgs(function). TEST(InvokeWithoutArgsTest, Function) { // As an action that takes one argument. -- cgit v1.2.3 From b78c3b8e008ea8ef059d224ece6aa52a4727ae2c Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Tue, 7 Aug 2018 10:38:41 -0400 Subject: small cleanup, np functional changes --- googlemock/test/gmock-actions_test.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'googlemock/test') diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc index 2d169f88..e8bdbee7 100644 --- a/googlemock/test/gmock-actions_test.cc +++ b/googlemock/test/gmock-actions_test.cc @@ -937,8 +937,6 @@ class Foo { int value_; }; -// GOOGLETEST_CM0005 DO NOT DELETE - // Tests InvokeWithoutArgs(function). TEST(InvokeWithoutArgsTest, Function) { // As an action that takes one argument. -- cgit v1.2.3 From 063a90b391d475f8f7ddc12e1df3dabcaf643f79 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Thu, 9 Aug 2018 10:51:49 -0400 Subject: Formatting change for auto code management, no functionality changes Merge branch 'master' of https://github.com/google/googletest --- googlemock/test/gmock_output_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'googlemock/test') diff --git a/googlemock/test/gmock_output_test.py b/googlemock/test/gmock_output_test.py index 8f57d46c..c8af0f96 100755 --- a/googlemock/test/gmock_output_test.py +++ b/googlemock/test/gmock_output_test.py @@ -33,9 +33,10 @@ To update the golden file: gmock_output_test.py --build_dir=BUILD/DIR --gengolden -# where BUILD/DIR contains the built gmock_output_test_ file. +where BUILD/DIR contains the built gmock_output_test_ file. gmock_output_test.py --gengolden gmock_output_test.py + """ __author__ = 'wan@google.com (Zhanyong Wan)' -- cgit v1.2.3 From 5eb263569bc1f90ff3820c4f9f5fbc8fa25a031f Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Thu, 9 Aug 2018 15:24:43 -0400 Subject: Update gmock_output_test.py --- googlemock/test/gmock_output_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'googlemock/test') diff --git a/googlemock/test/gmock_output_test.py b/googlemock/test/gmock_output_test.py index c8af0f96..20323e17 100755 --- a/googlemock/test/gmock_output_test.py +++ b/googlemock/test/gmock_output_test.py @@ -29,7 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -"""Tests the text output of Google C++ Mocking Framework. +r"""Tests the text output of Google C++ Mocking Framework. To update the golden file: gmock_output_test.py --build_dir=BUILD/DIR --gengolden -- cgit v1.2.3 From a3c0dd0f4d58e6c01a1432fdc69a9aff937309a9 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Tue, 14 Aug 2018 14:04:07 -0400 Subject: Comments changes, no functionality changes --- googlemock/test/gmock-actions_test.cc | 3 +-- googlemock/test/gmock-cardinalities_test.cc | 3 +-- googlemock/test/gmock-generated-actions_test.cc | 3 +-- googlemock/test/gmock-generated-function-mockers_test.cc | 3 +-- googlemock/test/gmock-generated-internal-utils_test.cc | 3 +-- googlemock/test/gmock-internal-utils_test.cc | 3 +-- googlemock/test/gmock-matchers_test.cc | 3 +-- googlemock/test/gmock-more-actions_test.cc | 3 +-- googlemock/test/gmock-nice-strict_test.cc | 3 +-- googlemock/test/gmock-port_test.cc | 3 +-- googlemock/test/gmock-spec-builders_test.cc | 3 +-- googlemock/test/gmock_all_test.cc | 3 +-- googlemock/test/gmock_ex_test.cc | 3 +-- googlemock/test/gmock_leak_test_.cc | 3 +-- googlemock/test/gmock_link2_test.cc | 3 +-- googlemock/test/gmock_link_test.cc | 3 +-- googlemock/test/gmock_link_test.h | 3 +-- googlemock/test/gmock_output_test_.cc | 3 +-- googlemock/test/gmock_stress_test.cc | 3 +-- googlemock/test/gmock_test.cc | 3 +-- 20 files changed, 20 insertions(+), 40 deletions(-) (limited to 'googlemock/test') diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc index e8bdbee7..e216fe2a 100644 --- a/googlemock/test/gmock-actions_test.cc +++ b/googlemock/test/gmock-actions_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-cardinalities_test.cc b/googlemock/test/gmock-cardinalities_test.cc index 04c792b5..132591bc 100644 --- a/googlemock/test/gmock-cardinalities_test.cc +++ b/googlemock/test/gmock-cardinalities_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-generated-actions_test.cc b/googlemock/test/gmock-generated-actions_test.cc index 40bbe6d9..a4602806 100644 --- a/googlemock/test/gmock-generated-actions_test.cc +++ b/googlemock/test/gmock-generated-actions_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-generated-function-mockers_test.cc b/googlemock/test/gmock-generated-function-mockers_test.cc index 0ff37556..f16833b2 100644 --- a/googlemock/test/gmock-generated-function-mockers_test.cc +++ b/googlemock/test/gmock-generated-function-mockers_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-generated-internal-utils_test.cc b/googlemock/test/gmock-generated-internal-utils_test.cc index 2e5abe56..ae0280fc 100644 --- a/googlemock/test/gmock-generated-internal-utils_test.cc +++ b/googlemock/test/gmock-generated-internal-utils_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-internal-utils_test.cc b/googlemock/test/gmock-internal-utils_test.cc index f8633df2..5f53077c 100644 --- a/googlemock/test/gmock-internal-utils_test.cc +++ b/googlemock/test/gmock-internal-utils_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index 9f1a5471..d08f08f7 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-more-actions_test.cc b/googlemock/test/gmock-more-actions_test.cc index b13518aa..08a2df09 100644 --- a/googlemock/test/gmock-more-actions_test.cc +++ b/googlemock/test/gmock-more-actions_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-nice-strict_test.cc b/googlemock/test/gmock-nice-strict_test.cc index c4194946..dce66423 100644 --- a/googlemock/test/gmock-nice-strict_test.cc +++ b/googlemock/test/gmock-nice-strict_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + #include "gmock/gmock-generated-nice-strict.h" diff --git a/googlemock/test/gmock-port_test.cc b/googlemock/test/gmock-port_test.cc index d6a8d444..a2c2be24 100644 --- a/googlemock/test/gmock-port_test.cc +++ b/googlemock/test/gmock-port_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-spec-builders_test.cc b/googlemock/test/gmock-spec-builders_test.cc index 715aac8c..78fbc3f0 100644 --- a/googlemock/test/gmock-spec-builders_test.cc +++ b/googlemock/test/gmock-spec-builders_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock_all_test.cc b/googlemock/test/gmock_all_test.cc index 56d6c49c..e1774fbb 100644 --- a/googlemock/test/gmock_all_test.cc +++ b/googlemock/test/gmock_all_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // Tests for Google C++ Mocking Framework (Google Mock) // diff --git a/googlemock/test/gmock_ex_test.cc b/googlemock/test/gmock_ex_test.cc index b03de82e..72eb43f7 100644 --- a/googlemock/test/gmock_ex_test.cc +++ b/googlemock/test/gmock_ex_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Tests Google Mock's functionality that depends on exceptions. diff --git a/googlemock/test/gmock_leak_test_.cc b/googlemock/test/gmock_leak_test_.cc index 1d27d22f..2e095abc 100644 --- a/googlemock/test/gmock_leak_test_.cc +++ b/googlemock/test/gmock_leak_test_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock_link2_test.cc b/googlemock/test/gmock_link2_test.cc index 2b48395c..d27ce176 100644 --- a/googlemock/test/gmock_link2_test.cc +++ b/googlemock/test/gmock_link2_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock_link_test.cc b/googlemock/test/gmock_link_test.cc index ef041be9..e7c54cc2 100644 --- a/googlemock/test/gmock_link_test.cc +++ b/googlemock/test/gmock_link_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock_link_test.h b/googlemock/test/gmock_link_test.h index 06a1cf89..d26670ec 100644 --- a/googlemock/test/gmock_link_test.h +++ b/googlemock/test/gmock_link_test.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock_output_test_.cc b/googlemock/test/gmock_output_test_.cc index 1b59eb3f..3955c733 100644 --- a/googlemock/test/gmock_output_test_.cc +++ b/googlemock/test/gmock_output_test_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Tests Google Mock's output in various scenarios. This ensures that // Google Mock's messages are readable and useful. diff --git a/googlemock/test/gmock_stress_test.cc b/googlemock/test/gmock_stress_test.cc index e4e61f0f..0d99bede 100644 --- a/googlemock/test/gmock_stress_test.cc +++ b/googlemock/test/gmock_stress_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Tests that Google Mock constructs can be used in a large number of // threads concurrently. diff --git a/googlemock/test/gmock_test.cc b/googlemock/test/gmock_test.cc index 70075679..341a17da 100644 --- a/googlemock/test/gmock_test.cc +++ b/googlemock/test/gmock_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // -- cgit v1.2.3 From 265efde9a5b35fbd23622620fa597822e122f38a Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Tue, 14 Aug 2018 15:04:11 -0400 Subject: Comments changes, no functionality changes. --- googlemock/test/gmock-actions_test.cc | 2 +- googlemock/test/gmock-spec-builders_test.cc | 2 +- googlemock/test/gmock_leak_test.py | 2 -- googlemock/test/gmock_output_test.py | 2 -- googlemock/test/gmock_test_utils.py | 2 -- 5 files changed, 2 insertions(+), 8 deletions(-) (limited to 'googlemock/test') diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc index e216fe2a..06e29a1e 100644 --- a/googlemock/test/gmock-actions_test.cc +++ b/googlemock/test/gmock-actions_test.cc @@ -1343,7 +1343,7 @@ TEST(FunctorActionTest, UnusedArguments) { } // Test that basic built-in actions work with move-only arguments. -// TODO(rburny): Currently, almost all ActionInterface-based actions will not +// FIXME: Currently, almost all ActionInterface-based actions will not // work, even if they only try to use other, copyable arguments. Implement them // if necessary (but note that DoAll cannot work on non-copyable types anyway - // so maybe it's better to make users use lambdas instead. diff --git a/googlemock/test/gmock-spec-builders_test.cc b/googlemock/test/gmock-spec-builders_test.cc index 78fbc3f0..7056c43c 100644 --- a/googlemock/test/gmock-spec-builders_test.cc +++ b/googlemock/test/gmock-spec-builders_test.cc @@ -1175,7 +1175,7 @@ TEST(UnexpectedCallTest, UnsatisifiedPrerequisites) { TEST(UndefinedReturnValueTest, ReturnValueIsMandatoryWhenNotDefaultConstructible) { MockA a; - // TODO(wan@google.com): We should really verify the output message, + // FIXME: We should really verify the output message, // but we cannot yet due to that EXPECT_DEATH only captures stderr // while Google Mock logs to stdout. #if GTEST_HAS_EXCEPTIONS diff --git a/googlemock/test/gmock_leak_test.py b/googlemock/test/gmock_leak_test.py index a2fee4b6..7e4b1eea 100755 --- a/googlemock/test/gmock_leak_test.py +++ b/googlemock/test/gmock_leak_test.py @@ -31,8 +31,6 @@ """Tests that leaked mock objects can be caught be Google Mock.""" -__author__ = 'wan@google.com (Zhanyong Wan)' - import gmock_test_utils PROGRAM_PATH = gmock_test_utils.GetTestExecutablePath('gmock_leak_test_') diff --git a/googlemock/test/gmock_output_test.py b/googlemock/test/gmock_output_test.py index 20323e17..0527bd93 100755 --- a/googlemock/test/gmock_output_test.py +++ b/googlemock/test/gmock_output_test.py @@ -39,8 +39,6 @@ gmock_output_test.py """ -__author__ = 'wan@google.com (Zhanyong Wan)' - import os import re import sys diff --git a/googlemock/test/gmock_test_utils.py b/googlemock/test/gmock_test_utils.py index 92b1ac14..7dc4e119 100755 --- a/googlemock/test/gmock_test_utils.py +++ b/googlemock/test/gmock_test_utils.py @@ -29,8 +29,6 @@ """Unit test utilities for Google C++ Mocking Framework.""" -__author__ = 'wan@google.com (Zhanyong Wan)' - import os import sys -- cgit v1.2.3