git: 5ca8c28cd8c7 - main - contrib/googletest: update from 1.14.0 to 1.15.2

From: Enji Cooper <ngie_at_FreeBSD.org>
Date: Sun, 20 Oct 2024 01:54:50 UTC
The branch main has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=5ca8c28cd8c725b81781201cfdb5f9969396f934

commit 5ca8c28cd8c725b81781201cfdb5f9969396f934
Merge: 0077477f215c 14f7077fed7d
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2024-10-20 01:51:18 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2024-10-20 01:54:01 +0000

    contrib/googletest: update from 1.14.0 to 1.15.2
    
    The changes between the two versions can be found in this diff of the
    two release tags:
    https://github.com/google/googletest/compare/v1.14.0...v1.15.2
    
    One notable change is that GoogleTest 1.15.x now officially requires
    C++-14 (1.14.x required C++-11).
    
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D47197
    
    Merge commit '14f7077fed7d82046bdcbe347004132f08aba886'

 contrib/googletest/BUILD.bazel                     |  17 ++
 contrib/googletest/CMakeLists.txt                  |  13 +-
 contrib/googletest/CONTRIBUTING.md                 |   8 +-
 contrib/googletest/CONTRIBUTORS                    |   1 +
 contrib/googletest/MODULE.bazel                    |  69 +++++
 contrib/googletest/README.md                       |  22 +-
 contrib/googletest/WORKSPACE                       |  29 +-
 contrib/googletest/WORKSPACE.bzlmod                |  35 +++
 contrib/googletest/ci/linux-presubmit.sh           |  10 +-
 contrib/googletest/ci/macos-presubmit.sh           |   3 +-
 contrib/googletest/ci/windows-presubmit.bat        |  11 +-
 contrib/googletest/docs/advanced.md                |  36 ++-
 contrib/googletest/docs/faq.md                     |  57 ++--
 contrib/googletest/docs/gmock_cook_book.md         |  41 ++-
 contrib/googletest/docs/gmock_for_dummies.md       |   6 +-
 contrib/googletest/docs/primer.md                  |  39 ++-
 contrib/googletest/docs/reference/assertions.md    |   2 +-
 contrib/googletest/docs/reference/mocking.md       |   3 +-
 contrib/googletest/docs/reference/testing.md       |  29 +-
 contrib/googletest/fake_fuchsia_sdk.bzl            |  33 +++
 contrib/googletest/googlemock/CMakeLists.txt       |  27 +-
 contrib/googletest/googlemock/README.md            |   6 +-
 .../googlemock/include/gmock/gmock-actions.h       |  44 ++-
 .../include/gmock/gmock-function-mocker.h          |   9 +-
 .../googlemock/include/gmock/gmock-matchers.h      | 179 ++++++-------
 .../googlemock/include/gmock/gmock-more-actions.h  |   7 +-
 .../googletest/googlemock/include/gmock/gmock.h    |  15 +-
 .../include/gmock/internal/gmock-internal-utils.h  |  14 +-
 .../googlemock/include/gmock/internal/gmock-port.h |   8 +-
 .../googlemock/src/gmock-internal-utils.cc         |   5 +-
 .../googletest/googlemock/src/gmock-matchers.cc    |  29 +-
 .../googlemock/src/gmock-spec-builders.cc          |   3 +-
 .../test/gmock-matchers-comparisons_test.cc        |   9 +
 .../test/gmock-matchers-containers_test.cc         |  17 +-
 .../googlemock/test/gmock-more-actions_test.cc     |  40 ++-
 .../googlemock/test/gmock-spec-builders_test.cc    |   2 +-
 .../googletest/googlemock/test/gmock_link_test.h   |   9 +
 contrib/googletest/googletest/CMakeLists.txt       |  28 +-
 contrib/googletest/googletest/README.md            |   4 +-
 .../googletest/googletest/cmake/Config.cmake.in    |   4 +
 .../googletest/cmake/internal_utils.cmake          |  42 +--
 .../include/gtest/gtest-assertion-result.h         |   2 +-
 .../googletest/include/gtest/gtest-death-test.h    |   8 +-
 .../googletest/include/gtest/gtest-message.h       |  19 +-
 .../googletest/include/gtest/gtest-param-test.h    |   8 +-
 .../googletest/include/gtest/gtest-printers.h      |  90 +++++--
 .../googletest/include/gtest/gtest-typed-test.h    | 126 ++++-----
 .../googletest/googletest/include/gtest/gtest.h    |  55 ++--
 .../gtest/internal/gtest-death-test-internal.h     |  51 ++--
 .../include/gtest/internal/gtest-filepath.h        |   8 +-
 .../include/gtest/internal/gtest-internal.h        |  99 +++----
 .../include/gtest/internal/gtest-param-util.h      | 154 +++++------
 .../include/gtest/internal/gtest-port-arch.h       |   2 +
 .../googletest/include/gtest/internal/gtest-port.h | 141 +++++++---
 .../include/gtest/internal/gtest-type-util.h       |   6 +-
 .../googletest/googletest/src/gtest-death-test.cc  |  36 +--
 .../googletest/googletest/src/gtest-filepath.cc    |   2 +-
 .../googletest/googletest/src/gtest-internal-inl.h |  46 ++--
 contrib/googletest/googletest/src/gtest-port.cc    |  98 +++++--
 contrib/googletest/googletest/src/gtest.cc         | 294 ++++++++++++---------
 .../googletest/test/googletest-color-test.py       |   1 +
 .../googletest/test/googletest-death-test-test.cc  |  78 +++---
 .../test/googletest-json-output-unittest.py        |  15 ++
 .../googletest/test/googletest-options-test.cc     |   5 +-
 .../test/googletest-output-test-golden-lin.txt     |   5 -
 .../googletest/test/googletest-port-test.cc        |   6 +-
 .../googletest/test/googletest-printers-test.cc    |  16 ++
 .../googletest/test/gtest_environment_test.cc      |  96 ++++---
 .../googletest/googletest/test/gtest_help_test.py  |  64 ++---
 .../googletest/test/gtest_json_test_utils.py       |   3 +
 .../googletest/test/gtest_repeat_test.cc           |   4 +-
 .../googletest/googletest/test/gtest_unittest.cc   |  46 ++--
 .../googletest/test/gtest_xml_output_unittest.py   |  15 +-
 contrib/googletest/googletest_deps.bzl             |  22 +-
 74 files changed, 1564 insertions(+), 1022 deletions(-)

