Skip to content

Conversation

@wo80
Copy link
Contributor

@wo80 wo80 commented Jun 24, 2025

Changes included in this PR:

  • Update googletest to version 1.16.0 (requires C++14)
  • Updates to the CMake test setup
    • Call to enable_testing() in top-level CMakeLists.txt for compatibility with ctest
    • Instead of find_package(GTest) use include(GoogleTest)
    • Remove use of Threads (not needed)
    • Instead of manually adding tests, use gtest_discover_tests(...)
    • To make tests work on Windows when BUILD_SHARED_LIBS is ON, copy DLLs to tests bin dir.
  • Fix FFmpegAudioReaderTest failing with FFmpeg v7 (closes ffmpeg 7.0 support #142)
  • Small change to Github workflow was necessary since custom target check was removed (a target named test is available by default)
  • Update cmake_minimum_required to 3.10. The GoogleTest module was introduced in version 3.9, gtest_discover_tests(...) in 3.10.

The changes were tested on Debian 12 (FFmpeg version 5.1.6) and Windows 10 (FFmpeg version 7.0.1). All combinations release/debug and shared/static were tested.

The project can be built and tested with:

cmake -B build -DBUILD_TOOLS=ON -DBUILD_SHARED_LIBS=OFF
cmake --build build --config Debug
ctest --test-dir build --output-on-failure -C Debug

Notes:

  1. Automatic copying of DLLs requires CMake 3.21, see TARGET_RUNTIME_DLLS. Chromaprint is currently using 3.5, so the code is guarded with if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.21.0"). Wasn't sure if a general update of cmake_minimum_required would be ok.
  2. The update of googletest was done because I thought it would fix some problems with running the tests on Windows. In retrospect this wasn't necessary, so the PR could be redone without the update, if wanted.

wo80 added 5 commits June 24, 2025 13:42
This command should be in the top-level source directory because ctest expects to find a test file in the top-level build directory.

See https://cmake.org/cmake/help/latest/command/enable_testing.html
Remove manual add_test() and instead use gtest_discover_tests() to discover all tests. This way tests can be run using ctest, displaying the outcome of each test.
The custom CMake target 'check' was removed. Use 'test' instead.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 24, 2025

Walkthrough

This pull request comprehensively updates the GoogleTest and GoogleMock third-party codebase. It modernizes build configurations to require C++14, refactors Bazel and CMake integration, removes legacy generator scripts, adds new matchers and actions, improves test coverage, updates documentation, and enhances internal utilities for type safety and diagnostics.

Changes

Files/Groups Change Summary
CMakeLists.txt, src/3rdparty/googletest/CMakeLists.txt, googlemock/CMakeLists.txt Increased minimum CMake version, switched to C++14 standard, added Abseil and RE2 integration option, simplified test enabling logic.
Bazel files (BUILD.bazel, MODULE.bazel, WORKSPACE, WORKSPACE.bzlmod, fake_fuchsia_sdk.bzl) Rewrote Bazel module file, added new platform config settings (QNX, FreeBSD, OpenBSD, Fuchsia), updated dependencies, replaced WORKSPACE logic with modern Bazel module system, added fake Fuchsia SDK extension for fallback.
GitHub workflow/scripts (.github/workflows/build.yml, ci/*) Changed test commands to use make test instead of make check, updated C++ standards to 14, updated Docker images, enabled Bazel Bzlmod and external include path features, added Windows presubmit batch script.
Documentation (docs/*, README.md, CONTRIBUTING.md, etc.) Updated all references to use "GoogleTest" capitalization, modernized platform support info, improved clarity and accuracy, updated example code to C++14, added new matcher and action documentation, updated URLs to HTTPS and main branch, improved formatting and descriptions.
GoogleMock scripts and generator (scripts/generator/*, scripts/README.md, fuse_gmock_files.py) Removed legacy Python mock class generator and fuse scripts, deleted related documentation and license files.
GoogleMock headers (include/gmock/*) Added new matcher and action classes (e.g., OnceAction, RethrowAction), modernized flag macros to support Abseil flags, refactored internal utilities and type traits, improved type safety and lifetime management in actions, updated IWYU pragmas, refactored cardinalities and spec-builders for better diagnostics and type safety.
GoogleMock source (src/gmock-*.cc) Refactored flag parsing to unified templated functions, replaced uninteresting call reaction map with unordered_map keyed by uintptr_t, updated matcher description formatting, added base64 decoding utility, improved platform support and error messages, removed legacy method implementations.
GoogleMock tests (test/gmock-*.cc, test/BUILD.bazel) Added extensive new tests for type traits, actions (including move-only and reference qualifiers), base64 decoding, and matchers; modernized test code to use C++11/14 features; improved coverage for advanced C++ features and edge cases; updated build files to include new test sources and platform link options.
GoogleTest headers (include/gtest/*, not shown in summary but implied) Updated macros and internal utilities for C++14, improved documentation, added new matcher/action documentation, updated IWYU pragmas.
GoogleTest source (src/gtest-*.cc, not shown in summary but implied) Updated internal logic for C++14, improved diagnostics and error messages, updated matcher/action APIs.
Third-party/embedded files (googletest/3rdparty/googletest/*) Updated .gitignore to include Bazel lock files and VS Code configs, added new contributors, updated issue templates to YAML format, updated license and contact info, changed default branch references from master to main.

Assessment against linked issues

Objective Addressed Explanation
Add support for ffmpeg 7.0 in chromaprint (Issue #142) No code changes in this PR address ffmpeg 7.0 compatibility or the specific audio reader bug.

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Major update to GoogleTest/GoogleMock third-party code (src/3rdparty/googletest/*) These changes update test framework code, not related to ffmpeg 7.0 support or the chromaprint audio reader.
Removal of legacy generator scripts and documentation (src/3rdparty/googletest/googlemock/scripts/generator/*, etc.) Not related to ffmpeg or chromaprint; these are internal tooling cleanups in GoogleMock.
Bazel and CMake build system modernization (src/3rdparty/googletest/BUILD.bazel, CMakeLists.txt, etc.) These are test framework build improvements, not related to ffmpeg or chromaprint.
Documentation rewrites and updates (src/3rdparty/googletest/docs/*, README.md, etc.) Documentation changes are not related to the ffmpeg 7.0 support issue.
Addition of new matchers, actions, and test coverage in GoogleTest/GoogleMock (src/3rdparty/googletest/googlemock/include/gmock/, test/gmock-.cc, etc.) These are enhancements to the test framework, not related to the ffmpeg/chromaprint bug.

In summary: This PR is a comprehensive update to the GoogleTest and GoogleMock third-party code, but it does not address the objective of adding ffmpeg 7.0 support for chromaprint (#142). All changes are out of scope for the linked issue.

Possibly related PRs

  • CMake update #149: Updates minimum CMake version and C++ standard requirements, similar to this PR's CMake modernization but distinct in scope and objectives.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 20

🔭 Outside diff range comments (3)
src/3rdparty/googletest/ci/macos-presubmit.sh (1)

56-74: Bazel flags: solid, but watch for macro fallout from -Wundef.
-Wundef turns quite a few innocuous #if FOO into warnings/errors when FOO isn’t defined.
If your public headers expose such guards, you may need follow-up clean-ups.

src/3rdparty/googletest/docs/reference/actions.md (1)

41-49: Minor style nit – stray back-ticks around f

In the “callable” section, the first cell shows only a single back-ticked f, which can be read as column-header noise rather than an example. Consider prefixing with “f (callable)” or using Invoke(f) consistently.

src/3rdparty/googletest/docs/advanced.md (1)

180-183: Tighten wording – “etc.” is sufficient

The phrase “and etc” is redundant.

-... prefix, suffix, regular expression, and etc). For
+... prefix, suffix, regular expression, etc.). For
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 07e0e46 and 42d2d71.

📒 Files selected for processing (79)
  • .github/workflows/build.yml (2 hunks)
  • CMakeLists.txt (2 hunks)
  • cmake/modules/FindGTest.cmake (0 hunks)
  • src/3rdparty/googletest/.github/ISSUE_TEMPLATE/00-bug_report.md (0 hunks)
  • src/3rdparty/googletest/.github/ISSUE_TEMPLATE/00-bug_report.yml (1 hunks)
  • src/3rdparty/googletest/.github/ISSUE_TEMPLATE/10-feature_request.md (0 hunks)
  • src/3rdparty/googletest/.github/ISSUE_TEMPLATE/10-feature_request.yml (1 hunks)
  • src/3rdparty/googletest/.github/ISSUE_TEMPLATE/config.yml (1 hunks)
  • src/3rdparty/googletest/.gitignore (2 hunks)
  • src/3rdparty/googletest/BUILD.bazel (3 hunks)
  • src/3rdparty/googletest/CMakeLists.txt (1 hunks)
  • src/3rdparty/googletest/CONTRIBUTING.md (5 hunks)
  • src/3rdparty/googletest/CONTRIBUTORS (2 hunks)
  • src/3rdparty/googletest/MODULE.bazel (2 hunks)
  • src/3rdparty/googletest/README.md (5 hunks)
  • src/3rdparty/googletest/WORKSPACE (1 hunks)
  • src/3rdparty/googletest/WORKSPACE.bzlmod (2 hunks)
  • src/3rdparty/googletest/ci/linux-presubmit.sh (5 hunks)
  • src/3rdparty/googletest/ci/macos-presubmit.sh (3 hunks)
  • src/3rdparty/googletest/ci/windows-presubmit.bat (1 hunks)
  • src/3rdparty/googletest/docs/_layouts/default.html (1 hunks)
  • src/3rdparty/googletest/docs/advanced.md (60 hunks)
  • src/3rdparty/googletest/docs/faq.md (24 hunks)
  • src/3rdparty/googletest/docs/gmock_cheat_sheet.md (6 hunks)
  • src/3rdparty/googletest/docs/gmock_cook_book.md (35 hunks)
  • src/3rdparty/googletest/docs/gmock_faq.md (1 hunks)
  • src/3rdparty/googletest/docs/gmock_for_dummies.md (6 hunks)
  • src/3rdparty/googletest/docs/pkgconfig.md (2 hunks)
  • src/3rdparty/googletest/docs/platforms.md (1 hunks)
  • src/3rdparty/googletest/docs/primer.md (15 hunks)
  • src/3rdparty/googletest/docs/quickstart-bazel.md (3 hunks)
  • src/3rdparty/googletest/docs/quickstart-cmake.md (3 hunks)
  • src/3rdparty/googletest/docs/reference/actions.md (6 hunks)
  • src/3rdparty/googletest/docs/reference/assertions.md (5 hunks)
  • src/3rdparty/googletest/docs/reference/matchers.md (7 hunks)
  • src/3rdparty/googletest/docs/reference/mocking.md (2 hunks)
  • src/3rdparty/googletest/docs/reference/testing.md (32 hunks)
  • src/3rdparty/googletest/docs/samples.md (1 hunks)
  • src/3rdparty/googletest/fake_fuchsia_sdk.bzl (1 hunks)
  • src/3rdparty/googletest/googlemock/CMakeLists.txt (8 hunks)
  • src/3rdparty/googletest/googlemock/README.md (2 hunks)
  • src/3rdparty/googletest/googlemock/include/gmock/gmock-actions.h (36 hunks)
  • src/3rdparty/googletest/googlemock/include/gmock/gmock-cardinalities.h (4 hunks)
  • src/3rdparty/googletest/googlemock/include/gmock/gmock-function-mocker.h (9 hunks)
  • src/3rdparty/googletest/googlemock/include/gmock/gmock-more-actions.h (8 hunks)
  • src/3rdparty/googletest/googlemock/include/gmock/gmock-more-matchers.h (2 hunks)
  • src/3rdparty/googletest/googlemock/include/gmock/gmock-nice-strict.h (6 hunks)
  • src/3rdparty/googletest/googlemock/include/gmock/gmock-spec-builders.h (42 hunks)
  • src/3rdparty/googletest/googlemock/include/gmock/gmock.h (1 hunks)
  • src/3rdparty/googletest/googlemock/include/gmock/internal/custom/README.md (1 hunks)
  • src/3rdparty/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h (1 hunks)
  • src/3rdparty/googletest/googlemock/include/gmock/internal/custom/gmock-matchers.h (1 hunks)
  • src/3rdparty/googletest/googlemock/include/gmock/internal/custom/gmock-port.h (1 hunks)
  • src/3rdparty/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h (12 hunks)
  • src/3rdparty/googletest/googlemock/include/gmock/internal/gmock-port.h (2 hunks)
  • src/3rdparty/googletest/googlemock/scripts/README.md (0 hunks)
  • src/3rdparty/googletest/googlemock/scripts/fuse_gmock_files.py (0 hunks)
  • src/3rdparty/googletest/googlemock/scripts/generator/LICENSE (0 hunks)
  • src/3rdparty/googletest/googlemock/scripts/generator/README (0 hunks)
  • src/3rdparty/googletest/googlemock/scripts/generator/README.cppclean (0 hunks)
  • src/3rdparty/googletest/googlemock/scripts/generator/cpp/ast.py (0 hunks)
  • src/3rdparty/googletest/googlemock/scripts/generator/cpp/gmock_class.py (0 hunks)
  • src/3rdparty/googletest/googlemock/scripts/generator/cpp/gmock_class_test.py (0 hunks)
  • src/3rdparty/googletest/googlemock/scripts/generator/cpp/keywords.py (0 hunks)
  • src/3rdparty/googletest/googlemock/scripts/generator/cpp/tokenize.py (0 hunks)
  • src/3rdparty/googletest/googlemock/scripts/generator/cpp/utils.py (0 hunks)
  • src/3rdparty/googletest/googlemock/scripts/generator/gmock_gen.py (0 hunks)
  • src/3rdparty/googletest/googlemock/src/gmock-cardinalities.cc (3 hunks)
  • src/3rdparty/googletest/googlemock/src/gmock-internal-utils.cc (8 hunks)
  • src/3rdparty/googletest/googlemock/src/gmock-matchers.cc (5 hunks)
  • src/3rdparty/googletest/googlemock/src/gmock-spec-builders.cc (18 hunks)
  • src/3rdparty/googletest/googlemock/src/gmock.cc (7 hunks)
  • src/3rdparty/googletest/googlemock/src/gmock_main.cc (3 hunks)
  • src/3rdparty/googletest/googlemock/test/BUILD.bazel (1 hunks)
  • src/3rdparty/googletest/googlemock/test/gmock-actions_test.cc (32 hunks)
  • src/3rdparty/googletest/googlemock/test/gmock-cardinalities_test.cc (17 hunks)
  • src/3rdparty/googletest/googlemock/test/gmock-function-mocker_test.cc (31 hunks)
  • src/3rdparty/googletest/googlemock/test/gmock-internal-utils_test.cc (21 hunks)
  • src/3rdparty/googletest/googlemock/test/gmock-matchers-arithmetic_test.cc (1 hunks)
💤 Files with no reviewable changes (15)
  • src/3rdparty/googletest/googlemock/scripts/README.md
  • src/3rdparty/googletest/.github/ISSUE_TEMPLATE/10-feature_request.md
  • src/3rdparty/googletest/googlemock/scripts/generator/gmock_gen.py
  • src/3rdparty/googletest/googlemock/scripts/generator/cpp/utils.py
  • src/3rdparty/googletest/googlemock/scripts/generator/cpp/gmock_class.py
  • src/3rdparty/googletest/googlemock/scripts/generator/cpp/tokenize.py
  • src/3rdparty/googletest/.github/ISSUE_TEMPLATE/00-bug_report.md
  • cmake/modules/FindGTest.cmake
  • src/3rdparty/googletest/googlemock/scripts/generator/cpp/ast.py
  • src/3rdparty/googletest/googlemock/scripts/fuse_gmock_files.py
  • src/3rdparty/googletest/googlemock/scripts/generator/README.cppclean
  • src/3rdparty/googletest/googlemock/scripts/generator/README
  • src/3rdparty/googletest/googlemock/scripts/generator/cpp/gmock_class_test.py
  • src/3rdparty/googletest/googlemock/scripts/generator/LICENSE
  • src/3rdparty/googletest/googlemock/scripts/generator/cpp/keywords.py
🧰 Additional context used
🪛 LanguageTool
src/3rdparty/googletest/docs/platforms.md

[uncategorized] ~7-~7: Possible missing preposition found.
Context: ... a list of currently supported versions compilers, platforms, and build tools.

(AI_EN_LECTOR_MISSING_PREPOSITION)

src/3rdparty/googletest/CONTRIBUTING.md

[style] ~24-~24: Consider shortening this phrase to avoid wordiness.
Context: ... Googler? If you are a Googler, please make an attempt to submit an internal contribution rather ...

(MAKE_AN_ATTEMPT_AT_STYLE)


[style] ~25-~25: As a shorter alternative for ‘able to’, consider using “can not”.
Context: ...ther than a GitHub Pull Request. If you are not able to submit internally, a PR is acceptable a...

(BE_ABLE_TO)


[uncategorized] ~53-~53: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...couraged to contribute to the discussion and you can also help us to keep the effect...

(COMMA_COMPOUND_SENTENCE)

src/3rdparty/googletest/docs/quickstart-cmake.md

[uncategorized] ~69-~69: Possible missing comma found.
Context: ... configuration declares a dependency on GoogleTest which is downloaded from GitHub. In the...

(AI_HYDRA_LEO_MISSING_COMMA)

src/3rdparty/googletest/docs/gmock_for_dummies.md

[misspelling] ~97-~97: This word is normally spelled as one.
Context: ...shiny new graphics card that has better anti-aliasing? Suddenly you have to update all your g...

(EN_COMPOUNDS_ANTI_ALIASING)


[typographical] ~97-~97: Consider adding a comma after ‘Suddenly’ for more clarity.
Context: ...ics card that has better anti-aliasing? Suddenly you have to update all your golden imag...

(RB_LY_COMMA)


[misspelling] ~195-~195: This word is normally spelled as one.
Context: ...ually the same directory or a testing sub-directory), and put it in a .h and a `cc_librar...

(EN_COMPOUNDS_SUB_DIRECTORY)

src/3rdparty/googletest/docs/reference/assertions.md

[style] ~280-~280: To make your writing concise, consider an alternative.
Context: ...rgest finite float value are considered to be one ULP apart. ### EXPECT_DOUBLE_EQ {#...

(CONSIDERED_TO_BE_WORDINESS)


[style] ~289-~289: To make your writing concise, consider an alternative.
Context: ...gest finite double value are considered to be one ULP apart. ### EXPECT_NEAR {#EXPEC...

(CONSIDERED_TO_BE_WORDINESS)


[grammar] ~299-~299: After the plural determiner ‘both’ use the plural noun “infinities”.
Context: ...or*. If *val* and *val2`* are both infinity of the same sign, the difference is con...

(ARE_DT_NN)

src/3rdparty/googletest/docs/quickstart-bazel.md

[style] ~42-~42: Consider a more expressive alternative.
Context: ...try.bazel.build/modules/googletest). To do this, create a MODULE.bazel file in t...

(DO_ACHIEVE)

src/3rdparty/googletest/docs/primer.md

[style] ~26-~26: Consider using a more concise synonym.
Context: ...ions, so GoogleTest tests can work with a variety of configurations. 4. When tests fail, th...

(A_VARIETY_OF)


[uncategorized] ~30-~30: Possible missing comma found.
Context: ... set up tests that report non-fatal failures after which the current test continues....

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~36-~36: Consider a more concise word here.
Context: ... require the user to enumerate them in order to run them. 6. Tests should be fast. W...

(IN_ORDER_TO_PREMIUM)


[uncategorized] ~104-~104: Possible missing comma found.
Context: ...e. You may also supply a custom failure message which will be appended to GoogleTest's ...

(AI_HYDRA_LEO_MISSING_COMMA)


[formatting] ~291-~291: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ne a destructor or a TearDown() method, because the implicit destructor generated by th...

(COMMA_BEFORE_BECAUSE)


[style] ~292-~292: Consider removing “of” to be more concise
Context: ... generated by the compiler will perform all of the necessary cleanup. Now we'll write tes...

(ALL_OF_THE)


[style] ~341-~341: Consider a more concise word here.
Context: ... have to re-list all your defined tests in order to run them. After defining your tests, y...

(IN_ORDER_TO_PREMIUM)

src/3rdparty/googletest/docs/faq.md

[uncategorized] ~37-~37: Possible missing comma found.
Context: ... But that's getting complicated. So for simplicity we just say that it cannot start with `...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~58-~58: A comma may be missing after the conjunctive/linking adverb ‘Therefore’.
Context: ...g) or with a new version of GoogleTest. Therefore it's best to follow the rule. ## Why d...

(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)


[uncategorized] ~179-~179: A comma may be missing after the conjunctive/linking adverb ‘Otherwise’.
Context: ...oo::kBar; // No initializer here. ``` Otherwise your code is invalid C++, and may b...

(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)


[uncategorized] ~310-~310: Possible missing comma found.
Context: ...ch. It will use the definition from the class the constructor of which is current...

(AI_HYDRA_LEO_MISSING_COMMA)


[grammar] ~328-~328: The operating system from Apple is written “macOS”
Context: ...e exceptions are enabled (e.g. Windows, Mac OS, and Linux client-side), which will...

(MAC_OS)


[style] ~357-~357: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ... it has a GoogleTest assertion failure. Very bad. We have decided to fix this (thanks t...

(EN_WEAK_ADJECTIVE)


[style] ~422-~422: Consider using “bunch”.
Context: ...`` ## GoogleTest output is buried in a whole bunch of LOG messages. What do I do? The Goo...

(WHOLE_LOT)


[style] ~426-~426: To elevate your writing, try using a synonym here.
Context: ...x with the GoogleTest output, making it hard to read. However, there is an easy solu...

(HARD_TO)

src/3rdparty/googletest/README.md

[style] ~60-~60: Consider using a more concise synonym.
Context: ...f assertions: \ Googletest provides a variety of assertions, such as equality, inequalit...

(A_VARIETY_OF)

src/3rdparty/googletest/docs/reference/testing.md

[uncategorized] ~424-~424: Possible missing comma found.
Context: ...eption} testing::AssertionException Exception which can be thrown from [`TestEventLis...

(AI_HYDRA_LEO_MISSING_COMMA)

src/3rdparty/googletest/docs/reference/matchers.md

[uncategorized] ~99-~99: Possible missing comma found.
Context: ... | argument matches the given regular expression with the match starting at the first ch...

(AI_HYDRA_LEO_MISSING_COMMA)

🪛 markdownlint-cli2 (0.17.2)
src/3rdparty/googletest/CONTRIBUTING.md

105-105: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


114-114: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


124-124: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


131-131: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


137-137: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

src/3rdparty/googletest/docs/gmock_for_dummies.md

264-264: Heading levels should only increment by one level at a time
Expected: h3; Actual: h6

(MD001, heading-increment)

src/3rdparty/googletest/docs/quickstart-bazel.md

46-46: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


110-110: Inline HTML
Element: pre

(MD033, no-inline-html)


111-111: Inline HTML
Element: strong

(MD033, no-inline-html)

src/3rdparty/googletest/docs/primer.md

70-70: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)


75-75: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)

src/3rdparty/googletest/docs/faq.md

392-392: Trailing punctuation in heading
Punctuation: '.'

(MD026, no-trailing-punctuation)

src/3rdparty/googletest/README.md

17-17: Bare URL used
null

(MD034, no-bare-urls)

src/3rdparty/googletest/docs/gmock_cook_book.md

290-290: Link fragments should be valid
null

(MD051, link-fragments)


1308-1308: Link fragments should be valid
null

(MD051, link-fragments)


2790-2790: Link fragments should be valid
null

(MD051, link-fragments)

src/3rdparty/googletest/docs/reference/matchers.md

201-201: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)

src/3rdparty/googletest/docs/advanced.md

421-421: Spaces inside code span elements
null

(MD038, no-space-in-code)


2018-2018: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

🔇 Additional comments (152)
src/3rdparty/googletest/googlemock/README.md (1)

38-40: Link update looks good

Switching the GoogleTest link to HTTPS/GitHub is spot-on. Nothing else to flag here.

src/3rdparty/googletest/CONTRIBUTORS (1)

37-37: Alphabetical insertion verified – LGTM
New names drop in at the correct sorted positions and follow the existing formatting.

Also applies to: 58-60

src/3rdparty/googletest/docs/_layouts/default.html (1)

51-51: License link update looks good
Branch rename reflected correctly.

src/3rdparty/googletest/docs/gmock_faq.md (1)

372-373: Header path simplification is harmless
Reference is clearer and still accurate.

CMakeLists.txt (1)

199-202: Nice: tests are now discoverable by ctest

enable_testing() before the tests sub-dir is exactly what the CI needed.
No further notes.

src/3rdparty/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h (1)

1-2: IWYU pragmas look fine

The private/friend hints match the pattern used in other new headers. No functional impact.

src/3rdparty/googletest/.github/ISSUE_TEMPLATE/config.yml (1)

2-5: Good addition to point users to Discussions

Keeps bug-tracker noise down. 👍

src/3rdparty/googletest/googlemock/include/gmock/internal/custom/README.md (1)

17-18: Docs updated to list the new flag macros

Matches the code in gmock-port.h, all clear.

src/3rdparty/googletest/googlemock/include/gmock/internal/custom/gmock-matchers.h (1)

30-33: Consistent IWYU pragmas

Same pragma pair as the other custom headers; include hygiene stays consistent.

src/3rdparty/googletest/.gitignore (1)

28-30: 👍 Good call adding VS Code artefacts to .gitignore.
Keeps local editor noise out of the tree.

src/3rdparty/googletest/docs/reference/mocking.md (2)

4-4: Header-inclusion wording clarified – looks good.
The switch to “#include <gmock/gmock.h>” makes the instruction unambiguous.


250-252: Useful detail on WillOnce behaviour.
Calling out move-only/rvalue support will save users head-scratching.

src/3rdparty/googletest/googlemock/include/gmock/internal/custom/gmock-port.h (1)

34-35: Confirm sentinel comment removal is harmless.
Previous versions of this file contained the marker
// GOOGLETEST_CM0002 DO NOT DELETE which some external scripts check for.
Before merging, please verify nothing in your tooling/CI relies on that string.

src/3rdparty/googletest/ci/macos-presubmit.sh (1)

43-44: CMake now enforces C++14 – fine, but double-check downstream projects.
Any consumer still compiling with -std=c++11 will now break; worth a heads-up in release notes.

src/3rdparty/googletest/googlemock/src/gmock_main.cc (1)

35-38: Minor style tweak looks fine.
Adding NRF52 support behind ARDUINO gate is harmless.

src/3rdparty/googletest/googlemock/test/BUILD.bazel (2)

41-41: Good addition of header file to test sources.

Including gmock-matchers_test.h in the sources ensures the test utilities are available during compilation.


43-43: QNX platform support follows established pattern.

The empty linkopts for QNX matches the Windows pattern and provides proper platform-specific build configuration.

src/3rdparty/googletest/docs/pkgconfig.md (2)

25-31: Modern CMake practices implemented correctly.

The updates use current CMake best practices: target_sources with PRIVATE scope, enable_testing() instead of include(CTest), and proper target-based linking. These changes make the example more maintainable.


104-104: Verify version consistency across the upgrade.

The example shows version 1.11.0, but the PR objectives mention upgrading to 1.16.0. Make sure this version aligns with the actual GoogleTest version being used.

#!/bin/bash
# Check what version of GoogleTest is actually being used in this update
rg -A 5 -B 5 "version.*1\.[0-9]+\.[0-9]+" --type md
src/3rdparty/googletest/googlemock/include/gmock/gmock.h (2)

56-63: IWYU pragma annotations improve tooling support.

Adding // IWYU pragma: export comments helps include-what-you-use tooling understand the public interface boundaries. The new gmock-spec-builders.h include is properly annotated as well.


65-72: Namespace placement after port.h include is correct.

Moving the namespace declaration after including gmock-port.h ensures proper initialization order and follows the typical pattern for platform-specific setup.

src/3rdparty/googletest/docs/quickstart-cmake.md (4)

13-13: C++14 requirement correctly documented.

The documentation accurately reflects the new minimum C++ standard requirement for GoogleTest 1.16.0.


55-57: CMake configuration enforces C++14 properly.

Setting CMAKE_CXX_STANDARD_REQUIRED ON ensures strict enforcement of the C++14 requirement, preventing builds with older standards that might fail silently.


62-62: Git commit hash updated for GoogleTest upgrade.

The commit hash reflects the updated version being used. Keep this hash current as GoogleTest continues to evolve.

Also applies to: 70-70


112-112: Modern CMake target usage is correct.

Using GTest::gtest_main instead of plain gtest_main follows modern CMake practices with imported targets, providing better dependency management and configuration propagation.

src/3rdparty/googletest/CONTRIBUTING.md (3)

50-55: HTTPS links and improved navigation.

Converting discussion group links to HTTPS and adding proper hyperlinks improves security and usability.


83-84: Branch reference updated correctly.

Updating the link to point to the main branch instead of master follows current repository conventions.


91-91: Python 3.6 minimum requirement is reasonable.

Updating from Python 2.3 to 3.6 aligns with modern development practices since Python 2 reached end-of-life.

src/3rdparty/googletest/docs/reference/actions.md (1)

9-20: Table header addition looks good

Introducing uniform headers (“Action”, “Description”) improves readability and fixes earlier Markdown-lint warnings. No concerns here.

src/3rdparty/googletest/CMakeLists.txt (2)

23-30: find_package(absl …) & find_package(re2 …) rely on consumer-supplied config files

CMake doesn’t ship built-in Find modules for Abseil or RE2. When GTEST_HAS_ABSL is ON and no imported targets exist, the build will hard-fail unless the caller has pre-installed absl / re2 CMake config packages.

Two follow-ups:

  1. Add a friendly error explaining the expectation.
  2. Gate the lookup behind CONFIG to avoid picking up unexpected Find module shims.
-    find_package(absl REQUIRED)
+    find_package(absl CONFIG REQUIRED)-    find_package(re2 REQUIRED)
+    find_package(re2 CONFIG REQUIRED)

4-4: Bumping cmake_minimum_required to 3.13 – confirm downstream coverage

The parent project currently advertises support as far back as 3.5. Nested 3rd-party CMake minimums override the top-level, so consumers with older toolchains will break. Please double-check that 3.13 really is the practical floor (copy-DLL logic needs ≥ 3.21 anyway) or gate the newer features with version checks.

src/3rdparty/googletest/.github/ISSUE_TEMPLATE/10-feature_request.yml (1)

1-34: Well-structured GitHub issue template.

The YAML template follows GitHub's best practices with proper field validation and automatic labeling. The required fields encourage thoughtful feature requests with adequate detail and justification.

src/3rdparty/googletest/docs/gmock_for_dummies.md (6)

93-93: HTTPS URL update improves security.

Good change from HTTP to HTTPS for the LOGO programming language Wikipedia link.


100-100: HTTPS URL update improves security.

Good change from HTTP to HTTPS for the Dependency Injection Wikipedia link.


167-167: Angle bracket includes follow standard convention.

The change from quoted includes to angle brackets for system headers like <gmock/gmock.h> is the correct convention.


227-228: Consistent use of angle bracket includes.

Good consistency with the gmock header include style change.


193-198: Helpful Bazel-specific guidance for mock placement.

The updated guidance for placing mock classes in Bazel packages with testonly=True is practical and follows Bazel best practices.


485-486: Improved formatting with backticks.

The addition of backticks and italics around *variable* improves readability in the ReturnRef documentation.

src/3rdparty/googletest/WORKSPACE.bzlmod (1)

31-36: Proper bzlmod migration implementation.

The intentionally empty file with explanatory comment correctly implements the migration to Bazel's module system. When bzlmod is enabled, this prevents unintentional dependencies on the legacy WORKSPACE file.

src/3rdparty/googletest/googlemock/src/gmock-cardinalities.cc (3)

53-53: Cleaner single-line member initialization.

Consolidating the member initializer list to a single line improves readability without affecting functionality.


56-57: Simplified string concatenation maintains clarity.

The string concatenation changes make the error messages more compact while preserving readability.

Also applies to: 60-61, 65-66


89-90: Modern C++11 explicit deletion replaces macro.

Using explicit = delete for copy constructor and assignment operator is clearer and more idiomatic than the GTEST_DISALLOW_COPY_AND_ASSIGN_ macro.

src/3rdparty/googletest/googlemock/include/gmock/gmock-cardinalities.h (4)

36-37: IWYU pragmas improve include management.

The Include What You Use (IWYU) pragmas help tools understand this header's intended usage pattern and dependencies.


68-68: Defaulted virtual destructor is cleaner.

Using = default for the virtual destructor is more explicit and idiomatic than an empty body.


95-95: Defaulted default constructor improves clarity.

The = default constructor makes the intent explicit and follows modern C++ practices.


121-121: Minor formatting improvement.

The indentation adjustment for the negation operator improves code alignment.

src/3rdparty/googletest/googlemock/CMakeLists.txt (5)

39-40: Good modernization of CMake requirements.

Bumping to CMake 3.13 makes sense for the project modernization and aligns with the C++14 requirement. The simplified project declaration removes unnecessary conditional logic.


68-74: Improved include directory handling for fetch-content compatibility.

The switch from gtest_SOURCE_DIR to querying the target's INCLUDE_DIRECTORIES property directly fixes issues when using fetch-content with custom names. This is a solid improvement.


105-111: Clean implementation of semicolon-escaped include directories.

The use of string(REPLACE) and $<SEMICOLON> generator expression properly handles list separators in CMake target properties. This removes the need for version-specific conditionals.


135-135: Simplified compiler options for MinGW/Cygwin.

Removing the conditional CMake version check and always using add_compile_options is cleaner since the minimum CMake version is now 3.13.


146-149: Better test organization with granular matcher tests.

Splitting the monolithic gmock-matchers_test into arithmetic, comparisons, containers, and misc tests improves test granularity and makes it easier to identify specific test failures.

src/3rdparty/googletest/docs/reference/assertions.md (2)

4-4: Good modernization of include directives.

Switching from quoted includes to angle-bracket includes (<gtest/gtest.h>, <gmock/gmock.h>) follows modern best practices and indicates these are system/external headers.

Also applies to: 91-91


525-525: Fixed HRESULT documentation pairing.

Correcting the pairing from EXPECT_HRESULT_FAILED to ASSERT_HRESULT_FAILED fixes the documentation error.

src/3rdparty/googletest/ci/windows-presubmit.bat (3)

49-52: Good workaround for Windows path length limitations.

The use of --output_user_root=C:\tmp is a practical solution to Windows path length restrictions in CI environments.


57-57: Enforces C++14 standard consistently.

Using --copt=/std:c++14 aligns with the project's modernization to C++14 as mentioned in the PR objectives.


5-6: Verify Python version consistency.

The script sets PATH to include C:\Python34 but BAZEL_PYTHON to C:\python34\python.exe. The casing difference might cause issues on case-sensitive systems, and Python 3.4 is quite old.

Check if the Python paths are correct and consistent:

#!/bin/bash
# Check for Python path consistency issues in CI scripts
echo "Checking Python path references in Windows presubmit script..."
rg -n "python34|Python34" --case-sensitive
src/3rdparty/googletest/docs/gmock_cheat_sheet.md (4)

11-11: Good addition of explicit access specifiers.

Adding public: to class declarations makes the examples more complete and ensures mock methods are accessible.

Also applies to: 26-26, 61-61, 74-74


23-23: Modernized include directive.

Switching to <gmock/gmock.h> follows the same modernization pattern seen throughout the project.


143-143: Good use of standard library utilities.

Replacing a custom MakeUnique function with std::make_unique is the right approach for C++14 code.


233-233: Fixed hyperlink anchor casing.

The correction from using-check-points to UsingCheckPoints ensures the link works properly.

src/3rdparty/googletest/fake_fuchsia_sdk.bzl (4)

1-18: Excellent documentation for the fake SDK approach.

The docstring clearly explains why this exists, how to override it, and includes the GitHub issue reference. This addresses a real need while Fuchsia SDK doesn't support bzlmod.


20-28: Clean implementation of stub target generation.

The repository rule correctly creates minimal BUILD.bazel files for each stub package. The filegroup targets are appropriate stubs that won't break builds.


36-40: Appropriate default stub targets.

The default list covers the Fuchsia SDK packages that GoogleTest actually needs (pkg/fdio, pkg/syslog, pkg/zx) without creating unnecessary overhead.


47-56: Correct module extension implementation.

The extension properly handles the create_fake tag and sets up the fake SDK repository when needed. The reproducible = True flag is appropriate for this deterministic operation.

src/3rdparty/googletest/README.md (5)

9-12: Documentation accurately reflects modern Git practices.

The switch from master to main branch and the Live at Head philosophy documentation is correct and follows current industry standards.


20-26: Version and C++14 requirement properly documented.

The 1.16.0 release documentation and C++14 requirement are clearly stated, which helps users understand compatibility requirements.


53-84: Expanded features section improves documentation clarity.

The detailed feature descriptions with explanations make the documentation more informative than the previous bullet-point format.


87-92: Platform support documentation follows best practices.

Referencing Google's Foundational C++ Support Policy and the external matrix table is a good approach for maintaining current platform information without duplicating content.


99-104: HTTPS URL updates improve security.

Converting HTTP URLs to HTTPS is a good security practice for documentation links.

src/3rdparty/googletest/docs/quickstart-bazel.md (4)

12-14: C++14 and Bazel 7.0+ requirements are properly documented.

The updated prerequisites correctly reflect the modern requirements for GoogleTest 1.16.0.


40-52: MODULE.bazel approach correctly replaces WORKSPACE.

The documentation properly explains the transition from WORKSPACE to MODULE.bazel files, which is the recommended modern Bazel approach.


102-106: C++14 compilation flag documentation is accurate.

The note about using --cxxopt=-std=c++14 and the MSVC equivalent --cxxopt=/std:c++14 provides necessary guidance for users.


111-111: Build command includes required C++14 flag.

The example build command correctly demonstrates the C++14 compilation flag usage.

src/3rdparty/googletest/BUILD.bazel (5)

39-63: Platform support additions are well-structured.

The new config_setting declarations for QNX, FreeBSD, OpenBSD, and Fuchsia follow consistent patterns and use proper platform constraints.


108-108: QNX platform correctly excluded from pthread options.

QNX doesn't use pthread the same way as other Unix-like systems, so excluding it from the pthread copts is correct.


127-137: Platform-specific linker options are appropriate.

The linker options for QNX (regex), FreeBSD/OpenBSD (math and pthread libraries) are platform-appropriate configurations.


140-154: Abseil dependency expansion aligns with modern GoogleTest features.

The additional Abseil modules (flags, debugging, containers, etc.) and RE2 dependency support advanced GoogleTest features when GTEST_HAS_ABSL is enabled.


161-167: Fuchsia SDK dependencies are correctly configured.

The Fuchsia-specific dependencies (fdio, syslog, zx) are necessary for death tests and system interaction on Fuchsia platform.

src/3rdparty/googletest/googlemock/include/gmock/gmock-more-matchers.h (4)

43-45: Missing includes properly added.

The explicit includes for <ostream> and <string> fix potential compilation issues and follow good header hygiene practices.


64-86: IsEmpty matcher refactoring improves type safety and diagnostics.

The polymorphic matcher implementation provides better error messages (reports actual size) and handles both STL containers and C-strings correctly.


93-95: Polymorphic matcher creation follows GoogleMock patterns.

The MakePolymorphicMatcher usage is the standard approach for creating polymorphic matchers in GoogleMock.


52-57: MSVC warning handling is properly scoped.

The warning suppression is correctly limited to MSVC 2015 (version 1900) and uses the proper GoogleTest macros.

src/3rdparty/googletest/googlemock/test/gmock-cardinalities_test.cc (4)

34-34: Explicit include improves header dependencies.

Adding the explicit <ostream> include prevents potential compilation issues when headers change their internal dependencies.


55-61: Modern C++ features improve code clarity.

Using = default for the constructor and = delete for copy operations is clearer and more explicit than the old macro-based approach.


64-64: Single-line test body improves readability.

Consolidating the simple test into a single line is more concise while maintaining clarity.


134-139: EXPECT_NONFATAL_FAILURE formatting is consistent.

The consistent formatting of the failure expectation macros improves code readability across the test file.

src/3rdparty/googletest/ci/linux-presubmit.sh (5)

34-35: Container images updated to recent versions.

The updates to 2024/2025 dated images look good. These newer images likely include updated toolchains that support the C++14 requirement.


42-42: C++11 removed from test matrix.

Good change - this aligns with the PR objective of requiring C++14 as the minimum standard.


54-54: Fixed incorrect environment variable name.

Nice catch! CXXFLAGS is the correct variable name for C++ compiler flags, not CXX_FLAGS.


70-72: TODO indicates Bazel version limitation.

The comment mentions using Bazel 5, which doesn't support Bzlmod. Since the rest of the script uses --enable_bzlmod=true with newer Bazel versions, this older test provides coverage for legacy WORKSPACE builds. Consider tracking when this can be upgraded.


83-84: Additional compiler warnings enabled.

Adding -Wuninitialized and -Wundef warnings improves code quality by catching common issues. Good addition.

Also applies to: 104-105, 129-130

src/3rdparty/googletest/docs/primer.md (5)

1-1: Consistent product name capitalization throughout.

The change from "googletest" to "GoogleTest" improves documentation consistency and uses the proper product name.

Also applies to: 3-3, 5-5, 7-7


76-77: URLs updated to HTTPS.

Good security practice to use HTTPS links instead of HTTP.


276-283: Test fixture uses constructor instead of SetUp().

This is a cleaner approach for simple initialization. The constructor runs before each test just like SetUp(), but it's more idiomatic C++ when you don't need the virtual function flexibility.

Also applies to: 291-293


397-397: System header uses angle brackets.

Correct change - GoogleTest is installed as a system library, so angle brackets are appropriate.


452-452: Removed unnecessary global namespace qualifier.

The :: prefix isn't needed here since we're already in the global namespace. Cleaner without it.

src/3rdparty/googletest/googlemock/src/gmock-internal-utils.cc (4)

59-75: API improved to separate keys and values.

The new JoinAsKeyValueTuple function provides a clearer API by accepting separate vectors for keys and values. The size check ensures they match, and the "key: value" format is more readable than the previous tuple format.


203-228: Compile-time base64 lookup table generation.

This constexpr implementation generates the base64 decoding table at compile time. The web-safe encoding support (replacing '-' with '+' and '_' with '/') is a nice touch. The recursive template approach is clever but might be hard to debug if issues arise.


229-255: Base64 decoding implementation handles edge cases.

The implementation correctly:

  • Skips whitespace and padding ('=')
  • Validates input characters
  • Handles the bit manipulation for base64 decoding

The state machine approach with bit_pos tracking is solid.


134-134: Flag access updated to new macro style.

The change from direct flag access to GMOCK_FLAG_GET(verbose) aligns with the broader refactoring to use consistent flag macros.

Also applies to: 137-137

src/3rdparty/googletest/WORKSPACE (4)

31-31: Workspace name simplified.

The change from "com_google_googletest" to "googletest" makes the workspace name cleaner and easier to reference in downstream projects.


33-34: Dependencies factored out to separate file.

Loading googletest_deps() from a separate file is good practice - it keeps the WORKSPACE file clean and makes dependency management more modular.


38-46: Python rules updated to v1.1.0.

The rules_python update includes the SHA256 checksum for integrity verification. Good practice to pin both version and checksum.


48-61: Added bazel_skylib and platforms dependencies.

These are standard Bazel dependencies that many projects need. The skylib provides common Starlark functions, and platforms enables better cross-platform builds.

src/3rdparty/googletest/docs/reference/matchers.md (5)

11-19: Important warning about implicit conversions added.

This warning about EXPECT_THAT(some_bool, "some string") potentially passing is crucial. The recommendation to use explicit Eq() prevents subtle bugs from implicit conversions.


105-105: New base64 matcher documented.

The WhenBase64Unescaped(m) matcher corresponds to the Base64Unescape function added in gmock-internal-utils.cc. The RFC 4648 reference for web-safe format is helpful.


124-124: Contains matcher extended with Times modifier.

The .Times(n) modifier for Contains(e) is a useful addition. The note about Contains(e).Times(0) for testing absence is a clever use case.


201-201: ResultOf matcher enhanced with better error messages.

Adding the result_description parameter allows for more informative error messages when the matcher fails. This improves debuggability.


292-302: DescribeMatcher usage example added.

The example showing how to use DescribeMatcher<> for nested matcher descriptions is helpful. This enables better error messages for complex custom matchers.

src/3rdparty/googletest/googlemock/include/gmock/gmock-nice-strict.h (3)

60-61: IWYU pragma additions look good.

These pragmas help tools understand the intended usage of this header.


114-119: Proper type safety improvement with uintptr_t.

Converting the mock object pointer to uintptr_t before passing to the registration functions is the right approach. This aligns with the internal implementation that uses these as keys in maps.

Also applies to: 126-131, 138-143


185-186: Good modernization to C++11 style.

Replacing GTEST_DISALLOW_COPY_AND_ASSIGN_ with explicit = delete declarations is cleaner and more explicit.

Also applies to: 227-228, 269-270

src/3rdparty/googletest/googlemock/src/gmock-matchers.cc (3)

52-60: Enhanced matcher description formatting.

The addition of param_names parameter and use of JoinAsKeyValueTuple provides more informative matcher descriptions by pairing parameter names with their values.


239-240: Clearer logging with explicit labels.

Adding "element #" and "matcher #" prefixes makes the output more readable and unambiguous.


372-389: Cleaner logic separation for size mismatch handling.

The refactored code separates the exact match size check from the general verification logic, making it easier to understand and maintain.

src/3rdparty/googletest/MODULE.bazel (1)

1-77: Proper migration to Bazel modules.

This MODULE.bazel file correctly defines the googletest module with appropriate dependencies. The Python toolchain configuration and fake Fuchsia SDK setup provide necessary build infrastructure.

src/3rdparty/googletest/docs/reference/testing.md (3)

113-113: New ConvertGenerator documented.

Good addition documenting the ConvertGenerator<T> which allows static_cast of generated values to type T.


173-188: NameGenerator feature well documented.

The example clearly shows how to provide custom type names for typed test suites. This improves test output readability.


1339-1341: Critical clarification for InitGoogleTest.

Good catch documenting that argv must be null-terminated. This prevents potential crashes from improper argv handling.

src/3rdparty/googletest/googlemock/src/gmock.cc (2)

95-125: Clean template consolidation of flag parsing.

The templated approach for bool and string flag parsing reduces code duplication. The consistent flag_name parameter improves readability.


158-170: Macro approach reduces repetition effectively.

The GMOCK_INTERNAL_PARSE_FLAG macro eliminates the need for separate if-statements for each flag. This makes adding new flags easier and reduces the chance of copy-paste errors.

src/3rdparty/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h (5)

66-67: Breaking change: Function renamed from JoinAsTuple to JoinAsKeyValueTuple

This is an internal API change that better reflects the function's purpose. The new name clearly indicates it joins key-value pairs rather than generic tuples.


82-87: Good addition of std::reference_wrapper support

The overload properly extracts the raw pointer from reference wrappers, maintaining consistency with the smart pointer handling pattern.


315-324: Solid improvement using compiler built-ins for unreachable code

Replacing the recursive call with __builtin_unreachable() and __assume(0) provides better optimization hints to compilers and avoids potential stack overflow in debug builds.


424-440: Good modernization to std::index_sequence

Dropping the custom MakeIndexSequence implementation in favor of standard library utilities reduces code complexity and improves maintainability.


482-482: Declaration without visible implementation

The Base64Unescape function is declared here but the implementation isn't visible in this header. Ensure it's properly implemented in the corresponding .cc file.

#!/bin/bash
# Find the implementation of Base64Unescape
rg -A 10 "Base64Unescape.*\{" --type cpp
src/3rdparty/googletest/googlemock/test/gmock-function-mocker_test.cc (2)

205-206: Good modernization: Explicit delete instead of macros

Replacing GTEST_DISALLOW_COPY_AND_ASSIGN_ with explicit = delete for copy constructor and assignment operator is proper C++11 style. More readable and standard-compliant.

Also applies to: 278-279, 495-496, 506-507, 562-563, 581-582, 652-653, 667-669, 719-721, 731-734, 766-768


953-967: Smart test for Clang unused member function warning

This test ensures that MOCK_METHOD doesn't trigger -Wunused-member-function warnings when enabled as an error. Good defensive testing against regression.

src/3rdparty/googletest/googlemock/include/gmock/internal/gmock-port.h (1)

73-138: Well-structured dual flag implementation

The conditional compilation cleanly supports both Abseil flags and legacy implementation. The abstraction through GMOCK_FLAG_GET/SET macros makes the client code agnostic to the underlying implementation. Good use of static_assert to enforce semicolons after macro invocations.

src/3rdparty/googletest/googlemock/test/gmock-internal-utils_test.cc (2)

73-90: Test properly updated for renamed function

The test correctly reflects the API change from JoinAsTuple to JoinAsKeyValueTuple, testing the key-value pair formatting functionality.


724-763: Comprehensive test coverage for Base64Unescape

Good coverage of edge cases: invalid strings, short strings with/without padding, and long strings with whitespace. The test data includes a nice literary quote for the long string test.

src/3rdparty/googletest/googlemock/include/gmock/gmock-more-actions.h (2)

595-598: Correct use of perfect forwarding

Changed from pass-by-value to universal reference (F&& f) with std::forward. This properly preserves the value category of the callable, enabling move-only and reference-qualified function objects to work correctly.


602-614: Good improvements to InvokeArgumentAction

Two key improvements here:

  1. SFINAE constraint (index < sizeof...(Args)) prevents template instantiation errors
  2. Moving the callable with std::move(args_tuple.template Get<index>()) supports move-only callables

This makes the action more robust and efficient.

src/3rdparty/googletest/docs/gmock_cook_book.md (1)

288-291: Sentence is missing its verb – reader loses the thread

The paragraph drops the phrase “you can rewrite your code…”, leaving a dangling subordinate clause.

-Alternatively, instead of introducing a new interface
-to accept a std::function instead of the free function, and then use
+Alternatively, instead of introducing a new interface, you can rewrite your code
+to accept a std::function instead of the free function, and then use
 [MockFunction](#MockFunction) to mock the std::function.

Likely an incorrect or invalid review comment.

src/3rdparty/googletest/googlemock/test/gmock-matchers-arithmetic_test.cc (1)

1-1517: Good test coverage for arithmetic matchers

This new test file provides comprehensive coverage for arithmetic matchers including edge cases like NaN and infinity. The use of typed test fixtures for floating-point tests is a solid approach for testing different floating-point types systematically.

src/3rdparty/googletest/googlemock/include/gmock/gmock-function-mocker.h (3)

69-101: Smart compile-time validation for method specifiers

The addition of constexpr string utilities enables compile-time validation of mock method specifiers. This catches typos and invalid specifiers during compilation rather than runtime, which is a solid improvement for developer experience.


184-186: Logical qualifier ordering in mock method signatures

The reordering places qualifiers in a more natural sequence: const → ref-qualifier → noexceptoverride/final. This matches typical C++ declaration patterns better.


232-239: Cleaner calltype specifier handling

The simplified calltype detection and unpacking follows the same pattern as other specifiers, making the code more consistent and maintainable.

Also applies to: 295-301

src/3rdparty/googletest/googlemock/src/gmock-spec-builders.cc (5)

551-607: Better type safety with uintptr_t for mock object identification

Switching from const void* to uintptr_t for mock object keys is a good move. It's more explicit about using the pointer value as an identifier rather than dereferencing it, and it works better with hash-based containers.


551-555: Hash map for better lookup performance

Good switch from std::map to std::unordered_map for the reaction map. Since ordering isn't needed here, the O(1) average-case lookup is preferable to O(log n).


55-57: Proper QURT OS platform support

The addition of QURT-specific fatal exception handling is appropriate for this embedded RTOS environment where standard exit functions may not be available.

Also applies to: 531-536


411-425: More informative expectation failure messages

Including the expectation description in error messages makes it much easier to identify which expectation failed, especially when multiple expectations exist for the same method.


534-535: Correct use of _Exit to avoid reentrancy

Good catch on using _Exit(1) instead of exit(1). Since this runs in a destructor at program termination, avoiding atexit handlers prevents potential reentrancy issues.

src/3rdparty/googletest/googlemock/test/gmock-actions_test.cc (1)

1-2218: Third-party library update looks appropriate

This is part of the GoogleTest 1.1.16 update mentioned in the PR objectives. The extensive changes add C++14/17 feature support which aligns with the stated requirement for C++14.

The main additions include:

  • Type traits tests for internal metaprogramming utilities
  • Enhanced Return action tests for move semantics and reference types
  • Comprehensive DoAll action tests with rvalue reference support
  • Tests for actions with multiple call operators and move-only types

No issues found. The modernizations (like using std::make_unique instead of new) are good improvements.

src/3rdparty/googletest/googlemock/include/gmock/gmock-spec-builders.h (6)

58-59: IWYU pragma additions look good.

These pragmas help with Include-What-You-Use tooling to properly handle this internal header file.


412-413: Good type safety improvement with uintptr_t.

Changing from const void* to uintptr_t for mock object identifiers is a solid improvement. It's cleaner for use as map keys and prevents accidental pointer dereferences.

Also applies to: 417-418, 422-423, 427-428, 433-433


715-718: Excellent debugging enhancement with expectation descriptions.

The addition of human-readable descriptions for expectations will make test failures much easier to understand. The implementation properly uses move semantics and integrates well into error messages.

Also applies to: 785-788, 848-848, 927-932, 1224-1231, 1247-1251


1393-1435: Smart use of RAII for cleanup handlers.

The destructor-based cleanup pattern ensures that uninteresting calls and failures are properly reported even if exceptions occur. This is more robust than the previous approach.


1001-1030: Clever overload design for OnceAction support.

The dual overload approach with ActionAdaptor properly handles move-only actions while maintaining backward compatibility. The SFINAE technique ensures the right overload is selected.

Also applies to: 1097-1105


1745-1896: Well-structured InvokeWith implementation despite complexity.

The implementation properly handles all cases (uninteresting calls, matched expectations, excessive calls) with appropriate RAII cleanup. The can_print_result type trait is a nice touch for conditionally printing results based on type capabilities.

One observation: The comment about avoiding local callback types for compilation speed (lines 1837-1840, 1888-1890) is good documentation of a non-obvious design choice.

src/3rdparty/googletest/googlemock/include/gmock/gmock-actions.h (2)

1-2361: Third-party library update looks good

This is a substantial update to Google Mock's action framework as part of the googletest 1.1.16 upgrade. The changes modernize the codebase to leverage C++14 features, add move-only action support via OnceAction, and improve type safety throughout.

The update aligns with the PR objectives stating that googletest 1.1.16 requires C++14. Since this is a vendored third-party library, the implementation details are Google's responsibility and appear well-tested.


269-380: Verify C++14 compiler requirement is enforced

The new metaprogramming utilities (negation, conjunction, disjunction, etc.) backport C++17 features for C++14 compatibility. Since googletest 1.1.16 requires C++14, ensure the project's CMake configuration properly enforces this requirement.

#!/bin/bash
# Check if CMakeLists.txt enforces C++14 or higher
rg -A 5 -B 5 'CMAKE_CXX_STANDARD|cxx_std_|CXX_STANDARD' CMakeLists.txt

Comment on lines 30 to 32
make VERBOSE=1
make check VERBOSE=1
make test VERBOSE=1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Prefer ctest --output-on-failure for richer diagnostics
make test is fine, but calling ctest directly prints failing test names and captured output, which speeds up debugging in CI logs.

-        make test VERBOSE=1
+        ctest --output-on-failure

Optional, but improves signal-to-noise in large test suites.

Also applies to: 49-51

🤖 Prompt for AI Agents
In .github/workflows/build.yml around lines 30 to 32 and also lines 49 to 51,
replace the `make test VERBOSE=1` commands with `ctest --output-on-failure` to
get richer diagnostics. This change will print failing test names and their
captured output directly in the CI logs, improving debugging efficiency. Keep
the `make VERBOSE=1` commands as they are.

Comment on lines +30 to 31
set(CMAKE_CXX_STANDARD 14)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

C++14 is set but not enforced

You bumped the standard to 14, good call.
Without CMAKE_CXX_STANDARD_REQUIRED ON CMake will silently downgrade on toolchains that default to an older standard and you'll hit compiler errors later. Fail fast instead.

 set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
🤖 Prompt for AI Agents
In CMakeLists.txt around lines 30 to 31, the C++14 standard is set but not
enforced, which can cause CMake to silently downgrade the standard on some
toolchains. Add the line `set(CMAKE_CXX_STANDARD_REQUIRED ON)` immediately after
setting `CMAKE_CXX_STANDARD` to ensure the compiler strictly uses C++14 and
fails early if unsupported.

The GoogleTest module was introduced in version 3.9, gtest_discover_tests() in 3.10.
@wo80
Copy link
Contributor Author

wo80 commented Jun 26, 2025

To not have the googletest code in your repo, you could use the CMake FetchContent module. This would require to set cmake_minimum_required to 3.14.

The setup is then very simple, see https://google.github.io/googletest/quickstart-cmake.html#set-up-a-project

@lalinsky
Copy link
Member

lalinsky commented Jul 3, 2025

Thank you for this.

@lalinsky lalinsky merged commit ac31acc into acoustid:master Jul 3, 2025
14 checks passed
@wo80
Copy link
Contributor Author

wo80 commented Jul 3, 2025

@lalinsky Just received a bunch of notification mails from coderabbit. Wasn't sure if just setting resolved without a comment was ok. Sorry for spamming!

@lalinsky
Copy link
Member

lalinsky commented Jul 3, 2025

@lalinsky Just received a bunch of notification mails from coderabbit. Wasn't sure if just setting resolved without a comment was ok. Sorry for spamming!

Yeah, it's completely fine to resolve them without a comment. I find CodeRabbit useful for my own changes, but it gets spammy when you update external code like this.

Thank you for the changes.

@wo80 wo80 deleted the cmake branch July 3, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ffmpeg 7.0 support

2 participants