From 3d1dcac4c4662498c3f50fdb35071cce96231850 Mon Sep 17 00:00:00 2001
From: assafpr <93249401+assafpr@users.noreply.github.com>
Date: Wed, 22 Jun 2022 14:15:53 +0300
Subject: [PATCH 01/20] change link from master to main in documentation
since master branch was changed to main, the links should be changed accordingly.
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 30edaecf..788b857a 100644
--- a/README.md
+++ b/README.md
@@ -135,7 +135,7 @@ that generates stub code for GoogleTest.
## Contributing Changes
Please read
-[`CONTRIBUTING.md`](https://github.com/google/googletest/blob/master/CONTRIBUTING.md)
+[`CONTRIBUTING.md`](https://github.com/google/googletest/blob/main/CONTRIBUTING.md)
for details on how to contribute to this project.
Happy testing!
From b3f3819a62d2aad678791d64cee0fefb2e921620 Mon Sep 17 00:00:00 2001
From: assafpr <93249401+assafpr@users.noreply.github.com>
Date: Wed, 22 Jun 2022 14:21:07 +0300
Subject: [PATCH 02/20] Update gmock_output_test_golden.txt
---
googlemock/test/gmock_output_test_golden.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/googlemock/test/gmock_output_test_golden.txt b/googlemock/test/gmock_output_test_golden.txt
index fdf224fd..467fa20e 100644
--- a/googlemock/test/gmock_output_test_golden.txt
+++ b/googlemock/test/gmock_output_test_golden.txt
@@ -75,14 +75,14 @@ GMOCK WARNING:
Uninteresting mock function call - returning default value.
Function call: Bar2(0, 1)
Returns: false
-NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/master/docs/gmock_cook_book.md#knowing-when-to-expect for details.
+NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect for details.
[ OK ] GMockOutputTest.UninterestingCall
[ RUN ] GMockOutputTest.UninterestingCallToVoidFunction
GMOCK WARNING:
Uninteresting mock function call - returning directly.
Function call: Bar3(0, 1)
-NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/master/docs/gmock_cook_book.md#knowing-when-to-expect for details.
+NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect for details.
[ OK ] GMockOutputTest.UninterestingCallToVoidFunction
[ RUN ] GMockOutputTest.RetiredExpectation
unknown file: Failure
@@ -266,14 +266,14 @@ Uninteresting mock function call - taking default action specified at:
FILE:#:
Function call: Bar2(2, 2)
Returns: true
-NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/master/docs/gmock_cook_book.md#knowing-when-to-expect for details.
+NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect for details.
GMOCK WARNING:
Uninteresting mock function call - taking default action specified at:
FILE:#:
Function call: Bar2(1, 1)
Returns: false
-NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/master/docs/gmock_cook_book.md#knowing-when-to-expect for details.
+NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect for details.
[ OK ] GMockOutputTest.UninterestingCallWithDefaultAction
[ RUN ] GMockOutputTest.ExplicitActionsRunOutWithDefaultAction
From 358a3f6e3ebba782b0e04011ffb4f4202355fae9 Mon Sep 17 00:00:00 2001
From: assafpr <93249401+assafpr@users.noreply.github.com>
Date: Wed, 22 Jun 2022 14:31:03 +0300
Subject: [PATCH 03/20] documentation, change mater branch to main
---
docs/samples.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/samples.md b/docs/samples.md
index 2d97ca55..c11177bb 100644
--- a/docs/samples.md
+++ b/docs/samples.md
@@ -1,7 +1,7 @@
# Googletest Samples
If you're like us, you'd like to look at
-[googletest samples.](https://github.com/google/googletest/tree/master/googletest/samples)
+[googletest samples.](https://github.com/google/googletest/tree/main/googletest/samples)
The sample directory has a number of well-commented samples showing how to use a
variety of googletest features.
From 1b772a9bc4aad97764840000c52309de42d7ae48 Mon Sep 17 00:00:00 2001
From: assafpr <93249401+assafpr@users.noreply.github.com>
Date: Wed, 22 Jun 2022 14:36:10 +0300
Subject: [PATCH 04/20] documentation, change mater branch to main
---
docs/_layouts/default.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html
index dcb42d91..c7f331b8 100644
--- a/docs/_layouts/default.html
+++ b/docs/_layouts/default.html
@@ -48,7 +48,7 @@
From f2f099fb7034370927ff8b62ce7892c485a8565a Mon Sep 17 00:00:00 2001
From: assafpr <93249401+assafpr@users.noreply.github.com>
Date: Wed, 22 Jun 2022 16:09:54 +0300
Subject: [PATCH 05/20] Update CONTRIBUTING.md
---
CONTRIBUTING.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b3f50436..3aba7f6c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -80,7 +80,7 @@ fairly rigid coding style, as defined by the
[google-styleguide](https://github.com/google/styleguide) project. All patches
will be expected to conform to the style outlined
[here](https://google.github.io/styleguide/cppguide.html). Use
-[.clang-format](https://github.com/google/googletest/blob/master/.clang-format)
+[.clang-format](https://github.com/google/googletest/blob/main/.clang-format)
to check your formatting.
## Requirements for Contributors
From b59ae848d16b3f3f5f20e38f91c70d748fe733f2 Mon Sep 17 00:00:00 2001
From: assafpr <93249401+assafpr@users.noreply.github.com>
Date: Wed, 22 Jun 2022 16:12:54 +0300
Subject: [PATCH 06/20] Update faq.md
---
docs/faq.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/faq.md b/docs/faq.md
index c849aff9..19280972 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -267,7 +267,7 @@ If necessary, you can continue to derive test fixtures from a derived fixture.
GoogleTest has no limit on how deep the hierarchy can be.
For a complete example using derived test fixtures, see
-[sample5_unittest.cc](https://github.com/google/googletest/blob/master/googletest/samples/sample5_unittest.cc).
+[sample5_unittest.cc](https://github.com/google/googletest/blob/main/googletest/samples/sample5_unittest.cc).
## My compiler complains "void value not ignored as it ought to be." What does this mean?
From fde6af67908ce431d7c08fa81781978b988fdb73 Mon Sep 17 00:00:00 2001
From: assafpr <93249401+assafpr@users.noreply.github.com>
Date: Wed, 22 Jun 2022 16:21:35 +0300
Subject: [PATCH 07/20] documentation, change mater branch to main
---
googletest/README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/googletest/README.md b/googletest/README.md
index d26b309e..60aaede4 100644
--- a/googletest/README.md
+++ b/googletest/README.md
@@ -9,7 +9,7 @@ depends on which build system you use, and is usually straightforward.
### Build with CMake
GoogleTest comes with a CMake build script
-([CMakeLists.txt](https://github.com/google/googletest/blob/master/CMakeLists.txt))
+([CMakeLists.txt](https://github.com/google/googletest/blob/main/CMakeLists.txt))
that can be used on a wide range of platforms ("C" stands for cross-platform.).
If you don't have CMake installed already, you can download it for free from
.
@@ -140,7 +140,7 @@ command line. Generally, these macros are named like `GTEST_XYZ` and you define
them to either 1 or 0 to enable or disable a certain feature.
We list the most frequently used macros below. For a complete list, see file
-[include/gtest/internal/gtest-port.h](https://github.com/google/googletest/blob/master/googletest/include/gtest/internal/gtest-port.h).
+[include/gtest/internal/gtest-port.h](https://github.com/google/googletest/blob/main/googletest/include/gtest/internal/gtest-port.h).
### Multi-threaded Tests
From df4b8edee0928a080852237c9a3443aaa68af7b9 Mon Sep 17 00:00:00 2001
From: assafpr <93249401+assafpr@users.noreply.github.com>
Date: Mon, 27 Jun 2022 09:48:05 +0300
Subject: [PATCH 08/20] Update advanced.md
master branch changed to main branch in links
---
docs/advanced.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/docs/advanced.md b/docs/advanced.md
index 9a752b92..bce983c6 100644
--- a/docs/advanced.md
+++ b/docs/advanced.md
@@ -1142,8 +1142,8 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(FooTest);
You can see [sample7_unittest.cc] and [sample8_unittest.cc] for more examples.
-[sample7_unittest.cc]: https://github.com/google/googletest/blob/master/googletest/samples/sample7_unittest.cc "Parameterized Test example"
-[sample8_unittest.cc]: https://github.com/google/googletest/blob/master/googletest/samples/sample8_unittest.cc "Parameterized Test example with multiple parameters"
+[sample7_unittest.cc]: https://github.com/google/googletest/blob/main/googletest/samples/sample7_unittest.cc "Parameterized Test example"
+[sample8_unittest.cc]: https://github.com/google/googletest/blob/main/googletest/samples/sample8_unittest.cc "Parameterized Test example with multiple parameters"
### Creating Value-Parameterized Abstract Tests
@@ -1294,7 +1294,7 @@ TYPED_TEST(FooTest, HasPropertyA) { ... }
You can see [sample6_unittest.cc] for a complete example.
-[sample6_unittest.cc]: https://github.com/google/googletest/blob/master/googletest/samples/sample6_unittest.cc "Typed Test example"
+[sample6_unittest.cc]: https://github.com/google/googletest/blob/main/googletest/samples/sample6_unittest.cc "Typed Test example"
## Type-Parameterized Tests
@@ -1733,7 +1733,7 @@ You can do so by adding one line:
Now, sit back and enjoy a completely different output from your tests. For more
details, see [sample9_unittest.cc].
-[sample9_unittest.cc]: https://github.com/google/googletest/blob/master/googletest/samples/sample9_unittest.cc "Event listener example"
+[sample9_unittest.cc]: https://github.com/google/googletest/blob/main/googletest/samples/sample9_unittest.cc "Event listener example"
You may append more than one listener to the list. When an `On*Start()` or
`OnTestPartResult()` event is fired, the listeners will receive it in the order
@@ -1760,7 +1760,7 @@ by the former.
See [sample10_unittest.cc] for an example of a failure-raising listener.
-[sample10_unittest.cc]: https://github.com/google/googletest/blob/master/googletest/samples/sample10_unittest.cc "Failure-raising listener example"
+[sample10_unittest.cc]: https://github.com/google/googletest/blob/main/googletest/samples/sample10_unittest.cc "Failure-raising listener example"
## Running Test Programs: Advanced Options
From dfa990f9426797abfc10e2ec02ff9ccdbe8b4619 Mon Sep 17 00:00:00 2001
From: assafpr <93249401+assafpr@users.noreply.github.com>
Date: Mon, 27 Jun 2022 09:50:36 +0300
Subject: [PATCH 09/20] Update gmock-spec-builders.cc
---
googlemock/src/gmock-spec-builders.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc
index 658ad3fa..78fbdfaa 100644
--- a/googlemock/src/gmock-spec-builders.cc
+++ b/googlemock/src/gmock-spec-builders.cc
@@ -295,7 +295,7 @@ void ReportUninterestingCall(CallReaction reaction, const std::string& msg) {
"call should not happen. Do not suppress it by blindly adding "
"an EXPECT_CALL() if you don't mean to enforce the call. "
"See "
- "https://github.com/google/googletest/blob/master/docs/"
+ "https://github.com/google/googletest/blob/main/docs/"
"gmock_cook_book.md#"
"knowing-when-to-expect for details.\n",
stack_frames_to_skip);
From 64df55449acb3b0c2e9de2ded58def728f8e3114 Mon Sep 17 00:00:00 2001
From: assafpr <93249401+assafpr@users.noreply.github.com>
Date: Mon, 27 Jun 2022 09:51:44 +0300
Subject: [PATCH 10/20] Update gtest-death-test.cc
---
googletest/src/gtest-death-test.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc
index e6abc627..5c9d3f23 100644
--- a/googletest/src/gtest-death-test.cc
+++ b/googletest/src/gtest-death-test.cc
@@ -249,7 +249,7 @@ static std::string DeathTestThreadWarning(size_t thread_count) {
msg << "detected " << thread_count << " threads.";
}
msg << " See "
- "https://github.com/google/googletest/blob/master/docs/"
+ "https://github.com/google/googletest/blob/main/docs/"
"advanced.md#death-tests-and-threads"
<< " for more explanation and suggested solutions, especially if"
<< " this is the last message you see before your test times out.";
From 66d2463610e5db956e742e4267312169b0a84958 Mon Sep 17 00:00:00 2001
From: assafpr <93249401+assafpr@users.noreply.github.com>
Date: Mon, 27 Jun 2022 09:53:40 +0300
Subject: [PATCH 11/20] Update gmock-spec-builders_test.cc
master branch changed to main in link
---
googlemock/test/gmock-spec-builders_test.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/googlemock/test/gmock-spec-builders_test.cc b/googlemock/test/gmock-spec-builders_test.cc
index 122d5b94..bb1e83ef 100644
--- a/googlemock/test/gmock-spec-builders_test.cc
+++ b/googlemock/test/gmock-spec-builders_test.cc
@@ -2059,7 +2059,7 @@ class GMockVerboseFlagTest : public VerboseFlagPreservingFixture {
"call should not happen. Do not suppress it by blindly adding "
"an EXPECT_CALL() if you don't mean to enforce the call. "
"See "
- "https://github.com/google/googletest/blob/master/docs/"
+ "https://github.com/google/googletest/blob/main/docs/"
"gmock_cook_book.md#"
"knowing-when-to-expect for details.";
From 1547c2acc833f53263b23fdea7fe1eeddd792933 Mon Sep 17 00:00:00 2001
From: assafpr <93249401+assafpr@users.noreply.github.com>
Date: Mon, 27 Jun 2022 09:55:28 +0300
Subject: [PATCH 12/20] Update gmock-actions.h
master branch changed to main in links
---
googlemock/include/gmock/gmock-actions.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h
index c785ad8a..7e78c09a 100644
--- a/googlemock/include/gmock/gmock-actions.h
+++ b/googlemock/include/gmock/gmock-actions.h
@@ -122,7 +122,7 @@
// MORE INFORMATION:
//
// To learn more about using these macros, please search for 'ACTION' on
-// https://github.com/google/googletest/blob/master/docs/gmock_cook_book.md
+// https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md
// IWYU pragma: private, include "gmock/gmock.h"
// IWYU pragma: friend gmock/.*
From d0af91ead3983b0eacae3efa5bf3a2b368141bb0 Mon Sep 17 00:00:00 2001
From: assafpr <93249401+assafpr@users.noreply.github.com>
Date: Mon, 27 Jun 2022 09:56:59 +0300
Subject: [PATCH 13/20] Update gmock-matchers.h
branch master changed to main on link
---
googlemock/include/gmock/gmock-matchers.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h
index 62829011..186a95ca 100644
--- a/googlemock/include/gmock/gmock-matchers.h
+++ b/googlemock/include/gmock/gmock-matchers.h
@@ -240,7 +240,7 @@
//
// To learn more about using these macros, please search for 'MATCHER'
// on
-// https://github.com/google/googletest/blob/master/docs/gmock_cook_book.md
+// https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md
//
// This file also implements some commonly used argument matchers. More
// matchers can be defined by the user implementing the
From dd72ed19fe52f2dbca3b354d9a49eb4124693b99 Mon Sep 17 00:00:00 2001
From: assafpr <93249401+assafpr@users.noreply.github.com>
Date: Mon, 27 Jun 2022 09:59:06 +0300
Subject: [PATCH 14/20] Update gtest.cc
fix a broken link
---
googletest/src/gtest.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index 6f31dd22..1b9c51be 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -6037,7 +6037,7 @@ bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) {
// each TestSuite and TestInfo object.
// If shard_tests == true, further filters tests based on sharding
// variables in the environment - see
-// https://github.com/google/googletest/blob/master/googletest/docs/advanced.md
+// https://github.com/google/googletest/blob/main/docs/advanced.md
// . Returns the number of tests that should run.
int UnitTestImpl::FilterTests(ReactionToSharding shard_tests) {
const int32_t total_shards = shard_tests == HONOR_SHARDING_PROTOCOL
From 61720589cbef9707b3c5247d02141a7c31e2876f Mon Sep 17 00:00:00 2001
From: Matei Dibu
Date: Wed, 20 Jul 2022 19:16:51 +0300
Subject: [PATCH 15/20] gtest-death-test: add 'noreturn'
---
googletest/src/gtest-death-test.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc
index e6abc627..d549e83d 100644
--- a/googletest/src/gtest-death-test.cc
+++ b/googletest/src/gtest-death-test.cc
@@ -284,7 +284,7 @@ enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW };
// message is propagated back to the parent process. Otherwise, the
// message is simply printed to stderr. In either case, the program
// then exits with status 1.
-static void DeathTestAbort(const std::string& message) {
+[[noreturn]] static void DeathTestAbort(const std::string& message) {
// On a POSIX system, this function may be called from a threadsafe-style
// death test child process, which operates on a very small stack. Use
// the heap for any additional non-minuscule memory requirements.
From 5b909beeec178f338be997830b6c31a80cda7a93 Mon Sep 17 00:00:00 2001
From: Dino Radakovic
Date: Thu, 4 Aug 2022 10:53:26 -0700
Subject: [PATCH 16/20] Explicitly instantiate matchee std::string in
MatchesRegex
If this ever turns out to be a performance issue, we could use std::conditional and std::is_same to avoid copying std::strings.
Fixes #3949
PiperOrigin-RevId: 465353572
Change-Id: If2d691bccb626c692c87e006df5afe88a4ed1542
---
googletest/include/gtest/gtest-matchers.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/googletest/include/gtest/gtest-matchers.h b/googletest/include/gtest/gtest-matchers.h
index bffa00c5..4a60b0d0 100644
--- a/googletest/include/gtest/gtest-matchers.h
+++ b/googletest/include/gtest/gtest-matchers.h
@@ -842,7 +842,7 @@ class MatchesRegexMatcher {
template
bool MatchAndExplain(const MatcheeStringType& s,
MatchResultListener* /* listener */) const {
- const std::string& s2(s);
+ const std::string s2(s);
return full_match_ ? RE::FullMatch(s2, *regex_)
: RE::PartialMatch(s2, *regex_);
}
From 4c9a3bb62bf3ba1f1010bf96f9c8ed767b363774 Mon Sep 17 00:00:00 2001
From: Dino Radakovic
Date: Mon, 8 Aug 2022 11:47:36 -0700
Subject: [PATCH 17/20] gtest_unittest: Call FAIL() in lambda, fix incorrect
fatality expectation
FAIL() evaluates into a return statement: https://github.com/google/googletest/blob/5b909beeec178f338be997830b6c31a80cda7a93/googletest/include/gtest/internal/gtest-internal.h#L1347
Calling it from the body of the test case turns all subsequent expectations into no-ops.
Fixes #3941
PiperOrigin-RevId: 466104977
Change-Id: Ic15f43acb734295a5c9690a2b5eec6f65e8c0814
---
googletest/test/gtest_unittest.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc
index b579e81e..329ca546 100644
--- a/googletest/test/gtest_unittest.cc
+++ b/googletest/test/gtest_unittest.cc
@@ -3454,10 +3454,10 @@ TEST_F(NoFatalFailureTest, MessageIsStreamable) {
TestPartResultArray gtest_failures;
{
ScopedFakeTestPartResultReporter gtest_reporter(>est_failures);
- EXPECT_NO_FATAL_FAILURE(FAIL() << "foo") << "my message";
+ EXPECT_NO_FATAL_FAILURE([] { FAIL() << "foo"; }()) << "my message";
}
ASSERT_EQ(2, gtest_failures.size());
- EXPECT_EQ(TestPartResult::kNonFatalFailure,
+ EXPECT_EQ(TestPartResult::kFatalFailure,
gtest_failures.GetTestPartResult(0).type());
EXPECT_EQ(TestPartResult::kNonFatalFailure,
gtest_failures.GetTestPartResult(1).type());
From 7274ec186442c96e4c7dcc99c684a03e5db2ff48 Mon Sep 17 00:00:00 2001
From: Derek Mauro
Date: Fri, 12 Aug 2022 10:46:04 -0700
Subject: [PATCH 18/20] Add --features=external_include_paths to Bazel CI to
ignore warnings from dependencies
PiperOrigin-RevId: 467244441
Change-Id: Iefa65474d8c62e7c4c942957dc8e275715076e5f
---
.github/workflows/gtest-ci.yml | 6 +++---
ci/linux-presubmit.sh | 3 +++
ci/macos-presubmit.sh | 1 +
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/gtest-ci.yml b/.github/workflows/gtest-ci.yml
index 036c392f..b2dcab49 100644
--- a/.github/workflows/gtest-ci.yml
+++ b/.github/workflows/gtest-ci.yml
@@ -17,7 +17,7 @@ jobs:
fetch-depth: 0
- name: Tests
- run: bazel test --test_output=errors //...
+ run: bazel test --cxxopt=-std=c++14 --features=external_include_paths --test_output=errors ...
MacOs:
runs-on: macos-latest
@@ -28,7 +28,7 @@ jobs:
fetch-depth: 0
- name: Tests
- run: bazel test --test_output=errors //...
+ run: bazel test --cxxopt=-std=c++14 --features=external_include_paths --test_output=errors ...
Windows:
@@ -40,4 +40,4 @@ jobs:
fetch-depth: 0
- name: Tests
- run: bazel test --test_output=errors //...
+ run: bazel test --cxxopt=-std=c++14 --features=external_include_paths --test_output=errors ...
diff --git a/ci/linux-presubmit.sh b/ci/linux-presubmit.sh
index f7e0f465..4eb5bbe4 100644
--- a/ci/linux-presubmit.sh
+++ b/ci/linux-presubmit.sh
@@ -80,6 +80,7 @@ time docker run \
--copt="-Wuninitialized" \
--copt="-Wno-error=pragmas" \
--distdir="/bazel-distdir" \
+ --features=external_include_paths \
--keep_going \
--show_timestamps \
--test_output=errors
@@ -100,6 +101,7 @@ for std in ${STD}; do
--copt="-Wuninitialized" \
--define="absl=${absl}" \
--distdir="/bazel-distdir" \
+ --features=external_include_paths \
--keep_going \
--show_timestamps \
--test_output=errors
@@ -123,6 +125,7 @@ for std in ${STD}; do
--copt="-Wuninitialized" \
--define="absl=${absl}" \
--distdir="/bazel-distdir" \
+ --features=external_include_paths \
--keep_going \
--linkopt="--gcc-toolchain=/usr/local" \
--show_timestamps \
diff --git a/ci/macos-presubmit.sh b/ci/macos-presubmit.sh
index 3b711da5..8f35df58 100644
--- a/ci/macos-presubmit.sh
+++ b/ci/macos-presubmit.sh
@@ -68,6 +68,7 @@ for absl in 0 1; do
--copt="-Werror" \
--cxxopt="-std=c++14" \
--define="absl=${absl}" \
+ --features=external_include_paths \
--keep_going \
--show_timestamps \
--test_output=errors
From c0e032efe587efa99413dd9ac54c3953a7915588 Mon Sep 17 00:00:00 2001
From: Derek Mauro
Date: Tue, 16 Aug 2022 10:23:11 -0700
Subject: [PATCH 19/20] Update README.md to point to the Foundational C++
Support Policy
PiperOrigin-RevId: 467959285
Change-Id: Ibd92b3a278f293736b31bd7e07fe502241bb1f05
---
README.md | 39 ++++++---------------------------------
1 file changed, 6 insertions(+), 33 deletions(-)
diff --git a/README.md b/README.md
index 5061357e..cd89abb2 100644
--- a/README.md
+++ b/README.md
@@ -59,39 +59,12 @@ More information about building GoogleTest can be found at
## Supported Platforms
-GoogleTest requires a codebase and compiler compliant with the C++14 standard or
-newer.
-
-The GoogleTest code is officially supported on the following platforms.
-Operating systems or tools not listed below are community-supported. For
-community-supported platforms, patches that do not complicate the code may be
-considered.
-
-If you notice any problems on your platform, please file an issue on the
-[GoogleTest GitHub Issue Tracker](https://github.com/google/googletest/issues).
-Pull requests containing fixes are welcome!
-
-### Operating Systems
-
-* Linux
-* macOS
-* Windows
-
-### Compilers
-
-* gcc 5.0+
-* clang 5.0+
-* MSVC 2015+
-
-**macOS users:** Xcode 9.3+ provides clang 5.0+.
-
-### Build Systems
-
-* [Bazel](https://bazel.build/)
-* [CMake](https://cmake.org/)
-
-**Note:** Bazel is the build system used by the team internally and in tests.
-CMake is supported on a best-effort basis and by the community.
+GoogleTest follows Google's
+[Foundational C++ Support Policy](https://opensource.google/documentation/policies/cplusplus-support).
+See
+[this table](https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md)
+for a list of currently supported versions compilers, platforms, and build
+tools.
## Who Is Using GoogleTest?
From 25cc5777a17820a6339204a3552aa1dd5e428669 Mon Sep 17 00:00:00 2001
From: Hardik Vala
Date: Mon, 22 Aug 2022 06:42:26 -0700
Subject: [PATCH 20/20] Add support of 19-member structs to gmock
UnpackStructImpl.
PiperOrigin-RevId: 469171380
Change-Id: Ic75fc0523924e40e620552d4c04b79dad22a68e0
---
googlemock/include/gmock/gmock-matchers.h | 5 +++++
googlemock/test/gmock-matchers-comparisons_test.cc | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h
index 46157360..5faf8dc9 100644
--- a/googlemock/include/gmock/gmock-matchers.h
+++ b/googlemock/include/gmock/gmock-matchers.h
@@ -3245,6 +3245,11 @@ auto UnpackStructImpl(const T& t, MakeIndexSequence<18>, char) {
const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r] = t;
return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r);
}
+template
+auto UnpackStructImpl(const T& t, MakeIndexSequence<19>, char) {
+ const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s] = t;
+ return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s);
+}
#endif // defined(__cpp_structured_bindings)
template
diff --git a/googlemock/test/gmock-matchers-comparisons_test.cc b/googlemock/test/gmock-matchers-comparisons_test.cc
index 1c6cac62..0cf731ff 100644
--- a/googlemock/test/gmock-matchers-comparisons_test.cc
+++ b/googlemock/test/gmock-matchers-comparisons_test.cc
@@ -1720,6 +1720,11 @@ TEST(FieldsAreTest, StructuredBindings) {
};
EXPECT_THAT(MyVarType18{},
FieldsAre(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+ struct MyVarType19 {
+ int a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s;
+ };
+ EXPECT_THAT(MyVarType19{}, FieldsAre(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0));
}
#endif