diff --cc contrib/googletest/CONTRIBUTING.md
index 8bed14b2666d,000000000000..ab5a47bf5530
mode 100644,000000..100644
--- a/contrib/googletest/CONTRIBUTING.md
+++ b/contrib/googletest/CONTRIBUTING.md
@@@ -1,141 -1,0 +1,141 @@@
 +# How to become a contributor and submit your own code
 +
 +## Contributor License Agreements
 +
 +We'd love to accept your patches! Before we can take them, we have to jump a
 +couple of legal hurdles.
 +
 +Please fill out either the individual or corporate Contributor License Agreement
 +(CLA).
 +
 +*   If you are an individual writing original source code and you're sure you
 +    own the intellectual property, then you'll need to sign an
 +    [individual CLA](https://developers.google.com/open-source/cla/individual).
 +*   If you work for a company that wants to allow you to contribute your work,
 +    then you'll need to sign a
 +    [corporate CLA](https://developers.google.com/open-source/cla/corporate).
 +
 +Follow either of the two links above to access the appropriate CLA and
 +instructions for how to sign and return it. Once we receive it, we'll be able to
 +accept your pull requests.
 +
 +## Are you a Googler?
 +
 +If you are a Googler, please make an attempt to submit an internal contribution
 +rather than a GitHub Pull Request. If you are not able to submit internally, a
 +PR is acceptable as an alternative.
 +
 +## Contributing A Patch
 +
 +1.  Submit an issue describing your proposed change to the
 +    [issue tracker](https://github.com/google/googletest/issues).
 +2.  Please don't mix more than one logical change per submittal, because it
 +    makes the history hard to follow. If you want to make a change that doesn't
 +    have a corresponding issue in the issue tracker, please create one.
 +3.  Also, coordinate with team members that are listed on the issue in question.
 +    This ensures that work isn't being duplicated and communicating your plan
 +    early also generally leads to better patches.
 +4.  If your proposed change is accepted, and you haven't already done so, sign a
 +    Contributor License Agreement
 +    ([see details above](#contributor-license-agreements)).
 +5.  Fork the desired repo, develop and test your code changes.
 +6.  Ensure that your code adheres to the existing style in the sample to which
 +    you are contributing.
 +7.  Ensure that your code has an appropriate set of unit tests which all pass.
 +8.  Submit a pull request.
 +
 +## The Google Test and Google Mock Communities
 +
 +The Google Test community exists primarily through the
- [discussion group](http://groups.google.com/group/googletestframework) and the
++[discussion group](https://groups.google.com/group/googletestframework) and the
 +GitHub repository. Likewise, the Google Mock community exists primarily through
- their own [discussion group](http://groups.google.com/group/googlemock). You are
- definitely encouraged to contribute to the discussion and you can also help us
- to keep the effectiveness of the group high by following and promoting the
++their own [discussion group](https://groups.google.com/group/googlemock). You
++are definitely encouraged to contribute to the discussion and you can also help
++us to keep the effectiveness of the group high by following and promoting the
 +guidelines listed here.
 +
 +### Please Be Friendly
 +
 +Showing courtesy and respect to others is a vital part of the Google culture,
 +and we strongly encourage everyone participating in Google Test development to
 +join us in accepting nothing less. Of course, being courteous is not the same as
 +failing to constructively disagree with each other, but it does mean that we
 +should be respectful of each other when enumerating the 42 technical reasons
 +that a particular proposal may not be the best choice. There's never a reason to
 +be antagonistic or dismissive toward anyone who is sincerely trying to
 +contribute to a discussion.
 +
 +Sure, C++ testing is serious business and all that, but it's also a lot of fun.
 +Let's keep it that way. Let's strive to be one of the friendliest communities in
 +all of open source.
 +
 +As always, discuss Google Test in the official GoogleTest discussion group. You
 +don't have to actually submit code in order to sign up. Your participation
 +itself is a valuable contribution.
 +
 +## Style
 +
 +To keep the source consistent, readable, diffable and easy to merge, we use a
 +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/main/.clang-format) to
 +check your formatting.
 +
 +## Requirements for Contributors
 +
 +If you plan to contribute a patch, you need to build Google Test, Google Mock,
 +and their own tests from a git checkout, which has further requirements:
 +
 +*   [Python](https://www.python.org/) v3.6 or newer (for running some of the
 +    tests and re-generating certain source files from templates)
 +*   [CMake](https://cmake.org/) v2.8.12 or newer
 +
 +## Developing Google Test and Google Mock
 +
 +This section discusses how to make your own changes to the Google Test project.
 +
 +### Testing Google Test and Google Mock Themselves
 +
 +To make sure your changes work as intended and don't break existing
 +functionality, you'll want to compile and run Google Test and GoogleMock's own
 +tests. For that you can use CMake:
 +
 +```
 +mkdir mybuild
 +cd mybuild
 +cmake -Dgtest_build_tests=ON -Dgmock_build_tests=ON ${GTEST_REPO_DIR}
 +```
 +
 +To choose between building only Google Test or Google Mock, you may modify your
 +cmake command to be one of each
 +
 +```
 +cmake -Dgtest_build_tests=ON ${GTEST_DIR} # sets up Google Test tests
 +cmake -Dgmock_build_tests=ON ${GMOCK_DIR} # sets up Google Mock tests
 +```
 +
 +Make sure you have Python installed, as some of Google Test's tests are written
 +in Python. If the cmake command complains about not being able to find Python
 +(`Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE)`), try telling it
 +explicitly where your Python executable can be found:
 +
 +```
 +cmake -DPYTHON_EXECUTABLE=path/to/python ...
 +```
 +
 +Next, you can build Google Test and / or Google Mock and all desired tests. On
 +\*nix, this is usually done by
 +
 +```
 +make
 +```
 +
 +To run the tests, do
 +
 +```
 +make test
 +```
 +
 +All tests should pass.
diff --cc contrib/googletest/MODULE.bazel
index 000000000000,61d5e2223512..61d5e2223512
mode 000000,100644..100644
--- a/contrib/googletest/MODULE.bazel
+++ b/contrib/googletest/MODULE.bazel
diff --cc contrib/googletest/README.md
index 443e02069581,000000000000..f50c670534d5
mode 100644,000000..100644
--- a/contrib/googletest/README.md
+++ b/contrib/googletest/README.md
@@@ -1,146 -1,0 +1,142 @@@
 +# GoogleTest
 +
 +### Announcements
 +
 +#### Live at Head
 +
 +GoogleTest now follows the
 +[Abseil Live at Head philosophy](https://abseil.io/about/philosophy#upgrade-support).
 +We recommend
 +[updating to the latest commit in the `main` branch as often as possible](https://github.com/abseil/abseil-cpp/blob/master/FAQ.md#what-is-live-at-head-and-how-do-i-do-it).
 +We do publish occasional semantic versions, tagged with
- `v${major}.${minor}.${patch}` (e.g. `v1.13.0`).
++`v${major}.${minor}.${patch}` (e.g. `v1.15.0`).
 +
 +#### Documentation Updates
 +
 +Our documentation is now live on GitHub Pages at
 +https://google.github.io/googletest/. We recommend browsing the documentation on
 +GitHub Pages rather than directly in the repository.
 +
- #### Release 1.13.0
++#### Release 1.15.0
 +
- [Release 1.13.0](https://github.com/google/googletest/releases/tag/v1.13.0) is
++[Release 1.15.0](https://github.com/google/googletest/releases/tag/v1.15.0) is
 +now available.
 +
- The 1.13.x branch requires at least C++14.
++The 1.15.x branch requires at least C++14.
 +
 +#### Continuous Integration
 +
- We use Google's internal systems for continuous integration. \
- GitHub Actions were added for the convenience of open-source contributors. They
- are exclusively maintained by the open-source community and not used by the
- GoogleTest team.
++We use Google's internal systems for continuous integration.
 +
 +#### Coming Soon
 +
 +*   We are planning to take a dependency on
 +    [Abseil](https://github.com/abseil/abseil-cpp).
- *   More documentation improvements are planned.
 +
 +## Welcome to **GoogleTest**, Google's C++ test framework!
 +
 +This repository is a merger of the formerly separate GoogleTest and GoogleMock
 +projects. These were so closely related that it makes sense to maintain and
 +release them together.
 +
 +### Getting Started
 +
 +See the [GoogleTest User's Guide](https://google.github.io/googletest/) for
 +documentation. We recommend starting with the
 +[GoogleTest Primer](https://google.github.io/googletest/primer.html).
 +
 +More information about building GoogleTest can be found at
 +[googletest/README.md](googletest/README.md).
 +
 +## Features
 +
 +*   xUnit test framework: \
 +    Googletest is based on the [xUnit](https://en.wikipedia.org/wiki/XUnit)
 +    testing framework, a popular architecture for unit testing
 +*   Test discovery: \
 +    Googletest automatically discovers and runs your tests, eliminating the need
 +    to manually register your tests
 +*   Rich set of assertions: \
 +    Googletest provides a variety of assertions, such as equality, inequality,
 +    exceptions, and more, making it easy to test your code
 +*   User-defined assertions: \
 +    You can define your own assertions with Googletest, making it simple to
 +    write tests that are specific to your code
 +*   Death tests: \
 +    Googletest supports death tests, which verify that your code exits in a
 +    certain way, making it useful for testing error-handling code
 +*   Fatal and non-fatal failures: \
 +    You can specify whether a test failure should be treated as fatal or
 +    non-fatal with Googletest, allowing tests to continue running even if a
 +    failure occurs
 +*   Value-parameterized tests: \
 +    Googletest supports value-parameterized tests, which run multiple times with
 +    different input values, making it useful for testing functions that take
 +    different inputs
 +*   Type-parameterized tests: \
 +    Googletest also supports type-parameterized tests, which run with different
 +    data types, making it useful for testing functions that work with different
 +    data types
 +*   Various options for running tests: \
 +    Googletest provides many options for running tests including running
 +    individual tests, running tests in a specific order and running tests in
 +    parallel
 +
 +## Supported Platforms
 +
 +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 of compilers, platforms, and build
 +tools.
 +
 +## Who Is Using GoogleTest?
 +
 +In addition to many internal projects at Google, GoogleTest is also used by the
 +following notable projects:
 +
- *   The [Chromium projects](http://www.chromium.org/) (behind the Chrome browser
-     and Chrome OS).
- *   The [LLVM](http://llvm.org/) compiler.
++*   The [Chromium projects](https://www.chromium.org/) (behind the Chrome
++    browser and Chrome OS).
++*   The [LLVM](https://llvm.org/) compiler.
 +*   [Protocol Buffers](https://github.com/google/protobuf), Google's data
 +    interchange format.
- *   The [OpenCV](http://opencv.org/) computer vision library.
++*   The [OpenCV](https://opencv.org/) computer vision library.
 +
 +## Related Open Source Projects
 +
 +[GTest Runner](https://github.com/nholthaus/gtest-runner) is a Qt5 based
 +automated test-runner and Graphical User Interface with powerful features for
 +Windows and Linux platforms.
 +
 +[GoogleTest UI](https://github.com/ospector/gtest-gbar) is a test runner that
 +runs your test binary, allows you to track its progress via a progress bar, and
 +displays a list of test failures. Clicking on one shows failure text. GoogleTest
 +UI is written in C#.
 +
 +[GTest TAP Listener](https://github.com/kinow/gtest-tap-listener) is an event
 +listener for GoogleTest that implements the
 +[TAP protocol](https://en.wikipedia.org/wiki/Test_Anything_Protocol) for test
 +result output. If your test runner understands TAP, you may find it useful.
 +
 +[gtest-parallel](https://github.com/google/gtest-parallel) is a test runner that
 +runs tests from your binary in parallel to provide significant speed-up.
 +
 +[GoogleTest Adapter](https://marketplace.visualstudio.com/items?itemName=DavidSchuldenfrei.gtest-adapter)
 +is a VS Code extension allowing to view GoogleTest in a tree view and run/debug
 +your tests.
 +
 +[C++ TestMate](https://github.com/matepek/vscode-catch2-test-adapter) is a VS
 +Code extension allowing to view GoogleTest in a tree view and run/debug your
 +tests.
 +
 +[Cornichon](https://pypi.org/project/cornichon/) is a small Gherkin DSL parser
 +that generates stub code for GoogleTest.
 +
 +## Contributing Changes
 +
 +Please read
 +[`CONTRIBUTING.md`](https://github.com/google/googletest/blob/main/CONTRIBUTING.md)
 +for details on how to contribute to this project.
 +
 +Happy testing!
diff --cc contrib/googletest/WORKSPACE.bzlmod
index 000000000000,381432c5d0cb..381432c5d0cb
mode 000000,100644..100644
--- a/contrib/googletest/WORKSPACE.bzlmod
+++ b/contrib/googletest/WORKSPACE.bzlmod
diff --cc contrib/googletest/fake_fuchsia_sdk.bzl
index 000000000000,2024dc6c4d03..2024dc6c4d03
mode 000000,100644..100644
--- a/contrib/googletest/fake_fuchsia_sdk.bzl
+++ b/contrib/googletest/fake_fuchsia_sdk.bzl