Full Code of google/googletest for AI

main 94be250af7e1 cached
251 files
3.9 MB
1.0M tokens
5410 symbols
1 requests
Download .txt
Showing preview only (4,161K chars total). Download the full file or copy to clipboard to get everything.
Repository: google/googletest
Branch: main
Commit: 94be250af7e1
Files: 251
Total size: 3.9 MB

Directory structure:
gitextract_ucy1bd7n/

├── .clang-format
├── .github/
│   └── ISSUE_TEMPLATE/
│       ├── 00-bug_report.yml
│       ├── 10-feature_request.yml
│       └── config.yml
├── .gitignore
├── BUILD.bazel
├── CMakeLists.txt
├── CONTRIBUTING.md
├── CONTRIBUTORS
├── LICENSE
├── MODULE.bazel
├── README.md
├── WORKSPACE
├── WORKSPACE.bzlmod
├── ci/
│   ├── linux-presubmit.sh
│   ├── macos-presubmit.sh
│   └── windows-presubmit.bat
├── docs/
│   ├── _config.yml
│   ├── _data/
│   │   └── navigation.yml
│   ├── _layouts/
│   │   └── default.html
│   ├── _sass/
│   │   └── main.scss
│   ├── advanced.md
│   ├── assets/
│   │   └── css/
│   │       └── style.scss
│   ├── community_created_documentation.md
│   ├── faq.md
│   ├── gmock_cheat_sheet.md
│   ├── gmock_cook_book.md
│   ├── gmock_faq.md
│   ├── gmock_for_dummies.md
│   ├── index.md
│   ├── pkgconfig.md
│   ├── platforms.md
│   ├── primer.md
│   ├── quickstart-bazel.md
│   ├── quickstart-cmake.md
│   ├── reference/
│   │   ├── actions.md
│   │   ├── assertions.md
│   │   ├── matchers.md
│   │   ├── mocking.md
│   │   └── testing.md
│   └── samples.md
├── fake_fuchsia_sdk.bzl
├── googlemock/
│   ├── CMakeLists.txt
│   ├── README.md
│   ├── cmake/
│   │   ├── gmock.pc.in
│   │   └── gmock_main.pc.in
│   ├── docs/
│   │   └── README.md
│   ├── include/
│   │   └── gmock/
│   │       ├── gmock-actions.h
│   │       ├── gmock-cardinalities.h
│   │       ├── gmock-function-mocker.h
│   │       ├── gmock-matchers.h
│   │       ├── gmock-more-actions.h
│   │       ├── gmock-more-matchers.h
│   │       ├── gmock-nice-strict.h
│   │       ├── gmock-spec-builders.h
│   │       ├── gmock.h
│   │       └── internal/
│   │           ├── custom/
│   │           │   ├── README.md
│   │           │   ├── gmock-generated-actions.h
│   │           │   ├── gmock-matchers.h
│   │           │   └── gmock-port.h
│   │           ├── gmock-internal-utils.h
│   │           ├── gmock-port.h
│   │           └── gmock-pp.h
│   ├── src/
│   │   ├── gmock-all.cc
│   │   ├── gmock-cardinalities.cc
│   │   ├── gmock-internal-utils.cc
│   │   ├── gmock-matchers.cc
│   │   ├── gmock-spec-builders.cc
│   │   ├── gmock.cc
│   │   └── gmock_main.cc
│   └── test/
│       ├── BUILD.bazel
│       ├── gmock-actions_test.cc
│       ├── gmock-cardinalities_test.cc
│       ├── gmock-function-mocker_test.cc
│       ├── gmock-internal-utils_test.cc
│       ├── gmock-matchers-arithmetic_test.cc
│       ├── gmock-matchers-comparisons_test.cc
│       ├── gmock-matchers-containers_test.cc
│       ├── gmock-matchers-misc_test.cc
│       ├── gmock-matchers_test.h
│       ├── gmock-more-actions_test.cc
│       ├── gmock-nice-strict_test.cc
│       ├── gmock-port_test.cc
│       ├── gmock-pp-string_test.cc
│       ├── gmock-pp_test.cc
│       ├── gmock-spec-builders_test.cc
│       ├── gmock_all_test.cc
│       ├── gmock_ex_test.cc
│       ├── gmock_leak_test.py
│       ├── gmock_leak_test_.cc
│       ├── gmock_link2_test.cc
│       ├── gmock_link_test.cc
│       ├── gmock_link_test.h
│       ├── gmock_output_test.py
│       ├── gmock_output_test_.cc
│       ├── gmock_output_test_golden.txt
│       ├── gmock_stress_test.cc
│       ├── gmock_test.cc
│       └── gmock_test_utils.py
├── googletest/
│   ├── CMakeLists.txt
│   ├── README.md
│   ├── cmake/
│   │   ├── Config.cmake.in
│   │   ├── gtest.pc.in
│   │   ├── gtest_main.pc.in
│   │   ├── internal_utils.cmake
│   │   └── libgtest.la.in
│   ├── docs/
│   │   └── README.md
│   ├── include/
│   │   └── gtest/
│   │       ├── gtest-assertion-result.h
│   │       ├── gtest-death-test.h
│   │       ├── gtest-matchers.h
│   │       ├── gtest-message.h
│   │       ├── gtest-param-test.h
│   │       ├── gtest-printers.h
│   │       ├── gtest-spi.h
│   │       ├── gtest-test-part.h
│   │       ├── gtest-typed-test.h
│   │       ├── gtest.h
│   │       ├── gtest_pred_impl.h
│   │       ├── gtest_prod.h
│   │       └── internal/
│   │           ├── custom/
│   │           │   ├── README.md
│   │           │   ├── gtest-port.h
│   │           │   ├── gtest-printers.h
│   │           │   └── gtest.h
│   │           ├── gtest-death-test-internal.h
│   │           ├── gtest-filepath.h
│   │           ├── gtest-internal.h
│   │           ├── gtest-param-util.h
│   │           ├── gtest-port-arch.h
│   │           ├── gtest-port.h
│   │           ├── gtest-string.h
│   │           └── gtest-type-util.h
│   ├── samples/
│   │   ├── prime_tables.h
│   │   ├── sample1.cc
│   │   ├── sample1.h
│   │   ├── sample10_unittest.cc
│   │   ├── sample1_unittest.cc
│   │   ├── sample2.cc
│   │   ├── sample2.h
│   │   ├── sample2_unittest.cc
│   │   ├── sample3-inl.h
│   │   ├── sample3_unittest.cc
│   │   ├── sample4.cc
│   │   ├── sample4.h
│   │   ├── sample4_unittest.cc
│   │   ├── sample5_unittest.cc
│   │   ├── sample6_unittest.cc
│   │   ├── sample7_unittest.cc
│   │   ├── sample8_unittest.cc
│   │   └── sample9_unittest.cc
│   ├── src/
│   │   ├── gtest-all.cc
│   │   ├── gtest-assertion-result.cc
│   │   ├── gtest-death-test.cc
│   │   ├── gtest-filepath.cc
│   │   ├── gtest-internal-inl.h
│   │   ├── gtest-matchers.cc
│   │   ├── gtest-port.cc
│   │   ├── gtest-printers.cc
│   │   ├── gtest-test-part.cc
│   │   ├── gtest-typed-test.cc
│   │   ├── gtest.cc
│   │   └── gtest_main.cc
│   └── test/
│       ├── BUILD.bazel
│       ├── googletest-break-on-failure-unittest.py
│       ├── googletest-break-on-failure-unittest_.cc
│       ├── googletest-catch-exceptions-test.py
│       ├── googletest-catch-exceptions-test_.cc
│       ├── googletest-color-test.py
│       ├── googletest-color-test_.cc
│       ├── googletest-death-test-test.cc
│       ├── googletest-death-test_ex_test.cc
│       ├── googletest-env-var-test.py
│       ├── googletest-env-var-test_.cc
│       ├── googletest-fail-if-no-test-linked-test-with-disabled-test_.cc
│       ├── googletest-fail-if-no-test-linked-test-with-enabled-test_.cc
│       ├── googletest-fail-if-no-test-linked-test.py
│       ├── googletest-fail-if-no-test-selected-test.py
│       ├── googletest-failfast-unittest.py
│       ├── googletest-failfast-unittest_.cc
│       ├── googletest-filepath-test.cc
│       ├── googletest-filter-unittest.py
│       ├── googletest-filter-unittest_.cc
│       ├── googletest-global-environment-unittest.py
│       ├── googletest-global-environment-unittest_.cc
│       ├── googletest-json-outfiles-test.py
│       ├── googletest-json-output-unittest.py
│       ├── googletest-list-tests-unittest.py
│       ├── googletest-list-tests-unittest_.cc
│       ├── googletest-listener-test.cc
│       ├── googletest-message-test.cc
│       ├── googletest-options-test.cc
│       ├── googletest-output-test-golden-lin.txt
│       ├── googletest-output-test.py
│       ├── googletest-output-test_.cc
│       ├── googletest-param-test-invalid-name1-test.py
│       ├── googletest-param-test-invalid-name1-test_.cc
│       ├── googletest-param-test-invalid-name2-test.py
│       ├── googletest-param-test-invalid-name2-test_.cc
│       ├── googletest-param-test-test.cc
│       ├── googletest-param-test-test.h
│       ├── googletest-param-test2-test.cc
│       ├── googletest-port-test.cc
│       ├── googletest-printers-test.cc
│       ├── googletest-setuptestsuite-test.py
│       ├── googletest-setuptestsuite-test_.cc
│       ├── googletest-shuffle-test.py
│       ├── googletest-shuffle-test_.cc
│       ├── googletest-test-part-test.cc
│       ├── googletest-throw-on-failure-test.py
│       ├── googletest-throw-on-failure-test_.cc
│       ├── googletest-uninitialized-test.py
│       ├── googletest-uninitialized-test_.cc
│       ├── gtest-typed-test2_test.cc
│       ├── gtest-typed-test_test.cc
│       ├── gtest-typed-test_test.h
│       ├── gtest-unittest-api_test.cc
│       ├── gtest_all_test.cc
│       ├── gtest_assert_by_exception_test.cc
│       ├── gtest_dirs_test.cc
│       ├── gtest_environment_test.cc
│       ├── gtest_help_test.py
│       ├── gtest_help_test_.cc
│       ├── gtest_json_test_utils.py
│       ├── gtest_list_output_unittest.py
│       ├── gtest_list_output_unittest_.cc
│       ├── gtest_main_unittest.cc
│       ├── gtest_no_test_unittest.cc
│       ├── gtest_pred_impl_unittest.cc
│       ├── gtest_premature_exit_test.cc
│       ├── gtest_prod_test.cc
│       ├── gtest_repeat_test.cc
│       ├── gtest_skip_check_output_test.py
│       ├── gtest_skip_environment_check_output_test.py
│       ├── gtest_skip_in_environment_setup_test.cc
│       ├── gtest_skip_test.cc
│       ├── gtest_sole_header_test.cc
│       ├── gtest_stress_test.cc
│       ├── gtest_test_macro_stack_footprint_test.cc
│       ├── gtest_test_utils.py
│       ├── gtest_testbridge_test.py
│       ├── gtest_testbridge_test_.cc
│       ├── gtest_throw_on_failure_ex_test.cc
│       ├── gtest_unittest.cc
│       ├── gtest_xml_outfile1_test_.cc
│       ├── gtest_xml_outfile2_test_.cc
│       ├── gtest_xml_outfiles_test.py
│       ├── gtest_xml_output_unittest.py
│       ├── gtest_xml_output_unittest_.cc
│       ├── gtest_xml_test_utils.py
│       ├── production.cc
│       └── production.h
└── googletest_deps.bzl

================================================
FILE CONTENTS
================================================

================================================
FILE: .clang-format
================================================
# Run manually to reformat a file:
# clang-format -i --style=file <file>
Language:        Cpp
BasedOnStyle:  Google


================================================
FILE: .github/ISSUE_TEMPLATE/00-bug_report.yml
================================================
name: Bug Report
description: Let us know that something does not work as expected.
title: "[Bug]: Please title this bug report"
body:
  - type: textarea
    id: what-happened
    attributes:
      label: Describe the issue
      description: What happened, and what did you expect to happen?
    validations:
      required: true
  - type: textarea
    id: steps
    attributes:
      label: Steps to reproduce the problem
      description: It is important that we are able to reproduce the problem that you are experiencing. Please provide all code and relevant steps to reproduce the problem, including your `BUILD`/`CMakeLists.txt` file and build commands. Links to a GitHub branch or [godbolt.org](https://godbolt.org/) that demonstrate the problem are also helpful.
    validations:
      required: true
  - type: textarea
    id: version
    attributes:
      label: What version of GoogleTest are you using?
      description: Please include the output of `git rev-parse HEAD` or the GoogleTest release version number that you are using.
    validations:
      required: true
  - type: textarea
    id: os
    attributes:
      label: What operating system and version are you using?
      description: If you are using a Linux distribution please include the name and version of the distribution as well.
    validations:
      required: true
  - type: textarea
    id: compiler
    attributes:
      label: What compiler and version are you using?
      description: Please include the output of `gcc -v` or `clang -v`, or the equivalent for your compiler.
    validations:
      required: true
  - type: textarea
    id: buildsystem
    attributes:
      label: What build system are you using?
      description: Please include the output of `bazel --version` or `cmake --version`, or the equivalent for your build system.
    validations:
      required: true
  - type: textarea
    id: additional
    attributes:
      label: Additional context
      description: Add any other context about the problem here.
    validations:
      required: false


================================================
FILE: .github/ISSUE_TEMPLATE/10-feature_request.yml
================================================
name: Feature request
description: Propose a new feature.
title: "[FR]: Please title this feature request"
labels: "enhancement"
body:
  - type: textarea
    id: version
    attributes:
      label: Does the feature exist in the most recent commit?
      description: We recommend using the latest commit from GitHub in your projects.
    validations:
      required: true
  - type: textarea
    id: why
    attributes:
      label: Why do we need this feature?
      description: Ideally, explain why a combination of existing features cannot be used instead.
    validations:
      required: true
  - type: textarea
    id: proposal
    attributes:
      label: Describe the proposal.
      description: Include a detailed description of the feature, with usage examples.
    validations:
      required: true
  - type: textarea
    id: platform
    attributes:
      label: Is the feature specific to an operating system, compiler, or build system version?
      description: If it is, please specify which versions.
    validations:
      required: true


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
    - name: Get Help
      url: https://github.com/google/googletest/discussions
      about: Please ask and answer questions here.


================================================
FILE: .gitignore
================================================
# Ignore CI build directory
build/
xcuserdata
cmake-build-debug/
.idea/
bazel-bin
bazel-genfiles
bazel-googletest
bazel-out
bazel-testlogs
MODULE.bazel.lock
# python
*.pyc

# Visual Studio files
.vs
*.sdf
*.opensdf
*.VC.opendb
*.suo
*.user
_ReSharper.Caches/
Win32-Debug/
Win32-Release/
x64-Debug/
x64-Release/

# VSCode files
.cache/
cmake-variants.yaml

# Ignore autoconf / automake files
Makefile.in
aclocal.m4
configure
build-aux/
autom4te.cache/
googletest/m4/libtool.m4
googletest/m4/ltoptions.m4
googletest/m4/ltsugar.m4
googletest/m4/ltversion.m4
googletest/m4/lt~obsolete.m4
googlemock/m4

# Ignore generated directories.
googlemock/fused-src/
googletest/fused-src/

# macOS files
.DS_Store
googletest/.DS_Store
googletest/xcode/.DS_Store

# Ignore cmake generated directories and files.
CMakeFiles
CTestTestfile.cmake
Makefile
cmake_install.cmake
googlemock/CMakeFiles
googlemock/CTestTestfile.cmake
googlemock/Makefile
googlemock/cmake_install.cmake
googlemock/gtest
/bin
/googlemock/gmock.dir
/googlemock/gmock_main.dir
/googlemock/RUN_TESTS.vcxproj.filters
/googlemock/RUN_TESTS.vcxproj
/googlemock/INSTALL.vcxproj.filters
/googlemock/INSTALL.vcxproj
/googlemock/gmock_main.vcxproj.filters
/googlemock/gmock_main.vcxproj
/googlemock/gmock.vcxproj.filters
/googlemock/gmock.vcxproj
/googlemock/gmock.sln
/googlemock/ALL_BUILD.vcxproj.filters
/googlemock/ALL_BUILD.vcxproj
/lib
/Win32
/ZERO_CHECK.vcxproj.filters
/ZERO_CHECK.vcxproj
/RUN_TESTS.vcxproj.filters
/RUN_TESTS.vcxproj
/INSTALL.vcxproj.filters
/INSTALL.vcxproj
/googletest-distribution.sln
/CMakeCache.txt
/ALL_BUILD.vcxproj.filters
/ALL_BUILD.vcxproj


================================================
FILE: BUILD.bazel
================================================
# Copyright 2017 Google Inc.
# All Rights Reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
#     * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#     * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#     * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#   Bazel Build for Google C++ Testing Framework(Google Test)

load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")

package(default_visibility = ["//visibility:public"])

licenses(["notice"])

exports_files(["LICENSE"])

config_setting(
    name = "qnx",
    constraint_values = ["@platforms//os:qnx"],
)

config_setting(
    name = "windows",
    constraint_values = ["@platforms//os:windows"],
)

config_setting(
    name = "freebsd",
    constraint_values = ["@platforms//os:freebsd"],
)

config_setting(
    name = "openbsd",
    constraint_values = ["@platforms//os:openbsd"],
)

# NOTE: Fuchsia is not an officially supported platform.
config_setting(
    name = "fuchsia",
    constraint_values = ["@platforms//os:fuchsia"],
)

config_setting(
    name = "msvc_compiler",
    flag_values = {
        "@bazel_tools//tools/cpp:compiler": "msvc-cl",
    },
    visibility = [":__subpackages__"],
)

config_setting(
    name = "has_absl",
    values = {"define": "absl=1"},
)

# Library that defines the FRIEND_TEST macro.
cc_library(
    name = "gtest_prod",
    hdrs = ["googletest/include/gtest/gtest_prod.h"],
    includes = ["googletest/include"],
)

# Google Test including Google Mock

# For an actual test, use `gtest` and also `gtest_main` if you depend on gtest's
# main(). For a library, use `gtest_for_library` instead if the library can be
# testonly.
cc_library(
    name = "gtest",
    srcs = glob(
        include = [
            "googletest/src/*.cc",
            "googletest/src/*.h",
            "googletest/include/gtest/**/*.h",
            "googlemock/src/*.cc",
            "googlemock/include/gmock/**/*.h",
        ],
        exclude = [
            "googletest/src/gtest-all.cc",
            "googletest/src/gtest_main.cc",
            "googlemock/src/gmock-all.cc",
            "googlemock/src/gmock_main.cc",
        ],
    ),
    hdrs = glob([
        "googletest/include/gtest/*.h",
        "googlemock/include/gmock/*.h",
    ]),
    copts = select({
        ":qnx": [],
        ":windows": [],
        "//conditions:default": ["-pthread"],
    }),
    defines = select({
        ":has_absl": ["GTEST_HAS_ABSL=1"],
        "//conditions:default": [],
    }),
    features = select({
        ":windows": ["windows_export_all_symbols"],
        "//conditions:default": [],
    }),
    includes = [
        "googlemock",
        "googlemock/include",
        "googletest",
        "googletest/include",
    ],
    linkopts = select({
        ":qnx": ["-lregex"],
        ":windows": [],
        ":freebsd": [
            "-lm",
            "-pthread",
        ],
        ":openbsd": [
            "-lm",
            "-pthread",
        ],
        "//conditions:default": ["-pthread"],
    }),
    deps = select({
        ":has_absl": [
            "@abseil-cpp//absl/container:flat_hash_set",
            "@abseil-cpp//absl/debugging:failure_signal_handler",
            "@abseil-cpp//absl/debugging:stacktrace",
            "@abseil-cpp//absl/debugging:symbolize",
            "@abseil-cpp//absl/flags:flag",
            "@abseil-cpp//absl/flags:parse",
            "@abseil-cpp//absl/flags:reflection",
            "@abseil-cpp//absl/flags:usage",
            "@abseil-cpp//absl/strings",
            "@re2",
        ],
        "//conditions:default": [],
    }) + select({
        # `gtest-death-test.cc` has `EXPECT_DEATH` that spawns a process,
        # expects it to crash and inspects its logs with the given matcher,
        # so that's why these libraries are needed.
        # Otherwise, builds targeting Fuchsia would fail to compile.
        ":fuchsia": [
            "@fuchsia_sdk//pkg/fdio",
            "@fuchsia_sdk//pkg/zx",
        ],
        "//conditions:default": [],
    }),
)

# `gtest`, but testonly. See guidance on `gtest` for when to use this.
alias(
    name = "gtest_for_library",
    testonly = True,
    actual = ":gtest",
)

# Implements main() for tests using gtest. Prefer to depend on `gtest` as well
# to ensure compliance with the layering_check Bazel feature where only the
# direct hdrs values are available.
cc_library(
    name = "gtest_main",
    srcs = ["googlemock/src/gmock_main.cc"],
    features = select({
        ":windows": ["windows_export_all_symbols"],
        "//conditions:default": [],
    }),
    deps = [":gtest"],
)

# The following rules build samples of how to use gTest.
cc_library(
    name = "gtest_sample_lib",
    srcs = [
        "googletest/samples/sample1.cc",
        "googletest/samples/sample2.cc",
        "googletest/samples/sample4.cc",
    ],
    hdrs = [
        "googletest/samples/prime_tables.h",
        "googletest/samples/sample1.h",
        "googletest/samples/sample2.h",
        "googletest/samples/sample3-inl.h",
        "googletest/samples/sample4.h",
    ],
    features = select({
        ":windows": ["windows_export_all_symbols"],
        "//conditions:default": [],
    }),
)

cc_test(
    name = "gtest_samples",
    size = "small",
    # All Samples except:
    #   sample9 (main)
    #   sample10 (main and takes a command line option and needs to be separate)
    srcs = [
        "googletest/samples/sample1_unittest.cc",
        "googletest/samples/sample2_unittest.cc",
        "googletest/samples/sample3_unittest.cc",
        "googletest/samples/sample4_unittest.cc",
        "googletest/samples/sample5_unittest.cc",
        "googletest/samples/sample6_unittest.cc",
        "googletest/samples/sample7_unittest.cc",
        "googletest/samples/sample8_unittest.cc",
    ],
    linkstatic = 0,
    deps = [
        "gtest_sample_lib",
        ":gtest_main",
    ],
)

cc_test(
    name = "sample9_unittest",
    size = "small",
    srcs = ["googletest/samples/sample9_unittest.cc"],
    deps = [":gtest"],
)

cc_test(
    name = "sample10_unittest",
    size = "small",
    srcs = ["googletest/samples/sample10_unittest.cc"],
    deps = [":gtest"],
)


================================================
FILE: CMakeLists.txt
================================================
# Note: CMake support is community-based. The maintainers do not use CMake
# internally.

cmake_minimum_required(VERSION 3.16)

project(googletest-distribution)
set(GOOGLETEST_VERSION 1.16.0)

if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX)
  set(CMAKE_CXX_EXTENSIONS OFF)
endif()

enable_testing()

include(CMakeDependentOption)
include(GNUInstallDirs)

# Note that googlemock target already builds googletest.
option(BUILD_GMOCK "Builds the googlemock subproject" ON)
option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON)
option(GTEST_HAS_ABSL "Use Abseil and RE2. Requires Abseil and RE2 to be separately added to the build." OFF)

if(GTEST_HAS_ABSL)
  if(NOT TARGET absl::base)
    find_package(absl REQUIRED)
  endif()
  if(NOT TARGET re2::re2)
    find_package(re2 REQUIRED)
  endif()
endif()

if(BUILD_GMOCK)
  add_subdirectory( googlemock )
else()
  add_subdirectory( googletest )
endif()


================================================
FILE: CONTRIBUTING.md
================================================
# 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](https://groups.google.com/group/googletestframework) and the
GitHub repository. Likewise, the Google Mock community exists primarily through
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.


================================================
FILE: CONTRIBUTORS
================================================
# This file contains a list of people who've made non-trivial
# contribution to the Google C++ Testing Framework project.  People
# who commit code to the project are encouraged to add their names
# here.  Please keep the list sorted by first names.

Ajay Joshi <jaj@google.com>
Balázs Dán <balazs.dan@gmail.com>
Benoit Sigoure <tsuna@google.com>
Bharat Mediratta <bharat@menalto.com>
Bogdan Piloca <boo@google.com>
Chandler Carruth <chandlerc@google.com>
Chris Prince <cprince@google.com>
Chris Taylor <taylorc@google.com>
Dan Egnor <egnor@google.com>
Dave MacLachlan <dmaclach@gmail.com>
David Anderson <danderson@google.com>
Dean Sturtevant
Eric Roman <eroman@chromium.org>
Gene Volovich <gv@cite.com>
Hady Zalek <hady.zalek@gmail.com>
Hal Burch <gmock@hburch.com>
Jeffrey Yasskin <jyasskin@google.com>
Jim Keller <jimkeller@google.com>
Joe Walnes <joe@truemesh.com>
Jon Wray <jwray@google.com>
Jói Sigurðsson <joi@google.com>
Keir Mierle <mierle@gmail.com>
Keith Ray <keith.ray@gmail.com>
Kenton Varda <kenton@google.com>
Kostya Serebryany <kcc@google.com>
Krystian Kuzniarek <krystian.kuzniarek@gmail.com>
Lev Makhlis
Manuel Klimek <klimek@google.com>
Mario Tanev <radix@google.com>
Mark Paskin
Markus Heule <markus.heule@gmail.com>
Martijn Vels <mvels@google.com>
Matthew Simmons <simmonmt@acm.org>
Mika Raento <mikie@iki.fi>
Mike Bland <mbland@google.com>
Miklós Fazekas <mfazekas@szemafor.com>
Neal Norwitz <nnorwitz@gmail.com>
Nermin Ozkiranartli <nermin@google.com>
Owen Carlsen <ocarlsen@google.com>
Paneendra Ba <paneendra@google.com>
Pasi Valminen <pasi.valminen@gmail.com>
Patrick Hanna <phanna@google.com>
Patrick Riley <pfr@google.com>
Paul Menage <menage@google.com>
Peter Kaminski <piotrk@google.com>
Piotr Kaminski <piotrk@google.com>
Preston Jackson <preston.a.jackson@gmail.com>
Rainer Klaffenboeck <rainer.klaffenboeck@dynatrace.com>
Russ Cox <rsc@google.com>
Russ Rufer <russ@pentad.com>
Sean Mcafee <eefacm@gmail.com>
Sigurður Ásgeirsson <siggi@google.com>
Soyeon Kim <sxshx818@naver.com>
Sverre Sundsdal <sundsdal@gmail.com>
Szymon Sobik <sobik.szymon@gmail.com>
Takeshi Yoshino <tyoshino@google.com>
Tracy Bialik <tracy@pentad.com>
Vadim Berman <vadimb@google.com>
Vlad Losev <vladl@google.com>
Wolfgang Klier <wklier@google.com>
Zhanyong Wan <wan@google.com>


================================================
FILE: LICENSE
================================================
Copyright 2008, Google Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

    * Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
    * Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


================================================
FILE: MODULE.bazel
================================================
# Copyright 2024 Google Inc.
# All Rights Reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
#     * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#     * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#     * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# https://bazel.build/external/overview#bzlmod

module(
    name = "googletest",
    version = "head",
    compatibility_level = 1,
)

# Only direct dependencies need to be listed below.
# Please keep the versions in sync with the versions in the WORKSPACE file.

bazel_dep(
    name = "abseil-cpp",
    version = "20260107.0",
)
bazel_dep(
    name = "platforms",
    version = "0.0.11",
)
bazel_dep(
    name = "re2",
    version = "2025-11-05.bcr.1",
)

bazel_dep(
    name = "rules_cc",
    version = "0.2.8"
)

bazel_dep(
    name = "rules_python",
    version = "1.3.0",
    dev_dependency = True,
)

# https://rules-python.readthedocs.io/en/stable/toolchains.html#library-modules-with-dev-only-python-usage
python = use_extension(
    "@rules_python//python/extensions:python.bzl",
    "python",
    dev_dependency = True,
)
python.toolchain(
    ignore_root_user_error = True,
    is_default = True,
    python_version = "3.12",
)

# See fake_fuchsia_sdk.bzl for instructions on how to override this with a real SDK, if needed.
fuchsia_sdk = use_extension("//:fake_fuchsia_sdk.bzl", "fuchsia_sdk")
fuchsia_sdk.create_fake()
use_repo(fuchsia_sdk, "fuchsia_sdk")


================================================
FILE: README.md
================================================
# GoogleTest

### Announcements

#### 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.17.0

[Release 1.17.0](https://github.com/google/googletest/releases/tag/v1.17.0) is
now available.

The 1.17.x branch
[requires at least C++17](https://opensource.google/documentation/policies/cplusplus-support#c_language_standard).

#### Continuous Integration

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).

## 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](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](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!


================================================
FILE: WORKSPACE
================================================
# Copyright 2024 Google Inc.
# All Rights Reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
#     * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#     * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#     * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

workspace(name = "googletest")

load("//:googletest_deps.bzl", "googletest_deps")
googletest_deps()

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "2cc26bbd53854ceb76dd42a834b1002cd4ba7f8df35440cf03482e045affc244",
    strip_prefix = "rules_python-1.3.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/1.3.0/rules_python-1.3.0.tar.gz",
)
# https://github.com/bazelbuild/rules_python/releases/tag/1.1.0
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()

http_archive(
    name = "platforms",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.11/platforms-0.0.11.tar.gz",
        "https://github.com/bazelbuild/platforms/releases/download/0.0.11/platforms-0.0.11.tar.gz",
    ],
    sha256 = "29742e87275809b5e598dc2f04d86960cc7a55b3067d97221c9abbc9926bff0f",
)

load("@bazel_features//:deps.bzl", "bazel_features_deps")
bazel_features_deps()

load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo")
compatibility_proxy_repo()


================================================
FILE: WORKSPACE.bzlmod
================================================
# Copyright 2024 Google Inc.
# All Rights Reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
#     * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#     * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#     * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# https://bazel.build/external/migration#workspace.bzlmod
#
# This file is intentionally empty. When bzlmod is enabled and this
# file exists, the content of WORKSPACE is ignored. This prevents
# bzlmod builds from unintentionally depending on the WORKSPACE file.


================================================
FILE: ci/linux-presubmit.sh
================================================
#!/bin/bash
#
# Copyright 2020, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
#     * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#     * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#     * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

set -euox pipefail

readonly LINUX_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20260131"

if [[ -z ${GTEST_ROOT:-} ]]; then
  GTEST_ROOT="$(realpath $(dirname ${0})/..)"
fi

# Use Bazel Vendor mode to reduce reliance on external dependencies.
# See https://bazel.build/external/vendor and the Dockerfile for
# an explaination of how this works.
if [[ ${KOKORO_GFILE_DIR:-} ]] && [[ -f "${KOKORO_GFILE_DIR}/distdir/googletest_vendor.tar.gz" ]]; then
  DOCKER_EXTRA_ARGS="--mount type=bind,source=${KOKORO_GFILE_DIR}/distdir,target=/distdir,readonly --env=BAZEL_VENDOR_ARCHIVE=/distdir/googletest_vendor.tar.gz ${DOCKER_EXTRA_ARGS:-}"
  BAZEL_EXTRA_ARGS="--vendor_dir=/googletest_vendor ${BAZEL_EXTRA_ARGS:-}"
fi

if [[ -z ${STD:-} ]]; then
  STD="c++17 c++20 c++23"
fi

# Test CMake + GCC
for cmake_off_on in OFF ON; do
  time docker run \
    --volume="${GTEST_ROOT}:/src:ro" \
    --tmpfs="/build:exec" \
    --workdir="/build" \
    --rm \
    --env="CC=/usr/local/bin/gcc" \
    --env=CXXFLAGS="-Werror -Wdeprecated" \
    ${LINUX_LATEST_CONTAINER} \
    /bin/bash -c "
      cmake /src \
        -DCMAKE_CXX_STANDARD=17 \
        -Dgtest_build_samples=ON \
        -Dgtest_build_tests=ON \
        -Dgmock_build_tests=ON \
        -Dcxx_no_exception=${cmake_off_on} \
        -Dcxx_no_rtti=${cmake_off_on} && \
      make -j$(nproc) && \
      ctest -j$(nproc) --output-on-failure"
done

# Test CMake + Clang
for cmake_off_on in OFF ON; do
  time docker run \
    --volume="${GTEST_ROOT}:/src:ro" \
    --tmpfs="/build:exec" \
    --workdir="/build" \
    --rm \
    --env="CC=/opt/llvm/bin/clang" \
    --env=CXXFLAGS="-Werror -Wdeprecated --gcc-toolchain=/usr/local" \
    ${LINUX_LATEST_CONTAINER} \
    /bin/bash -c "
      cmake /src \
        -DCMAKE_CXX_STANDARD=17 \
        -Dgtest_build_samples=ON \
        -Dgtest_build_tests=ON \
        -Dgmock_build_tests=ON \
        -Dcxx_no_exception=${cmake_off_on} \
        -Dcxx_no_rtti=${cmake_off_on} && \
      make -j$(nproc) && \
      ctest -j$(nproc) --output-on-failure"
done

# Do one test with an older version of GCC
time docker run \
  --volume="${GTEST_ROOT}:/src:ro" \
  --workdir="/src" \
  --rm \
  --env="CC=/opt/gcc-9/bin/gcc" \
  --env="BAZEL_CXXOPTS=-std=c++17" \
  --env="BAZEL_LINKOPTS=-L/opt/gcc-9/lib64:-Wl,-rpath=/opt/gcc-9/lib64" \
  --env="USE_BAZEL_VERSION=8.5.1" \
  ${DOCKER_EXTRA_ARGS:-} \
  ${LINUX_LATEST_CONTAINER} \
  /bin/bash --login -c "
    /usr/local/bin/bazel test ... \
      --copt=\"-Wall\" \
      --copt=\"-Werror\" \
      --copt=\"-Wuninitialized\" \
      --copt=\"-Wundef\" \
      --copt=\"-Wno-error=pragmas\" \
      --enable_bzlmod=false \
      --enable_workspace=true \
      --features=external_include_paths \
      --keep_going \
      --per_file_copt=\"external/.*@-w\" \
      --show_timestamps \
      --test_output=errors \
      ${BAZEL_EXTRA_ARGS:-}"

# Test GCC
for std in ${STD}; do
  for absl in 0 1; do
    time docker run \
      --volume="${GTEST_ROOT}:/src:ro" \
      --workdir="/src" \
      --rm \
      --env="CC=/usr/local/bin/gcc" \
      --env="BAZEL_CXXOPTS=-std=${std}" \
      --env="USE_BAZEL_VERSION=9.0.0" \
      ${DOCKER_EXTRA_ARGS:-} \
      ${LINUX_LATEST_CONTAINER} \
      /bin/bash --login -c "
        /usr/local/bin/bazel test ... \
          --copt=\"-Wall\" \
          --copt=\"-Werror\" \
          --copt=\"-Wuninitialized\" \
          --copt=\"-Wundef\" \
          --define=\"absl=${absl}\" \
          --enable_bzlmod=true \
          --features=external_include_paths \
          --keep_going \
          --per_file_copt=\"external/.*@-w\" \
          --show_timestamps \
          --test_output=errors \
          ${BAZEL_EXTRA_ARGS:-}"
  done
done

# Test Clang
for std in ${STD}; do
  for absl in 0 1; do
    time docker run \
      --volume="${GTEST_ROOT}:/src:ro" \
      --workdir="/src" \
      --rm \
      --env="CC=/opt/llvm/bin/clang" \
      --env="BAZEL_CXXOPTS=-std=${std}" \
      --env="USE_BAZEL_VERSION=9.0.0" \
      ${DOCKER_EXTRA_ARGS:-} \
      ${LINUX_LATEST_CONTAINER} \
      /bin/bash --login -c "
        /usr/local/bin/bazel test ... \
          --copt=\"--gcc-toolchain=/usr/local\" \
          --copt=\"-Wall\" \
          --copt=\"-Werror\" \
          --copt=\"-Wuninitialized\" \
          --copt=\"-Wundef\" \
          --define=\"absl=${absl}\" \
          --enable_bzlmod=true \
          --features=external_include_paths \
          --keep_going \
          --linkopt=\"--gcc-toolchain=/usr/local\" \
          --per_file_copt=\"external/.*@-w\" \
          --show_timestamps \
          --test_output=errors \
          ${BAZEL_EXTRA_ARGS:-}"
  done
done


================================================
FILE: ci/macos-presubmit.sh
================================================
#!/bin/bash
#
# Copyright 2020, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
#     * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#     * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#     * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

set -euox pipefail

# Use Xcode 26.2
sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer

brew install cmake

export CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.ncpu)
export CTEST_PARALLEL_LEVEL=$(sysctl -n hw.ncpu)

if [[ -z ${GTEST_ROOT:-} ]]; then
  GTEST_ROOT="$(realpath $(dirname ${0})/..)"
fi

# Test the CMake build
for cmake_off_on in OFF ON; do
  BUILD_DIR=$(mktemp -d build_dir.XXXXXXXX)
  cd ${BUILD_DIR}
  time cmake ${GTEST_ROOT} \
    -DCMAKE_CXX_STANDARD=17 \
    -Dgtest_build_samples=ON \
    -Dgtest_build_tests=ON \
    -Dgmock_build_tests=ON \
    -Dcxx_no_exception=${cmake_off_on} \
    -Dcxx_no_rtti=${cmake_off_on}
  time make -j$(nproc)
  time ctest -j$(nproc) --output-on-failure
done

# Test the Bazel build

# If we are running on Kokoro, check for a versioned Bazel binary.
KOKORO_GFILE_BAZEL_BIN="bazel-9.0.0-darwin-x86_64"
if [[ ${KOKORO_GFILE_DIR:-} ]] && [[ -f ${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN} ]]; then
  BAZEL_BIN="${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN}"
  chmod +x ${BAZEL_BIN}
else
  BAZEL_BIN="bazel"
fi

# Use Bazel Vendor mode to reduce reliance on external dependencies.
if [[ ${KOKORO_GFILE_DIR:-} ]] && [[ -f "${KOKORO_GFILE_DIR}/distdir/googletest_vendor.tar.gz" ]]; then
  tar -xf "${KOKORO_GFILE_DIR}/distdir/googletest_vendor.tar.gz" -C "${HOME}/"
  BAZEL_EXTRA_ARGS="--vendor_dir=${HOME}/googletest_vendor ${BAZEL_EXTRA_ARGS:-}"
fi

cd ${GTEST_ROOT}
for absl in 0 1; do
  ${BAZEL_BIN} test ... \
    --copt="-Wall" \
    --copt="-Werror" \
    --copt="-Wundef" \
    --cxxopt="-std=c++17" \
    --define="absl=${absl}" \
    --enable_bzlmod=true \
    --features=external_include_paths \
    --keep_going \
    --per_file_copt="external/.*@-w" \
    --show_timestamps \
    --test_output=errors \
    ${BAZEL_EXTRA_ARGS:-}
done


================================================
FILE: ci/windows-presubmit.bat
================================================
SETLOCAL ENABLEDELAYEDEXPANSION

SET BAZEL_EXE=%KOKORO_GFILE_DIR%\bazel-9.0.0-windows-x86_64.exe

SET PATH=C:\Python34;%PATH%
SET BAZEL_PYTHON=C:\python34\python.exe
SET BAZEL_SH=C:\tools\msys64\usr\bin\bash.exe
SET CMAKE_BIN="cmake.exe"
SET CTEST_BIN="ctest.exe"
SET CTEST_OUTPUT_ON_FAILURE=1
SET CMAKE_BUILD_PARALLEL_LEVEL=16
SET CTEST_PARALLEL_LEVEL=16

SET GTEST_ROOT=%~dp0\..
IF %errorlevel% neq 0 EXIT /B 1

:: ----------------------------------------------------------------------------
:: CMake
SET CMAKE_BUILD_PATH=cmake_msvc2022
MKDIR %CMAKE_BUILD_PATH%
CD %CMAKE_BUILD_PATH%

%CMAKE_BIN% %GTEST_ROOT% ^
  -G "Visual Studio 17 2022" ^
  -DCMAKE_CXX_STANDARD=17 ^
  -DPYTHON_EXECUTABLE:FILEPATH=c:\python37\python.exe ^
  -DPYTHON_INCLUDE_DIR:PATH=c:\python37\include ^
  -DPYTHON_LIBRARY:FILEPATH=c:\python37\lib\site-packages\pip ^
  -Dgtest_build_samples=ON ^
  -Dgtest_build_tests=ON ^
  -Dgmock_build_tests=ON
IF %errorlevel% neq 0 EXIT /B 1

%CMAKE_BIN% --build . --target ALL_BUILD --config Debug -- -maxcpucount
IF %errorlevel% neq 0 EXIT /B 1

%CTEST_BIN% -C Debug --timeout 600
IF %errorlevel% neq 0 EXIT /B 1

CD %GTEST_ROOT%
RMDIR /S /Q %CMAKE_BUILD_PATH%

:: ----------------------------------------------------------------------------
:: Bazel

:: The default home directory on Kokoro is a long path which causes errors
:: because of Windows limitations on path length.
:: --output_user_root=C:\tmp causes Bazel to use a shorter path.
SET BAZEL_VS=C:\Program Files\Microsoft Visual Studio\2022\Community

:: Use Bazel Vendor mode to reduce reliance on external dependencies.
IF EXIST "%KOKORO_GFILE_DIR%\distdir\googletest_vendor.tar.gz" (
  tar --force-local -xf "%KOKORO_GFILE_DIR%\distdir\googletest_vendor.tar.gz" -C c:
  SET VENDOR_FLAG=--vendor_dir=c:\googletest_vendor
) ELSE (
  SET VENDOR_FLAG=
)

:: C++17
%BAZEL_EXE% ^
  --output_user_root=C:\tmp ^
  test ... ^
  --compilation_mode=dbg ^
  --copt=/std:c++17 ^
  --copt=/WX ^
  --enable_bzlmod=true ^
  --keep_going ^
  --per_file_copt=external/.*@/w ^
  --test_output=errors ^
  --test_tag_filters=-no_test_msvc2017 ^
  %VENDOR_FLAG%
IF %errorlevel% neq 0 EXIT /B 1

:: C++20
%BAZEL_EXE% ^
  --output_user_root=C:\tmp ^
  test ... ^
  --compilation_mode=dbg ^
  --copt=/std:c++20 ^
  --copt=/WX ^
  --enable_bzlmod=true ^
  --keep_going ^
  --per_file_copt=external/.*@/w ^
  --test_output=errors ^
  --test_tag_filters=-no_test_msvc2017 ^
  %VENDOR_FLAG%
IF %errorlevel% neq 0 EXIT /B 1


================================================
FILE: docs/_config.yml
================================================
title: GoogleTest


================================================
FILE: docs/_data/navigation.yml
================================================
nav:
- section: "Get Started"
  items:
  - title: "Supported Platforms"
    url: "/platforms.html"
  - title: "Quickstart: Bazel"
    url: "/quickstart-bazel.html"
  - title: "Quickstart: CMake"
    url: "/quickstart-cmake.html"
- section: "Guides"
  items:
  - title: "GoogleTest Primer"
    url: "/primer.html"
  - title: "Advanced Topics"
    url: "/advanced.html"
  - title: "Mocking for Dummies"
    url: "/gmock_for_dummies.html"
  - title: "Mocking Cookbook"
    url: "/gmock_cook_book.html"
  - title: "Mocking Cheat Sheet"
    url: "/gmock_cheat_sheet.html"
- section: "References"
  items:
  - title: "Testing Reference"
    url: "/reference/testing.html"
  - title: "Mocking Reference"
    url: "/reference/mocking.html"
  - title: "Assertions"
    url: "/reference/assertions.html"
  - title: "Matchers"
    url: "/reference/matchers.html"
  - title: "Actions"
    url: "/reference/actions.html"
  - title: "Testing FAQ"
    url: "/faq.html"
  - title: "Mocking FAQ"
    url: "/gmock_faq.html"
  - title: "Code Samples"
    url: "/samples.html"
  - title: "Using pkg-config"
    url: "/pkgconfig.html"
  - title: "Community Documentation"
    url: "/community_created_documentation.html"


================================================
FILE: docs/_layouts/default.html
================================================
<!DOCTYPE html>
<html lang="{{ site.lang | default: "en-US" }}">
  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

{% seo %}
    <link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
    <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-9PTP6FW1M5"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'G-9PTP6FW1M5');
    </script>
  </head>
  <body>
    <div class="sidebar">
      <div class="header">
        <h1><a href="{{ "/" | relative_url }}">{{ site.title | default: "Documentation" }}</a></h1>
      </div>
      <input type="checkbox" id="nav-toggle" class="nav-toggle">
      <label for="nav-toggle" class="expander">
        <span class="arrow"></span>
      </label>
      <nav>
        {% for item in site.data.navigation.nav %}
        <h2>{{ item.section }}</h2>
        <ul>
          {% for subitem in item.items %}
          <a href="{{subitem.url | relative_url }}">
            <li class="{% if subitem.url == page.url %}active{% endif %}">
              {{ subitem.title }}
            </li>
          </a>
          {% endfor %}
        </ul>
        {% endfor %}
      </nav>
    </div>
    <div class="main markdown-body">
      <div class="main-inner">
        {{ content }}
      </div>
      <div class="footer">
        GoogleTest &middot;
        <a href="https://github.com/google/googletest">GitHub Repository</a> &middot;
        <a href="https://github.com/google/googletest/blob/main/LICENSE">License</a> &middot;
        <a href="https://policies.google.com/privacy">Privacy Policy</a>
      </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
    <script>anchors.add('.main h2, .main h3, .main h4, .main h5, .main h6');</script>
  </body>
</html>


================================================
FILE: docs/_sass/main.scss
================================================
// Styles for GoogleTest docs website on GitHub Pages.
// Color variables are defined in
// https://github.com/pages-themes/primer/tree/master/_sass/primer-support/lib/variables

$sidebar-width: 260px;

body {
  display: flex;
  margin: 0;
}

.sidebar {
  background: $black;
  color: $text-white;
  flex-shrink: 0;
  height: 100vh;
  overflow: auto;
  position: sticky;
  top: 0;
  width: $sidebar-width;
}

.sidebar h1 {
  font-size: 1.5em;
}

.sidebar h2 {
  color: $gray-light;
  font-size: 0.8em;
  font-weight: normal;
  margin-bottom: 0.8em;
  padding-left: 2.5em;
  text-transform: uppercase;
}

.sidebar .header {
  background: $black;
  padding: 2em;
  position: sticky;
  top: 0;
  width: 100%;
}

.sidebar .header a {
  color: $text-white;
  text-decoration: none;
}

.sidebar .nav-toggle {
  display: none;
}

.sidebar .expander {
  cursor: pointer;
  display: none;
  height: 3em;
  position: absolute;
  right: 1em;
  top: 1.5em;
  width: 3em;
}

.sidebar .expander .arrow {
  border: solid $white;
  border-width: 0 3px 3px 0;
  display: block;
  height: 0.7em;
  margin: 1em auto;
  transform: rotate(45deg);
  transition: transform 0.5s;
  width: 0.7em;
}

.sidebar nav {
  width: 100%;
}

.sidebar nav ul {
  list-style-type: none;
  margin-bottom: 1em;
  padding: 0;

  &:last-child {
    margin-bottom: 2em;
  }

  a {
   text-decoration: none;
  }

  li {
    color: $text-white;
    padding-left: 2em;
    text-decoration: none;
  }

  li.active {
    background: $border-gray-darker;
    font-weight: bold;
  }

  li:hover {
    background: $border-gray-darker;
  }
}

.main {
  background-color: $bg-gray;
  width: calc(100% - #{$sidebar-width});
}

.main .main-inner {
  background-color: $white;
  padding: 2em;
}

.main .footer {
  margin: 0;
  padding: 2em;
}

.main table th {
  text-align: left;
}

.main .callout {
  border-left: 0.25em solid $white;
  padding: 1em;

  a {
    text-decoration: underline;
  }

  &.important {
    background-color: $bg-yellow-light;
    border-color: $bg-yellow;
    color: $black;
  }

  &.note {
    background-color: $bg-blue-light;
    border-color: $text-blue;
    color: $text-blue;
  }

  &.tip {
    background-color: $green-000;
    border-color: $green-700;
    color: $green-700;
  }

  &.warning {
    background-color: $red-000;
    border-color: $text-red;
    color: $text-red;
  }
}

.main .good pre {
  background-color: $bg-green-light;
}

.main .bad pre {
  background-color: $red-000;
}

@media all and (max-width: 768px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    height: auto;
    position: relative;
    width: 100%;
  }

  .sidebar .expander {
    display: block;
  }

  .sidebar nav {
    height: 0;
    overflow: hidden;
  }

  .sidebar .nav-toggle:checked {
    & ~ nav {
      height: auto;
    }

    & + .expander .arrow {
      transform: rotate(-135deg);
    }
  }

  .main {
    width: 100%;
  }
}


================================================
FILE: docs/advanced.md
================================================
# Advanced GoogleTest Topics

## Introduction

Now that you have read the [GoogleTest Primer](primer.md) and learned how to
write tests using GoogleTest, it's time to learn some new tricks. This document
will show you more assertions as well as how to construct complex failure
messages, propagate fatal failures, reuse and speed up your test fixtures, and
use various flags with your tests.

## More Assertions

This section covers some less frequently used, but still significant,
assertions.

### Explicit Success and Failure

See [Explicit Success and Failure](reference/assertions.md#success-failure) in
the Assertions Reference.

### Exception Assertions

See [Exception Assertions](reference/assertions.md#exceptions) in the Assertions
Reference.

### Predicate Assertions for Better Error Messages

Even though GoogleTest has a rich set of assertions, they can never be complete,
as it's impossible (nor a good idea) to anticipate all scenarios a user might
run into. Therefore, sometimes a user has to use `EXPECT_TRUE()` to check a
complex expression, for lack of a better macro. This has the problem of not
showing you the values of the parts of the expression, making it hard to
understand what went wrong. As a workaround, some users choose to construct the
failure message by themselves, streaming it into `EXPECT_TRUE()`. However, this
is awkward especially when the expression has side-effects or is expensive to
evaluate.

GoogleTest gives you three different options to solve this problem:

#### Using an Existing Boolean Function

If you already have a function or functor that returns `bool` (or a type that
can be implicitly converted to `bool`), you can use it in a *predicate
assertion* to get the function arguments printed for free. See
[`EXPECT_PRED*`](reference/assertions.md#EXPECT_PRED) in the Assertions
Reference for details.

#### Using a Function That Returns an AssertionResult

While `EXPECT_PRED*()` and friends are handy for a quick job, the syntax is not
satisfactory: you have to use different macros for different arities, and it
feels more like Lisp than C++. The `::testing::AssertionResult` class solves
this problem.

An `AssertionResult` object represents the result of an assertion (whether it's
a success or a failure, and an associated message). You can create an
`AssertionResult` using one of these factory functions:

```c++
namespace testing {

// Returns an AssertionResult object to indicate that an assertion has
// succeeded.
AssertionResult AssertionSuccess();

// Returns an AssertionResult object to indicate that an assertion has
// failed.
AssertionResult AssertionFailure();

}
```

You can then use the `<<` operator to stream messages to the `AssertionResult`
object.

To provide more readable messages in Boolean assertions (e.g. `EXPECT_TRUE()`),
write a predicate function that returns `AssertionResult` instead of `bool`. For
example, if you define `IsEven()` as:

```c++
testing::AssertionResult IsEven(int n) {
  if ((n % 2) == 0)
    return testing::AssertionSuccess();
  else
    return testing::AssertionFailure() << n << " is odd";
}
```

instead of:

```c++
bool IsEven(int n) {
  return (n % 2) == 0;
}
```

the failed assertion `EXPECT_TRUE(IsEven(Fib(4)))` will print:

```none
Value of: IsEven(Fib(4))
  Actual: false (3 is odd)
Expected: true
```

instead of a more opaque

```none
Value of: IsEven(Fib(4))
  Actual: false
Expected: true
```

If you want informative messages in `EXPECT_FALSE` and `ASSERT_FALSE` as well
(one third of Boolean assertions in the Google code base are negative ones), and
are fine with making the predicate slower in the success case, you can supply a
success message:

```c++
testing::AssertionResult IsEven(int n) {
  if ((n % 2) == 0)
    return testing::AssertionSuccess() << n << " is even";
  else
    return testing::AssertionFailure() << n << " is odd";
}
```

Then the statement `EXPECT_FALSE(IsEven(Fib(6)))` will print

```none
  Value of: IsEven(Fib(6))
     Actual: true (8 is even)
  Expected: false
```

#### Using a Predicate-Formatter

If you find the default message generated by
[`EXPECT_PRED*`](reference/assertions.md#EXPECT_PRED) and
[`EXPECT_TRUE`](reference/assertions.md#EXPECT_TRUE) unsatisfactory, or some
arguments to your predicate do not support streaming to `ostream`, you can
instead use *predicate-formatter assertions* to *fully* customize how the
message is formatted. See
[`EXPECT_PRED_FORMAT*`](reference/assertions.md#EXPECT_PRED_FORMAT) in the
Assertions Reference for details.

### Floating-Point Comparison

See [Floating-Point Comparison](reference/assertions.md#floating-point) in the
Assertions Reference.

#### Floating-Point Predicate-Format Functions

Some floating-point operations are useful, but not that often used. In order to
avoid an explosion of new macros, we provide them as predicate-format functions
that can be used in the predicate assertion macro
[`EXPECT_PRED_FORMAT2`](reference/assertions.md#EXPECT_PRED_FORMAT), for
example:

```c++
using ::testing::FloatLE;
using ::testing::DoubleLE;
...
EXPECT_PRED_FORMAT2(FloatLE, val1, val2);
EXPECT_PRED_FORMAT2(DoubleLE, val1, val2);
```

The above code verifies that `val1` is less than, or approximately equal to,
`val2`.

### Asserting Using gMock Matchers

See [`EXPECT_THAT`](reference/assertions.md#EXPECT_THAT) in the Assertions
Reference.

### More String Assertions

(Please read the [previous](#asserting-using-gmock-matchers) section first if
you haven't.)

You can use the gMock [string matchers](reference/matchers.md#string-matchers)
with [`EXPECT_THAT`](reference/assertions.md#EXPECT_THAT) to do more string
comparison tricks (sub-string, prefix, suffix, regular expression, and etc). For
example,

```c++
using ::testing::HasSubstr;
using ::testing::MatchesRegex;
...
  ASSERT_THAT(foo_string, HasSubstr("needle"));
  EXPECT_THAT(bar_string, MatchesRegex("\\w*\\d+"));
```

### Windows HRESULT assertions

See [Windows HRESULT Assertions](reference/assertions.md#HRESULT) in the
Assertions Reference.

### Type Assertions

You can call the function

```c++
::testing::StaticAssertTypeEq<T1, T2>();
```

to assert that types `T1` and `T2` are the same. The function does nothing if
the assertion is satisfied. If the types are different, the function call will
fail to compile, the compiler error message will say that `T1 and T2 are not the
same type` and most likely (depending on the compiler) show you the actual
values of `T1` and `T2`. This is mainly useful inside template code.

**Caveat**: When used inside a member function of a class template or a function
template, `StaticAssertTypeEq<T1, T2>()` is effective only if the function is
instantiated. For example, given:

```c++
template <typename T> class Foo {
 public:
  void Bar() { testing::StaticAssertTypeEq<int, T>(); }
};
```

the code:

```c++
void Test1() { Foo<bool> foo; }
```

will not generate a compiler error, as `Foo<bool>::Bar()` is never actually
instantiated. Instead, you need:

```c++
void Test2() { Foo<bool> foo; foo.Bar(); }
```

to cause a compiler error.

### Assertion Placement

You can use assertions in any C++ function. In particular, it doesn't have to be
a method of the test fixture class. The one constraint is that assertions that
generate a fatal failure (`FAIL*` and `ASSERT_*`) can only be used in
void-returning functions. This is a consequence of Google's not using
exceptions. By placing it in a non-void function you'll get a confusing compile
error like `"error: void value not ignored as it ought to be"` or `"cannot
initialize return object of type 'bool' with an rvalue of type 'void'"` or
`"error: no viable conversion from 'void' to 'string'"`.

If you need to use fatal assertions in a function that returns non-void, one
option is to make the function return the value in an out parameter instead. For
example, you can rewrite `T2 Foo(T1 x)` to `void Foo(T1 x, T2* result)`. You
need to make sure that `*result` contains some sensible value even when the
function returns prematurely. As the function now returns `void`, you can use
any assertion inside of it.

If changing the function's type is not an option, you should just use assertions
that generate non-fatal failures, such as `ADD_FAILURE*` and `EXPECT_*`.

{: .callout .note}
NOTE: Constructors and destructors are not considered void-returning functions,
according to the C++ language specification, and so you may not use fatal
assertions in them; you'll get a compilation error if you try. Instead, either
call `abort` and crash the entire test executable, or put the fatal assertion in
a `SetUp`/`TearDown` function; see
[constructor/destructor vs. `SetUp`/`TearDown`](faq.md#CtorVsSetUp)

{: .callout .warning}
WARNING: A fatal assertion in a helper function (private void-returning method)
called from a constructor or destructor does not terminate the current test, as
your intuition might suggest: it merely returns from the constructor or
destructor early, possibly leaving your object in a partially-constructed or
partially-destructed state! You almost certainly want to `abort` or use
`SetUp`/`TearDown` instead.

## Skipping test execution

Related to the assertions `SUCCEED()` and `FAIL()`, you can prevent further test
execution at runtime with the `GTEST_SKIP()` macro. This is useful when you need
to check for preconditions of the system under test during runtime and skip
tests in a meaningful way.

`GTEST_SKIP()` can be used in individual test cases or in the `SetUp()` methods
of classes derived from either `::testing::Environment` or `::testing::Test`.
For example:

```c++
TEST(SkipTest, DoesSkip) {
  GTEST_SKIP() << "Skipping single test";
  FAIL();  // Won't fail; it won't be executed
}

class SkipFixture : public ::testing::Test {
 protected:
  void SetUp() override {
    GTEST_SKIP() << "Skipping all tests for this fixture";
  }
};

// Tests for SkipFixture won't be executed.
TEST_F(SkipFixture, SkipsOneTest) {
  FAIL();  // Won't fail; it won't be executed
}
```

As with assertion macros, you can stream a custom message into `GTEST_SKIP()`.

## Teaching GoogleTest How to Print Your Values

When a test assertion such as `EXPECT_EQ` fails, GoogleTest prints the argument
values to help you debug. It does this using a user-extensible value printer.

This printer knows how to print built-in C++ types, native arrays, STL
containers, and any type that supports the `<<` operator. For other types, it
prints the raw bytes in the value and hopes that you the user can figure it out.

As mentioned earlier, the printer is *extensible*. That means you can teach it
to do a better job at printing your particular type than to dump the bytes. To
do that, define an `AbslStringify()` overload as a `friend` function template
for your type:

```cpp
namespace foo {

class Point {  // We want GoogleTest to be able to print instances of this.
  ...
  // Provide a friend overload.
  template <typename Sink>
  friend void AbslStringify(Sink& sink, const Point& point) {
    absl::Format(&sink, "(%d, %d)", point.x, point.y);
  }

  int x;
  int y;
};

// If you can't declare the function in the class it's important that the
// AbslStringify overload is defined in the SAME namespace that defines Point.
// C++'s look-up rules rely on that.
enum class EnumWithStringify { kMany = 0, kChoices = 1 };

template <typename Sink>
void AbslStringify(Sink& sink, EnumWithStringify e) {
  absl::Format(&sink, "%s", e == EnumWithStringify::kMany ? "Many" : "Choices");
}

}  // namespace foo
```

{: .callout .note}
Note: `AbslStringify()` utilizes a generic "sink" buffer to construct its
string. For more information about supported operations on `AbslStringify()`'s
sink, see
[the `AbslStringify()` documentation](https://abseil.io/docs/cpp/guides/abslstringify).

`AbslStringify()` can also use `absl::StrFormat`'s catch-all `%v` type specifier
within its own format strings to perform type deduction. `Point` above could be
formatted as `"(%v, %v)"` for example, and deduce the `int` values as `%d`.

Sometimes, `AbslStringify()` might not be an option: your team may wish to print
types with extra debugging information for testing purposes only. If so, you can
instead define a `PrintTo()` function like this:

```c++
#include <ostream>

namespace foo {

class Point {
  ...
  friend void PrintTo(const Point& point, std::ostream* os) {
    *os << "(" << point.x << "," << point.y << ")";
  }

  int x;
  int y;
};

// If you can't declare the function in the class it's important that PrintTo()
// is defined in the SAME namespace that defines Point.  C++'s look-up rules
// rely on that.
void PrintTo(const Point& point, std::ostream* os) {
    *os << "(" << point.x << "," << point.y << ")";
}

}  // namespace foo
```

If you have defined both `AbslStringify()` and `PrintTo()`, the latter will be
used by GoogleTest. This allows you to customize how the value appears in
GoogleTest's output without affecting code that relies on the behavior of
`AbslStringify()`.

If you have an existing `<<` operator and would like to define an
`AbslStringify()`, the latter will be used for GoogleTest printing.

If you want to print a value `x` using GoogleTest's value printer yourself, just
call `::testing::PrintToString(x)`, which returns an `std::string`:

```c++
vector<pair<Point, int> > point_ints = GetPointIntVector();

EXPECT_TRUE(IsCorrectPointIntVector(point_ints))
    << "point_ints = " << testing::PrintToString(point_ints);
```

For more details regarding `AbslStringify()` and its integration with other
libraries, see
[the documentation](https://abseil.io/docs/cpp/guides/abslstringify).

## Regular Expression Syntax

When built with Bazel and using Abseil, GoogleTest uses the
[RE2](https://github.com/google/re2/wiki/Syntax) syntax. Otherwise, for POSIX
systems (Linux, Cygwin, Mac), GoogleTest uses the
[POSIX extended regular expression](https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_04)
syntax. To learn about POSIX syntax, you may want to read this
[Wikipedia entry](https://en.wikipedia.org/wiki/Regular_expression#POSIX_extended).

On Windows, GoogleTest uses its own simple regular expression implementation. It
lacks many features. For example, we don't support union (`"x|y"`), grouping
(`"(xy)"`), brackets (`"[xy]"`), and repetition count (`"x{5,7}"`), among
others. Below is what we do support (`A` denotes a literal character, period
(`.`), or a single `\\ ` escape sequence; `x` and `y` denote regular
expressions.):

Expression | Meaning
---------- | --------------------------------------------------------------
`c`        | matches any literal character `c`
`\\d`      | matches any decimal digit
`\\D`      | matches any character that's not a decimal digit
`\\f`      | matches `\f`
`\\n`      | matches `\n`
`\\r`      | matches `\r`
`\\s`      | matches any ASCII whitespace, including `\n`
`\\S`      | matches any character that's not a whitespace
`\\t`      | matches `\t`
`\\v`      | matches `\v`
`\\w`      | matches any letter, `_`, or decimal digit
`\\W`      | matches any character that `\\w` doesn't match
`\\c`      | matches any literal character `c`, which must be a punctuation
`.`        | matches any single character except `\n`
`A?`       | matches 0 or 1 occurrences of `A`
`A*`       | matches 0 or many occurrences of `A`
`A+`       | matches 1 or many occurrences of `A`
`^`        | matches the beginning of a string (not that of each line)
`$`        | matches the end of a string (not that of each line)
`xy`       | matches `x` followed by `y`

To help you determine which capability is available on your system, GoogleTest
defines macros to govern which regular expression it is using. The macros are:
`GTEST_USES_SIMPLE_RE=1` or `GTEST_USES_POSIX_RE=1`. If you want your death
tests to work in all cases, you can either `#if` on these macros or use the more
limited syntax only.

## Death Tests

In many applications, there are assertions that can cause application failure if
a condition is not met. These consistency checks, which ensure that the program
is in a known good state, are there to fail at the earliest possible time after
some program state is corrupted. If the assertion checks the wrong condition,
then the program may proceed in an erroneous state, which could lead to memory
corruption, security holes, or worse. Hence it is vitally important to test that
such assertion statements work as expected.

Since these precondition checks cause the processes to die, we call such tests
*death tests*. More generally, any test that checks that a program terminates
(except by throwing an exception) in an expected fashion is also a death test.

Note that if a piece of code throws an exception, we don't consider it "death"
for the purpose of death tests, as the caller of the code could catch the
exception and avoid the crash. If you want to verify exceptions thrown by your
code, see [Exception Assertions](#ExceptionAssertions).

If you want to test `EXPECT_*()/ASSERT_*()` failures in your test code, see
["Catching" Failures](#catching-failures).

### How to Write a Death Test

GoogleTest provides assertion macros to support death tests. See
[Death Assertions](reference/assertions.md#death) in the Assertions Reference
for details.

To write a death test, simply use one of the macros inside your test function.
For example,

```c++
TEST(MyDeathTest, Foo) {
  // This death test uses a compound statement.
  ASSERT_DEATH({
    int n = 5;
    Foo(&n);
  }, "Error on line .* of Foo()");
}

TEST(MyDeathTest, NormalExit) {
  EXPECT_EXIT(NormalExit(), testing::ExitedWithCode(0), "Success");
}

TEST(MyDeathTest, KillProcess) {
  EXPECT_EXIT(KillProcess(), testing::KilledBySignal(SIGKILL),
              "Sending myself unblockable signal");
}
```

verifies that:

*   calling `Foo(5)` causes the process to die with the given error message,
*   calling `NormalExit()` causes the process to print `"Success"` to stderr and
    exit with exit code 0, and
*   calling `KillProcess()` kills the process with signal `SIGKILL`.

{: .callout .warning}
Warning: If your death test contains mocks and is expecting a specific exit
code, then you must allow the mock objects to be leaked via `Mock::AllowLeak`.
This is because the mock leak detector will exit with its own error code if it
detects a leak.

The test function body may contain other assertions and statements as well, if
necessary.

Note that a death test only cares about three things:

1.  does `statement` abort or exit the process?
2.  (in the case of `ASSERT_EXIT` and `EXPECT_EXIT`) does the exit status
    satisfy `predicate`? Or (in the case of `ASSERT_DEATH` and `EXPECT_DEATH`)
    is the exit status non-zero? And
3.  does the stderr output match `matcher`?

In particular, if `statement` generates an `ASSERT_*` or `EXPECT_*` failure, it
will **not** cause the death test to fail, as GoogleTest assertions don't abort
the process.

### Death Test Naming

{: .callout .important}
IMPORTANT: We strongly recommend you to follow the convention of naming your
**test suite** (not test) `*DeathTest` when it contains a death test, as
demonstrated in the above example. The
[Death Tests And Threads](#death-tests-and-threads) section below explains why.

If a test fixture class is shared by normal tests and death tests, you can use
`using` or `typedef` to introduce an alias for the fixture class and avoid
duplicating its code:

```c++
class FooTest : public testing::Test { ... };

using FooDeathTest = FooTest;

TEST_F(FooTest, DoesThis) {
  // normal test
}

TEST_F(FooDeathTest, DoesThat) {
  // death test
}
```

### How It Works

See [Death Assertions](reference/assertions.md#death) in the Assertions
Reference.

### Death Tests And Threads

The reason for the two death test styles has to do with thread safety. Due to
well-known problems with forking in the presence of threads, death tests should
be run in a single-threaded context. Sometimes, however, it isn't feasible to
arrange that kind of environment. For example, statically-initialized modules
may start threads before main is ever reached. Once threads have been created,
it may be difficult or impossible to clean them up.

GoogleTest has three features intended to raise awareness of threading issues.

1.  A warning is emitted if multiple threads are running when a death test is
    encountered.
2.  Test suites with a name ending in "DeathTest" are run before all other
    tests.
3.  It uses `clone()` instead of `fork()` to spawn the child process on Linux
    (`clone()` is not available on Cygwin and Mac), as `fork()` is more likely
    to cause the child to hang when the parent process has multiple threads.

It's perfectly fine to create threads inside a death test statement; they are
executed in a separate process and cannot affect the parent.

### Death Test Styles

The "threadsafe" death test style was introduced in order to help mitigate the
risks of testing in a possibly multithreaded environment. It trades increased
test execution time (potentially dramatically so) for improved thread safety.

The automated testing framework does not set the style flag. You can choose a
particular style of death tests by setting the flag programmatically:

```c++
GTEST_FLAG_SET(death_test_style, "threadsafe");
```

You can do this in `main()` to set the style for all death tests in the binary,
or in individual tests. Recall that flags are saved before running each test and
restored afterwards, so you need not do that yourself. For example:

```c++
int main(int argc, char** argv) {
  testing::InitGoogleTest(&argc, argv);
  GTEST_FLAG_SET(death_test_style, "fast");
  return RUN_ALL_TESTS();
}

TEST(MyDeathTest, TestOne) {
  GTEST_FLAG_SET(death_test_style, "threadsafe");
  // This test is run in the "threadsafe" style:
  ASSERT_DEATH(ThisShouldDie(), "");
}

TEST(MyDeathTest, TestTwo) {
  // This test is run in the "fast" style:
  ASSERT_DEATH(ThisShouldDie(), "");
}
```

### Caveats

The `statement` argument of `ASSERT_EXIT()` can be any valid C++ statement. If
it leaves the current function via a `return` statement or by throwing an
exception, the death test is considered to have failed. Some GoogleTest macros
may return from the current function (e.g. `ASSERT_TRUE()`), so be sure to avoid
them in `statement`.

Since `statement` runs in the child process, any in-memory side effect (e.g.
modifying a variable, releasing memory, etc) it causes will *not* be observable
in the parent process. In particular, if you release memory in a death test,
your program will fail the heap check as the parent process will never see the
memory reclaimed. To solve this problem, you can

1.  try not to free memory in a death test;
2.  free the memory again in the parent process; or
3.  do not use the heap checker in your program.

Due to an implementation detail, you cannot place multiple death test assertions
on the same line; otherwise, compilation will fail with an unobvious error
message.

Despite the improved thread safety afforded by the "threadsafe" style of death
test, thread problems such as deadlock are still possible in the presence of
handlers registered with `pthread_atfork(3)`.

## Using Assertions in Sub-routines

{: .callout .note}
Note: If you want to put a series of test assertions in a subroutine to check
for a complex condition, consider using
[a custom GMock matcher](gmock_cook_book.md#NewMatchers) instead. This lets you
provide a more readable error message in case of failure and avoid all of the
issues described below.

### Adding Traces to Assertions

If a test sub-routine is called from several places, when an assertion inside it
fails, it can be hard to tell which invocation of the sub-routine the failure is
from. You can alleviate this problem using extra logging or custom failure
messages, but that usually clutters up your tests. A better solution is to use
the `SCOPED_TRACE` macro or the `ScopedTrace` utility:

```c++
SCOPED_TRACE(message);
```

```c++
ScopedTrace trace("file_path", line_number, message);
```

where `message` can be anything streamable to `std::ostream`. `SCOPED_TRACE`
macro will cause the current file name, line number, and the given message to be
added in every failure message. `ScopedTrace` accepts explicit file name and
line number in arguments, which is useful for writing test helpers. The effect
will be undone when the control leaves the current lexical scope.

For example,

```c++
10: void Sub1(int n) {
11:   EXPECT_EQ(Bar(n), 1);
12:   EXPECT_EQ(Bar(n + 1), 2);
13: }
14:
15: TEST(FooTest, Bar) {
16:   {
17:     SCOPED_TRACE("A");  // This trace point will be included in
18:                         // every failure in this scope.
19:     Sub1(1);
20:   }
21:   // Now it won't.
22:   Sub1(9);
23: }
```

could result in messages like these:

```none
path/to/foo_test.cc:11: Failure
Value of: Bar(n)
Expected: 1
  Actual: 2
Google Test trace:
path/to/foo_test.cc:17: A

path/to/foo_test.cc:12: Failure
Value of: Bar(n + 1)
Expected: 2
  Actual: 3
```

Without the trace, it would've been difficult to know which invocation of
`Sub1()` the two failures come from respectively. (You could add an extra
message to each assertion in `Sub1()` to indicate the value of `n`, but that's
tedious.)

Some tips on using `SCOPED_TRACE`:

1.  With a suitable message, it's often enough to use `SCOPED_TRACE` at the
    beginning of a sub-routine, instead of at each call site.
2.  When calling sub-routines inside a loop, make the loop iterator part of the
    message in `SCOPED_TRACE` such that you can know which iteration the failure
    is from.
3.  Sometimes the line number of the trace point is enough for identifying the
    particular invocation of a sub-routine. In this case, you don't have to
    choose a unique message for `SCOPED_TRACE`. You can simply use `""`.
4.  You can use `SCOPED_TRACE` in an inner scope when there is one in the outer
    scope. In this case, all active trace points will be included in the failure
    messages, in reverse order they are encountered.
5.  The trace dump is clickable in Emacs - hit `return` on a line number and
    you'll be taken to that line in the source file!

### Propagating Fatal Failures

A common pitfall when using `ASSERT_*` and `FAIL*` is not understanding that
when they fail they only abort the *current function*, not the entire test. For
example, the following test will segfault:

```c++
void Subroutine() {
  // Generates a fatal failure and aborts the current function.
  ASSERT_EQ(1, 2);

  // The following won't be executed.
  ...
}

TEST(FooTest, Bar) {
  Subroutine();  // The intended behavior is for the fatal failure
                 // in Subroutine() to abort the entire test.

  // The actual behavior: the function goes on after Subroutine() returns.
  int* p = nullptr;
  *p = 3;  // Segfault!
}
```

To alleviate this, GoogleTest provides three different solutions. You could use
either exceptions, the `(ASSERT|EXPECT)_NO_FATAL_FAILURE` assertions or the
`HasFatalFailure()` function. They are described in the following two
subsections.

#### Asserting on Subroutines with an exception

The following code can turn ASSERT-failure into an exception:

```c++
class ThrowListener : public testing::EmptyTestEventListener {
  void OnTestPartResult(const testing::TestPartResult& result) override {
    if (result.type() == testing::TestPartResult::kFatalFailure) {
      throw testing::AssertionException(result);
    }
  }
};
int main(int argc, char** argv) {
  ...
  testing::UnitTest::GetInstance()->listeners().Append(new ThrowListener);
  return RUN_ALL_TESTS();
}
```

This listener should be added after other listeners if you have any, otherwise
they won't see failed `OnTestPartResult`.

#### Asserting on Subroutines

As shown above, if your test calls a subroutine that has an `ASSERT_*` failure
in it, the test will continue after the subroutine returns. This may not be what
you want.

Often people want fatal failures to propagate like exceptions. For that
GoogleTest offers the following macros:

Fatal assertion                       | Nonfatal assertion                    | Verifies
------------------------------------- | ------------------------------------- | --------
`ASSERT_NO_FATAL_FAILURE(statement);` | `EXPECT_NO_FATAL_FAILURE(statement);` | `statement` doesn't generate any new fatal failures in the current thread.

Only failures in the thread that executes the assertion are checked to determine
the result of this type of assertions. If `statement` creates new threads,
failures in these threads are ignored.

Examples:

```c++
ASSERT_NO_FATAL_FAILURE(Foo());

int i;
EXPECT_NO_FATAL_FAILURE({
  i = Bar();
});
```

Assertions from multiple threads are currently not supported on Windows.

#### Checking for Failures in the Current Test

`HasFatalFailure()` in the `::testing::Test` class returns `true` if an
assertion in the current test has suffered a fatal failure. This allows
functions to catch fatal failures in a sub-routine and return early.

```c++
class Test {
 public:
  ...
  static bool HasFatalFailure();
};
```

The typical usage, which basically simulates the behavior of a thrown exception,
is:

```c++
TEST(FooTest, Bar) {
  Subroutine();
  // Aborts if Subroutine() had a fatal failure.
  if (HasFatalFailure()) return;

  // The following won't be executed.
  ...
}
```

If `HasFatalFailure()` is used outside of `TEST()` , `TEST_F()` , or a test
fixture, you must add the `::testing::Test::` prefix, as in:

```c++
if (testing::Test::HasFatalFailure()) return;
```

Similarly, `HasNonfatalFailure()` returns `true` if the current test has at
least one non-fatal failure, and `HasFailure()` returns `true` if the current
test has at least one failure of either kind.

## Logging Additional Information

In your test code, you can call `RecordProperty("key", value)` to log additional
information, where `value` can be either a string or an `int`. The *last* value
recorded for a key will be emitted to the
[XML output](#generating-an-xml-report) if you specify one. For example, the
test

```c++
TEST_F(WidgetUsageTest, MinAndMaxWidgets) {
  RecordProperty("MaximumWidgets", ComputeMaxUsage());
  RecordProperty("MinimumWidgets", ComputeMinUsage());
}
```

will output XML like this:

```xml
  ...
    <testcase name="MinAndMaxWidgets" file="test.cpp" line="1" status="run" time="0.006" classname="WidgetUsageTest" MaximumWidgets="12" MinimumWidgets="9" />
  ...
```

{: .callout .note}
> NOTE:
>
> *   `RecordProperty()` is a static member of the `Test` class. Therefore it
>     needs to be prefixed with `::testing::Test::` if used outside of the
>     `TEST` body and the test fixture class.
> *   *`key`* must be a valid XML attribute name, and cannot conflict with the
>     ones already used by GoogleTest (`name`, `status`, `time`, `classname`,
>     `type_param`, and `value_param`).
> *   Calling `RecordProperty()` outside of the lifespan of a test is allowed.
>     If it's called outside of a test but between a test suite's
>     `SetUpTestSuite()` and `TearDownTestSuite()` methods, it will be
>     attributed to the XML element for the test suite. If it's called outside
>     of all test suites (e.g. in a test environment), it will be attributed to
>     the top-level XML element.

## Sharing Resources Between Tests in the Same Test Suite

GoogleTest creates a new test fixture object for each test in order to make
tests independent and easier to debug. However, sometimes tests use resources
that are expensive to set up, making the one-copy-per-test model prohibitively
expensive.

If the tests don't change the resource, there's no harm in their sharing a
single resource copy. So, in addition to per-test set-up/tear-down, GoogleTest
also supports per-test-suite set-up/tear-down. To use it:

1.  In your test fixture class (say `FooTest` ), declare as `static` some member
    variables to hold the shared resources.
2.  Outside your test fixture class (typically just below it), define those
    member variables, optionally giving them initial values.
3.  In the same test fixture class, define a public member function `static void
    SetUpTestSuite()` (remember not to spell it as **`SetupTestSuite`** with a
    small `u`!) to set up the shared resources and a `static void
    TearDownTestSuite()` function to tear them down.

That's it! GoogleTest automatically calls `SetUpTestSuite()` before running the
*first test* in the `FooTest` test suite (i.e. before creating the first
`FooTest` object), and calls `TearDownTestSuite()` after running the *last test*
in it (i.e. after deleting the last `FooTest` object). In between, the tests can
use the shared resources.

Remember that the test order is undefined, so your code can't depend on a test
preceding or following another. Also, the tests must either not modify the state
of any shared resource, or, if they do modify the state, they must restore the
state to its original value before passing control to the next test.

Note that `SetUpTestSuite()` may be called multiple times for a test fixture
class that has derived classes, so you should not expect code in the function
body to be run only once. Also, derived classes still have access to shared
resources defined as static members, so careful consideration is needed when
managing shared resources to avoid memory leaks if shared resources are not
properly cleaned up in `TearDownTestSuite()`.

Here's an example of per-test-suite set-up and tear-down:

```c++
class FooTest : public testing::Test {
 protected:
  // Per-test-suite set-up.
  // Called before the first test in this test suite.
  // Can be omitted if not needed.
  static void SetUpTestSuite() {
    shared_resource_ = new ...;

    // If `shared_resource_` is **not deleted** in `TearDownTestSuite()`,
    // reallocation should be prevented because `SetUpTestSuite()` may be called
    // in subclasses of FooTest and lead to memory leak.
    //
    // if (shared_resource_ == nullptr) {
    //   shared_resource_ = new ...;
    // }
  }

  // Per-test-suite tear-down.
  // Called after the last test in this test suite.
  // Can be omitted if not needed.
  static void TearDownTestSuite() {
    delete shared_resource_;
    shared_resource_ = nullptr;
  }

  // You can define per-test set-up logic as usual.
  void SetUp() override { ... }

  // You can define per-test tear-down logic as usual.
  void TearDown() override { ... }

  // Some expensive resource shared by all tests.
  static T* shared_resource_;
};

T* FooTest::shared_resource_ = nullptr;

TEST_F(FooTest, Test1) {
  ... you can refer to shared_resource_ here ...
}

TEST_F(FooTest, Test2) {
  ... you can refer to shared_resource_ here ...
}
```

{: .callout .note}
NOTE: Though the above code declares `SetUpTestSuite()` protected, it may
sometimes be necessary to declare it public, such as when using it with
`TEST_P`.

## Global Set-Up and Tear-Down

Just as you can do set-up and tear-down at the test level and the test suite
level, you can also do it at the test program level. Here's how.

First, you subclass the `::testing::Environment` class to define a test
environment, which knows how to set-up and tear-down:

```c++
class Environment : public ::testing::Environment {
 public:
  ~Environment() override {}

  // Override this to define how to set up the environment.
  void SetUp() override {}

  // Override this to define how to tear down the environment.
  void TearDown() override {}
};
```

Then, you register an instance of your environment class with GoogleTest by
calling the `::testing::AddGlobalTestEnvironment()` function:

```c++
Environment* AddGlobalTestEnvironment(Environment* env);
```

Now, when `RUN_ALL_TESTS()` is invoked, it first calls the `SetUp()` method. The
tests are then executed, provided that none of the environments have reported
fatal failures and `GTEST_SKIP()` has not been invoked. Finally, `TearDown()` is
called.

Note that `SetUp()` and `TearDown()` are only invoked if there is at least one
test to be performed. Importantly, `TearDown()` is executed even if the test is
not run due to a fatal failure or `GTEST_SKIP()`.

Calling `SetUp()` and `TearDown()` for each iteration depends on the flag
`gtest_recreate_environments_when_repeating`. `SetUp()` and `TearDown()` are
called for each environment object when the object is recreated for each
iteration. However, if test environments are not recreated for each iteration,
`SetUp()` is called only on the first iteration, and `TearDown()` is called only
on the last iteration.

It's OK to register multiple environment objects. In this suite, their `SetUp()`
will be called in the order they are registered, and their `TearDown()` will be
called in the reverse order.

Note that GoogleTest takes ownership of the registered environment objects.
Therefore **do not delete them** by yourself.

You should call `AddGlobalTestEnvironment()` before `RUN_ALL_TESTS()` is called,
probably in `main()`. If you use `gtest_main`, you need to call this before
`main()` starts for it to take effect. One way to do this is to define a global
variable like this:

```c++
testing::Environment* const foo_env =
    testing::AddGlobalTestEnvironment(new FooEnvironment);
```

However, we strongly recommend you to write your own `main()` and call
`AddGlobalTestEnvironment()` there, as relying on initialization of global
variables makes the code harder to read and may cause problems when you register
multiple environments from different translation units and the environments have
dependencies among them (remember that the compiler doesn't guarantee the order
in which global variables from different translation units are initialized).

## Value-Parameterized Tests

*Value-parameterized tests* allow you to test your code with different
parameters without writing multiple copies of the same test. This is useful in a
number of situations, for example:

*   You have a piece of code whose behavior is affected by one or more
    command-line flags. You want to make sure your code performs correctly for
    various values of those flags.
*   You want to test different implementations of an OO interface.
*   You want to test your code over various inputs (a.k.a. data-driven testing).
    This feature is easy to abuse, so please exercise your good sense when doing
    it!

### How to Write Value-Parameterized Tests

To write value-parameterized tests, first you should define a fixture class. It
must be derived from both `testing::Test` and `testing::WithParamInterface<T>`
(the latter is a pure interface), where `T` is the type of your parameter
values. For convenience, you can just derive the fixture class from
`testing::TestWithParam<T>`, which itself is derived from both `testing::Test`
and `testing::WithParamInterface<T>`. `T` can be any copyable type. If it's a
raw pointer, you are responsible for managing the lifespan of the pointed
values.

{: .callout .note}
NOTE: If your test fixture defines `SetUpTestSuite()` or `TearDownTestSuite()`
they must be declared **public** rather than **protected** in order to use
`TEST_P`.

```c++
class FooTest :
    public testing::TestWithParam<absl::string_view> {
  // You can implement all the usual fixture class members here.
  // To access the test parameter, call GetParam() from class
  // TestWithParam<T>.
};

// Or, when you want to add parameters to a pre-existing fixture class:
class BaseTest : public testing::Test {
  ...
};
class BarTest : public BaseTest,
                public testing::WithParamInterface<absl::string_view> {
  ...
};
```

Then, use the `TEST_P` macro to define as many test patterns using this fixture
as you want. The `_P` suffix is for "parameterized" or "pattern", whichever you
prefer to think.

```c++
TEST_P(FooTest, DoesBlah) {
  // Inside a test, access the test parameter with the GetParam() method
  // of the TestWithParam<T> class:
  EXPECT_TRUE(foo.Blah(GetParam()));
  ...
}

TEST_P(FooTest, HasBlahBlah) {
  ...
}
```

Finally, you can use the `INSTANTIATE_TEST_SUITE_P` macro to instantiate the
test suite with any set of parameters you want. GoogleTest defines a number of
functions for generating test parameters—see details at
[`INSTANTIATE_TEST_SUITE_P`](reference/testing.md#INSTANTIATE_TEST_SUITE_P) in
the Testing Reference.

For example, the following statement will instantiate tests from the `FooTest`
test suite each with parameter values `"meeny"`, `"miny"`, and `"moe"` using the
[`Values`](reference/testing.md#param-generators) parameter generator:

```c++
INSTANTIATE_TEST_SUITE_P(MeenyMinyMoe,
                         FooTest,
                         testing::Values("meeny", "miny", "moe"));
```

{: .callout .note}
NOTE: The code above must be placed at global or namespace scope, not at
function scope.

The first argument to `INSTANTIATE_TEST_SUITE_P` is a unique name for the
instantiation of the test suite. The next argument is the name of the test
pattern, and the last is the
[parameter generator](reference/testing.md#param-generators).

The parameter generator expression is not evaluated until GoogleTest is
initialized (via `InitGoogleTest()`). Any prior initialization done in the
`main` function will be accessible from the parameter generator, for example,
the results of flag parsing.

You can instantiate a test pattern more than once, so to distinguish different
instances of the pattern, the instantiation name is added as a prefix to the
actual test suite name. Remember to pick unique prefixes for different
instantiations. The tests from the instantiation above will have these names:

*   `MeenyMinyMoe/FooTest.DoesBlah/0` for `"meeny"`
*   `MeenyMinyMoe/FooTest.DoesBlah/1` for `"miny"`
*   `MeenyMinyMoe/FooTest.DoesBlah/2` for `"moe"`
*   `MeenyMinyMoe/FooTest.HasBlahBlah/0` for `"meeny"`
*   `MeenyMinyMoe/FooTest.HasBlahBlah/1` for `"miny"`
*   `MeenyMinyMoe/FooTest.HasBlahBlah/2` for `"moe"`

You can use these names in [`--gtest_filter`](#running-a-subset-of-the-tests).

The following statement will instantiate all tests from `FooTest` again, each
with parameter values `"cat"` and `"dog"` using the
[`ValuesIn`](reference/testing.md#param-generators) parameter generator:

```c++
constexpr absl::string_view kPets[] = {"cat", "dog"};
INSTANTIATE_TEST_SUITE_P(Pets, FooTest, testing::ValuesIn(kPets));
```

The tests from the instantiation above will have these names:

*   `Pets/FooTest.DoesBlah/0` for `"cat"`
*   `Pets/FooTest.DoesBlah/1` for `"dog"`
*   `Pets/FooTest.HasBlahBlah/0` for `"cat"`
*   `Pets/FooTest.HasBlahBlah/1` for `"dog"`

Please note that `INSTANTIATE_TEST_SUITE_P` will instantiate *all* tests in the
given test suite, whether their definitions come before or *after* the
`INSTANTIATE_TEST_SUITE_P` statement.

Additionally, by default, every `TEST_P` without a corresponding
`INSTANTIATE_TEST_SUITE_P` causes a failing test in test suite
`GoogleTestVerification`. If you have a test suite where that omission is not an
error, for example it is in a library that may be linked in for other reasons or
where the list of test cases is dynamic and may be empty, then this check can be
suppressed by tagging the test suite:

```c++
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/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

In the above, we define and instantiate `FooTest` in the *same* source file.
Sometimes you may want to define value-parameterized tests in a library and let
other people instantiate them later. This pattern is known as *abstract tests*.
As an example of its application, when you are designing an interface you can
write a standard suite of abstract tests (perhaps using a factory function as
the test parameter) that all implementations of the interface are expected to
pass. When someone implements the interface, they can instantiate your suite to
get all the interface-conformance tests for free.

To define abstract tests, you should organize your code like this:

1.  Put the definition of the parameterized test fixture class (e.g. `FooTest`)
    in a header file, say `foo_param_test.h`. Think of this as *declaring* your
    abstract tests.
2.  Put the `TEST_P` definitions in `foo_param_test.cc`, which includes
    `foo_param_test.h`. Think of this as *implementing* your abstract tests.

Once they are defined, you can instantiate them by including `foo_param_test.h`,
invoking `INSTANTIATE_TEST_SUITE_P()`, and depending on the library target that
contains `foo_param_test.cc`. You can instantiate the same abstract test suite
multiple times, possibly in different source files.

### Specifying Names for Value-Parameterized Test Parameters

The optional last argument to `INSTANTIATE_TEST_SUITE_P()` allows the user to
specify a function or functor that generates custom test name suffixes based on
the test parameters. The function should accept one argument of type
`testing::TestParamInfo<class ParamType>`, and return `std::string`.

`testing::PrintToStringParamName` is a builtin test suffix generator that
returns the value of `testing::PrintToString(GetParam())`. It does not work for
`std::string` or C strings.

{: .callout .note}
NOTE: test names must be non-empty, unique, and may only contain ASCII
alphanumeric characters. In particular, they
[should not contain underscores](faq.md#why-should-test-suite-names-and-test-names-not-contain-underscore)

```c++
class MyTestSuite : public testing::TestWithParam<int> {};

TEST_P(MyTestSuite, MyTest)
{
  std::cout << "Example Test Param: " << GetParam() << std::endl;
}

INSTANTIATE_TEST_SUITE_P(MyGroup, MyTestSuite, testing::Range(0, 10),
                         testing::PrintToStringParamName());
```

Providing a custom functor allows for more control over test parameter name
generation, especially for types where the automatic conversion does not
generate helpful parameter names (e.g. strings as demonstrated above). The
following example illustrates this for multiple parameters, an enumeration type
and a string, and also demonstrates how to combine generators. It uses a lambda
for conciseness:

```c++
enum class MyType { MY_FOO = 0, MY_BAR = 1 };

class MyTestSuite : public testing::TestWithParam<std::tuple<MyType, std::string>> {
};

INSTANTIATE_TEST_SUITE_P(
    MyGroup, MyTestSuite,
    testing::Combine(
        testing::Values(MyType::MY_FOO, MyType::MY_BAR),
        testing::Values("A", "B")),
    [](const testing::TestParamInfo<MyTestSuite::ParamType>& info) {
      std::string name = absl::StrCat(
          std::get<0>(info.param) == MyType::MY_FOO ? "Foo" : "Bar",
          std::get<1>(info.param));
      absl::c_replace_if(name, [](char c) { return !std::isalnum(c); }, '_');
      return name;
    });
```

## Typed Tests

Suppose you have multiple implementations of the same interface and want to make
sure that all of them satisfy some common requirements. Or, you may have defined
several types that are supposed to conform to the same "concept" and you want to
verify it. In both cases, you want the same test logic repeated for different
types.

While you can write one `TEST` or `TEST_F` for each type you want to test (and
you may even factor the test logic into a function template that you invoke from
the `TEST`), it's tedious and doesn't scale: if you want `m` tests over `n`
types, you'll end up writing `m*n` `TEST`s.

*Typed tests* allow you to repeat the same test logic over a list of types. You
only need to write the test logic once, although you must know the type list
when writing typed tests. Here's how you do it:

First, define a fixture class template. It should be parameterized by a type.
Remember to derive it from `::testing::Test`:

```c++
template <typename T>
class FooTest : public testing::Test {
 public:
  ...
  using List = std::list<T>;
  static T shared_;
  T value_;
};
```

Next, associate a list of types with the test suite, which will be repeated for
each type in the list:

```c++
using MyTypes = ::testing::Types<char, int, unsigned int>;
TYPED_TEST_SUITE(FooTest, MyTypes);
```

The type alias (`using` or `typedef`) is necessary for the `TYPED_TEST_SUITE`
macro to parse correctly. Otherwise the compiler will think that each comma in
the type list introduces a new macro argument.

Then, use `TYPED_TEST()` instead of `TEST_F()` to define a typed test for this
test suite. You can repeat this as many times as you want:

```c++
TYPED_TEST(FooTest, DoesBlah) {
  // Inside a test, refer to the special name TypeParam to get the type
  // parameter.  Since we are inside a derived class template, C++ requires
  // us to visit the members of FooTest via 'this'.
  TypeParam n = this->value_;

  // To visit static members of the fixture, add the 'TestFixture::'
  // prefix.
  n += TestFixture::shared_;

  // To refer to typedefs in the fixture, add the 'typename TestFixture::'
  // prefix.  The 'typename' is required to satisfy the compiler.
  typename TestFixture::List values;

  values.push_back(n);
  ...
}

TYPED_TEST(FooTest, HasPropertyA) { ... }
```

You can see [sample6_unittest.cc] for a complete example.

[sample6_unittest.cc]: https://github.com/google/googletest/blob/main/googletest/samples/sample6_unittest.cc "Typed Test example"

## Type-Parameterized Tests

*Type-parameterized tests* are like typed tests, except that they don't require
you to know the list of types ahead of time. Instead, you can define the test
logic first and instantiate it with different type lists later. You can even
instantiate it more than once in the same program.

If you are designing an interface or concept, you can define a suite of
type-parameterized tests to verify properties that any valid implementation of
the interface/concept should have. Then, the author of each implementation can
just instantiate the test suite with their type to verify that it conforms to
the requirements, without having to write similar tests repeatedly. Here's an
example:

First, define a fixture class template, as we did with typed tests:

```c++
template <typename T>
class FooTest : public testing::Test {
  void DoSomethingInteresting();
  ...
};
```

Next, declare that you will define a type-parameterized test suite:

```c++
TYPED_TEST_SUITE_P(FooTest);
```

Then, use `TYPED_TEST_P()` to define a type-parameterized test. You can repeat
this as many times as you want:

```c++
TYPED_TEST_P(FooTest, DoesBlah) {
  // Inside a test, refer to TypeParam to get the type parameter.
  TypeParam n = 0;

  // You will need to use `this` explicitly to refer to fixture members.
  this->DoSomethingInteresting()
  ...
}

TYPED_TEST_P(FooTest, HasPropertyA) { ... }
```

Now the tricky part: you need to register all test patterns using the
`REGISTER_TYPED_TEST_SUITE_P` macro before you can instantiate them. The first
argument of the macro is the test suite name; the rest are the names of the
tests in this test suite:

```c++
REGISTER_TYPED_TEST_SUITE_P(FooTest,
                            DoesBlah, HasPropertyA);
```

Finally, you are free to instantiate the pattern with the types you want. If you
put the above code in a header file, you can `#include` it in multiple C++
source files and instantiate it multiple times.

```c++
using MyTypes = ::testing::Types<char, int, unsigned int>;
INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes);
```

To distinguish different instances of the pattern, the first argument to the
`INSTANTIATE_TYPED_TEST_SUITE_P` macro is a prefix that will be added to the
actual test suite name. Remember to pick unique prefixes for different
instances.

In the special case where the type list contains only one type, you can write
that type directly without `::testing::Types<...>`, like this:

```c++
INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, int);
```

You can see [sample6_unittest.cc] for a complete example.

## Testing Private Code

If you change your software's internal implementation, your tests should not
break as long as the change is not observable by users. Therefore, **per the
black-box testing principle, most of the time you should test your code through
its public interfaces.**

**If you still find yourself needing to test internal implementation code,
consider if there's a better design.** The desire to test internal
implementation is often a sign that the class is doing too much. Consider
extracting an implementation class, and testing it. Then use that implementation
class in the original class.

If you absolutely have to test non-public interface code though, you can. There
are two cases to consider:

*   Static functions ( *not* the same as static member functions!) or unnamed
    namespaces, and
*   Private or protected class members

To test them, we use the following special techniques:

*   Both static functions and definitions/declarations in an unnamed namespace
    are only visible within the same translation unit. To test them, move the
    private code into the `foo::internal` namespace, where `foo` is the
    namespace your project normally uses, and put the private declarations in a
    `*-internal.h` file. Your production `.cc` files and your tests are allowed
    to include this internal header, but your clients are not. This way, you can
    fully test your internal implementation without leaking it to your clients.

{: .callout .note}
NOTE: It is also technically *possible* to `#include` the entire `.cc` file
being tested in your `*_test.cc` file to test static functions and
definitions/declarations in an unnamed namespace. However, this technique is
**not recommended** by this documentation and it is only presented here for the
sake of completeness.

*   Private class members are only accessible from within the class or by
    friends. To access a class' private members, you can declare your test
    fixture as a friend to the class and define accessors in your fixture. Tests
    using the fixture can then access the private members of your production
    class via the accessors in the fixture. Note that even though your fixture
    is a friend to your production class, your tests are not automatically
    friends to it, as they are technically defined in sub-classes of the
    fixture.

    Another way to test private members is to refactor them into an
    implementation class, which is then declared in a `*-internal.h` file. Your
    clients aren't allowed to include this header but your tests can.

    Or, you can declare an individual test as a friend of your class by adding
    this line in the class body:

    ```c++
        FRIEND_TEST(TestSuiteName, TestName);
    ```

    For example,

    ```c++
    // foo.h
    class Foo {
      ...
     private:
      FRIEND_TEST(FooTest, BarReturnsZeroOnNull);

      int Bar(void* x);
    };

    // foo_test.cc
    ...
    TEST(FooTest, BarReturnsZeroOnNull) {
      Foo foo;
      EXPECT_EQ(foo.Bar(NULL), 0);  // Uses Foo's private member Bar().
    }
    ```

    Pay special attention when your class is defined in a namespace. If you want
    your test fixtures and tests to be friends of your class, then they must be
    defined in the exact same namespace (no anonymous or inline namespaces).

    For example, if the code to be tested looks like:

    ```c++
    namespace my_namespace {

    class Foo {
      friend class FooTest;
      FRIEND_TEST(FooTest, Bar);
      FRIEND_TEST(FooTest, Baz);
      ... definition of the class Foo ...
    };

    }  // namespace my_namespace
    ```

    Your test code should be something like:

    ```c++
    namespace my_namespace {

    class FooTest : public testing::Test {
     protected:
      ...
    };

    TEST_F(FooTest, Bar) { ... }
    TEST_F(FooTest, Baz) { ... }

    }  // namespace my_namespace
    ```

## "Catching" Failures

If you are building a testing utility on top of GoogleTest, you'll want to test
your utility. What framework would you use to test it? GoogleTest, of course.

The challenge is to verify that your testing utility reports failures correctly.
In frameworks that report a failure by throwing an exception, you could catch
the exception and assert on it. But GoogleTest doesn't use exceptions, so how do
we test that a piece of code generates an expected failure?

`"gtest/gtest-spi.h"` contains some constructs to do this.
After #including this header, you can use

```c++
  EXPECT_FATAL_FAILURE(statement, substring);
```

to assert that `statement` generates a fatal (e.g. `ASSERT_*`) failure in the
current thread whose message contains the given `substring`, or use

```c++
  EXPECT_NONFATAL_FAILURE(statement, substring);
```

if you are expecting a non-fatal (e.g. `EXPECT_*`) failure.

Only failures in the current thread are checked to determine the result of this
type of expectations. If `statement` creates new threads, failures in these
threads are also ignored. If you want to catch failures in other threads as
well, use one of the following macros instead:

```c++
  EXPECT_FATAL_FAILURE_ON_ALL_THREADS(statement, substring);
  EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(statement, substring);
```

{: .callout .note}
NOTE: Assertions from multiple threads are currently not supported on Windows.

For technical reasons, there are some caveats:

1.  You cannot stream a failure message to either macro.

2.  `statement` in `EXPECT_FATAL_FAILURE{_ON_ALL_THREADS}()` cannot reference
    local non-static variables or non-static members of `this` object.

3.  `statement` in `EXPECT_FATAL_FAILURE{_ON_ALL_THREADS}()` cannot return a
    value.

## Registering tests programmatically

The `TEST` macros handle the vast majority of all use cases, but there are few
where runtime registration logic is required. For those cases, the framework
provides the `::testing::RegisterTest` that allows callers to register arbitrary
tests dynamically.

This is an advanced API only to be used when the `TEST` macros are insufficient.
The macros should be preferred when possible, as they avoid most of the
complexity of calling this function.

It provides the following signature:

```c++
template <typename Factory>
TestInfo* RegisterTest(const char* test_suite_name, const char* test_name,
                       const char* type_param, const char* value_param,
                       const char* file, int line, Factory factory);
```

The `factory` argument is a factory callable (move-constructible) object or
function pointer that creates a new instance of the Test object. It handles
ownership to the caller. The signature of the callable is `Fixture*()`, where
`Fixture` is the test fixture class for the test. All tests registered with the
same `test_suite_name` must return the same fixture type. This is checked at
runtime.

The framework will infer the fixture class from the factory and will call the
`SetUpTestSuite` and `TearDownTestSuite` for it.

Must be called before `RUN_ALL_TESTS()` is invoked, otherwise behavior is
undefined.

Use case example:

```c++
class MyFixture : public testing::Test {
 public:
  // All of these optional, just like in regular macro usage.
  static void SetUpTestSuite() { ... }
  static void TearDownTestSuite() { ... }
  void SetUp() override { ... }
  void TearDown() override { ... }
};

class MyTest : public MyFixture {
 public:
  explicit MyTest(int data) : data_(data) {}
  void TestBody() override { ... }

 private:
  int data_;
};

void RegisterMyTests(const std::vector<int>& values) {
  for (int v : values) {
    testing::RegisterTest(
        "MyFixture", ("Test" + std::to_string(v)).c_str(), nullptr,
        std::to_string(v).c_str(),
        __FILE__, __LINE__,
        // Important to use the fixture type as the return type here.
        [=]() -> MyFixture* { return new MyTest(v); });
  }
}
...
int main(int argc, char** argv) {
  testing::InitGoogleTest(&argc, argv);
  std::vector<int> values_to_test = LoadValuesFromConfig();
  RegisterMyTests(values_to_test);
  ...
  return RUN_ALL_TESTS();
}
```

## Getting the Current Test's Name

Sometimes a function may need to know the name of the currently running test.
For example, you may be using the `SetUp()` method of your test fixture to set
the golden file name based on which test is running. The
[`TestInfo`](reference/testing.md#TestInfo) class has this information.

To obtain a `TestInfo` object for the currently running test, call
`current_test_info()` on the [`UnitTest`](reference/testing.md#UnitTest)
singleton object:

```c++
  // Gets information about the currently running test.
  // Do NOT delete the returned object - it's managed by the UnitTest class.
  const testing::TestInfo* const test_info =
      testing::UnitTest::GetInstance()->current_test_info();

  printf("We are in test %s of test suite %s.\n",
         test_info->name(),
         test_info->test_suite_name());
```

`current_test_info()` returns a null pointer if no test is running. In
particular, you cannot find the test suite name in `SetUpTestSuite()`,
`TearDownTestSuite()` (where you know the test suite name implicitly), or
functions called from them.

## Extending GoogleTest by Handling Test Events

GoogleTest provides an **event listener API** to let you receive notifications
about the progress of a test program and test failures. The events you can
listen to include the start and end of the test program, a test suite, or a test
method, among others. You may use this API to augment or replace the standard
console output, replace the XML output, or provide a completely different form
of output, such as a GUI or a database. You can also use test events as
checkpoints to implement a resource leak checker, for example.

### Defining Event Listeners

To define a event listener, you subclass either
[`testing::TestEventListener`](reference/testing.md#TestEventListener) or
[`testing::EmptyTestEventListener`](reference/testing.md#EmptyTestEventListener)
The former is an (abstract) interface, where *each pure virtual method can be
overridden to handle a test event* (For example, when a test starts, the
`OnTestStart()` method will be called.). The latter provides an empty
implementation of all methods in the interface, such that a subclass only needs
to override the methods it cares about.

When an event is fired, its context is passed to the handler function as an
argument. The following argument types are used:

*   UnitTest reflects the state of the entire test program,
*   TestSuite has information about a test suite, which can contain one or more
    tests,
*   TestInfo contains the state of a test, and
*   TestPartResult represents the result of a test assertion.

An event handler function can examine the argument it receives to find out
interesting information about the event and the test program's state.

Here's an example:

```c++
  class MinimalistPrinter : public testing::EmptyTestEventListener {
    // Called before a test starts.
    void OnTestStart(const testing::TestInfo& test_info) override {
      printf("*** Test %s.%s starting.\n",
             test_info.test_suite_name(), test_info.name());
    }

    // Called after a failed assertion or a SUCCESS().
    void OnTestPartResult(const testing::TestPartResult& test_part_result) override {
      printf("%s in %s:%d\n%s\n",
             test_part_result.failed() ? "*** Failure" : "Success",
             test_part_result.file_name(),
             test_part_result.line_number(),
             test_part_result.summary());
    }

    // Called after a test ends.
    void OnTestEnd(const testing::TestInfo& test_info) override {
      printf("*** Test %s.%s ending.\n",
             test_info.test_suite_name(), test_info.name());
    }
  };
```

### Using Event Listeners

To use the event listener you have defined, add an instance of it to the
GoogleTest event listener list (represented by class
[`TestEventListeners`](reference/testing.md#TestEventListeners) - note the "s"
at the end of the name) in your `main()` function, before calling
`RUN_ALL_TESTS()`:

```c++
int main(int argc, char** argv) {
  testing::InitGoogleTest(&argc, argv);
  // Gets hold of the event listener list.
  testing::TestEventListeners& listeners =
      testing::UnitTest::GetInstance()->listeners();
  // Adds a listener to the end.  GoogleTest takes the ownership.
  listeners.Append(new MinimalistPrinter);
  return RUN_ALL_TESTS();
}
```

There's only one problem: the default test result printer is still in effect, so
its output will mingle with the output from your minimalist printer. To suppress
the default printer, just release it from the event listener list and delete it.
You can do so by adding one line:

```c++
  ...
  delete listeners.Release(listeners.default_result_printer());
  listeners.Append(new MinimalistPrinter);
  return RUN_ALL_TESTS();
```

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/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
they appear in the list (since new listeners are added to the end of the list,
the default text printer and the default XML generator will receive the event
first). An `On*End()` event will be received by the listeners in the *reverse*
order. This allows output by listeners added later to be framed by output from
listeners added earlier.

### Generating Failures in Listeners

You may use failure-raising macros (`EXPECT_*()`, `ASSERT_*()`, `FAIL()`, etc)
when processing an event. There are some restrictions:

1.  You cannot generate any failure in `OnTestPartResult()` (otherwise it will
    cause `OnTestPartResult()` to be called recursively).
2.  A listener that handles `OnTestPartResult()` is not allowed to generate any
    failure.

When you add listeners to the listener list, you should put listeners that
handle `OnTestPartResult()` *before* listeners that can generate failures. This
ensures that failures generated by the latter are attributed to the right test
by the former.

See [sample10_unittest.cc] for an example of a failure-raising listener.

[sample10_unittest.cc]: https://github.com/google/googletest/blob/main/googletest/samples/sample10_unittest.cc "Failure-raising listener example"

## Running Test Programs: Advanced Options

GoogleTest test programs are ordinary executables. Once built, you can run them
directly and affect their behavior via the following environment variables
and/or command line flags. For the flags to work, your programs must call
`::testing::InitGoogleTest()` before calling `RUN_ALL_TESTS()`.

To see a list of supported flags and their usage, please run your test program
with the `--help` flag.

If an option is specified both by an environment variable and by a flag, the
latter takes precedence.

### Selecting Tests

#### Listing Test Names

Sometimes it is necessary to list the available tests in a program before
running them so that a filter may be applied if needed. Including the flag
`--gtest_list_tests` overrides all other flags and lists tests in the following
format:

```none
TestSuite1.
  TestName1
  TestName2
TestSuite2.
  TestName
```

None of the tests listed are actually run if the flag is provided. There is no
corresponding environment variable for this flag.

#### Running a Subset of the Tests

By default, a GoogleTest program runs all tests the user has defined. Sometimes,
you want to run only a subset of the tests (e.g. for debugging or quickly
verifying a change). If you set the `GTEST_FILTER` environment variable or the
`--gtest_filter` flag to a filter string, GoogleTest will only run the tests
whose full names (in the form of `TestSuiteName.TestName`) match the filter.

The format of a filter is a '`:`'-separated list of wildcard patterns (called
the *positive patterns*) optionally followed by a '`-`' and another
'`:`'-separated pattern list (called the *negative patterns*). A test matches
the filter if and only if it matches any of the positive patterns but does not
match any of the negative patterns.

A pattern may contain `'*'` (matches any string) or `'?'` (matches any single
character). For convenience, the filter `'*-NegativePatterns'` can be also
written as `'-NegativePatterns'`.

For example:

*   `./foo_test` Has no flag, and thus runs all its tests.
*   `./foo_test --gtest_filter=*` Also runs everything, due to the single
    match-everything `*` value.
*   `./foo_test --gtest_filter=FooTest.*` Runs everything in test suite
    `FooTest` .
*   `./foo_test --gtest_filter=*Null*:*Constructor*` Runs any test whose full
    name contains either `"Null"` or `"Constructor"` .
*   `./foo_test --gtest_filter=-*DeathTest.*` Runs all non-death tests.
*   `./foo_test --gtest_filter=FooTest.*-FooTest.Bar` Runs everything in test
    suite `FooTest` except `FooTest.Bar`.
*   `./foo_test --gtest_filter=FooTest.*:BarTest.*-FooTest.Bar:BarTest.Foo` Runs
    everything in test suite `FooTest` except `FooTest.Bar` and everything in
    test suite `BarTest` except `BarTest.Foo`.

#### Stop test execution upon first failure

By default, a GoogleTest program runs all tests the user has defined. In some
cases (e.g. iterative test development & execution) it may be desirable stop
test execution upon first failure (trading improved latency for completeness).
If `GTEST_FAIL_FAST` environment variable or `--gtest_fail_fast` flag is set,
the test runner will stop execution as soon as the first test failure is found.

#### Temporarily Disabling Tests

If you have a broken test that you cannot fix right away, you can add the
`DISABLED_` prefix to its name. This will exclude it from execution. This is
better than commenting out the code or using `#if 0`, as disabled tests are
still compiled (and thus won't rot).

If you need to disable all tests in a test suite, you can either add `DISABLED_`
to the front of the name of each test, or alternatively add it to the front of
the test suite name.

For example, the following tests won't be run by GoogleTest, even though they
will still be compiled:

```c++
// Tests that Foo does Abc.
TEST(FooTest, DISABLED_DoesAbc) { ... }

class DISABLED_BarTest : public testing::Test { ... };

// Tests that Bar does Xyz.
TEST_F(DISABLED_BarTest, DoesXyz) { ... }
```

{: .callout .note}
NOTE: This feature should only be used for temporary pain-relief. You still have
to fix the disabled tests at a later date. As a reminder, GoogleTest will print
a banner warning you if a test program contains any disabled tests.

{: .callout .tip}
TIP: You can easily count the number of disabled tests you have using
`grep`. This number can be used as a metric for
improving your test quality.

#### Temporarily Enabling Disabled Tests

To include disabled tests in test execution, just invoke the test program with
the `--gtest_also_run_disabled_tests` flag or set the
`GTEST_ALSO_RUN_DISABLED_TESTS` environment variable to a value other than `0`.
You can combine this with the `--gtest_filter` flag to further select which
disabled tests to run.

### Enforcing Having At Least One Test Case

A not uncommon programmer mistake is to write a test program that has no test
case linked in. This can happen, for example, when you put test case definitions
in a library and the library is not marked as "always link".

To catch such mistakes, run the test program with the
`--gtest_fail_if_no_test_linked` flag or set the `GTEST_FAIL_IF_NO_TEST_LINKED`
environment variable to a value other than `0`. Now the program will fail if no
test case is linked in.

Note that *any* test case linked in makes the program valid for the purpose of
this check. In particular, even a disabled test case suffices.

### Enforcing Running At Least One Test Case

In addition to enforcing that tests are defined in the binary with
`--gtest_fail_if_no_test_linked`, it is also possible to enforce that a test
case was actually executed to ensure that resources are not consumed by tests
that do nothing.

To catch such optimization opportunities, run the test program with the
`--gtest_fail_if_no_test_selected` flag or set the
`GTEST_FAIL_IF_NO_TEST_SELECTED` environment variable to a value other than `0`.

A test is considered selected if it begins to run, even if it is later skipped
via `GTEST_SKIP`. Thus, `DISABLED` tests do not count as selected and neither do
tests that are not matched by `--gtest_filter`.

### Repeating the Tests

Once in a while you'll run into a test whose result is hit-or-miss. Perhaps it
will fail only 1% of the time, making it rather hard to reproduce the bug under
a debugger. This can be a major source of frustration.

The `--gtest_repeat` flag allows you to repeat all (or selected) test methods in
a program many times. Hopefully, a flaky test will eventually fail and give you
a chance to debug. Here's how to use it:

```none
$ foo_test --gtest_repeat=1000
Repeat foo_test 1000 times and don't stop at failures.

$ foo_test --gtest_repeat=-1
A negative count means repeating forever.

$ foo_test --gtest_repeat=1000 --gtest_break_on_failure
Repeat foo_test 1000 times, stopping at the first failure.  This
is especially useful when running under a debugger: when the test
fails, it will drop into the debugger and you can then inspect
variables and stacks.

$ foo_test --gtest_repeat=1000 --gtest_filter=FooBar.*
Repeat the tests whose name matches the filter 1000 times.
```

If your test program contains
[global set-up/tear-down](#global-set-up-and-tear-down) code, it will be
repeated in each iteration as well, as the flakiness may be in it. To avoid
repeating global set-up/tear-down, specify
`--gtest_recreate_environments_when_repeating=false`{.nowrap}.

You can also specify the repeat count by setting the `GTEST_REPEAT` environment
variable.

### Shuffling the Tests

You can specify the `--gtest_shuffle` flag (or set the `GTEST_SHUFFLE`
environment variable to `1`) to run the tests in a program in a random order.
This helps to reveal bad dependencies between tests.

By default, GoogleTest uses a random seed calculated from the current time.
Therefore you'll get a different order every time. The console output includes
the random seed value, such that you can reproduce an order-related test failure
later. To specify the random seed explicitly, use the `--gtest_random_seed=SEED`
flag (or set the `GTEST_RANDOM_SEED` environment variable), where `SEED` is an
integer in the range [0, 99999]. The seed value 0 is special: it tells
GoogleTest to do the default behavior of calculating the seed from the current
time.

If you combine this with `--gtest_repeat=N`, GoogleTest will pick a different
random seed and re-shuffle the tests in each iteration.

### Distributing Test Functions to Multiple Machines

If you have more than one machine you can use to run a test program, you might
want to run the test functions in parallel and get the result faster. We call
this technique *sharding*, where each machine is called a *shard*.

GoogleTest is compatible with test sharding. To take advantage of this feature,
your test runner (not part of GoogleTest) needs to do the following:

1.  Allocate a number of machines (shards) to run the tests.
1.  On each shard, set the `GTEST_TOTAL_SHARDS` environment variable to the total
    number of shards. It must be the same for all shards.
1.  On each shard, set the `GTEST_SHARD_INDEX` environment variable to the index
    of the shard. Different shards must be assigned different indices, which
    must be in the range `[0, GTEST_TOTAL_SHARDS - 1]`.
1.  Run the same test program on all shards. When GoogleTest sees the above two
    environment variables, it will select a subset of the test functions to run.
    Across all shards, each test function in the program will be run exactly
    once.
1.  Wait for all shards to finish, then collect and report the results.

Your project may have tests that were written without GoogleTest and thus don't
understand this protocol. In order for your test runner to figure out which test
supports sharding, it can set the environment variable `GTEST_SHARD_STATUS_FILE`
to a non-existent file path. If a test program supports sharding, it will create
this file to acknowledge that fact; otherwise it will not create it. The actual
contents of the file are not important at this time, although we may put some
useful information in it in the future.

Here's an example to make it clear. Suppose you have a test program `foo_test`
that contains the following 5 test functions:

```
TEST(A, V)
TEST(A, W)
TEST(B, X)
TEST(B, Y)
TEST(B, Z)
```

Suppose you have 3 machines at your disposal. To run the test functions in
parallel, you would set `GTEST_TOTAL_SHARDS` to 3 on all machines, and set
`GTEST_SHARD_INDEX` to 0, 1, and 2 on the machines respectively. Then you would
run the same `foo_test` on each machine.

GoogleTest reserves the right to change how the work is distributed across the
shards, but here's one possible scenario:

*   Machine #0 runs `A.V` and `B.X`.
*   Machine #1 runs `A.W` and `B.Y`.
*   Machine #2 runs `B.Z`.

### Controlling Test Output

#### Colored Terminal Output

GoogleTest can use colors in its terminal output to make it easier to spot the
important information:

<pre>...
<font color="green">[----------]</font> 1 test from FooTest
<font color="green">[ RUN      ]</font> FooTest.DoesAbc
<font color="green">[       OK ]</font> FooTest.DoesAbc
<font color="green">[----------]</font> 2 tests from BarTest
<font color="green">[ RUN      ]</font> BarTest.HasXyzProperty
<font color="green">[       OK ]</font> BarTest.HasXyzProperty
<font color="green">[ RUN      ]</font> BarTest.ReturnsTrueOnSuccess
... some error messages ...
<font color="red">[   FAILED ]</font> BarTest.ReturnsTrueOnSuccess
...
<font color="green">[==========]</font> 30 tests from 14 test suites ran.
<font color="green">[   PASSED ]</font> 28 tests.
<font color="red">[   FAILED ]</font> 2 tests, listed below:
<font color="red">[   FAILED ]</font> BarTest.ReturnsTrueOnSuccess
<font color="red">[   FAILED ]</font> AnotherTest.DoesXyz

 2 FAILED TESTS
</pre>

You can set the `GTEST_COLOR` environment variable or the `--gtest_color`
command line flag to `yes`, `no`, or `auto` (the default) to enable colors,
disable colors, or let GoogleTest decide. When the value is `auto`, GoogleTest
will use colors if and only if the output goes to a terminal and (on non-Windows
platforms) the `TERM` environment variable is set to `xterm` or `xterm-color`.

#### Suppressing test passes

By default, GoogleTest prints 1 line of output for each test, indicating if it
passed or failed. To show only test failures, run the test program with
`--gtest_brief=1`, or set the GTEST_BRIEF environment variable to `1`.

#### Suppressing the Elapsed Time

By default, GoogleTest prints the time it takes to run each test. To disable
that, run the test program with the `--gtest_print_time=0` command line flag, or
set the GTEST_PRINT_TIME environment variable to `0`.

#### Suppressing UTF-8 Text Output

In case of assertion failures, GoogleTest prints expected and actual values of
type `string` both as hex-encoded strings as well as in readable UTF-8 text if
they contain valid non-ASCII UTF-8 characters. If you want to suppress the UTF-8
text because, for example, you don't have an UTF-8 compatible output medium, run
the test program with `--gtest_print_utf8=0` or set the `GTEST_PRINT_UTF8`
environment variable to `0`.

#### Generating an XML Report

GoogleTest can emit a detailed XML report to a file in addition to its normal
textual output. The report contains the duration of each test, and thus can help
you identify slow tests.

To generate the XML report, set the `GTEST_OUTPUT` environment variable or the
`--gtest_output` flag to the string `"xml:path_to_output_file"`, which will
create the file at the given location. You can also just use the string `"xml"`,
in which case the output can be found in the `test_detail.xml` file in the
current directory.

If you specify a directory (for example, `"xml:output/directory/"` on Linux or
`"xml:output\directory\"` on Windows), GoogleTest will create the XML file in
that directory, named after the test executable (e.g. `foo_test.xml` for test
program `foo_test` or `foo_test.exe`). If the file already exists (perhaps left
over from a previous run), GoogleTest will pick a different name (e.g.
`foo_test_1.xml`) to avoid overwriting it.

The report is based on the `junitreport` Ant task. Since that format was
originally intended for Java, a little interpretation is required to make it
apply to GoogleTest tests, as shown here:

```xml
<testsuites name="AllTests" ...>
  <testsuite name="test_case_name" ...>
    <testcase    name="test_name" ...>
      <failure message="..."/>
      <failure message="..."/>
      <failure message="..."/>
    </testcase>
  </testsuite>
</testsuites>
```

*   The root `<testsuites>` element corresponds to the entire test program.
*   `<testsuite>` elements correspond to GoogleTest test suites.
*   `<testcase>` elements correspond to GoogleTest test functions.

For instance, the following program

```c++
TEST(MathTest, Addition) { ... }
TEST(MathTest, Subtraction) { ... }
TEST(LogicTest, NonContradiction) { ... }
```

could generate this report:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="3" failures="1" errors="0" time="0.035" timestamp="2011-10-31T18:52:42" name="AllTests">
  <testsuite name="MathTest" tests="2" failures="1" errors="0" time="0.015">
    <testcase name="Addition" file="test.cpp" line="1" status="run" time="0.007" classname="">
      <failure message="Value of: add(1, 1)&#x0A;  Actual: 3&#x0A;Expected: 2" type="">...</failure>
      <failure message="Value of: add(1, -1)&#x0A;  Actual: 1&#x0A;Expected: 0" type="">...</failure>
    </testcase>
    <testcase name="Subtraction" file="test.cpp" line="2" status="run" time="0.005" classname="">
    </testcase>
  </testsuite>
  <testsuite name="LogicTest" tests="1" failures="0" errors="0" time="0.005">
    <testcase name="NonContradiction" file="test.cpp" line="3" status="run" time="0.005" classname="">
    </testcase>
  </testsuite>
</testsuites>
```

Things to note:

*   The `tests` attribute of a `<testsuites>` or `<testsuite>` element tells how
    many test functions the GoogleTest program or test suite contains, while the
    `failures` attribute tells how many of them failed.

*   The `time` attribute expresses the duration of the test, test suite, or
    entire test program in seconds.

*   The `timestamp` attribute records the local date and time of the test
    execution.

*   The `file` and `line` attributes record the source file location, where the
    test was defined.

*   Each `<failure>` element corresponds to a single failed GoogleTest
    assertion.

#### Generating a JSON Report

GoogleTest can also emit a JSON report as an alternative format to XML. To
generate the JSON report, set the `GTEST_OUTPUT` environment variable or the
`--gtest_output` flag to the string `"json:path_to_output_file"`, which will
create the file at the given location. You can also just use the string
`"json"`, in which case the output can be found in the `test_detail.json` file
in the current directory.

The report format conforms to the following JSON Schema:

```json
{
  "$schema": "https://json-schema.org/schema#",
  "type": "object",
  "definitions": {
    "TestCase": {
      "type": "object",
      "properties": {
        "name": { "type": "string" },
        "tests": { "type": "integer" },
        "failures": { "type": "integer" },
        "disabled": { "type": "integer" },
        "time": { "type": "string" },
        "testsuite": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/TestInfo"
          }
        }
      }
    },
    "TestInfo": {
      "type": "object",
      "properties": {
        "name": { "type": "string" },
        "file": { "type": "string" },
        "line": { "type": "integer" },
        "status": {
          "type": "string",
          "enum": ["RUN", "NOTRUN"]
        },
        "time": { "type": "string" },
        "classname": { "type": "string" },
        "failures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Failure"
          }
        }
      }
    },
    "Failure": {
      "type": "object",
      "properties": {
        "failures": { "type": "string" },
        "type": { "type": "string" }
      }
    }
  },
  "properties": {
    "tests": { "type": "integer" },
    "failures": { "type": "integer" },
    "disabled": { "type": "integer" },
    "errors": { "type": "integer" },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "time": { "type": "string" },
    "name": { "type": "string" },
    "testsuites": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/TestCase"
      }
    }
  }
}
```

The report uses the format that conforms to the following Proto3 using the
[JSON encoding](https://developers.google.com/protocol-buffers/docs/proto3#json):

```proto
syntax = "proto3";

package googletest;

import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";

message UnitTest {
  int32 tests = 1;
  int32 failures = 2;
  int32 disabled = 3;
  int32 errors = 4;
  google.protobuf.Timestamp timestamp = 5;
  google.protobuf.Duration time = 6;
  string name = 7;
  repeated TestCase testsuites = 8;
}

message TestCase {
  string name = 1;
  int32 tests = 2;
  int32 failures = 3;
  int32 disabled = 4;
  int32 errors = 5;
  google.protobuf.Duration time = 6;
  repeated TestInfo testsuite = 7;
}

message TestInfo {
  string name = 1;
  string file = 6;
  int32 line = 7;
  enum Status {
    RUN = 0;
    NOTRUN = 1;
  }
  Status status = 2;
  google.protobuf.Duration time = 3;
  string classname = 4;
  message Failure {
    string failures = 1;
    string type = 2;
  }
  repeated Failure failures = 5;
}
```

For instance, the following program

```c++
TEST(MathTest, Addition) { ... }
TEST(MathTest, Subtraction) { ... }
TEST(LogicTest, NonContradiction) { ... }
```

could generate this report:

```json
{
  "tests": 3,
  "failures": 1,
  "errors": 0,
  "time": "0.035s",
  "timestamp": "2011-10-31T18:52:42Z",
  "name": "AllTests",
  "testsuites": [
    {
      "name": "MathTest",
      "tests": 2,
      "failures": 1,
      "errors": 0,
      "time": "0.015s",
      "testsuite": [
        {
          "name": "Addition",
          "file": "test.cpp",
          "line": 1,
          "status": "RUN",
          "time": "0.007s",
          "classname": "",
          "failures": [
            {
              "message": "Value of: add(1, 1)\n  Actual: 3\nExpected: 2",
              "type": ""
            },
            {
              "message": "Value of: add(1, -1)\n  Actual: 1\nExpected: 0",
              "type": ""
            }
          ]
        },
        {
          "name": "Subtraction",
          "file": "test.cpp",
          "line": 2,
          "status": "RUN",
          "time": "0.005s",
          "classname": ""
        }
      ]
    },
    {
      "name": "LogicTest",
      "tests": 1,
      "failures": 0,
      "errors": 0,
      "time": "0.005s",
      "testsuite": [
        {
          "name": "NonContradiction",
          "file": "test.cpp",
          "line": 3,
          "status": "RUN",
          "time": "0.005s",
          "classname": ""
        }
      ]
    }
  ]
}
```

{: .callout .important}
IMPORTANT: The exact format of the JSON document is subject to change.

### Controlling How Failures Are Reported

#### Detecting Test Premature Exit

Google Test implements the *premature-exit-file* protocol for test runners to
catch any kind of unexpected exits of test programs. Upon start, Google Test
creates the file which will be automatically deleted after all work has been
finished. Then, the test runner can check if this file exists. In case the file
remains undeleted, the inspected test has exited prematurely.

This feature is enabled only if the `TEST_PREMATURE_EXIT_FILE` environment
variable has been set.

#### Turning Assertion Failures into Break-Points

When running test programs under a debugger, it's very convenient if the
debugger can catch an assertion failure and automatically drop into interactive
mode. GoogleTest's *break-on-failure* mode supports this behavior.

To enable it, set the `GTEST_BREAK_ON_FAILURE` environment variable to a value
other than `0`. Alternatively, you can use the `--gtest_break_on_failure`
command line flag.

#### Disabling Catching Test-Thrown Exceptions

GoogleTest can be used either with or without exceptions enabled. If a test
throws a C++ exception or (on Windows) a structured exception (SEH), by default
GoogleTest catches it, reports it as a test failure, and continues with the next
test method. This maximizes the coverage of a test run. Also, on Windows an
uncaught exception will cause a pop-up window, so catching the exceptions allows
you to run the tests automatically.

When debugging the test failures, however, you may instead want the exceptions
to be handled by the debugger, such that you can examine the call stack when an
exception is thrown. To achieve that, set the `GTEST_CATCH_EXCEPTIONS`
environment variable to `0`, or use the `--gtest_catch_exceptions=0` flag when
running the tests.

### Sanitizer Integration

The
[Undefined Behavior Sanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html),
[Address Sanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizer),
and
[Thread Sanitizer](https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual)
all provide weak functions that you can override to trigger explicit failures
when they detect sanitizer errors, such as creating a reference from `nullptr`.
To override these functions, place definitions for them in a source file that
you compile as part of your main binary:

```
extern "C" {
void __ubsan_on_report() {
  FAIL() << "Encountered an undefined behavior sanitizer error";
}
void __asan_on_error() {
  FAIL() << "Encountered an address sanitizer error";
}
void __tsan_on_report() {
  FAIL() << "Encountered a thread sanitizer error";
}
}  // extern "C"
```

After compiling your project with one of the sanitizers enabled, if a particular
test triggers a sanitizer error, GoogleTest will report that it failed.


================================================
FILE: docs/assets/css/style.scss
================================================
---
---

@import "jekyll-theme-primer";
@import "main";


================================================
FILE: docs/community_created_documentation.md
================================================
# Community-Created Documentation

The following is a list, in no particular order, of links to documentation
created by the Googletest community.

*   [Googlemock Insights](https://github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/blob/master/googletest/insights.md),
    by [ElectricRCAircraftGuy](https://github.com/ElectricRCAircraftGuy)


================================================
FILE: docs/faq.md
================================================
# GoogleTest FAQ

## Why should test suite names and test names not contain underscore?

{: .callout .note}
Note: GoogleTest reserves underscore (`_`) for special-purpose keywords, such as
[the `DISABLED_` prefix](advanced.md#temporarily-disabling-tests), in addition
to the following rationale.

Underscore (`_`) is special, as C++ reserves the following to be used by the
compiler and the standard library:

1.  any identifier that starts with an `_` followed by an upper-case letter, and
2.  any identifier that contains two consecutive underscores (i.e. `__`)
    *anywhere* in its name.

User code is *prohibited* from using such identifiers.

Now let's look at what this means for `TEST` and `TEST_F`.

Currently `TEST(TestSuiteName, TestName)` generates a class named
`TestSuiteName_TestName_Test`. What happens if `TestSuiteName` or `TestName`
contains `_`?

1.  If `TestSuiteName` starts with an `_` followed by an upper-case letter (say,
    `_Foo`), we end up with `_Foo_TestName_Test`, which is reserved and thus
    invalid.
2.  If `TestSuiteName` ends with an `_` (say, `Foo_`), we get
    `Foo__TestName_Test`, which is invalid.
3.  If `TestName` starts with an `_` (say, `_Bar`), we get
    `TestSuiteName__Bar_Test`, which is invalid.
4.  If `TestName` ends with an `_` (say, `Bar_`), we get
    `TestSuiteName_Bar__Test`, which is invalid.

So clearly `TestSuiteName` and `TestName` cannot start or end with `_`
(Actually, `TestSuiteName` can start with `_`—as long as the `_` isn't followed
by an upper-case letter. But that's getting complicated. So for simplicity we
just say that it cannot start with `_`.).

It may seem fine for `TestSuiteName` and `TestName` to contain `_` in the
middle. However, consider this:

```c++
TEST(Time, Flies_Like_An_Arrow) { ... }
TEST(Time_Flies, Like_An_Arrow) { ... }
```

Now, the two `TEST`s will both generate the same class
(`Time_Flies_Like_An_Arrow_Test`). That's not good.

So for simplicity, we just ask the users to avoid `_` in `TestSuiteName` and
`TestName`. The rule is more constraining than necessary, but it's simple and
easy to remember. It also gives GoogleTest some wiggle room in case its
implementation needs to change in the future.

If you violate the rule, there may not be immediate consequences, but your test
may (just may) break with a new compiler (or a new version of the compiler you
are using) or with a new version of GoogleTest. Therefore it's best to follow
the rule.

## Why does GoogleTest support `EXPECT_EQ(NULL, ptr)` and `ASSERT_EQ(NULL, ptr)` but not `EXPECT_NE(NULL, ptr)` and `ASSERT_NE(NULL, ptr)`?

First of all, you can use `nullptr` with each of these macros, e.g.
`EXPECT_EQ(ptr, nullptr)`, `EXPECT_NE(ptr, nullptr)`, `ASSERT_EQ(ptr, nullptr)`,
`ASSERT_NE(ptr, nullptr)`. This is the preferred syntax in the style guide
because `nullptr` does not have the type problems that `NULL` does.

Due to some peculiarity of C++, it requires some non-trivial template meta
programming tricks to support using `NULL` as an argument of the `EXPECT_XX()`
and `ASSERT_XX()` macros. Therefore we only do it where it's most needed
(otherwise we make the implementation of GoogleTest harder to maintain and more
error-prone than necessary).

Historically, the `EXPECT_EQ()` macro took the *expected* value as its first
argument and the *actual* value as the second, though this argument order is now
discouraged. It was reasonable that someone wanted
to write `EXPECT_EQ(NULL, some_expression)`, and this indeed was requested
several times. Therefore we implemented it.

The need for `EXPECT_NE(NULL, ptr)` wasn't nearly as strong. When the assertion
fails, you already know that `ptr` must be `NULL`, so it doesn't add any
information to print `ptr` in this case. That means `EXPECT_TRUE(ptr != NULL)`
works just as well.

If we were to support `EXPECT_NE(NULL, ptr)`, for consistency we'd have to
support `EXPECT_NE(ptr, NULL)` as well. This means using the template meta
programming tricks twice in the implementation, making it even harder to
understand and maintain. We believe the benefit doesn't justify the cost.

Finally, with the growth of the gMock matcher library, we are encouraging people
to use the unified `EXPECT_THAT(value, matcher)` syntax more often in tests. One
significant advantage of the matcher approach is that matchers can be easily
combined to form new matchers, while the `EXPECT_NE`, etc, macros cannot be
easily combined. Therefore we want to invest more in the matchers than in the
`EXPECT_XX()` macros.

## I need to test that different implementations of an interface satisfy some common requirements. Should I use typed tests or value-parameterized tests?

For testing various implementations of the same interface, either typed tests or
value-parameterized tests can get it done. It's really up to you the user to
decide which is more convenient for you, depending on your particular case. Some
rough guidelines:

*   Typed tests can be easier to write if instances of the different
    implementations can be created the same way, modulo the type. For example,
    if all these implementations have a public default constructor (such that
    you can write `new TypeParam`), or if their factory functions have the same
    form (e.g. `CreateInstance<TypeParam>()`).
*   Value-parameterized tests can be easier to write if you need different code
    patterns to create different implementations' instances, e.g. `new Foo` vs
    `new Bar(5)`. To accommodate for the differences, you can write factory
    function wrappers and pass these function pointers to the tests as their
    parameters.
*   When a typed test fails, the default output includes the name of the type,
    which can help you quickly identify which implementation is wrong.
    Value-parameterized tests only show the number of the failed iteration by
    default. You will need to define a function that returns the iteration name
    and pass it as the third parameter to INSTANTIATE_TEST_SUITE_P to have more
    useful output.
*   When using typed tests, you need to make sure you are testing against the
    interface type, not the concrete types (in other words, you want to make
    sure `implicit_cast<MyInterface*>(my_concrete_impl)` works, not just that
    `my_concrete_impl` works). It's less likely to make mistakes in this area
    when using value-parameterized tests.

I hope I didn't confuse you more. :-) If you don't mind, I'd suggest you to give
both approaches a try. Practice is a much better way to grasp the subtle
differences between the two tools. Once you have some concrete experience, you
can much more easily decide which one to use the next time.

## My death test modifies some state, but the change seems lost after the death test finishes. Why?

Death tests (`EXPECT_DEATH`, etc.) are executed in a sub-process s.t. the
expected crash won't kill the test program (i.e. the parent process). As a
result, any in-memory side effects they incur are observable in their respective
sub-processes, but not in the parent process. You can think of them as running
in a parallel universe, more or less.

In particular, if you use mocking and the death test statement invokes some mock
methods, the parent process will think the calls have never occurred. Therefore,
you may want to move your `EXPECT_CALL` statements inside the `EXPECT_DEATH`
macro.

## EXPECT_EQ(htonl(blah), blah_blah) generates weird compiler errors in opt mode. Is this a GoogleTest bug?

Actually, the bug is in `htonl()`.

According to `'man htonl'`, `htonl()` is a *function*, which means it's valid to
use `htonl` as a function pointer. However, in opt mode `htonl()` is defined as
a *macro*, which breaks this usage.

Worse, the macro definition of `htonl()` uses a `gcc` extension and is *not*
standard C++. That hacky implementation has some ad hoc limitations. In
particular, it prevents you from writing `Foo<sizeof(htonl(x))>()`, where `Foo`
is a template that has an integral argument.

The implementation of `EXPECT_EQ(a, b)` uses `sizeof(... a ...)` inside a
template argument, and thus doesn't compile in opt mode when `a` contains a call
to `htonl()`. It is difficult to make `EXPECT_EQ` bypass the `htonl()` bug, as
the solution must work with different compilers on various platforms.

## The compiler complains about "undefined references" to some static const member variables, but I did define them in the class body. What's wrong?

If your class has a static data member:

```c++
// foo.h
class Foo {
  ...
  static const int kBar = 100;
};
```

you also need to define it *outside* of the class body in `foo.cc`:

```c++
const int Foo::kBar;  // No initializer here.
```

Otherwise your code is **invalid C++**, and may break in unexpected ways. In
particular, using it in GoogleTest comparison assertions (`EXPECT_EQ`, etc.)
will generate an "undefined reference" linker error. The fact that "it used to
work" doesn't mean it's valid. It just means that you were lucky. :-)

If the declaration of the static data member is `constexpr` then it is
implicitly an `inline` definition, and a separate definition in `foo.cc` is not
needed:

```c++
// foo.h
class Foo {
  ...
  static constexpr int kBar = 100;  // Defines kBar, no need to do it in foo.cc.
};
```

## Can I derive a test fixture from another?

Yes.

Each test fixture has a corresponding and same named test suite. This means only
one test suite can use a particular fixture. Sometimes, however, multiple test
cases may want to use the same or slightly different fixtures. For example, you
may want to make sure that all of a GUI library's test suites don't leak
important system resources like fonts and brushes.

In GoogleTest, you share a fixture among test suites by putting the shared logic
in a base test fixture, then deriving from that base a separate fixture for each
test suite that wants to use this common logic. You then use `TEST_F()` to write
tests using each derived fixture.

Typically, your code looks like this:

```c++
// Defines a base test fixture.
class BaseTest : public ::testing::Test {
 protected:
  ...
};

// Derives a fixture FooTest from BaseTest.
class FooTest : public BaseTest {
 protected:
  void SetUp() override {
    BaseTest::SetUp();  // Sets up the base fixture first.
    ... additional set-up work ...
  }

  void TearDown() override {
    ... clean-up work for FooTest ...
    BaseTest::TearDown();  // Remember to tear down the base fixture
                           // after cleaning up FooTest!
  }

  ... functions and variables for FooTest ...
};

// Tests that use the fixture FooTest.
TEST_F(FooTest, Bar) { ... }
TEST_F(FooTest, Baz) { ... }

... additional fixtures derived from BaseTest ...
```

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/main/googletest/samples/sample5_unittest.cc).

## My compiler complains "void value not ignored as it ought to be." What does this mean?

You're probably using an `ASSERT_*()` in a function that doesn't return `void`.
`ASSERT_*()` can only be used in `void` functions, due to exceptions being
disabled by our build system. Please see more details
[here](advanced.md#assertion-placement).

## My death test hangs (or seg-faults). How do I fix it?

In GoogleTest, death tests are run in a child process and the way they work is
delicate. To write death tests you really need to understand how they work—see
the details at [Death Assertions](reference/assertions.md#death) in the
Assertions Reference.

In particular, death tests don't like having multiple threads in the parent
process. So the first thing you can try is to eliminate creating threads outside
of `EXPECT_DEATH()`. For example, you may want to use mocks or fake objects
instead of real ones in your tests.

Sometimes this is impossible as some library you must use may be creating
threads before `main()` is even reached. In this case, you can try to minimize
the chance of conflicts by either moving as many activities as possible inside
`EXPECT_DEATH()` (in the extreme case, you want to move everything inside), or
leaving as few things as possible in it. Also, you can try to set the death test
style to `"threadsafe"`, which is safer but slower, and see if it helps.

If you go with thread-safe death tests, remember that they rerun the test
program from the beginning in the child process. Therefore make sure your
program can run side-by-side with itself and is deterministic.

In the end, this boils down to good concurrent programming. You have to make
sure that there are no race conditions or deadlocks in your program. No silver
bullet - sorry!

## Should I use the constructor/destructor of the test fixture or SetUp()/TearDown()? {#CtorVsSetUp}

The first thing to remember is that GoogleTest does **not** reuse the same test
fixture object across multiple tests. For each `TEST_F`, GoogleTest will create
a **fresh** test fixture object, immediately call `SetUp()`, run the test body,
call `TearDown()`, and then delete the test fixture object.

When you need to write per-test set-up and tear-down logic, you have the choice
between using the test fixture constructor/destructor or `SetUp()`/`TearDown()`.
The former is usually preferred, as it has the following benefits:

*   By initializing a member variable in the constructor, we have the option to
    make it `const`, which helps prevent accidental changes to its value and
    makes the tests more obviously correct.
*   In case we need to subclass the test fixture class, the subclass'
    constructor is guaranteed to call the base class' constructor *first*, and
    the subclass' destructor is guaranteed to call the base class' destructor
    *afterward*. With `SetUp()/TearDown()`, a subclass may make the mistake of
    forgetting to call the base class' `SetUp()/TearDown()` or call them at the
    wrong time.

You may still want to use `SetUp()/TearDown()` in the following cases:

*   C++ does not allow virtual function calls in constructors and destructors.
    You can call a method declared as virtual, but it will not use dynamic
    dispatch. It will use the definition from the class the constructor of which
    is currently executing. This is because calling a virtual method before the
    derived class constructor has a chance to run is very dangerous - the
    virtual method might operate on uninitialized data. Therefore, if you need
    to call a method that will be overridden in a derived class, you have to use
    `SetUp()/TearDown()`.
*   In the body of a constructor (or destructor), it's not possible to use the
    `ASSERT_xx` macros. Therefore, if the set-up operation could cause a fatal
    test failure that should prevent the test from running, it's necessary to
    use `abort` and abort the whole test
    executable, or to use `SetUp()` instead of a constructor.
*   If the tear-down operation could throw an exception, you must use
    `TearDown()` as opposed to the destructor, as throwing in a destructor leads
    to undefined behavior and usually will kill your program right away. Note
    that many standard libraries (like STL) may throw when exceptions are
    enabled in the compiler. Therefore you should prefer `TearDown()` if you
    want to write portable tests that work with or without exceptions.
*   The GoogleTest team is considering making the assertion macros throw on
    platforms where exceptions are enabled (e.g. Windows, Mac OS, and Linux
    client-side), which will eliminate the need for the user to propagate
    failures from a subroutine to its caller. Therefore, you shouldn't use
    GoogleTest assertions in a destructor if your code could run on such a
    platform.

## The compiler complains "no matching function to call" when I use `ASSERT_PRED*`. How do I fix it?

See details for [`EXPECT_PRED*`](reference/assertions.md#EXPECT_PRED) in the
Assertions Reference.

## My compiler complains about "ignoring return value" when I call RUN_ALL_TESTS(). Why?

Some people had been ignoring the return value of `RUN_ALL_TESTS()`. That is,
instead of

```c++
  return RUN_ALL_TESTS();
```

they write

```c++
  RUN_ALL_TESTS();
```

This is **wrong and dangerous**. The testing services needs to see the return
value of `RUN_ALL_TESTS()` in order to determine if a test has passed. If your
`main()` function ignores it, your test will be considered successful even if it
has a GoogleTest assertion failure. Very bad.

We have decided to fix this (thanks to Michael Chastain for the idea). Now, your
code will no longer be able to ignore `RUN_ALL_TESTS()` when compiled with
`gcc`. If you do so, you'll get a compiler error.

If you see the compiler complaining about you ignoring the return value of
`RUN_ALL_TESTS()`, the fix is simple: just make sure its value is used as the
return value of `main()`.

But how could we introduce a change that breaks existing tests? Well, in this
case, the code was already broken in the first place, so we didn't break it. :-)

## My compiler complains that a constructor (or destructor) cannot return a value. What's going on?

Due to a peculiarity of C++, in order to support the syntax for streaming
messages to an `ASSERT_*`, e.g.

```c++
  ASSERT_EQ(1, Foo()) << "blah blah" << foo;
```

we had to give up using `ASSERT*` and `FAIL*` (but not `EXPECT*` and
`ADD_FAILURE*`) in constructors and destructors. The workaround is to move the
content of your constructor/destructor to a private void member function, or
switch to `EXPECT_*()` if that works. This
[section](advanced.md#assertion-placement) in the user's guide explains it.

## My SetUp() function is not called. Why?

C++ is case-sensitive. Did you spell it as `Setup()`?

Similarly, sometimes people spell `SetUpTestSuite()` as `SetupTestSuite()` and
wonder why it's never called.

## I have several test suites which share the same test fixture logic; do I have to define a new test fixture class for each of them? This seems pretty tedious.

You don't have to. Instead of

```c++
class FooTest : public BaseTest {};

TEST_F(FooTest, Abc) { ... }
TEST_F(FooTest, Def) { ... }

class BarTest : public BaseTest {};

TEST_F(BarTest, Abc) { ... }
TEST_F(BarTest, Def) { ... }
```

you can simply `typedef` the test fixtures:

```c++
typedef BaseTest FooTest;

TEST_F(FooTest, Abc) { ... }
TEST_F(FooTest, Def) { ... }

typedef BaseTest BarTest;

TEST_F(BarTest, Abc) { ... }
TEST_F(BarTest, Def) { ... }
```

## GoogleTest output is buried in a whole bunch of LOG messages. What do I do?

The GoogleTest output is meant to be a concise and human-friendly report. If
your test generates textual output itself, it will mix with the GoogleTest
output, making it hard to read. However, there is an easy solution to this
problem.

Since `LOG` messages go to stderr, we decided to let GoogleTest output go to
stdout. This way, you can easily separate the two using redirection. For
example:

```shell
$ ./my_test > gtest_output.txt
```

## Why should I prefer test fixtures over global variables?

There are several good reasons:

1.  It's likely your test needs to change the states of its global variables.
    This makes it difficult to keep side effects from escaping one test and
    contaminating others, making debugging difficult. By using fixtures, each
    test has a fresh set of variables that's different (but with the same
    names). Thus, tests are kept independent of each other.
2.  Global variables pollute the global namespace.
3.  Test fixtures can be reused via subclassing, which cannot be done easily
    with global variables. This is useful if many test suites have something in
    common.

## What can the statement argument in ASSERT_DEATH() be?

`ASSERT_DEATH(statement, matcher)` (or any death assertion macro) can be used
wherever *`statement`* is valid. So basically *`statement`* can be any C++
statement that makes sense in the current context. In particular, it can
reference global and/or local variables, and can be:

*   a simple function call (often the case),
*   a complex expression, or
*   a compound statement.

Some examples are shown here:

```c++
// A death test can be a simple function call.
TEST(MyDeathTest, FunctionCall) {
  ASSERT_DEATH(Xyz(5), "Xyz failed");
}

// Or a complex expression that references variables and functions.
TEST(MyDeathTest, ComplexExpression) {
  const bool c = Condition();
  ASSERT_DEATH((c ? Func1(0) : object2.Method("test")),
               "(Func1|Method) failed");
}

// Death assertions can be used anywhere in a function.  In
// particular, they can be inside a loop.
TEST(MyDeathTest, InsideLoop) {
  // Verifies that Foo(0), Foo(1), ..., and Foo(4) all die.
  for (int i = 0; i < 5; i++) {
    EXPECT_DEATH_M(Foo(i), "Foo has \\d+ errors",
                   ::testing::Message() << "where i is " << i);
  }
}

// A death assertion can contain a compound statement.
TEST(MyDeathTest, CompoundStatement) {
  // Verifies that at lease one of Bar(0), Bar(1), ..., and
  // Bar(4) dies.
  ASSERT_DEATH({
    for (int i = 0; i < 5; i++) {
      Bar(i);
    }
  },
  "Bar has \\d+ errors");
}
```

## I have a fixture class `FooTest`, but `TEST_F(FooTest, Bar)` gives me error ``"no matching function for call to `FooTest::FooTest()'"``. Why?

GoogleTest needs to be able to create objects of your test fixture class, so it
must have a default constructor. Normally the compiler will define one for you.
However, there are cases where you have to define your own:

*   If you explicitly declare a non-default constructor for class `FooTest`
    (`DISALLOW_EVIL_CONSTRUCTORS()` does this), then you need to define a
    default constructor, even if it would be empty.
*   If `FooTest` has a const non-static data member, then you have to define the
    default constructor *and* initialize the const member in the initializer
    list of the constructor. (Early versions of `gcc` doesn't force you to
    initialize the const member. It's a bug that has been fixed in `gcc 4`.)

## Why does GoogleTest require the entire test suite, instead of individual tests, to be named `*DeathTest` when it uses `ASSERT_DEATH`?

GoogleTest does not interleave tests from different test suites. That is, it
runs all tests in one test suite first, and then runs all tests in the next test
suite, and so on. GoogleTest does this because it needs to set up a test suite
before the first test in it is run, and tear it down afterwards. Splitting up
the test case would require multiple set-up and tear-down processes, which is
inefficient and makes the semantics unclean.

If we were to determine the order of tests based on test name instead of test
case name, then we would have a problem with the following situation:

```c++
TEST_F(FooTest, AbcDeathTest) { ... }
TEST_F(FooTest, Uvw) { ... }

TEST_F(BarTest, DefDeathTest) { ... }
TEST_F(BarTest, Xyz) { ... }
```

Since `FooTest.AbcDeathTest` needs to run before `BarTest.Xyz`, and we don't
interleave tests from different test suites, we need to run all tests in the
`FooTest` case before running any test in the `BarTest` case. This contradicts
with the requirement to run `BarTest.DefDeathTest` before `FooTest.Uvw`.

## But I don't like calling my entire test suite `*DeathTest` when it contains both death tests and non-death tests. What do I do?

You don't have to, but if you like, you may split up the test suite into
`FooTest` and `FooDeathTest`, where the names make it clear that they are
related:

```c++
class FooTest : public ::testing::Test { ... };

TEST_F(FooTest, Abc) { ... }
TEST_F(FooTest, Def) { ... }

using FooDeathTest = FooTest;

TEST_F(FooDeathTest, Uvw) { ... EXPECT_DEATH(...) ... }
TEST_F(FooDeathTest, Xyz) { ... ASSERT_DEATH(...) ... }
```

## GoogleTest prints the LOG messages in a death test's child process only when the test fails. How can I see the LOG messages when the death test succeeds?

Printing the LOG messages generated by the statement inside `EXPECT_DEATH()`
makes it harder to search for real problems in the parent's log. Therefore,
GoogleTest only prints them when the death test has failed.

If you really need to see such LOG messages, a workaround is to temporarily
break the death test (e.g. by changing the regex pattern it is expected to
match). Admittedly, this is a hack. We'll consider a more permanent solution
after the fork-and-exec-style death tests are implemented.

## The compiler complains about `no match for 'operator<<'` when I use an assertion. What gives?

If you use a user-defined type `FooType` in an assertion, you must make sure
there is an `std::ostream& operator<<(std::ostream&, const FooType&)` function
defined such that we can print a value of `FooType`.

In addition, if `FooType` is declared in a name space, the `<<` operator also
needs to be defined in the *same* name space. See
[Tip of the Week #49](https://abseil.io/tips/49) for details.

## How do I suppress the memory leak messages on Windows?

Since the statically initialized GoogleTest singleton requires allocations on
the heap, the Visual C++ memory leak detector will report memory leaks at the
end of the program run. The easiest way to avoid this is to use the
`_CrtMemCheckpoint` and `_CrtMemDumpAllObjectsSince` calls to not report any
statically initialized heap objects. See MSDN for more details and additional
heap check/debug routines.

## How can my code detect if it is running in a test?

If you write code that sniffs whether it's running in a test and does different
things accordingly, you are leaking test-only logic into production code and
there is no easy way to ensure that the test-only code paths aren't run by
mistake in production. Such cleverness also leads to
[Heisenbugs](https://en.wikipedia.org/wiki/Heisenbug). Therefore we strongly
advise against the practice, and GoogleTest doesn't provide a way to do it.

In general, the recommended way to cause the code to behave differently under
test is [Dependency Injection](https://en.wikipedia.org/wiki/Dependency_injection). You can inject
different functionality from the test and from the production code. Since your
production code doesn't link in the for-test logic at all (the
[`testonly`](https://docs.bazel.build/versions/master/be/common-definitions.html#common.testonly) attribute for BUILD targets helps to ensure
that), there is no danger in accidentally running it.

However, if you *really*, *really*, *really* have no choice, and if you follow
the rule of ending your test program names with `_test`, you can use the
*horrible* hack of sniffing your executable name (`argv[0]` in `main()`) to know
whether the code is under test.

## How do I temporarily disable a test?

If you have a broken test that you cannot fix right away, you can add the
`DISABLED_` prefix to its name. This will exclude it from execution. This is
better than commenting out the code or using `#if 0`, as disabled tests are
still compiled (and thus won't rot).

To include disabled tests in test execution, just invoke the test program with
the `--gtest_also_run_disabled_tests` flag.

## Is it OK if I have two separate `TEST(Foo, Bar)` test methods defined in different namespaces?

Yes.

The rule is **all test methods in the same test suite must use the same fixture
class**. This means that the following is **allowed** because both tests use the
same fixture class (`::testing::Test`).

```c++
namespace foo {
TEST(CoolTest, DoSomething) {
  SUCCEED();
}
}  // namespace foo

namespace bar {
TEST(CoolTest, DoSomething) {
  SUCCEED();
}
}  // namespace bar
```

However, the following code is **not allowed** and will produce a runtime error
from GoogleTest because the test methods are using different test fixture
classes with the same test suite name.

```c++
namespace foo {
class CoolTest : public ::testing::Test {};  // Fixture foo::CoolTest
TEST_F(CoolTest, DoSomething) {
  SUCCEED();
}
}  // namespace foo

namespace bar {
class CoolTest : public ::testing::Test {};  // Fixture: bar::CoolTest
TEST_F(CoolTest, DoSomething) {
  SUCCEED();
}
}  // namespace bar
```


================================================
FILE: docs/gmock_cheat_sheet.md
================================================
# gMock Cheat Sheet

## Defining a Mock Class

### Mocking a Normal Class {#MockClass}

Given

```cpp
class Foo {
 public:
  virtual ~Foo();
  virtual int GetSize() const = 0;
  virtual string Describe(const char* name) = 0;
  virtual string Describe(int type) = 0;
  virtual bool Process(Bar elem, int count) = 0;
};
```

(note that `~Foo()` **must** be virtual) we can define its mock as

```cpp
#include <gmock/gmock.h>

class MockFoo : public Foo {
 public:
  MOCK_METHOD(int, GetSize, (), (const, override));
  MOCK_METHOD(string, Describe, (const char* name), (override));
  MOCK_METHOD(string, Describe, (int type), (override));
  MOCK_METHOD(bool, Process, (Bar elem, int count), (override));
};
```

To create a "nice" mock, which ignores all uninteresting calls, a "naggy" mock,
which warns on all uninteresting calls, or a "strict" mock, which treats them as
failures:

```cpp
using ::testing::NiceMock;
using ::testing::NaggyMock;
using ::testing::StrictMock;

NiceMock<MockFoo> nice_foo;      // The type is a subclass of MockFoo.
NaggyMock<MockFoo> naggy_foo;    // The type is a subclass of MockFoo.
StrictMock<MockFoo> strict_foo;  // The type is a subclass of MockFoo.
```

{: .callout .note}
**Note:** A mock object is currently naggy by default. We may make it nice by
default in the future.

### Mocking a Class Template {#MockTemplate}

Class templates can be mocked just like any class.

To mock

```cpp
template <typename Elem>
class StackInterface {
 public:
  virtual ~StackInterface();
  virtual int GetSize() const = 0;
  virtual void Push(const Elem& x) = 0;
};
```

(note that all member functions that are mocked, including `~StackInterface()`
**must** be virtual).

```cpp
template <typename Elem>
class MockStack : public StackInterface<Elem> {
 public:
  MOCK_METHOD(int, GetSize, (), (const, override));
  MOCK_METHOD(void, Push, (const Elem& x), (override));
};
```

### Specifying Calling Conventions for Mock Functions

If your mock function doesn't use the default calling convention, you can
specify it by adding `Calltype(convention)` to `MOCK_METHOD`'s 4th parameter.
For example,

```cpp
  MOCK_METHOD(bool, Foo, (int n), (Calltype(STDMETHODCALLTYPE)));
  MOCK_METHOD(int, Bar, (double x, double y),
              (const, Calltype(STDMETHODCALLTYPE)));
```

where `STDMETHODCALLTYPE` is defined by `<objbase.h>` on Windows.

## Using Mocks in Tests {#UsingMocks}

The typical work flow is:

1.  Import the gMock names you need to use. All gMock symbols are in the
    `testing` namespace unless they are macros or otherwise noted.
2.  Create the mock objects.
3.  Optionally, set the default actions of the mock objects.
4.  Set your expectations on the mock objects (How will they be called? What
    will they do?).
5.  Exercise code that uses the mock objects; if necessary, check the result
    using googletest assertions.
6.  When a mock object is destructed, gMock automatically verifies that all
    expectations on it have been satisfied.

Here's an example:

```cpp
using ::testing::Return;                          // #1

TEST(BarTest, DoesThis) {
  MockFoo foo;                                    // #2

  ON_CALL(foo, GetSize())                         // #3
      .WillByDefault(Return(1));
  // ... other default actions ...

  EXPECT_CALL(foo, Describe(5))                   // #4
      .Times(3)
      .WillRepeatedly(Return("Category 5"));
  // ... other expectations ...

  EXPECT_EQ(MyProductionFunction(&foo), "good");  // #5
}                                                 // #6
```

## Setting Default Actions {#OnCall}

gMock has a **built-in default action** for any function that returns `void`,
`bool`, a numeric value, or a pointer. In C++11, it additionally returns
the default-constructed value, if one exists for the given type.

To customize the default action for functions with return type `T`, use
[`DefaultValue<T>`](reference/mocking.md#DefaultValue). For example:

```cpp
  // Sets the default action for return type std::unique_ptr<Buzz> to
  // creating a new Buzz every time.
  DefaultValue<std::unique_ptr<Buzz>>::SetFactory(
      [] { return std::make_unique<Buzz>(AccessLevel::kInternal); });

  // When this fires, the default action of MakeBuzz() will run, which
  // will return a new Buzz object.
  EXPECT_CALL(mock_buzzer_, MakeBuzz("hello")).Times(AnyNumber());

  auto buzz1 = mock_buzzer_.MakeBuzz("hello");
  auto buzz2 = mock_buzzer_.MakeBuzz("hello");
  EXPECT_NE(buzz1, nullptr);
  EXPECT_NE(buzz2, nullptr);
  EXPECT_NE(buzz1, buzz2);

  // Resets the default action for return type std::unique_ptr<Buzz>,
  // to avoid interfere with other tests.
  DefaultValue<std::unique_ptr<Buzz>>::Clear();
```

To customize the default action for a particular method of a specific mock
object, use [`ON_CALL`](reference/mocking.md#ON_CALL). `ON_CALL` has a similar
syntax to `EXPECT_CALL`, but it is used for setting default behaviors when you
do not require that the mock method is called. See
[Knowing When to Expect](gmock_cook_book.md#UseOnCall) for a more detailed
discussion.

## Setting Expectations {#ExpectCall}

See [`EXPECT_CALL`](reference/mocking.md#EXPECT_CALL) in the Mocking Reference.

## Matchers {#MatcherList}

See the [Matchers Reference](reference/matchers.md).

## Actions {#ActionList}

See the [Actions Reference](reference/actions.md).

## Cardinalities {#CardinalityList}

See the [`Times` clause](reference/mocking.md#EXPECT_CALL.Times) of
`EXPECT_CALL` in the Mocking Reference.

## Expectation Order

By default, expectations can be matched in *any* order. If some or all
expectations must be matched in a given order, you can use the
[`After` clause](reference/mocking.md#EXPECT_CALL.After) or
[`InSequence` clause](reference/mocking.md#EXPECT_CALL.InSequence) of
`EXPECT_CALL`, or use an [`InSequence` object](reference/mocking.md#InSequence).

## Verifying and Resetting a Mock

gMock will verify the expectations on a mock object when it is destructed, or
you can do it earlier:

```cpp
using ::testing::Mock;
...
// Verifies and removes the expectations on mock_obj;
// returns true if and only if successful.
Mock::VerifyAndClearExpectations(&mock_obj);
...
// Verifies and removes the expectations on mock_obj;
// also removes the default actions set by ON_CALL();
// returns true if and only if successful.
Mock::VerifyAndClear(&mock_obj);
```

Do not set new expectations after verifying and clearing a mock after its use.
Setting expectations after code that exercises the mock has undefined behavior.
See [Using Mocks in Tests](gmock_for_dummies.md#using-mocks-in-tests) for more
information.

You can also tell gMock that a mock object can be leaked and doesn't need to be
verified:

```cpp
Mock::AllowLeak(&mock_obj);
```

## Mock Classes

gMock defines a convenient mock class template

```cpp
class MockFunction<R(A1, ..., An)> {
 public:
  MOCK_METHOD(R, Call, (A1, ..., An));
};
```

See this [recipe](gmock_cook_book.md#UsingCheckPoints) for one application of
it.

## Flags

| Flag                           | Description                               |
| :----------------------------- | :---------------------------------------- |
| `--gmock_catch_leaked_mocks=0` | Don't report leaked mock objects as failures. |
| `--gmock_verbose=LEVEL` | Sets the default verbosity level (`info`, `warning`, or `error`) of Google Mock messages. |


================================================
FILE: docs/gmock_cook_book.md
================================================
# gMock Cookbook

You can find recipes for using gMock here. If you haven't yet, please read
[the dummy guide](gmock_for_dummies.md) first to make sure you understand the
basics.

{: .callout .note}
**Note:** gMock lives in the `testing` name space. For readability, it is
recommended to write `using ::testing::Foo;` once in your file before using the
name `Foo` defined by gMock. We omit such `using` statements in this section for
brevity, but you should do it in your own code.

## Creating Mock Classes

Mock classes are defined as normal classes, using the `MOCK_METHOD` macro to
generate mocked methods. The macro gets 3 or 4 parameters:

```cpp
class MyMock {
 public:
  MOCK_METHOD(ReturnType, MethodName, (Args...));
  MOCK_METHOD(ReturnType, MethodName, (Args...), (Specs...));
};
```

The first 3 parameters are simply the method declaration, split into 3 parts.
The 4th parameter accepts a closed list of qualifiers, which affect the
generated method:

*   **`const`** - Makes the mocked method a `const` method. Required if
    overriding a `const` method.
*   **`override`** - Marks the method with `override`. Recommended if overriding
    a `virtual` method.
*   **`noexcept`** - Marks the method with `noexcept`. Required if overriding a
    `noexcept` method.
*   **`Calltype(...)`** - Sets the call type for the method (e.g. to
    `STDMETHODCALLTYPE`), useful in Windows.
*   **`ref(...)`** - Marks the method with the reference qualification
    specified. Required if overriding a method that has reference
    qualifications. Eg `ref(&)` or `ref(&&)`.

### Dealing with unprotected commas

Unprotected commas, i.e. commas which are not surrounded by parentheses, prevent
`MOCK_METHOD` from parsing its arguments correctly:

{: .bad}
```cpp
class MockFoo {
 public:
  MOCK_METHOD(std::pair<bool, int>, GetPair, ());  // Won't compile!
  MOCK_METHOD(bool, CheckMap, (std::map<int, double>, bool));  // Won't compile!
};
```

Solution 1 - wrap with parentheses:

{: .good}
```cpp
class MockFoo {
 public:
  MOCK_METHOD((std::pair<bool, int>), GetPair, ());
  MOCK_METHOD(bool, CheckMap, ((std::map<int, double>), bool));
};
```

Note that wrapping a return or argument type with parentheses is, in general,
invalid C++. `MOCK_METHOD` removes the parentheses.

Solution 2 - define an alias:

{: .good}
```cpp
class MockFoo {
 public:
  using BoolAndInt = std::pair<bool, int>;
  MOCK_METHOD(BoolAndInt, GetPair, ());
  using MapIntDouble = std::map<int, double>;
  MOCK_METHOD(bool, CheckMap, (MapIntDouble, bool));
};
```

### Mocking Private or Protected Methods

You must always put a mock method definition (`MOCK_METHOD`) in a `public:`
section of the mock class, regardless of the method being mocked being `public`,
`protected`, or `private` in the base class. This allows `ON_CALL` and
`EXPECT_CALL` to reference the mock function from outside of the mock class.
(Yes, C++ allows a subclass to change the access level of a virtual function in
the base class.) Example:

```cpp
class Foo {
 public:
  ...
  virtual bool Transform(Gadget* g) = 0;

 protected:
  virtual void Resume();

 private:
  virtual int GetTimeOut();
};

class MockFoo : public Foo {
 public:
  ...
  MOCK_METHOD(bool, Transform, (Gadget* g), (override));

  // The following must be in the public section, even though the
  // methods are protected or private in the base class.
  MOCK_METHOD(void, Resume, (), (override));
  MOCK_METHOD(int, GetTimeOut, (), (override));
};
```

### Mocking Overloaded Methods

You can mock overloaded functions as usual. No special attention is required:

```cpp
class Foo {
  ...

  // Must be virtual as we'll inherit from Foo.
  virtual ~Foo();

  // Overloaded on the types and/or numbers of arguments.
  virtual int Add(Element x);
  virtual int Add(int times, Element x);

  // Overloaded on the const-ness of this object.
  virtual Bar& GetBar();
  virtual const Bar& GetBar() const;
};

class MockFoo : public Foo {
  ...
  MOCK_METHOD(int, Add, (Element x), (override));
  MOCK_METHOD(int, Add, (int times, Element x), (override));

  MOCK_METHOD(Bar&, GetBar, (), (override));
  MOCK_METHOD(const Bar&, GetBar, (), (const, override));
};
```

{: .callout .note}
**Note:** if you don't mock all versions of the overloaded method, the compiler
will give you a warning about some methods in the base class being hidden. To
fix that, use `using` to bring them in scope:

```cpp
class MockFoo : public Foo {
  ...
  using Foo::Add;
  MOCK_METHOD(int, Add, (Element x), (override));
  // We don't want to mock int Add(int times, Element x);
  ...
};
```

### Mocking Class Templates

You can mock class templates just like any class.

```cpp
template <typename Elem>
class StackInterface {
  ...
  // Must be virtual as we'll inherit from StackInterface.
  virtual ~StackInterface();

  virtual int GetSize() const = 0;
  virtual void Push(const Elem& x) = 0;
};

template <typename Elem>
class MockStack : public StackInterface<Elem> {
  ...
  MOCK_METHOD(int, GetSize, (), (const, override));
  MOCK_METHOD(void, Push, (const Elem& x), (override));
};
```

### Mocking Non-virtual Methods {#MockingNonVirtualMethods}

gMock can mock non-virtual functions to be used in Hi-perf dependency injection.

In this case, instead of sharing a common base class with the real class, your
mock class will be *unrelated* to the real class, but contain methods with the
same signatures. The syntax for mocking non-virtual methods is the *same* as
mocking virtual methods (just don't add `override`):

```cpp
// A simple packet stream class.  None of its members is virtual.
class ConcretePacketStream {
 public:
  void AppendPacket(Packet* new_packet);
  const Packet* GetPacket(size_t packet_number) const;
  size_t NumberOfPackets() const;
  ...
};

// A mock packet stream class.  It inherits from no other, but defines
// GetPacket() and NumberOfPackets().
class MockPacketStream {
 public:
  MOCK_METHOD(const Packet*, GetPacket, (size_t packet_number), (const));
  MOCK_METHOD(size_t, NumberOfPackets, (), (const));
  ...
};
```

Note that the mock class doesn't define `AppendPacket()`, unlike the real class.
That's fine as long as the test doesn't need to call it.

Next, you need a way to say that you want to use `ConcretePacketStream` in
production code, and use `MockPacketStream` in tests. Since the functions are
not virtual and the two classes are unrelated, you must specify your choice at
*compile time* (as opposed to run time).

One way to do it is to templatize your code that needs to use a packet stream.
More specifically, you will give your code a template type argument for the type
of the packet stream. In production, you will instantiate your template with
`ConcretePacketStream` as the type argument. In tests, you will instantiate the
same template with `MockPacketStream`. For example, you may write:

```cpp
template <class PacketStream>
void CreateConnection(PacketStream* stream) { ... }

template <class PacketStream>
class PacketReader {
 public:
  void ReadPackets(PacketStream* stream, size_t packet_num);
};
```

Then you can use `CreateConnection<ConcretePacketStream>()` and
`PacketReader<ConcretePacketStream>` in production code, and use
`CreateConnection<MockPacketStream>()` and `PacketReader<MockPacketStream>` in
tests.

```cpp
  MockPacketStream mock_stream;
  EXPECT_CALL(mock_stream, ...)...;
  .. set more expectations on mock_stream ...
  PacketReader<MockPacketStream> reader(&mock_stream);
  ... exercise reader ...
```

### Mocking Free Functions

It is not possible to directly mock a free function (i.e. a C-style function or
a static method). If you need to, you can rewrite your code to use an interface
(abstract class).

Instead of calling a free function (say, `OpenFile`) directly, introduce an
interface for it and have a concrete subclass that calls the free function:

```cpp
class FileInterface {
 public:
  ...
  virtual bool Open(const char* path, const char* mode) = 0;
};

class File : public FileInterface {
 public:
  ...
  bool Open(const char* path, const char* mode) override {
     return OpenFile(path, mode);
  }
};
```

Your code should talk to `FileInterface` to open a file. Now it's easy to mock
out the function.

This may seem like a lot of hassle, but in practice you often have multiple
related functions that you can put in the same interface, so the per-function
syntactic overhead will be much lower.

If you are concerned about the performance overhead incurred by virtual
functions, and profiling confirms your concern, you can combine this with the
recipe for [mocking non-virtual methods](#MockingNonVirtualMethods).

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.

### Old-Style `MOCK_METHODn` Macros

Before the generic `MOCK_METHOD` macro
[was introduced in 2018](https://github.com/google/googletest/commit/c5f08bf91944ce1b19bcf414fa1760e69d20afc2),
mocks where created using a family of macros collectively called `MOCK_METHODn`.
These macros are still supported, though migration to the new `MOCK_METHOD` is
recommended.

The macros in the `MOCK_METHODn` family differ from `MOCK_METHOD`:

*   The general structure is `MOCK_METHODn(MethodName, ReturnType(Args))`,
    instead of `MOCK_METHOD(ReturnType, MethodName, (Args))`.
*   The number `n` must equal the number of arguments.
*   When mocking a const method, one must use `MOCK_CONST_METHODn`.
*   When mocking a class template, the macro name must be suffixed with `_T`.
*   In order to specify the call type, the macro name must be suffixed with
    `_WITH_CALLTYPE`, and the call type is the first macro argument.

Old macros and their new equivalents:

<table>
  <tr><th colspan=2>Simple</th></tr>
  <tr>
    <td>Old</td>
    <td><code>MOCK_METHOD1(Foo, bool(int))</code></td>
  </tr>
  <tr>
    <td>New</td>
    <td><code>MOCK_METHOD(bool, Foo, (int))</code></td>
  </tr>

  <tr><th colspan=2>Const Method</th></tr>
  <tr>
    <td>Old</td>
    <td><code>MOCK_CONST_METHOD1(Foo, bool(int))</code></td>
  </tr>
  <tr>
    <td>New</td>
    <td><code>MOCK_METHOD(bool, Foo, (int), (const))</code></td>
  </tr>

  <tr><th colspan=2>Method in a Class Template</th></tr>
  <tr>
    <td>Old</td>
    <td><code>MOCK_METHOD1_T(Foo, bool(int))</code></td>
  </tr>
  <tr>
    <td>New</td>
    <td><code>MOCK_METHOD(bool, Foo, (int))</code></td>
  </tr>

  <tr><th colspan=2>Const Method in a Class Template</th></tr>
  <tr>
    <td>Old</td>
    <td><code>MOCK_CONST_METHOD1_T(Foo, bool(int))</code></td>
  </tr>
  <tr>
    <td>New</td>
    <td><code>MOCK_METHOD(bool, Foo, (int), (const))</code></td>
  </tr>

  <tr><th colspan=2>Method with Call Type</th></tr>
  <tr>
    <td>Old</td>
    <td><code>MOCK_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, Foo, bool(int))</code></td>
  </tr>
  <tr>
    <td>New</td>
    <td><code>MOCK_METHOD(bool, Foo, (int), (Calltype(STDMETHODCALLTYPE)))</code></td>
  </tr>

  <tr><th colspan=2>Const Method with Call Type</th></tr>
  <tr>
    <td>Old</td>
    <td><code>MOCK_CONST_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, Foo, bool(int))</code></td>
  </tr>
  <tr>
    <td>New</td>
    <td><code>MOCK_METHOD(bool, Foo, (int), (const, Calltype(STDMETHODCALLTYPE)))</code></td>
  </tr>

  <tr><th colspan=2>Method with Call Type in a Class Template</th></tr>
  <tr>
    <td>Old</td>
    <td><code>MOCK_METHOD1_T_WITH_CALLTYPE(STDMETHODCALLTYPE, Foo, bool(int))</code></td>
  </tr>
  <tr>
    <td>New</td>
    <td><code>MOCK_METHOD(bool, Foo, (int), (Calltype(STDMETHODCALLTYPE)))</code></td>
  </tr>

  <tr><th colspan=2>Const Method with Call Type in a Class Template</th></tr>
  <tr>
    <td>Old</td>
    <td><code>MOCK_CONST_METHOD1_T_WITH_CALLTYPE(STDMETHODCALLTYPE, Foo, bool(int))</code></td>
  </tr>
  <tr>
    <td>New</td>
    <td><code>MOCK_METHOD(bool, Foo, (int), (const, Calltype(STDMETHODCALLTYPE)))</code></td>
  </tr>
</table>

### The Nice, the Strict, and the Naggy {#NiceStrictNaggy}

If a mock method has no `EXPECT_CALL` spec but is called, we say that it's an
"uninteresting call", and the default action (which can be specified using
`ON_CALL()`) of the method will be taken. Currently, an uninteresting call will
also by default cause gMock to print a warning.

However, sometimes you may want to ignore these uninteresting calls, and
sometimes you may want to treat them as errors. gMock lets you make the decision
on a per-mock-object basis.

Suppose your test uses a mock class `MockFoo`:

```cpp
TEST(...) {
  MockFoo mock_foo;
  EXPECT_CALL(mock_foo, DoThis());
  ... code that uses mock_foo ...
}
```

If a method of `mock_foo` other than `DoThis()` is called, you will get a
warning. However, if you rewrite your test to use `NiceMock<MockFoo>` instead,
you can suppress the warning:

```cpp
using ::testing::NiceMock;

TEST(...) {
  NiceMock<MockFoo> mock_foo;
  EXPECT_CALL(mock_foo, DoThis());
  ... code that uses mock_foo ...
}
```

`NiceMock<MockFoo>` is a subclass of `MockFoo`, so it can be used wherever
`MockFoo` is accepted.

It also works if `MockFoo`'s constructor takes some arguments, as
`NiceMock<MockFoo>` "inherits" `MockFoo`'s constructors:

```cpp
using ::testing::NiceMock;

TEST(...) {
  NiceMock<MockFoo> mock_foo(5, "hi");  // Calls MockFoo(5, "hi").
  EXPECT_CALL(mock_foo, DoThis());
  ... code that uses mock_foo ...
}
```

The usage of `StrictMock` is similar, except that it makes all uninteresting
calls failures:

```cpp
using ::testing::StrictMock;

TEST(...) {
  StrictMock<MockFoo> mock_foo;
  EXPECT_CALL(mock_foo, DoThis());
  ... code that uses mock_foo ...

  // The test will fail if a method of mock_foo other than DoThis()
  // is called.
}
```

{: .callout .note}
NOTE: `NiceMock` and `StrictMock` only affects *uninteresting* calls (calls of
*methods* with no expectations); they do not affect *unexpected* calls (calls of
methods with expectations, but they don't match). See
[Understanding Uninteresting vs Unexpected Calls](#uninteresting-vs-unexpected).

There are some caveats though (sadly they are side effects of C++'s
limitations):

1.  `NiceMock<MockFoo>` and `StrictMock<MockFoo>` only work for mock methods
    defined using the `MOCK_METHOD` macro **directly** in the `MockFoo` class.
    If a mock method is defined in a **base class** of `MockFoo`, the "nice" or
    "strict" modifier may not affect it, depending on the compiler. In
    particular, nesting `NiceMock` and `StrictMock` (e.g.
    `NiceMock<StrictMock<MockFoo> >`) is **not** supported.
2.  `NiceMock<MockFoo>` and `StrictMock<MockFoo>` may not work correctly if the
    destructor of `MockFoo` is not virtual. We would like to fix this, but it
    requires cleaning up existing tests.

Finally, you should be **very cautious** about when to use naggy or strict
mocks, as they tend to make tests more brittle and harder to maintain. When you
refactor your code without changing its externally visible behavior, ideally you
shouldn't need to update any tests. If your code interacts with a naggy mock,
however, you may start to get spammed with warnings as the result of your
change. Worse, if your code interacts with a strict mock, your tests may start
to fail and you'll be forced to fix them. Our general recommendation is to use
nice mocks (not yet the default) most of the time, use naggy mocks (the current
default) when developing or debugging tests, and use strict mocks only as the
last resort.

### Simplifying the Interface without Breaking Existing Code {#SimplerInterfaces}

Sometimes a method has a long list of arguments that is mostly uninteresting.
For example:

```cpp
class LogSink {
 public:
  ...
  virtual void send(LogSeverity severity, const char* full_filename,
                    const char* base_filename, int line,
                    const struct tm* tm_time,
                    const char* message, size_t message_len) = 0;
};
```

This method's argument list is lengthy and hard to wo
Download .txt
gitextract_ucy1bd7n/

├── .clang-format
├── .github/
│   └── ISSUE_TEMPLATE/
│       ├── 00-bug_report.yml
│       ├── 10-feature_request.yml
│       └── config.yml
├── .gitignore
├── BUILD.bazel
├── CMakeLists.txt
├── CONTRIBUTING.md
├── CONTRIBUTORS
├── LICENSE
├── MODULE.bazel
├── README.md
├── WORKSPACE
├── WORKSPACE.bzlmod
├── ci/
│   ├── linux-presubmit.sh
│   ├── macos-presubmit.sh
│   └── windows-presubmit.bat
├── docs/
│   ├── _config.yml
│   ├── _data/
│   │   └── navigation.yml
│   ├── _layouts/
│   │   └── default.html
│   ├── _sass/
│   │   └── main.scss
│   ├── advanced.md
│   ├── assets/
│   │   └── css/
│   │       └── style.scss
│   ├── community_created_documentation.md
│   ├── faq.md
│   ├── gmock_cheat_sheet.md
│   ├── gmock_cook_book.md
│   ├── gmock_faq.md
│   ├── gmock_for_dummies.md
│   ├── index.md
│   ├── pkgconfig.md
│   ├── platforms.md
│   ├── primer.md
│   ├── quickstart-bazel.md
│   ├── quickstart-cmake.md
│   ├── reference/
│   │   ├── actions.md
│   │   ├── assertions.md
│   │   ├── matchers.md
│   │   ├── mocking.md
│   │   └── testing.md
│   └── samples.md
├── fake_fuchsia_sdk.bzl
├── googlemock/
│   ├── CMakeLists.txt
│   ├── README.md
│   ├── cmake/
│   │   ├── gmock.pc.in
│   │   └── gmock_main.pc.in
│   ├── docs/
│   │   └── README.md
│   ├── include/
│   │   └── gmock/
│   │       ├── gmock-actions.h
│   │       ├── gmock-cardinalities.h
│   │       ├── gmock-function-mocker.h
│   │       ├── gmock-matchers.h
│   │       ├── gmock-more-actions.h
│   │       ├── gmock-more-matchers.h
│   │       ├── gmock-nice-strict.h
│   │       ├── gmock-spec-builders.h
│   │       ├── gmock.h
│   │       └── internal/
│   │           ├── custom/
│   │           │   ├── README.md
│   │           │   ├── gmock-generated-actions.h
│   │           │   ├── gmock-matchers.h
│   │           │   └── gmock-port.h
│   │           ├── gmock-internal-utils.h
│   │           ├── gmock-port.h
│   │           └── gmock-pp.h
│   ├── src/
│   │   ├── gmock-all.cc
│   │   ├── gmock-cardinalities.cc
│   │   ├── gmock-internal-utils.cc
│   │   ├── gmock-matchers.cc
│   │   ├── gmock-spec-builders.cc
│   │   ├── gmock.cc
│   │   └── gmock_main.cc
│   └── test/
│       ├── BUILD.bazel
│       ├── gmock-actions_test.cc
│       ├── gmock-cardinalities_test.cc
│       ├── gmock-function-mocker_test.cc
│       ├── gmock-internal-utils_test.cc
│       ├── gmock-matchers-arithmetic_test.cc
│       ├── gmock-matchers-comparisons_test.cc
│       ├── gmock-matchers-containers_test.cc
│       ├── gmock-matchers-misc_test.cc
│       ├── gmock-matchers_test.h
│       ├── gmock-more-actions_test.cc
│       ├── gmock-nice-strict_test.cc
│       ├── gmock-port_test.cc
│       ├── gmock-pp-string_test.cc
│       ├── gmock-pp_test.cc
│       ├── gmock-spec-builders_test.cc
│       ├── gmock_all_test.cc
│       ├── gmock_ex_test.cc
│       ├── gmock_leak_test.py
│       ├── gmock_leak_test_.cc
│       ├── gmock_link2_test.cc
│       ├── gmock_link_test.cc
│       ├── gmock_link_test.h
│       ├── gmock_output_test.py
│       ├── gmock_output_test_.cc
│       ├── gmock_output_test_golden.txt
│       ├── gmock_stress_test.cc
│       ├── gmock_test.cc
│       └── gmock_test_utils.py
├── googletest/
│   ├── CMakeLists.txt
│   ├── README.md
│   ├── cmake/
│   │   ├── Config.cmake.in
│   │   ├── gtest.pc.in
│   │   ├── gtest_main.pc.in
│   │   ├── internal_utils.cmake
│   │   └── libgtest.la.in
│   ├── docs/
│   │   └── README.md
│   ├── include/
│   │   └── gtest/
│   │       ├── gtest-assertion-result.h
│   │       ├── gtest-death-test.h
│   │       ├── gtest-matchers.h
│   │       ├── gtest-message.h
│   │       ├── gtest-param-test.h
│   │       ├── gtest-printers.h
│   │       ├── gtest-spi.h
│   │       ├── gtest-test-part.h
│   │       ├── gtest-typed-test.h
│   │       ├── gtest.h
│   │       ├── gtest_pred_impl.h
│   │       ├── gtest_prod.h
│   │       └── internal/
│   │           ├── custom/
│   │           │   ├── README.md
│   │           │   ├── gtest-port.h
│   │           │   ├── gtest-printers.h
│   │           │   └── gtest.h
│   │           ├── gtest-death-test-internal.h
│   │           ├── gtest-filepath.h
│   │           ├── gtest-internal.h
│   │           ├── gtest-param-util.h
│   │           ├── gtest-port-arch.h
│   │           ├── gtest-port.h
│   │           ├── gtest-string.h
│   │           └── gtest-type-util.h
│   ├── samples/
│   │   ├── prime_tables.h
│   │   ├── sample1.cc
│   │   ├── sample1.h
│   │   ├── sample10_unittest.cc
│   │   ├── sample1_unittest.cc
│   │   ├── sample2.cc
│   │   ├── sample2.h
│   │   ├── sample2_unittest.cc
│   │   ├── sample3-inl.h
│   │   ├── sample3_unittest.cc
│   │   ├── sample4.cc
│   │   ├── sample4.h
│   │   ├── sample4_unittest.cc
│   │   ├── sample5_unittest.cc
│   │   ├── sample6_unittest.cc
│   │   ├── sample7_unittest.cc
│   │   ├── sample8_unittest.cc
│   │   └── sample9_unittest.cc
│   ├── src/
│   │   ├── gtest-all.cc
│   │   ├── gtest-assertion-result.cc
│   │   ├── gtest-death-test.cc
│   │   ├── gtest-filepath.cc
│   │   ├── gtest-internal-inl.h
│   │   ├── gtest-matchers.cc
│   │   ├── gtest-port.cc
│   │   ├── gtest-printers.cc
│   │   ├── gtest-test-part.cc
│   │   ├── gtest-typed-test.cc
│   │   ├── gtest.cc
│   │   └── gtest_main.cc
│   └── test/
│       ├── BUILD.bazel
│       ├── googletest-break-on-failure-unittest.py
│       ├── googletest-break-on-failure-unittest_.cc
│       ├── googletest-catch-exceptions-test.py
│       ├── googletest-catch-exceptions-test_.cc
│       ├── googletest-color-test.py
│       ├── googletest-color-test_.cc
│       ├── googletest-death-test-test.cc
│       ├── googletest-death-test_ex_test.cc
│       ├── googletest-env-var-test.py
│       ├── googletest-env-var-test_.cc
│       ├── googletest-fail-if-no-test-linked-test-with-disabled-test_.cc
│       ├── googletest-fail-if-no-test-linked-test-with-enabled-test_.cc
│       ├── googletest-fail-if-no-test-linked-test.py
│       ├── googletest-fail-if-no-test-selected-test.py
│       ├── googletest-failfast-unittest.py
│       ├── googletest-failfast-unittest_.cc
│       ├── googletest-filepath-test.cc
│       ├── googletest-filter-unittest.py
│       ├── googletest-filter-unittest_.cc
│       ├── googletest-global-environment-unittest.py
│       ├── googletest-global-environment-unittest_.cc
│       ├── googletest-json-outfiles-test.py
│       ├── googletest-json-output-unittest.py
│       ├── googletest-list-tests-unittest.py
│       ├── googletest-list-tests-unittest_.cc
│       ├── googletest-listener-test.cc
│       ├── googletest-message-test.cc
│       ├── googletest-options-test.cc
│       ├── googletest-output-test-golden-lin.txt
│       ├── googletest-output-test.py
│       ├── googletest-output-test_.cc
│       ├── googletest-param-test-invalid-name1-test.py
│       ├── googletest-param-test-invalid-name1-test_.cc
│       ├── googletest-param-test-invalid-name2-test.py
│       ├── googletest-param-test-invalid-name2-test_.cc
│       ├── googletest-param-test-test.cc
│       ├── googletest-param-test-test.h
│       ├── googletest-param-test2-test.cc
│       ├── googletest-port-test.cc
│       ├── googletest-printers-test.cc
│       ├── googletest-setuptestsuite-test.py
│       ├── googletest-setuptestsuite-test_.cc
│       ├── googletest-shuffle-test.py
│       ├── googletest-shuffle-test_.cc
│       ├── googletest-test-part-test.cc
│       ├── googletest-throw-on-failure-test.py
│       ├── googletest-throw-on-failure-test_.cc
│       ├── googletest-uninitialized-test.py
│       ├── googletest-uninitialized-test_.cc
│       ├── gtest-typed-test2_test.cc
│       ├── gtest-typed-test_test.cc
│       ├── gtest-typed-test_test.h
│       ├── gtest-unittest-api_test.cc
│       ├── gtest_all_test.cc
│       ├── gtest_assert_by_exception_test.cc
│       ├── gtest_dirs_test.cc
│       ├── gtest_environment_test.cc
│       ├── gtest_help_test.py
│       ├── gtest_help_test_.cc
│       ├── gtest_json_test_utils.py
│       ├── gtest_list_output_unittest.py
│       ├── gtest_list_output_unittest_.cc
│       ├── gtest_main_unittest.cc
│       ├── gtest_no_test_unittest.cc
│       ├── gtest_pred_impl_unittest.cc
│       ├── gtest_premature_exit_test.cc
│       ├── gtest_prod_test.cc
│       ├── gtest_repeat_test.cc
│       ├── gtest_skip_check_output_test.py
│       ├── gtest_skip_environment_check_output_test.py
│       ├── gtest_skip_in_environment_setup_test.cc
│       ├── gtest_skip_test.cc
│       ├── gtest_sole_header_test.cc
│       ├── gtest_stress_test.cc
│       ├── gtest_test_macro_stack_footprint_test.cc
│       ├── gtest_test_utils.py
│       ├── gtest_testbridge_test.py
│       ├── gtest_testbridge_test_.cc
│       ├── gtest_throw_on_failure_ex_test.cc
│       ├── gtest_unittest.cc
│       ├── gtest_xml_outfile1_test_.cc
│       ├── gtest_xml_outfile2_test_.cc
│       ├── gtest_xml_outfiles_test.py
│       ├── gtest_xml_output_unittest.py
│       ├── gtest_xml_output_unittest_.cc
│       ├── gtest_xml_test_utils.py
│       ├── production.cc
│       └── production.h
└── googletest_deps.bzl
Download .txt
Showing preview only (868K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (5410 symbols across 165 files)

FILE: googlemock/include/gmock/gmock-actions.h
  function namespace (line 152) | namespace testing {
  function Result (line 495) | Result Call(Args... args) && {
  function StdFunctionAdaptor (line 508) | StdFunctionAdaptor final {
  type T (line 589) | typedef T (*FactoryFunction)();
  function SetFactory (line 590) | static void SetFactory(FactoryFunction factory) {
  function Clear (line 596) | static void Clear() {
  function IsSet (line 602) | static bool IsSet() { return producer_ != nullptr; }
  function Exists (line 606) | static bool Exists() {
  function T (line 613) | static T Get() {
  function class (line 625) | class FixedValueProducer : public ValueProducer {
  function class (line 636) | class FactoryValueProducer : public ValueProducer {
  function Clear (line 662) | static void Clear() { address_ = nullptr; }
  function IsSet (line 665) | static bool IsSet() { return address_ != nullptr; }
  function Exists (line 669) | static bool Exists() {
  function T (line 676) | static T& Get() {
  function Get (line 691) | static void Get() {}
  type typename (line 707) | typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
  type ActionAdapter (line 739) | struct ActionAdapter {
  type typename (line 755) | typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
  function explicit (line 774) | explicit Action(ActionInterface<F>* impl)
  function Result (line 793) | Result Perform(ArgumentTuple args) const {
  function operator (line 802) | operator OnceAction<F>() const {  // NOLINT
  type typename (line 886) | typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
  function explicit (line 888) | explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {}
  function Result (line 890) | Result Perform(const ArgumentTuple& args) override {
  function explicit (line 926) | explicit ByMoveWrapper(T value) : payload(std::move(value)) {}
  function ReturnAction (line 932) | [[nodiscard]] ReturnAction final {
  type State (line 1114) | struct State {
  function class (line 1125) | class [[nodiscard]] ReturnNullAction {
  function class (line 1137) | class [[nodiscard]] ReturnVoidAction {
  type typename (line 1159) | typedef typename Function<F>::Result Result;
  type typename (line 1174) | typedef typename Function<F>::ArgumentTuple ArgumentTuple;
  function explicit (line 1176) | explicit Impl(T& ref) : ref_(ref) {}
  function Result (line 1178) | Result Perform(const ArgumentTuple&) override { return ref_; }
  type typename (line 1201) | typedef typename Function<F>::Result Result;
  type typename (line 1216) | typedef typename Function<F>::ArgumentTuple ArgumentTuple;
  function explicit (line 1218) | explicit Impl(const T& value) : value_(value) {}
  function Result (line 1220) | Result Perform(const ArgumentTuple&) override { return value_; }
  function T (line 1247) | T Next() {
  function class (line 1260) | class [[nodiscard]] DoDefaultAction {
  type typename (line 1381) | typedef typename internal::Function<F>::Result Result;
  function R (line 1448) | R operator()(Args&&... args) && {
  function R (line 1472) | R operator()(Args&&... args) && {
  type UserConstructorTag (line 1512) | struct UserConstructorTag {}
  function R (line 1645) | R operator()(Args... args) && {
  type OA (line 1695) | struct OA {
  function T (line 1720) | T* operator()() const {
  function DoDelete (line 1808) | void DoDelete(T* ptr) {
  function DoDelete (line 1813) | [[deprecated(
  type RethrowAction (line 1839) | struct RethrowAction {
  type internal (line 1880) | typedef internal::IgnoredValue Unused;
  function typename (line 1885) | typename std::decay<Action>::type DoAll(Action&& action) {
  function PolymorphicAction (line 1960) | inline PolymorphicAction<internal::ReturnNullAction> ReturnNull() {
  function PolymorphicAction (line 1965) | inline PolymorphicAction<internal::ReturnVoidAction> Return() {
  function internal (line 2016) | inline internal::DoDefaultAction DoDefault() {
  function typename (line 2059) | typename std::decay<FunctionImpl>::type Invoke(FunctionImpl&& function_i...
  function internal (line 2191) | inline internal::RethrowAction Rethrow(std::exception_ptr exception) {
  function namespace (line 2196) | namespace internal {
  function explicit (line 2237) | explicit ActionImpl(std::shared_ptr<Impl> impl) : Base{std::move(impl)} {}

FILE: googlemock/include/gmock/gmock-cardinalities.h
  function namespace (line 53) | namespace testing {

FILE: googlemock/include/gmock/gmock-function-mocker.h
  function namespace (line 48) | namespace testing {

FILE: googlemock/include/gmock/gmock-matchers.h
  function namespace (line 291) | namespace testing {
  type RawT (line 556) | typedef GTEST_REMOVE_REFERENCE_AND_CONST_(T) RawT;
  type RawU (line 557) | typedef GTEST_REMOVE_REFERENCE_AND_CONST_(U) RawU;
  function namespace (line 573) | namespace internal {
  function class (line 794) | class [[nodiscard]] NotNullMatcher {
  function DescribeTo (line 802) | void DescribeTo(::std::ostream* os) const { *os << "isn't NULL"; }
  function DescribeNegationTo (line 803) | void DescribeNegationTo(::std::ostream* os) const { *os << "is NULL"; }
  function MatchAndExplain (line 853) | bool MatchAndExplain(Super& x,
  function DescribeTo (line 859) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 864) | void DescribeNegationTo(::std::ostream* os) const override {
  function CaseInsensitiveCStringEquals (line 877) | inline bool CaseInsensitiveCStringEquals(const char* lhs, const char* rh...
  function CaseInsensitiveCStringEquals (line 881) | inline bool CaseInsensitiveCStringEquals(const wchar_t* lhs,
  function MatchAndExplain (line 988) | bool MatchAndExplain(const internal::StringView& s,
  function DescribeTo (line 1018) | void DescribeTo(::std::ostream* os) const {
  function DescribeNegationTo (line 1023) | void DescribeNegationTo(::std::ostream* os) const {
  function MatchAndExplain (line 1041) | bool MatchAndExplain(const internal::StringView& s,
  function DescribeTo (line 1072) | void DescribeTo(::std::ostream* os) const {
  function DescribeNegationTo (line 1077) | void DescribeNegationTo(::std::ostream* os) const {
  function MatchAndExplain (line 1095) | bool MatchAndExplain(const internal::StringView& s,
  function DescribeTo (line 1126) | void DescribeTo(::std::ostream* os) const {
  function DescribeNegationTo (line 1131) | void DescribeNegationTo(::std::ostream* os) const {
  function class (line 1142) | class [[nodiscard]] WhenBase64UnescapedMatcher {
  function DescribeTo (line 1211) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 1214) | void DescribeNegationTo(::std::ostream* os) const override {
  function matcher_ (line 1257) | matcher_(matcher) {}
  function MatchAndExplain (line 1259) | bool MatchAndExplain(const T& x,
  function DescribeTo (line 1264) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 1268) | void DescribeNegationTo(::std::ostream* os) const override {
  function DescribeTo (line 1304) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 1313) | void DescribeNegationTo(::std::ostream* os) const override {
  function MatchAndExplain (line 1322) | bool MatchAndExplain(const T& x,
  function DescribeNegationTo (line 1449) | void DescribeNegationTo(::std::ostream* os) const override {
  function MatchAndExplain (line 1458) | bool MatchAndExplain(const T& x,
  function DescribeTo (line 1602) | void DescribeTo(::std::ostream* os) const {
  function DescribeNegationTo (line 1606) | void DescribeNegationTo(::std::ostream* os) const {
  function class (line 1712) | class [[nodiscard]] IsNanMatcher {
  function DescribeTo (line 1720) | void DescribeTo(::std::ostream* os) const { *os << "is NaN"; }
  function DescribeNegationTo (line 1721) | void DescribeNegationTo(::std::ostream* os) const { *os << "isn't NaN"; }
  function DescribeTo (line 1796) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 1817) | void DescribeNegationTo(::std::ostream* os) const override {
  function operator (line 1854) | operator Matcher<const FloatType&>() const {
  function operator (line 1859) | operator Matcher<FloatType&>() const {
  function explicit (line 1881) | explicit FloatingEq2Matcher(bool nan_eq_nan) { Init(-1, nan_eq_nan); }
  function explicit (line 1883) | explicit FloatingEq2Matcher(FloatType max_abs_error) {
  function explicit (line 1975) | explicit Impl(const InnerMatcher& matcher)
  function DescribeTo (line 1978) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 1983) | void DescribeNegationTo(::std::ostream* os) const override {
  function MatchAndExplain (line 1988) | bool MatchAndExplain(Pointer pointer,
  function typename (line 2031) | typename std::pointer_traits<GTEST_REMOVE_REFERENCE_AND_CONST_(
  function DescribeTo (line 2037) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 2042) | void DescribeNegationTo(::std::ostream* os) const override {
  function MatchAndExplain (line 2047) | bool MatchAndExplain(PointerType pointer,
  function matcher_ (line 2072) | matcher_(matcher) {}
  function DescribeTo (line 2074) | void DescribeTo(::std::ostream* os) const {
  function DescribeNegationTo (line 2079) | void DescribeNegationTo(::std::ostream* os) const {
  function std (line 2087) | static std::string GetToName() { return GetTypeName<To>(); }
  function DescribeTo (line 2148) | void DescribeTo(::std::ostream* os) const {
  function DescribeNegationTo (line 2153) | void DescribeNegationTo(::std::ostream* os) const {
  function MatchAndExplainImpl (line 2175) | bool MatchAndExplainImpl(std::true_type /* is_pointer */, const Class* p,
  function DescribeTo (line 2215) | void DescribeTo(::std::ostream* os) const {
  function DescribeNegationTo (line 2220) | void DescribeNegationTo(::std::ostream* os) const {
  function MatchAndExplainImpl (line 2243) | bool MatchAndExplainImpl(std::true_type /* is_pointer */, const Class* p,
  type Functor (line 2266) | typedef Functor StorageType;
  function CheckIsValid (line 2268) | static void CheckIsValid(Functor /* functor */) {}
  type ResType (line 2279) | typedef ResType ResultType;
  type ResType (line 2280) | typedef ResType (*StorageType)(ArgType);
  function CheckIsValid (line 2282) | static void CheckIsValid(ResType (*f)(ArgType)) {
  function ResType (line 2287) | ResType Invoke(ResType (*f)(ArgType), T arg) {
  function DescribeTo (line 2334) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 2343) | void DescribeNegationTo(::std::ostream* os) const override {
  function MatchAndExplain (line 2352) | bool MatchAndExplain(T obj, MatchResultListener* listener) const override {
  function explicit (line 2399) | explicit Impl(const SizeMatcher& size_matcher)
  function DescribeTo (line 2402) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 2406) | void DescribeNegationTo(::std::ostream* os) const override {
  function MatchAndExplain (line 2411) | bool MatchAndExplain(Container container,
  type typename (line 2449) | typedef typename std::iterator_traits<
  function explicit (line 2452) | explicit Impl(const DistanceMatcher& distance_matcher)
  function DescribeTo (line 2455) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 2459) | void DescribeNegationTo(::std::ostream* os) const override {
  function MatchAndExplain (line 2464) | bool MatchAndExplain(Container container,
  type typename (line 2500) | typedef typename View::type StlContainer;
  type typename (line 2501) | typedef typename View::const_reference StlContainerReference;
  function explicit (line 2510) | explicit ContainerEqMatcher(const Container& expected)
  function DescribeTo (line 2513) | void DescribeTo(::std::ostream* os) const {
  function DescribeNegationTo (line 2517) | void DescribeNegationTo(::std::ostream* os) const {
  type internal (line 2525) | typedef internal::StlContainerView<
  type typename (line 2601) | typedef typename LhsView::type LhsStlContainer;
  type typename (line 2602) | typedef typename LhsView::const_reference LhsStlContainerReference;
  type typename (line 2605) | typedef typename RemoveConstFromKey<
  function DescribeTo (line 2612) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 2617) | void DescribeNegationTo(::std::ostream* os) const override {
  function MatchAndExplain (line 2622) | bool MatchAndExplain(LhsContainer lhs,
  type typename (line 2672) | typedef typename RhsView::type RhsStlContainer;
  type typename (line 2673) | typedef typename internal::RangeTraits<RhsStlContainer>::value_type RhsV...
  type typename (line 2701) | typedef typename LhsView::type LhsStlContainer;
  type typename (line 2702) | typedef typename LhsView::const_reference LhsStlContainerReference;
  type typename (line 2703) | typedef
  type LhsValue (line 2709) | typedef ::std::tuple<const LhsValue&, const RhsValue&> InnerMatcherArg;
  function DescribeTo (line 2716) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 2723) | void DescribeNegationTo(::std::ostream* os) const override {
  function MatchAndExplain (line 2732) | bool MatchAndExplain(LhsContainer lhs,
  type typename (line 2788) | typedef typename View::type StlContainer;
  type typename (line 2789) | typedef typename View::const_reference StlContainerReference;
  type typename (line 2790) | typedef typename internal::RangeTraits<StlContainer>::value_type Element;
  function MatchAndExplainImpl (line 2800) | bool MatchAndExplainImpl(bool all_elements_should_match, Container conta...
  function MatchAndExplainImpl (line 2819) | bool MatchAndExplainImpl(const Matcher<size_t>& count_matcher,
  function DescribeTo (line 2956) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 2961) | void DescribeNegationTo(::std::ostream* os) const override {
  function MatchAndExplain (line 2966) | bool MatchAndExplain(Container container,
  function DescribeTo (line 2984) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 2991) | void DescribeNegationTo(::std::ostream* os) const override {
  function MatchAndExplain (line 2998) | bool MatchAndExplain(Container container,
  type typename (line 3136) | typedef typename RawPairType::first_type KeyType;
  function MatchAndExplain (line 3145) | bool MatchAndExplain(PairType key_value,
  function DescribeTo (line 3158) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 3164) | void DescribeNegationTo(::std::ostream* os) const override {
  function explicit (line 3206) | explicit Impl(const InnerMatcher& matcher)
  function DescribeTo (line 3209) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 3214) | void DescribeNegationTo(::std::ostream* os) const override {
  function MatchAndExplain (line 3219) | bool MatchAndExplain(Type object,
  type typename (line 3238) | typedef typename RawPairType::first_type FirstType;
  type typename (line 3239) | typedef typename RawPairType::second_type SecondType;
  function DescribeTo (line 3249) | void DescribeTo(::std::ostream* os) const override {
  function DescribeNegationTo (line 3257) | void DescribeNegationTo(::std::ostream* os) const override {
  function MatchAndExplain (line 3266) | bool MatchAndExplain(PairType a_pair,
  function matchers_ (line 3514) | FieldsAreMatcherImpl(const Inner& matchers)
  function DescribeTo (line 3519) | void DescribeTo(::std::ostream* os) const override {
  type typename (line 4432) | typedef typename ::std::iterator_traits<Iter>::value_type T;
  type typename (line 5082) | typedef typename internal::StlContainerView<RhsContainer> RhsView;
  type typename (line 5083) | typedef typename RhsView::type RhsStlContainer;
  type typename (line 5084) | typedef typename internal::RangeTraits<RhsStlContainer>::value_type Second;

FILE: googlemock/include/gmock/gmock-more-actions.h
  function namespace (line 578) | namespace testing {

FILE: googlemock/include/gmock/gmock-more-matchers.h
  function namespace (line 48) | namespace testing {

FILE: googlemock/include/gmock/gmock-nice-strict.h
  function namespace (line 72) | namespace testing {

FILE: googlemock/include/gmock/gmock-spec-builders.h
  function namespace (line 90) | namespace testing {
  type CallReaction (line 355) | enum CallReaction {
  function class (line 364) | class GTEST_API_ Mock {
  function class (line 481) | class GTEST_API_ Expectation {
  function class (line 560) | class ExpectationSet {
  function class (line 615) | class GTEST_API_ Sequence {
  function class (line 653) | class GTEST_API_ InSequence {
  function namespace (line 665) | namespace internal {
  type typename (line 1285) | typedef
  function T (line 1351) | T Unwrap() { return std::move(value_); }
  function explicit (line 1371) | explicit ReferenceOrValueWrapper(reference ref) : value_ptr_(&ref) {}
  function class (line 1393) | class Cleanup final {
  function UninterestingCallCleanupHandler (line 1402) | struct UntypedFunctionMockerBase::UninterestingCallCleanupHandler {
  function FailureCleanupHandler (line 1411) | struct UntypedFunctionMockerBase::FailureCleanupHandler {
  function public (line 1441) | public UntypedFunctionMockerBase {
  function namespace (line 1900) | namespace internal {
  function Expectation (line 2066) | inline Expectation::Expectation(internal::ExpectationBase& exp)  // NOLINT

FILE: googlemock/include/gmock/gmock.h
  function namespace (line 72) | namespace testing {

FILE: googlemock/include/gmock/internal/gmock-internal-utils.h
  function namespace (line 54) | namespace testing {

FILE: googlemock/src/gmock-cardinalities.cc
  type testing (line 45) | namespace testing {
    class BetweenCardinalityImpl (line 50) | class BetweenCardinalityImpl : public CardinalityInterface {
      method BetweenCardinalityImpl (line 52) | BetweenCardinalityImpl(int min, int max)
      method ConservativeLowerBound (line 72) | int ConservativeLowerBound() const override { return min_; }
      method ConservativeUpperBound (line 73) | int ConservativeUpperBound() const override { return max_; }
      method IsSatisfiedByCallCount (line 75) | bool IsSatisfiedByCallCount(int call_count) const override {
      method IsSaturatedByCallCount (line 79) | bool IsSaturatedByCallCount(int call_count) const override {
      method BetweenCardinalityImpl (line 89) | BetweenCardinalityImpl(const BetweenCardinalityImpl&) = delete;
      method BetweenCardinalityImpl (line 90) | BetweenCardinalityImpl& operator=(const BetweenCardinalityImpl&) = d...
    function FormatTimes (line 94) | inline std::string FormatTimes(int n) {
    function GTEST_API_ (line 139) | GTEST_API_ Cardinality AtLeast(int n) { return Between(n, INT_MAX); }
    function GTEST_API_ (line 142) | GTEST_API_ Cardinality AtMost(int n) { return Between(0, n); }
    function GTEST_API_ (line 145) | GTEST_API_ Cardinality AnyNumber() { return AtLeast(0); }
    function GTEST_API_ (line 148) | GTEST_API_ Cardinality Between(int min, int max) {
    function GTEST_API_ (line 153) | GTEST_API_ Cardinality Exactly(int n) { return Between(n, n); }

FILE: googlemock/src/gmock-internal-utils.cc
  type testing (line 54) | namespace testing {
    type internal (line 55) | namespace internal {
      function GTEST_API_ (line 59) | GTEST_API_ std::string JoinAsKeyValueTuple(
      function GTEST_API_ (line 81) | GTEST_API_ std::string ConvertIdentifierNameToWords(const char* id_n...
      class GoogleTestFailureReporter (line 102) | class GoogleTestFailureReporter : public FailureReporterInterface {
        method ReportFailure (line 104) | void ReportFailure(FailureType type, const char* file, int line,
      function GTEST_API_ (line 117) | GTEST_API_ FailureReporterInterface* GetFailureReporter() {
      function GTEST_API_ (line 133) | GTEST_API_ bool LogIsVisible(LogSeverity severity) {
      function GTEST_API_ (line 154) | GTEST_API_ void Log(LogSeverity severity, const std::string& message,
      function GTEST_API_ (line 191) | GTEST_API_ WithoutMatchers WithoutMatchers::Get() { return WithoutMa...
      function GTEST_API_ (line 193) | GTEST_API_ void IllegalDoDefault(const char* file, int line) {
      function UndoWebSafeEncoding (line 203) | constexpr char UndoWebSafeEncoding(char c) {
      function UnBase64Impl (line 207) | constexpr char UnBase64Impl(char c, const char* const base64, char c...
      function UnBase64Impl (line 215) | constexpr std::array<char, 256> UnBase64Impl(std::index_sequence<I...>,
      function UnBase64 (line 221) | constexpr std::array<char, 256> UnBase64(const char* const base64) {
      function Base64Unescape (line 229) | bool Base64Unescape(const std::string& encoded, std::string* decoded) {

FILE: googlemock/src/gmock-matchers.cc
  type testing (line 44) | namespace testing {
    type internal (line 45) | namespace internal {
      function GTEST_API_ (line 52) | GTEST_API_ std::string FormatMatcherDescription(
      class MaxBipartiteMatchState (line 124) | class MaxBipartiteMatchState {
        method MaxBipartiteMatchState (line 126) | explicit MaxBipartiteMatchState(const MatchMatrix& graph)
        method ElementMatcherPairs (line 132) | ElementMatcherPairs Compute() {
        method TryAugment (line 184) | bool TryAugment(size_t ilhs, ::std::vector<char>* seen) {
      function GTEST_API_ (line 228) | GTEST_API_ ElementMatcherPairs FindMaxBipartiteMatching(const MatchM...
      function LogElementMatcherPairVec (line 232) | static void LogElementMatcherPairVec(const ElementMatcherPairs& pairs,

FILE: googlemock/src/gmock-spec-builders.cc
  type testing (line 65) | namespace testing {
    type internal (line 66) | namespace internal {
      function GTEST_API_ (line 73) | GTEST_API_ void LogWithLocation(testing::internal::LogSeverity sever...
      function GTEST_EXCLUSIVE_LOCK_REQUIRED_ (line 110) | GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
      function GTEST_EXCLUSIVE_LOCK_REQUIRED_ (line 137) | GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
      function GTEST_EXCLUSIVE_LOCK_REQUIRED_ (line 157) | GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
      function GTEST_EXCLUSIVE_LOCK_REQUIRED_ (line 188) | GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
      function GTEST_LOCK_EXCLUDED_ (line 212) | GTEST_LOCK_EXCLUDED_(mutex_) {
      function ReportUninterestingCall (line 284) | void ReportUninterestingCall(CallReaction reaction, const std::strin...
      function GTEST_LOCK_EXCLUDED_ (line 319) | GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {
      function GTEST_LOCK_EXCLUDED_ (line 332) | GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {
      function GTEST_LOCK_EXCLUDED_ (line 343) | GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {
      function GTEST_LOCK_EXCLUDED_ (line 360) | GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {
      function Expectation (line 376) | Expectation UntypedFunctionMockerBase::GetHandleOf(ExpectationBase* ...
      function GTEST_EXCLUSIVE_LOCK_REQUIRED_ (line 396) | GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
      function CallReaction (line 446) | static CallReaction intToCallReaction(int mock_behavior) {
    type MockObjectState (line 464) | struct MockObjectState {
      method MockObjectState (line 465) | MockObjectState()
    class MockObjectRegistry (line 482) | class MockObjectRegistry {
      method StateMap (line 540) | StateMap& states() { return states_; }
    function GTEST_LOCK_EXCLUDED_ (line 561) | GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
    function GTEST_LOCK_EXCLUDED_ (line 571) | GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
    function GTEST_LOCK_EXCLUDED_ (line 578) | GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
    function GTEST_LOCK_EXCLUDED_ (line 585) | GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
    function GTEST_LOCK_EXCLUDED_ (line 592) | GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
    function GTEST_LOCK_EXCLUDED_ (line 600) | GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
    function GTEST_LOCK_EXCLUDED_ (line 613) | GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
    function GTEST_LOCK_EXCLUDED_ (line 622) | GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
    function GTEST_LOCK_EXCLUDED_ (line 631) | GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
    function GTEST_EXCLUSIVE_LOCK_REQUIRED_ (line 641) | GTEST_EXCLUSIVE_LOCK_REQUIRED_(internal::g_gmock_mutex) {
    function GTEST_LOCK_EXCLUDED_ (line 666) | GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
    function GTEST_LOCK_EXCLUDED_ (line 670) | GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
    function GTEST_LOCK_EXCLUDED_ (line 674) | GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
    function GTEST_LOCK_EXCLUDED_ (line 681) | GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
    function GTEST_LOCK_EXCLUDED_ (line 691) | GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
    function GTEST_EXCLUSIVE_LOCK_REQUIRED_ (line 711) | GTEST_EXCLUSIVE_LOCK_REQUIRED_(internal::g_gmock_mutex) {
    function GTEST_EXCLUSIVE_LOCK_REQUIRED_ (line 729) | GTEST_EXCLUSIVE_LOCK_REQUIRED_(internal::g_gmock_mutex) {

FILE: googlemock/src/gmock.cc
  type testing (line 54) | namespace testing {
    type internal (line 55) | namespace internal {
      function ParseGoogleMockFlag (line 95) | static bool ParseGoogleMockFlag(const char* str, const char* flag_name,
      function ParseGoogleMockFlag (line 114) | static bool ParseGoogleMockFlag(const char* str, const char* flag_name,
      function ParseGoogleMockFlag (line 127) | static bool ParseGoogleMockFlag(const char* str, const char* flag_name,
      function InitGoogleMockImpl (line 145) | void InitGoogleMockImpl(int* argc, CharType** argv) {
    function GTEST_API_ (line 203) | GTEST_API_ void InitGoogleMock(int* argc, char** argv) {
    function GTEST_API_ (line 209) | GTEST_API_ void InitGoogleMock(int* argc, wchar_t** argv) {
    function GTEST_API_ (line 215) | GTEST_API_ void InitGoogleMock() {

FILE: googlemock/src/gmock_main.cc
  function setup (line 40) | void setup() {
  function loop (line 46) | void loop() { RUN_ALL_TESTS(); }
  function GTEST_API_ (line 64) | GTEST_API_ int main(int argc, char** argv) {

FILE: googlemock/test/gmock-actions_test.cc
  type testing (line 62) | namespace testing {
    function TEST (line 67) | TEST(TypeTraits, Negation) {
    type MyFalse (line 104) | struct MyFalse : std::integral_constant<int, 0> {}
    type MyTrue (line 107) | struct MyTrue : std::integral_constant<int, -1> {}
    function TEST (line 109) | TEST(TypeTraits, Conjunction) {
    function TEST (line 148) | TEST(TypeTraits, Disjunction) {
    function TEST (line 187) | TEST(TypeTraits, IsInvocableRV) {
    function TEST (line 257) | TEST(BuiltInDefaultValueTest, IsNullForPointerTypes) {
    function TEST (line 264) | TEST(BuiltInDefaultValueTest, ExistsForPointerTypes) {
    function TEST (line 272) | TEST(BuiltInDefaultValueTest, IsZeroForNumericTypes) {
    function TEST (line 301) | TEST(BuiltInDefaultValueTest, ExistsForNumericTypes) {
    function TEST (line 325) | TEST(BuiltInDefaultValueTest, IsFalseForBool) {
    function TEST (line 330) | TEST(BuiltInDefaultValueTest, BoolExists) {
    function TEST (line 336) | TEST(BuiltInDefaultValueTest, IsEmptyStringForString) {
    function TEST (line 342) | TEST(BuiltInDefaultValueTest, ExistsForString) {
    function TEST (line 348) | TEST(BuiltInDefaultValueTest, WorksForConstTypes) {
    class MyDefaultConstructible (line 356) | class MyDefaultConstructible {
      method MyDefaultConstructible (line 358) | MyDefaultConstructible() : value_(42) {}
      method value (line 360) | int value() const { return value_; }
    class MyNonDefaultConstructible (line 367) | class MyNonDefaultConstructible {
      method MyNonDefaultConstructible (line 370) | explicit MyNonDefaultConstructible(int a_value) : value_(a_value) {}
      method value (line 372) | int value() const { return value_; }
    function TEST (line 378) | TEST(BuiltInDefaultValueTest, ExistsForDefaultConstructibleType) {
    function TEST (line 382) | TEST(BuiltInDefaultValueTest, IsDefaultConstructedForDefaultConstructi...
    function TEST (line 386) | TEST(BuiltInDefaultValueTest, DoesNotExistForNonDefaultConstructibleTy...
    function TEST (line 391) | TEST(BuiltInDefaultValueDeathTest, IsUndefinedForReferences) {
    function TEST (line 396) | TEST(BuiltInDefaultValueDeathTest, IsUndefinedForNonDefaultConstructib...
    function TEST (line 402) | TEST(DefaultValueTest, IsInitiallyUnset) {
    function TEST (line 409) | TEST(DefaultValueTest, CanBeSetAndUnset) {
    function TEST (line 436) | TEST(DefaultValueDeathTest, GetReturnsBuiltInDefaultValueWhenUnset) {
    function TEST (line 448) | TEST(DefaultValueTest, GetWorksForMoveOnlyIfSet) {
    function TEST (line 459) | TEST(DefaultValueTest, GetWorksForVoid) { return DefaultValue<void>::G...
    function TEST (line 464) | TEST(DefaultValueOfReferenceTest, IsInitiallyUnset) {
    function TEST (line 471) | TEST(DefaultValueOfReferenceTest, IsInitiallyNotExisting) {
    function TEST (line 478) | TEST(DefaultValueOfReferenceTest, CanBeSetAndUnset) {
    function TEST (line 503) | TEST(DefaultValueOfReferenceDeathTest, GetReturnsBuiltInDefaultValueWh...
    class MyActionImpl (line 517) | class MyActionImpl : public ActionInterface<MyGlobalFunction> {
      method Perform (line 519) | int Perform(const std::tuple<bool, int>& args) override {
    function TEST (line 524) | TEST(ActionInterfaceTest, CanBeImplementedByDefiningPerform) {
    function TEST (line 529) | TEST(ActionInterfaceTest, MakeAction) {
    function TEST (line 542) | TEST(ActionTest, CanBeConstructedFromActionInterface) {
    function TEST (line 547) | TEST(ActionTest, DelegatesWorkToActionInterface) {
    function TEST (line 555) | TEST(ActionTest, IsCopyable) {
    class IsNotZero (line 581) | class IsNotZero : public ActionInterface<bool(int)> {  // NOLINT
      method Perform (line 583) | bool Perform(const std::tuple<int>& arg) override {
    function TEST (line 588) | TEST(ActionTest, CanBeConvertedToOtherActionType) {
    class ReturnSecondArgumentAction (line 599) | class ReturnSecondArgumentAction {
      method Result (line 605) | Result Perform(const ArgumentTuple& args) {
    class ReturnZeroFromNullaryFunctionAction (line 612) | class ReturnZeroFromNullaryFunctionAction {
      method Result (line 622) | Result Perform(const std::tuple<>&) const {
    function ReturnSecondArgument (line 630) | PolymorphicAction<ReturnSecondArgumentAction> ReturnSecondArgument() {
    function ReturnZeroFromNullaryFunction (line 634) | PolymorphicAction<ReturnZeroFromNullaryFunctionAction>
    function TEST (line 641) | TEST(MakePolymorphicActionTest, ConstructsActionFromImpl) {
    function TEST (line 648) | TEST(MakePolymorphicActionTest, WorksWhenPerformHasOneTemplateParamete...
    function TEST (line 658) | TEST(ReturnTest, WorksForVoid) {
    function TEST (line 664) | TEST(ReturnTest, ReturnsGivenValue) {
    function TEST (line 673) | TEST(ReturnTest, AcceptsStringLiteral) {
    function TEST (line 684) | TEST(ReturnTest, SupportsReferenceLikeReturnType) {
    function TEST (line 711) | TEST(ReturnTest, PrefersConversionOperator) {
    function TEST (line 746) | TEST(ReturnTest, ConversionRequiresConstLvalueReference) {
    function TEST (line 764) | TEST(ReturnTest, ConversionRequiresMutableLvalueReference) {
    function TEST (line 793) | TEST(ReturnTest, MoveOnlyResultType) {
    type Base (line 813) | struct Base {
    type Derived (line 817) | struct Derived : public Base {
    function TEST (line 821) | TEST(ReturnTest, IsCovariant) {
    class FromType (line 835) | class FromType {
      method FromType (line 837) | explicit FromType(bool* is_converted) : converted_(is_converted) {}
    class ToType (line 844) | class ToType {
      method ToType (line 847) | ToType(const FromType& x) { *x.converted() = true; }
    function TEST (line 850) | TEST(ReturnTest, ConvertsArgumentWhenConverted) {
    function TEST (line 863) | TEST(ReturnNullTest, WorksInPointerReturningFunction) {
    function TEST (line 873) | TEST(ReturnNullTest, WorksInSmartPointerReturningFunction) {
    function TEST (line 882) | TEST(ReturnRefTest, WorksForReference) {
    function TEST (line 890) | TEST(ReturnRefTest, IsCovariant) {
    function CanCallReturnRef (line 901) | bool CanCallReturnRef(T&&) {
    function CanCallReturnRef (line 904) | bool CanCallReturnRef(Unused) { return false; }
    function TEST (line 907) | TEST(ReturnRefTest, WorksForNonTemporary) {
    function TEST (line 922) | TEST(ReturnRefTest, DoesNotWorkForTemporary) {
    function TEST (line 938) | TEST(ReturnRefOfCopyTest, WorksForReference) {
    function TEST (line 951) | TEST(ReturnRefOfCopyTest, IsCovariant) {
    function TEST (line 962) | TEST(ReturnRoundRobinTest, WorksForInitList) {
    function TEST (line 974) | TEST(ReturnRoundRobinTest, WorksForVector) {
    class MockClass (line 988) | class MockClass {
      method MockClass (line 990) | MockClass() = default;
      method MockClass (line 1002) | MockClass(const MockClass&) = delete;
      method MockClass (line 1003) | MockClass& operator=(const MockClass&) = delete;
    function TEST (line 1008) | TEST(DoDefaultTest, ReturnsBuiltInDefaultValueByDefault) {
    function TEST (line 1016) | TEST(DoDefaultDeathTest, DiesForUnknowType) {
    function VoidFunc (line 1029) | void VoidFunc(bool /* flag */) {}
    function TEST (line 1031) | TEST(DoDefaultDeathTest, DiesIfUsedInCompositeAction) {
    function TEST (line 1044) | TEST(DoDefaultTest, ReturnsUserSpecifiedPerTypeDefaultValueWhenThereIs...
    function TEST (line 1053) | TEST(DoDefaultTest, DoesWhatOnCallSpecifies) {
    function TEST (line 1061) | TEST(DoDefaultTest, CannotBeUsedInOnCall) {
    function TEST (line 1072) | TEST(SetArgPointeeTest, SetsTheNthPointee) {
    function TEST (line 1091) | TEST(SetArgPointeeTest, AcceptsStringLiteral) {
    function TEST (line 1107) | TEST(SetArgPointeeTest, AcceptsWideStringLiteral) {
    function TEST (line 1126) | TEST(SetArgPointeeTest, AcceptsCharPointer) {
    function TEST (line 1145) | TEST(SetArgPointeeTest, AcceptsWideCharPointer) {
    function TEST (line 1167) | TEST(SetArgumentPointeeTest, SetsTheNthPointee) {
    function Nullary (line 1186) | int Nullary() { return 1; }
    class NullaryFunctor (line 1188) | class NullaryFunctor {
    function VoidNullary (line 1194) | void VoidNullary() { g_done = true; }
    class VoidNullaryFunctor (line 1196) | class VoidNullaryFunctor {
    function Short (line 1201) | short Short(short n) { return n; }
    function Char (line 1202) | char Char(char ch) { return ch; }
    function Unary (line 1206) | bool Unary(int x) { return x < 0; }
    function VoidBinary (line 1210) | void VoidBinary(int, char) { g_done = true; }
    function Ternary (line 1212) | int Ternary(int x, char y, short z) { return x + y + z; }
    function SumOf4 (line 1214) | int SumOf4(int a, int b, int c, int d) { return a + b + c + d; }
    class Foo (line 1216) | class Foo {
      method Foo (line 1218) | Foo() : value_(123) {}
      method Nullary (line 1220) | int Nullary() const { return value_; }
    function TEST (line 1227) | TEST(InvokeWithoutArgsTest, Function) {
    function TEST (line 1244) | TEST(InvokeWithoutArgsTest, Functor) {
    function TEST (line 1262) | TEST(InvokeWithoutArgsTest, Method) {
    function TEST (line 1270) | TEST(IgnoreResultTest, PolymorphicAction) {
    function ReturnOne (line 1277) | int ReturnOne() {
    function TEST (line 1282) | TEST(IgnoreResultTest, MonomorphicAction) {
    function MyNonDefaultConstructible (line 1291) | MyNonDefaultConstructible ReturnMyNonDefaultConstructible(double /* x ...
      method MyNonDefaultConstructible (line 370) | explicit MyNonDefaultConstructible(int a_value) : value_(a_value) {}
      method value (line 372) | int value() const { return value_; }
    function TEST (line 1296) | TEST(IgnoreResultTest, ActionReturningClass) {
    function TEST (line 1304) | TEST(AssignTest, Int) {
    function TEST (line 1311) | TEST(AssignTest, String) {
    function TEST (line 1318) | TEST(AssignTest, CompatibleTypes) {
    function TEST (line 1326) | TEST(DoAll, SupportsRefQualifiedActions) {
    function TEST (line 1344) | TEST(DoAll, ProvidesLvalueReferencesToInitialActions) {
    function TEST (line 1451) | TEST(DoAll, SupportsTypeErasedActions) {
    function TEST (line 1486) | TEST(DoAll, ConvertibleToOnceActionWithUserProvidedActionConversion) {
    function TEST (line 1521) | TEST(WithArgsTest, OneArg) {
    function TEST (line 1528) | TEST(WithArgsTest, TwoArgs) {
    type ConcatAll (line 1535) | struct ConcatAll {
    function TEST (line 1544) | TEST(WithArgsTest, TenArgs) {
    class SubtractAction (line 1553) | class SubtractAction : public ActionInterface<int(int, int)> {
      method Perform (line 1555) | int Perform(const std::tuple<int, int>& args) override {
    function TEST (line 1560) | TEST(WithArgsTest, NonInvokeAction) {
    function TEST (line 1569) | TEST(WithArgsTest, Identity) {
    function TEST (line 1576) | TEST(WithArgsTest, RepeatedArguments) {
    function TEST (line 1583) | TEST(WithArgsTest, ReversedArgumentOrder) {
    function TEST (line 1591) | TEST(WithArgsTest, ArgsOfCompatibleTypes) {
    function TEST (line 1599) | TEST(WithArgsTest, VoidAction) {
    function TEST (line 1606) | TEST(WithArgsTest, ReturnReference) {
    function TEST (line 1613) | TEST(WithArgsTest, InnerActionWithConversion) {
    function TEST (line 1627) | TEST(WithArgsTest, RefQualifiedInnerAction) {
    function TEST (line 1642) | TEST(WithArgsTest, ProvideAsLvalueToWillOnce) {
    class SetErrnoAndReturnTest (line 1658) | class SetErrnoAndReturnTest : public testing::Test {
      method SetUp (line 1660) | void SetUp() override { errno = 0; }
      method TearDown (line 1661) | void TearDown() override { errno = 0; }
    function TEST_F (line 1664) | TEST_F(SetErrnoAndReturnTest, Int) {
    function TEST_F (line 1670) | TEST_F(SetErrnoAndReturnTest, Ptr) {
    function TEST_F (line 1677) | TEST_F(SetErrnoAndReturnTest, CompatibleTypes) {
    function TEST (line 1688) | TEST(ByRefTest, IsCopyable) {
    function TEST (line 1709) | TEST(ByRefTest, ConstValue) {
    function TEST (line 1718) | TEST(ByRefTest, NonConstValue) {
    function TEST (line 1731) | TEST(ByRefTest, ExplicitType) {
    function TEST (line 1760) | TEST(ByRefTest, PrintsCorrectly) {
    type UnaryConstructorClass (line 1768) | struct UnaryConstructorClass {
      method UnaryConstructorClass (line 1769) | explicit UnaryConstructorClass(int v) : value(v) {}
    function TEST (line 1774) | TEST(ReturnNewTest, Unary) {
    function TEST (line 1781) | TEST(ReturnNewTest, UnaryWorksWhenMockMethodHasArgs) {
    function TEST (line 1789) | TEST(ReturnNewTest, UnaryWorksWhenMockMethodReturnsPointerToConst) {
    class TenArgConstructorClass (line 1797) | class TenArgConstructorClass {
      method TenArgConstructorClass (line 1799) | TenArgConstructorClass(int a1, int a2, int a3, int a4, int a5, int a...
    function TEST (line 1806) | TEST(ReturnNewTest, ConstructorThatTakes10Arguments) {
    function UniquePtrSource (line 1815) | std::unique_ptr<int> UniquePtrSource() { return std::make_unique<int>(...
    function VectorUniquePtrSource (line 1817) | std::vector<std::unique_ptr<int>> VectorUniquePtrSource() {
    function TEST (line 1823) | TEST(MockMethodTest, CanReturnMoveOnlyValue_Return) {
    function TEST (line 1845) | TEST(MockMethodTest, CanReturnMoveOnlyValue_DoAllReturn) {
    function TEST (line 1859) | TEST(MockMethodTest, CanReturnMoveOnlyValue_Invoke) {
    function TEST (line 1881) | TEST(MockMethodTest, CanTakeMoveOnlyValue) {
    function TEST (line 1926) | TEST(MockMethodTest, ActionHasRvalueRefQualifiedCallOperator) {
    function TEST (line 1952) | TEST(MockMethodTest, ActionHasMultipleCallOperators) {
    function TEST (line 1981) | TEST(MockMethodTest, MoveOnlyAction) {
    function TEST (line 2019) | TEST(MockMethodTest, ActionReturnsIgnoredValue) {
    function TEST (line 2033) | TEST(MockMethodTest, WillOnceCanAcceptLvalueReference) {
    type StaticAssertSingleArgument (line 2044) | struct StaticAssertSingleArgument {
      method CheckArgs (line 2046) | static constexpr bool CheckArgs() {
    function TEST (line 2061) | TEST(MockMethodTest, ActionSwallowsAllArguments) {
    type ActionWithTemplatedConversionOperators (line 2071) | struct ActionWithTemplatedConversionOperators {
    function TEST (line 2086) | TEST(MockMethodTest, ActionHasTemplatedConversionOperators) {
    function Add (line 2098) | int Add(int val, int& ref, int* ptr) {  // NOLINT
    function Deref (line 2105) | int Deref(std::unique_ptr<int> ptr) { return *ptr; }
    type Double (line 2107) | struct Double {
      method T (line 2109) | T operator()(T t) {
    function UniqueInt (line 2114) | std::unique_ptr<int> UniqueInt(int i) { return std::make_unique<int>(i...
    function TEST (line 2116) | TEST(FunctorActionTest, ActionFromFunction) {
    function TEST (line 2127) | TEST(FunctorActionTest, ActionFromLambda) {
    function TEST (line 2140) | TEST(FunctorActionTest, PolymorphicFunctor) {
    function TEST (line 2147) | TEST(FunctorActionTest, TypeConversion) {
    function TEST (line 2176) | TEST(FunctorActionTest, UnusedArguments) {
    function TEST (line 2186) | TEST(MoveOnlyArgumentsTest, ReturningActions) {
    function ACTION (line 2199) | ACTION(ReturnArity) { return std::tuple_size<args_type>::value; }
    function TEST (line 2201) | TEST(ActionMacro, LargeArity) {

FILE: googlemock/test/gmock-cardinalities_test.cc
  class MockFoo (line 53) | class MockFoo {
    method MockFoo (line 55) | MockFoo() = default;
    method MockFoo (line 59) | MockFoo(const MockFoo&) = delete;
    method MockFoo (line 60) | MockFoo& operator=(const MockFoo&) = delete;
  function TEST (line 64) | TEST(CardinalityTest, IsDefaultConstructable) { Cardinality c; }
  function TEST (line 67) | TEST(CardinalityTest, IsCopyable) {
  function TEST (line 81) | TEST(CardinalityTest, IsOverSaturatedByCallCountWorks) {
  function TEST (line 90) | TEST(CardinalityTest, CanDescribeActualCallCount) {
  function TEST (line 109) | TEST(AnyNumber, Works) {
  function TEST (line 125) | TEST(AnyNumberTest, HasCorrectBounds) {
  function TEST (line 133) | TEST(AtLeastTest, OnNegativeNumber) {
  function TEST (line 141) | TEST(AtLeastTest, OnZero) {
  function TEST (line 154) | TEST(AtLeastTest, OnPositiveNumber) {
  function TEST (line 178) | TEST(AtLeastTest, HasCorrectBounds) {
  function TEST (line 186) | TEST(AtMostTest, OnNegativeNumber) {
  function TEST (line 194) | TEST(AtMostTest, OnZero) {
  function TEST (line 207) | TEST(AtMostTest, OnPositiveNumber) {
  function TEST (line 231) | TEST(AtMostTest, HasCorrectBounds) {
  function TEST (line 239) | TEST(BetweenTest, OnNegativeStart) {
  function TEST (line 247) | TEST(BetweenTest, OnNegativeEnd) {
  function TEST (line 255) | TEST(BetweenTest, OnStartBiggerThanEnd) {
  function TEST (line 264) | TEST(BetweenTest, OnZeroStartAndZeroEnd) {
  function TEST (line 278) | TEST(BetweenTest, OnZeroStartAndNonZeroEnd) {
  function TEST (line 295) | TEST(BetweenTest, OnSameStartAndEnd) {
  function TEST (line 312) | TEST(BetweenTest, OnDifferentStartAndEnd) {
  function TEST (line 332) | TEST(BetweenTest, HasCorrectBounds) {
  function TEST (line 340) | TEST(ExactlyTest, OnNegativeNumber) {
  function TEST (line 348) | TEST(ExactlyTest, OnZero) {
  function TEST (line 361) | TEST(ExactlyTest, OnPositiveNumber) {
  function TEST (line 382) | TEST(ExactlyTest, HasCorrectBounds) {
  class EvenCardinality (line 391) | class EvenCardinality : public CardinalityInterface {
    method IsSatisfiedByCallCount (line 395) | bool IsSatisfiedByCallCount(int call_count) const override {
    method IsSaturatedByCallCount (line 401) | bool IsSaturatedByCallCount(int /* call_count */) const override {
    method DescribeTo (line 406) | void DescribeTo(::std::ostream* ss) const override {
  function TEST (line 411) | TEST(MakeCardinalityTest, ConstructsCardinalityFromInterface) {

FILE: googlemock/test/gmock-function-mocker_test.cc
  type testing (line 60) | namespace testing {
    type gmock_function_mocker_test (line 61) | namespace gmock_function_mocker_test {
      class TemplatedCopyable (line 78) | class TemplatedCopyable {
        method TemplatedCopyable (line 80) | TemplatedCopyable() = default;
        method TemplatedCopyable (line 83) | TemplatedCopyable(const U& other) {}
      class FooInterface (line 86) | class FooInterface {
      class MockFoo (line 145) | class MockFoo : public FooInterface {
        method MockFoo (line 147) | MockFoo() = default;
        method MockFoo (line 212) | MockFoo(const MockFoo&) = delete;
        method MockFoo (line 213) | MockFoo& operator=(const MockFoo&) = delete;
      class LegacyMockFoo (line 216) | class LegacyMockFoo : public FooInterface {
        method LegacyMockFoo (line 218) | LegacyMockFoo() = default;
        method RefQualifiedConstRef (line 275) | int RefQualifiedConstRef() const& override { return 0; }
        method RefQualifiedConstRefRef (line 276) | int RefQualifiedConstRefRef() const&& override { return 0; }
        method RefQualifiedRef (line 277) | int RefQualifiedRef() & override { return 0; }
        method RefQualifiedRefRef (line 278) | int RefQualifiedRefRef() && override { return 0; }
        method RefQualifiedOverloaded (line 279) | int RefQualifiedOverloaded() const& override { return 0; }
        method RefQualifiedOverloaded (line 280) | int RefQualifiedOverloaded() const&& override { return 0; }
        method RefQualifiedOverloaded (line 281) | int RefQualifiedOverloaded() & override { return 0; }
        method RefQualifiedOverloaded (line 282) | int RefQualifiedOverloaded() && override { return 0; }
        method LegacyMockFoo (line 285) | LegacyMockFoo(const LegacyMockFoo&) = delete;
        method LegacyMockFoo (line 286) | LegacyMockFoo& operator=(const LegacyMockFoo&) = delete;
      class FunctionMockerTest (line 292) | class FunctionMockerTest : public testing::Test {
        method FunctionMockerTest (line 294) | FunctionMockerTest() : foo_(&mock_foo_) {}
      function TYPED_TEST (line 303) | TYPED_TEST(FunctionMockerTest, MocksVoidFunction) {
      function TYPED_TEST (line 309) | TYPED_TEST(FunctionMockerTest, MocksNullaryFunction) {
      function TYPED_TEST (line 319) | TYPED_TEST(FunctionMockerTest, MocksUnaryFunction) {
      function TYPED_TEST (line 327) | TYPED_TEST(FunctionMockerTest, MocksBinaryFunction) {
      function TYPED_TEST (line 334) | TYPED_TEST(FunctionMockerTest, MocksDecimalFunction) {
      function TYPED_TEST (line 343) | TYPED_TEST(FunctionMockerTest, MocksFunctionWithNonConstReferenceArg...
      function TYPED_TEST (line 352) | TYPED_TEST(FunctionMockerTest, MocksFunctionWithConstReferenceArgume...
      function TYPED_TEST (line 361) | TYPED_TEST(FunctionMockerTest, MocksFunctionWithConstArgument) {
      function TYPED_TEST (line 368) | TYPED_TEST(FunctionMockerTest, MocksFunctionsOverloadedOnArgumentNum...
      function TYPED_TEST (line 379) | TYPED_TEST(FunctionMockerTest, MocksFunctionsOverloadedOnArgumentTyp...
      function TYPED_TEST (line 390) | TYPED_TEST(FunctionMockerTest, MocksFunctionsOverloadedOnConstnessOf...
      function TYPED_TEST (line 399) | TYPED_TEST(FunctionMockerTest, MocksReturnTypeWithComma) {
      function TYPED_TEST (line 408) | TYPED_TEST(FunctionMockerTest, MocksTypeWithTemplatedCopyCtor) {
      function TYPED_TEST (line 416) | TYPED_TEST(FunctionMockerTest, MocksNullaryFunctionWithCallType) {
      function TYPED_TEST (line 426) | TYPED_TEST(FunctionMockerTest, MocksUnaryFunctionWithCallType) {
      function TYPED_TEST (line 437) | TYPED_TEST(FunctionMockerTest, MocksDecimalFunctionWithCallType) {
      function TYPED_TEST (line 446) | TYPED_TEST(FunctionMockerTest, MocksFunctionsConstFunctionWithCallTy...
      function TYPED_TEST (line 452) | TYPED_TEST(FunctionMockerTest, MocksReturnTypeWithCommaAndCallType) {
      function TEST (line 461) | TEST(FunctionMockerTest, RefQualified) {
      class MockB (line 495) | class MockB {
        method MockB (line 497) | MockB() = default;
        method MockB (line 502) | MockB(const MockB&) = delete;
        method MockB (line 503) | MockB& operator=(const MockB&) = delete;
      class LegacyMockB (line 506) | class LegacyMockB {
        method LegacyMockB (line 508) | LegacyMockB() = default;
        method LegacyMockB (line 513) | LegacyMockB(const LegacyMockB&) = delete;
        method LegacyMockB (line 514) | LegacyMockB& operator=(const LegacyMockB&) = delete;
      class ExpectCallTest (line 518) | class ExpectCallTest : public ::testing::Test {}
      function TYPED_TEST (line 524) | TYPED_TEST(ExpectCallTest, UnmentionedFunctionCanBeCalledAnyNumberOf...
      class StackInterface (line 542) | class StackInterface {
      class MockStack (line 555) | class MockStack : public StackInterface<T> {
        method MockStack (line 557) | MockStack() = default;
        method MockStack (line 569) | MockStack(const MockStack&) = delete;
        method MockStack (line 570) | MockStack& operator=(const MockStack&) = delete;
      class LegacyMockStack (line 574) | class LegacyMockStack : public StackInterface<T> {
        method LegacyMockStack (line 576) | LegacyMockStack() = default;
        method LegacyMockStack (line 588) | LegacyMockStack(const LegacyMockStack&) = delete;
        method LegacyMockStack (line 589) | LegacyMockStack& operator=(const LegacyMockStack&) = delete;
      class TemplateMockTest (line 593) | class TemplateMockTest : public ::testing::Test {}
      function TYPED_TEST (line 599) | TYPED_TEST(TemplateMockTest, Works) {
      function TYPED_TEST (line 619) | TYPED_TEST(TemplateMockTest, MethodWithCommaInReturnTypeWorks) {
      class StackInterfaceWithCallType (line 634) | class StackInterfaceWithCallType {
      class MockStackWithCallType (line 647) | class MockStackWithCallType : public StackInterfaceWithCallType<T> {
        method MockStackWithCallType (line 649) | MockStackWithCallType() {}
        method MockStackWithCallType (line 659) | MockStackWithCallType(const MockStackWithCallType&) = delete;
        method MockStackWithCallType (line 660) | MockStackWithCallType& operator=(const MockStackWithCallType&) = d...
      class LegacyMockStackWithCallType (line 664) | class LegacyMockStackWithCallType : public StackInterfaceWithCallTyp...
        method LegacyMockStackWithCallType (line 666) | LegacyMockStackWithCallType() {}
        method LegacyMockStackWithCallType (line 674) | LegacyMockStackWithCallType(const LegacyMockStackWithCallType&) = ...
        method LegacyMockStackWithCallType (line 675) | LegacyMockStackWithCallType& operator=(const LegacyMockStackWithCa...
      class TemplateMockTestWithCallType (line 680) | class TemplateMockTestWithCallType : public ::testing::Test {}
      function TYPED_TEST (line 688) | TYPED_TEST(TemplateMockTestWithCallType, Works) {
      class MockOverloadedOnArgNumber (line 719) | class MockOverloadedOnArgNumber {
        method MockOverloadedOnArgNumber (line 721) | MockOverloadedOnArgNumber() = default;
        method MockOverloadedOnArgNumber (line 726) | MockOverloadedOnArgNumber(const MockOverloadedOnArgNumber&) = delete;
        method MockOverloadedOnArgNumber (line 727) | MockOverloadedOnArgNumber& operator=(const MockOverloadedOnArgNumb...
      class LegacyMockOverloadedOnArgNumber (line 731) | class LegacyMockOverloadedOnArgNumber {
        method LegacyMockOverloadedOnArgNumber (line 733) | LegacyMockOverloadedOnArgNumber() = default;
        method LegacyMockOverloadedOnArgNumber (line 738) | LegacyMockOverloadedOnArgNumber(const LegacyMockOverloadedOnArgNum...
        method LegacyMockOverloadedOnArgNumber (line 740) | LegacyMockOverloadedOnArgNumber& operator=(
      class OverloadedMockMethodTest (line 745) | class OverloadedMockMethodTest : public ::testing::Test {}
      function TYPED_TEST (line 751) | TYPED_TEST(OverloadedMockMethodTest, CanOverloadOnArgNumberInMacroBo...
      class MockOverloadedOnConstness (line 766) | class MockOverloadedOnConstness {
        method MockOverloadedOnConstness (line 768) | MockOverloadedOnConstness() = default;
        method MockOverloadedOnConstness (line 773) | MockOverloadedOnConstness(const MockOverloadedOnConstness&) = delete;
        method MockOverloadedOnConstness (line 774) | MockOverloadedOnConstness& operator=(const MockOverloadedOnConstne...
      function TEST (line 778) | TEST(MockMethodOverloadedMockMethodTest, CanOverloadOnConstnessInMac...
      function TEST (line 788) | TEST(MockMethodMockFunctionTest, WorksForVoidNullary) {
      function TEST (line 794) | TEST(MockMethodMockFunctionTest, WorksForNonVoidNullary) {
      function TEST (line 801) | TEST(MockMethodMockFunctionTest, WorksForVoidUnary) {
      function TEST (line 807) | TEST(MockMethodMockFunctionTest, WorksForNonVoidBinary) {
      function TEST (line 816) | TEST(MockMethodMockFunctionTest, WorksFor10Arguments) {
      function TEST (line 827) | TEST(MockMethodMockFunctionTest, AsStdFunction) {
      function TEST (line 836) | TEST(MockMethodMockFunctionTest, AsStdFunctionReturnsReference) {
      function TEST (line 846) | TEST(MockMethodMockFunctionTest, AsStdFunctionWithReferenceParameter) {
      function IsMockFunctionTemplateArgumentDeducedTo (line 857) | static constexpr bool IsMockFunctionTemplateArgumentDeducedTo(
      class MockMethodMockFunctionSignatureTest (line 865) | class MockMethodMockFunctionSignatureTest : public Test {}
      function TYPED_TEST (line 873) | TYPED_TEST(MockMethodMockFunctionSignatureTest,
      function TYPED_TEST (line 880) | TYPED_TEST(MockMethodMockFunctionSignatureTest,
      function TYPED_TEST (line 887) | TYPED_TEST(
      type AlternateCallable (line 897) | struct AlternateCallable {}
      function TYPED_TEST (line 899) | TYPED_TEST(MockMethodMockFunctionSignatureTest,
      function TYPED_TEST (line 906) | TYPED_TEST(MockMethodMockFunctionSignatureTest,
      type MockMethodSizes0 (line 914) | struct MockMethodSizes0 {
      type MockMethodSizes1 (line 917) | struct MockMethodSizes1 {
      type MockMethodSizes2 (line 920) | struct MockMethodSizes2 {
      type MockMethodSizes3 (line 923) | struct MockMethodSizes3 {
      type MockMethodSizes4 (line 926) | struct MockMethodSizes4 {
      type LegacyMockMethodSizes0 (line 930) | struct LegacyMockMethodSizes0 {
      type LegacyMockMethodSizes1 (line 933) | struct LegacyMockMethodSizes1 {
      type LegacyMockMethodSizes2 (line 936) | struct LegacyMockMethodSizes2 {
      type LegacyMockMethodSizes3 (line 939) | struct LegacyMockMethodSizes3 {
      type LegacyMockMethodSizes4 (line 942) | struct LegacyMockMethodSizes4 {
      function TEST (line 946) | TEST(MockMethodMockFunctionTest, MockMethodSizeOverhead) {
      function TEST (line 960) | TEST(MockMethodMockFunctionTest, EnsureNoUnusedMemberFunction) {
      type MockMethodNoexceptSpecifier (line 978) | struct MockMethodNoexceptSpecifier {
      function TEST (line 990) | TEST(MockMethodMockFunctionTest, NoexceptSpecifierPreserved) {

FILE: googlemock/test/gmock-internal-utils_test.cc
  type proto2 (line 64) | namespace proto2 {
    class Message (line 65) | class Message
  type testing (line 68) | namespace testing {
    type internal (line 69) | namespace internal {
      function TEST (line 73) | TEST(JoinAsKeyValueTupleTest, JoinsEmptyTuple) {
      function TEST (line 77) | TEST(JoinAsKeyValueTupleTest, JoinsOneTuple) {
      function TEST (line 81) | TEST(JoinAsKeyValueTupleTest, JoinsTwoTuple) {
      function TEST (line 85) | TEST(JoinAsKeyValueTupleTest, JoinsTenTuple) {
      function TEST (line 92) | TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameContainsNoWord) {
      function TEST (line 98) | TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameContainsDigits) {
      function TEST (line 105) | TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameContainsCamelCas...
      function TEST (line 113) | TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameContains_Separat...
      function TEST (line 120) | TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameIsMixture) {
      function TEST (line 126) | TEST(GetRawPointerTest, WorksForSmartPointers) {
      function TEST (line 135) | TEST(GetRawPointerTest, WorksForRawPointers) {
      function TEST (line 142) | TEST(GetRawPointerTest, WorksForStdReferenceWrapper) {
      class Base (line 150) | class Base {}
      class Derived (line 151) | class Derived : public Base {}
      function TEST (line 153) | TEST(KindOfTest, Bool) {
      function TEST (line 157) | TEST(KindOfTest, Integer) {
      function TEST (line 177) | TEST(KindOfTest, FloatingPoint) {
      function TEST (line 183) | TEST(KindOfTest, Other) {
      function TEST (line 191) | TEST(LosslessArithmeticConvertibleTest, BoolToBool) {
      function TEST (line 195) | TEST(LosslessArithmeticConvertibleTest, BoolToInteger) {
      function TEST (line 202) | TEST(LosslessArithmeticConvertibleTest, BoolToFloatingPoint) {
      function TEST (line 207) | TEST(LosslessArithmeticConvertibleTest, IntegerToBool) {
      function TEST (line 212) | TEST(LosslessArithmeticConvertibleTest, IntegerToInteger) {
      function TEST (line 246) | TEST(LosslessArithmeticConvertibleTest, IntegerToFloatingPoint) {
      function TEST (line 255) | TEST(LosslessArithmeticConvertibleTest, FloatingPointToBool) {
      function TEST (line 260) | TEST(LosslessArithmeticConvertibleTest, FloatingPointToInteger) {
      function TEST (line 266) | TEST(LosslessArithmeticConvertibleTest, FloatingPointToFloatingPoint) {
      function TEST (line 291) | TEST(TupleMatchesTest, WorksForSize0) {
      function TEST (line 298) | TEST(TupleMatchesTest, WorksForSize1) {
      function TEST (line 306) | TEST(TupleMatchesTest, WorksForSize2) {
      function TEST (line 317) | TEST(TupleMatchesTest, WorksForSize5) {
      function TEST (line 332) | TEST(AssertTest, SucceedsOnTrue) {
      function TEST (line 338) | TEST(AssertTest, FailsFatallyOnFalse) {
      function TEST (line 346) | TEST(ExpectTest, SucceedsOnTrue) {
      function TEST (line 352) | TEST(ExpectTest, FailsNonfatallyOnFalse) {
      class LogIsVisibleTest (line 368) | class LogIsVisibleTest : public ::testing::Test {
        method SetUp (line 370) | void SetUp() override { original_verbose_ = GMOCK_FLAG_GET(verbose...
        method TearDown (line 372) | void TearDown() override { GMOCK_FLAG_SET(verbose, original_verbos...
      function TEST_F (line 377) | TEST_F(LogIsVisibleTest, AlwaysReturnsTrueIfVerbosityIsInfo) {
      function TEST_F (line 383) | TEST_F(LogIsVisibleTest, AlwaysReturnsFalseIfVerbosityIsError) {
      function TEST_F (line 389) | TEST_F(LogIsVisibleTest, WorksWhenVerbosityIsWarning) {
      function TestLogWithSeverity (line 401) | void TestLogWithSeverity(const std::string& verbosity, LogSeverity s...
      function TEST (line 421) | TEST(LogTest, NoStackTraceWhenStackFramesToSkipIsNegative) {
      type MockStackTraceGetter (line 430) | struct MockStackTraceGetter : testing::internal::OsStackTraceGetterI...
        method CurrentStackTrace (line 431) | std::string CurrentStackTrace(int max_depth, int skip_count) overr...
        method UponLeavingGTest (line 435) | void UponLeavingGTest() override {}
      function TEST (line 440) | TEST(LogTest, NoSkippingStackFrameInOptMode) {
      function TEST (line 479) | TEST(LogTest, AllLogsArePrintedWhenVerbosityIsInfo) {
      function TEST (line 486) | TEST(LogTest, OnlyWarningsArePrintedWhenVerbosityIsWarning) {
      function TEST (line 493) | TEST(LogTest, NoLogsArePrintedWhenVerbosityIsError) {
      function TEST (line 500) | TEST(LogTest, OnlyWarningsArePrintedWhenVerbosityIsInvalid) {
      function GrabOutput (line 507) | std::string GrabOutput(void (*logger)(), const char* verbosity) {
      class DummyMock (line 516) | class DummyMock {
      function ExpectCallLogger (line 522) | void ExpectCallLogger() {
      function TEST (line 529) | TEST(ExpectCallTest, LogsWhenVerbosityIsInfo) {
      function TEST (line 536) | TEST(ExpectCallTest, DoesNotLogWhenVerbosityIsWarning) {
      function TEST (line 542) | TEST(ExpectCallTest, DoesNotLogWhenVerbosityIsError) {
      function OnCallLogger (line 546) | void OnCallLogger() {
      function TEST (line 552) | TEST(OnCallTest, LogsWhenVerbosityIsInfo) {
      function TEST (line 559) | TEST(OnCallTest, DoesNotLogWhenVerbosityIsWarning) {
      function TEST (line 565) | TEST(OnCallTest, DoesNotLogWhenVerbosityIsError) {
      function OnCallAnyArgumentLogger (line 569) | void OnCallAnyArgumentLogger() {
      function TEST (line 575) | TEST(OnCallTest, LogsAnythingArgument) {
      function TEST (line 584) | TEST(StlContainerViewTest, WorksForStlContainer) {
      function TEST (line 600) | TEST(StlContainerViewTest, WorksForStaticNativeArray) {
      function TEST (line 626) | TEST(StlContainerViewTest, WorksForDynamicNativeArray) {
      function TEST (line 659) | TEST(FunctionTest, Nullary) {
      function TEST (line 669) | TEST(FunctionTest, Unary) {
      function TEST (line 682) | TEST(FunctionTest, Binary) {
      function TEST (line 699) | TEST(FunctionTest, LongArgumentList) {
      function TEST (line 724) | TEST(Base64Unescape, InvalidString) {
      function TEST (line 729) | TEST(Base64Unescape, ShortString) {
      function TEST (line 735) | TEST(Base64Unescape, ShortStringWithPadding) {
      function TEST (line 741) | TEST(Base64Unescape, ShortStringWithoutPadding) {
      function TEST (line 747) | TEST(Base64Unescape, LongStringWithWhiteSpaces) {

FILE: googlemock/test/gmock-matchers-arithmetic_test.cc
  type testing (line 48) | namespace testing {
    type gmock_matchers_test (line 49) | namespace gmock_matchers_test {
      function TEST (line 56) | TEST(Eq2Test, MatchesEqualArguments) {
      function TEST (line 63) | TEST(Eq2Test, CanDescribeSelf) {
      function TEST (line 70) | TEST(Ge2Test, MatchesGreaterThanOrEqualArguments) {
      function TEST (line 78) | TEST(Ge2Test, CanDescribeSelf) {
      function TEST (line 85) | TEST(Gt2Test, MatchesGreaterThanArguments) {
      function TEST (line 93) | TEST(Gt2Test, CanDescribeSelf) {
      function TEST (line 100) | TEST(Le2Test, MatchesLessThanOrEqualArguments) {
      function TEST (line 108) | TEST(Le2Test, CanDescribeSelf) {
      function TEST (line 115) | TEST(Lt2Test, MatchesLessThanArguments) {
      function TEST (line 123) | TEST(Lt2Test, CanDescribeSelf) {
      function TEST (line 130) | TEST(Ne2Test, MatchesUnequalArguments) {
      function TEST (line 138) | TEST(Ne2Test, CanDescribeSelf) {
      function TEST (line 143) | TEST(PairMatchBaseTest, WorksWithMoveOnly) {
      function TEST (line 153) | TEST(IsNan, FloatMatchesNan) {
      function TEST (line 175) | TEST(IsNan, DoubleMatchesNan) {
      function TEST (line 197) | TEST(IsNan, LongDoubleMatchesNan) {
      function TEST (line 219) | TEST(IsNan, NotMatchesNan) {
      function TEST (line 237) | TEST(IsNan, CanDescribeSelf) {
      function TEST (line 249) | TEST(IsNan, CanDescribeSelfWithNot) {
      function TEST (line 262) | TEST(FloatEq2Test, MatchesEqualArguments) {
      function TEST (line 271) | TEST(FloatEq2Test, CanDescribeSelf) {
      function TEST (line 278) | TEST(NanSensitiveFloatEqTest, MatchesEqualArgumentsWithNaN) {
      function TEST (line 290) | TEST(NanSensitiveFloatEqTest, CanDescribeSelfWithNaNs) {
      function TEST (line 297) | TEST(DoubleEq2Test, MatchesEqualArguments) {
      function TEST (line 306) | TEST(DoubleEq2Test, CanDescribeSelf) {
      function TEST (line 313) | TEST(NanSensitiveDoubleEqTest, MatchesEqualArgumentsWithNaN) {
      function TEST (line 325) | TEST(NanSensitiveDoubleEqTest, CanDescribeSelfWithNaNs) {
      function TEST (line 332) | TEST(FloatNear2Test, MatchesEqualArguments) {
      function TEST (line 341) | TEST(FloatNear2Test, CanDescribeSelf) {
      function TEST (line 348) | TEST(NanSensitiveFloatNearTest, MatchesNearbyArgumentsWithNaN) {
      function TEST (line 361) | TEST(NanSensitiveFloatNearTest, CanDescribeSelfWithNaNs) {
      function TEST (line 368) | TEST(DoubleNear2Test, MatchesEqualArguments) {
      function TEST (line 377) | TEST(DoubleNear2Test, CanDescribeSelf) {
      function TEST (line 384) | TEST(NanSensitiveDoubleNearTest, MatchesNearbyArgumentsWithNaN) {
      function TEST (line 397) | TEST(NanSensitiveDoubleNearTest, CanDescribeSelfWithNaNs) {
      function TEST (line 403) | TEST(DistanceFrom, CanDescribeSelf) {
      function TEST (line 412) | TEST(DistanceFrom, CanExplainMatchFailure) {
      function TEST (line 419) | TEST(DistanceFrom, MatchesDoubleWithinRange) {
      function TEST (line 430) | TEST(DistanceFrom, MatchesDoubleRefWithinRange) {
      function TEST (line 441) | TEST(DistanceFrom, CanBeImplicitlyConvertedToMatcher) {
      function TEST (line 451) | TEST(DistanceFrom, CanBeUsedOnCompatibleTypes) {
      class Point (line 473) | class Point {
        method Point (line 475) | Point(double x, double y) : x_(x), y_(y) {}
        method x (line 476) | double x() const { return x_; }
        method y (line 477) | double y() const { return y_; }
      function PointDistance (line 485) | double PointDistance(const Point& lhs, const Point& rhs) {
      function TEST (line 492) | TEST(DistanceFrom, CanBeUsedOnTypeWithCustomDistanceFunction) {
      class Double (line 502) | class Double {
        method Double (line 504) | explicit Double(double value) : value_(value) {}
        method Double (line 505) | Double(const Double& other) = default;
        method value (line 506) | double value() const { return value_; }
        method PrintTo (line 510) | void PrintTo(const Double& value, std::ostream* os) {
      function Double (line 519) | Double DoubleDistance(Double lhs, Double rhs) {
        method Double (line 504) | explicit Double(double value) : value_(value) {}
        method Double (line 505) | Double(const Double& other) = default;
        method value (line 506) | double value() const { return value_; }
        method PrintTo (line 510) | void PrintTo(const Double& value, std::ostream* os) {
      function TEST (line 529) | TEST(DistanceFrom, CanDescribeWithCustomPrinter) {
      function TEST (line 538) | TEST(DistanceFrom, CanCustomizeDistanceAndComparator) {
      class Float (line 548) | class Float {
        method Float (line 550) | explicit Float(float value) : value_(value) {}
        method Float (line 551) | Float(const Float& other) = default;
        method value (line 552) | float value() const { return value_; }
      function Float (line 560) | Float operator-(const Float& lhs, const Float& rhs) {
        method Float (line 550) | explicit Float(float value) : value_(value) {}
        method Float (line 551) | Float(const Float& other) = default;
        method value (line 552) | float value() const { return value_; }
      function Float (line 566) | Float abs(Float value) { return Float(std::abs(value.value())); }
        method Float (line 550) | explicit Float(float value) : value_(value) {}
        method Float (line 551) | Float(const Float& other) = default;
        method value (line 552) | float value() const { return value_; }
      function TEST (line 576) | TEST(DistanceFrom, CanBeUsedWithTypeThatSupportsBothMinusAndAbs) {
      function TEST (line 585) | TEST(NotTest, NegatesMatcher) {
      function TEST (line 593) | TEST(NotTest, CanDescribeSelf) {
      function TEST (line 599) | TEST(NotTest, NotMatcherSafelyCastsMonomorphicMatchers) {
      function AllOfMatches (line 609) | void AllOfMatches(int num, const Matcher<int>& m) {
      function TEST (line 622) | TEST(AllOfTest, MatchesWhenAllMatch) {
      function TEST (line 675) | TEST(AllOfTest, CanDescribeSelf) {
      function TEST (line 699) | TEST(AllOfTest, CanDescribeNegation) {
      function TEST (line 728) | TEST(AllOfTest, AllOfMatcherSafelyCastsMonomorphicMatchers) {
      function TEST_P (line 742) | TEST_P(AllOfTestP, ExplainsResult) {
      function AnyOfMatches (line 788) | static void AnyOfMatches(int num, const Matcher<int>& m) {
      function AnyOfStringMatches (line 797) | static void AnyOfStringMatches(int num, const Matcher<std::string>& ...
      function TEST (line 811) | TEST(AnyOfTest, MatchesWhenAnyMatches) {
      function TEST (line 853) | TEST(AnyOfTest, VariadicMatchesWhenAnyMatches) {
      function TEST (line 872) | TEST(ConditionalTest, MatchesFirstIfCondition) {
      function TEST (line 886) | TEST(ConditionalTest, MatchesSecondIfCondition) {
      function TEST (line 901) | TEST(AnyOfTest, CanDescribeSelf) {
      function TEST (line 922) | TEST(AnyOfTest, CanDescribeNegation) {
      function TEST (line 945) | TEST(AnyOfTest, AnyOfMatcherSafelyCastsMonomorphicMatchers) {
      function TEST_P (line 959) | TEST_P(AnyOfTestP, ExplainsResult) {
      function IsPositive (line 1008) | int IsPositive(double x) { return x > 0 ? 1 : 0; }
      class IsGreaterThan (line 1012) | class IsGreaterThan {
        method IsGreaterThan (line 1014) | explicit IsGreaterThan(int threshold) : threshold_(threshold) {}
      function ReferencesFooAndIsZero (line 1027) | bool ReferencesFooAndIsZero(const int& n) { return (&n == &foo) && (...
      function TEST (line 1031) | TEST(TrulyTest, MatchesWhatSatisfiesThePredicate) {
      function TEST (line 1038) | TEST(TrulyTest, CanBeUsedWithFunctor) {
      class ConvertibleToBool (line 1045) | class ConvertibleToBool {
        method ConvertibleToBool (line 1047) | explicit ConvertibleToBool(int number) : number_(number) {}
      function ConvertibleToBool (line 1054) | ConvertibleToBool IsNotZero(int number) { return ConvertibleToBool(n...
        method ConvertibleToBool (line 1047) | explicit ConvertibleToBool(int number) : number_(number) {}
      function TEST (line 1059) | TEST(TrulyTest, PredicateCanReturnAClassConvertibleToBool) {
      function TEST (line 1066) | TEST(TrulyTest, CanDescribeSelf) {
      function TEST (line 1073) | TEST(TrulyTest, WorksForByRefArguments) {
      function TEST (line 1081) | TEST(TrulyTest, ExplainsFailures) {
      function TEST (line 1089) | TEST(MatchesTest, IsSatisfiedByWhatMatchesTheMatcher) {
      function TEST (line 1096) | TEST(MatchesTest, WorksOnByRefArguments) {
      function TEST (line 1104) | TEST(MatchesTest, WorksWithMatcherOnNonRefType) {
      function TEST (line 1113) | TEST(ValueTest, WorksWithPolymorphicMatcher) {
      function TEST (line 1118) | TEST(ValueTest, WorksWithMonomorphicMatcher) {
      function TEST (line 1129) | TEST(AllArgsTest, WorksForTuple) {
      function TEST (line 1134) | TEST(AllArgsTest, WorksForNonTuple) {
      class AllArgsHelper (line 1139) | class AllArgsHelper {
        method AllArgsHelper (line 1141) | AllArgsHelper() = default;
        method AllArgsHelper (line 1146) | AllArgsHelper(const AllArgsHelper&) = delete;
        method AllArgsHelper (line 1147) | AllArgsHelper& operator=(const AllArgsHelper&) = delete;
      function TEST (line 1150) | TEST(AllArgsTest, WorksInWithClause) {
      class OptionalMatchersHelper (line 1160) | class OptionalMatchersHelper {
        method OptionalMatchersHelper (line 1162) | OptionalMatchersHelper() = default;
        method OptionalMatchersHelper (line 1174) | OptionalMatchersHelper(const OptionalMatchersHelper&) = delete;
        method OptionalMatchersHelper (line 1175) | OptionalMatchersHelper& operator=(const OptionalMatchersHelper&) =...
      function TEST (line 1178) | TEST(AllArgsTest, WorksWithoutMatchers) {
      class FloatingPointTest (line 1201) | class FloatingPointTest : public testing::Test {
        method FloatingPointTest (line 1206) | FloatingPointTest()
        method TestSize (line 1228) | void TestSize() { EXPECT_EQ(sizeof(RawType), sizeof(Bits)); }
        method TestMatches (line 1232) | void TestMatches(
      class FloatingPointNearTest (line 1308) | class FloatingPointNearTest : public FloatingPointTest<RawType> {
        method TestNearMatches (line 1314) | void TestNearMatches(testing::internal::FloatingEqMatcher<RawType> (
      function TEST_F (line 1392) | TEST_F(FloatTest, FloatEqApproximatelyMatchesFloats) { TestMatches(&...
      function TEST_F (line 1394) | TEST_F(FloatTest, NanSensitiveFloatEqApproximatelyMatchesFloats) {
      function TEST_F (line 1398) | TEST_F(FloatTest, FloatEqCannotMatchNaN) {
      function TEST_F (line 1406) | TEST_F(FloatTest, NanSensitiveFloatEqCanMatchNaN) {
      function TEST_F (line 1414) | TEST_F(FloatTest, FloatEqCanDescribeSelf) {
      function TEST_F (line 1428) | TEST_F(FloatTest, NanSensitiveFloatEqCanDescribeSelf) {
      function TEST_F (line 1446) | TEST_F(FloatNearTest, FloatNearMatches) { TestNearMatches(&FloatNear...
      function TEST_F (line 1448) | TEST_F(FloatNearTest, NanSensitiveFloatNearApproximatelyMatchesFloat...
      function TEST_F (line 1452) | TEST_F(FloatNearTest, FloatNearCanDescribeSelf) {
      function TEST_F (line 1468) | TEST_F(FloatNearTest, NanSensitiveFloatNearCanDescribeSelf) {
      function TEST_F (line 1484) | TEST_F(FloatNearTest, FloatNearCannotMatchNaN) {
      function TEST_F (line 1492) | TEST_F(FloatNearTest, NanSensitiveFloatNearCanMatchNaN) {
      function TEST_F (line 1503) | TEST_F(DoubleTest, DoubleEqApproximatelyMatchesDoubles) {
      function TEST_F (line 1507) | TEST_F(DoubleTest, NanSensitiveDoubleEqApproximatelyMatchesDoubles) {
      function TEST_F (line 1511) | TEST_F(DoubleTest, DoubleEqCannotMatchNaN) {
      function TEST_F (line 1519) | TEST_F(DoubleTest, NanSensitiveDoubleEqCanMatchNaN) {
      function TEST_F (line 1527) | TEST_F(DoubleTest, DoubleEqCanDescribeSelf) {
      function TEST_F (line 1541) | TEST_F(DoubleTest, NanSensitiveDoubleEqCanDescribeSelf) {
      function TEST_F (line 1559) | TEST_F(DoubleNearTest, DoubleNearMatches) { TestNearMatches(&DoubleN...
      function TEST_F (line 1561) | TEST_F(DoubleNearTest, NanSensitiveDoubleNearApproximatelyMatchesDou...
      function TEST_F (line 1565) | TEST_F(DoubleNearTest, DoubleNearCanDescribeSelf) {
      function TEST_F (line 1581) | TEST_F(DoubleNearTest, ExplainsResultWhenMatchFails) {
      function TEST_F (line 1595) | TEST_F(DoubleNearTest, NanSensitiveDoubleNearCanDescribeSelf) {
      function TEST_F (line 1611) | TEST_F(DoubleNearTest, DoubleNearCannotMatchNaN) {
      function TEST_F (line 1619) | TEST_F(DoubleNearTest, NanSensitiveDoubleNearCanMatchNaN) {
      function TEST (line 1627) | TEST(NotTest, WorksOnMoveOnlyType) {
      function TEST (line 1633) | TEST(AllOfTest, HugeMatcher) {
      function TEST (line 1640) | TEST(AnyOfTest, HugeMatcher) {
      type adl_test (line 1647) | namespace adl_test {
        function AllOf (line 1662) | bool AllOf(const T1& /*t1*/, const T2& /*t2*/) {
        function TEST (line 1666) | TEST(AllOfTest, DoesNotCallAllOfUnqualified) {
        function AnyOf (line 1672) | bool AnyOf(const T1&, const T2&) {
        function TEST (line 1676) | TEST(AnyOfTest, DoesNotCallAnyOfUnqualified) {
      function TEST (line 1683) | TEST(AllOfTest, WorksOnMoveOnlyType) {
      function TEST (line 1689) | TEST(AnyOfTest, WorksOnMoveOnlyType) {

FILE: googlemock/test/gmock-matchers-comparisons_test.cc
  type gmock_matchers_test (line 50) | namespace gmock_matchers_test {
    function TEST_P (line 55) | TEST_P(MonotonicMatcherTestP, IsPrintable) {
    function TEST (line 61) | TEST(MatchResultListenerTest, StreamingWorks) {
    function TEST (line 77) | TEST(MatchResultListenerTest, CanAccessUnderlyingStream) {
    function TEST (line 84) | TEST(MatchResultListenerTest, IsInterestedWorks) {
    class EvenMatcherImpl (line 94) | class EvenMatcherImpl : public MatcherInterface<int> {
      method MatchAndExplain (line 96) | bool MatchAndExplain(int x,
      method DescribeTo (line 101) | void DescribeTo(ostream* os) const override { *os << "is an even num...
    function TEST (line 109) | TEST(MatcherInterfaceTest, CanBeImplementedUsingPublishedAPI) {
    class NewEvenMatcherImpl (line 115) | class NewEvenMatcherImpl : public MatcherInterface<int> {
      method MatchAndExplain (line 117) | bool MatchAndExplain(int x, MatchResultListener* listener) const ove...
      method DescribeTo (line 129) | void DescribeTo(ostream* os) const override { *os << "is an even num...
    function TEST (line 132) | TEST(MatcherInterfaceTest, CanBeImplementedUsingNewAPI) {
    function TEST (line 143) | TEST(MatcherTest, CanBeDefaultConstructed) { Matcher<double> m; }
    function TEST (line 146) | TEST(MatcherTest, CanBeConstructedFromMatcherInterface) {
    function TEST (line 154) | TEST(MatcherTest, CanBeImplicitlyConstructedFromValue) {
    function TEST (line 161) | TEST(MatcherTest, CanBeImplicitlyConstructedFromNULL) {
    type Undefined (line 170) | struct Undefined {
    function TEST (line 175) | TEST(MatcherTest, CanBeConstructedFromUndefinedVariable) {
    function TEST (line 182) | TEST(MatcherTest, CanAcceptAbstractClass) { Matcher<const Undefined&> ...
    function TEST (line 185) | TEST(MatcherTest, IsCopyable) {
    function TEST (line 199) | TEST(MatcherTest, CanDescribeItself) {
    function TEST_P (line 204) | TEST_P(MatcherTestP, MatchAndExplain) {
    function TEST (line 217) | TEST(StringMatcherTest, CanBeImplicitlyConstructedFromCStringLiteral) {
    function TEST (line 229) | TEST(StringMatcherTest, CanBeImplicitlyConstructedFromString) {
    function TEST (line 242) | TEST(StringViewMatcherTest, CanBeImplicitlyConstructedFromCStringLiter...
    function TEST (line 254) | TEST(StringViewMatcherTest, CanBeImplicitlyConstructedFromString) {
    function TEST (line 266) | TEST(StringViewMatcherTest, CanBeImplicitlyConstructedFromStringView) {
    function TEST (line 279) | TEST(StringMatcherTest,
    function TEST (line 294) | TEST(MakeMatcherTest, ConstructsMatcherFromMatcherInterface) {
    class ReferencesBarOrIsZeroImpl (line 302) | class ReferencesBarOrIsZeroImpl {
      method MatchAndExplain (line 305) | bool MatchAndExplain(const T& x, MatchResultListener* /* listener */...
      method DescribeTo (line 310) | void DescribeTo(ostream* os) const { *os << "g_bar or zero"; }
      method DescribeNegationTo (line 312) | void DescribeNegationTo(ostream* os) const {
    function ReferencesBarOrIsZero (line 319) | PolymorphicMatcher<ReferencesBarOrIsZeroImpl> ReferencesBarOrIsZero() {
    function TEST (line 323) | TEST(MakePolymorphicMatcherTest, ConstructsMatcherUsingOldAPI) {
    class PolymorphicIsEvenImpl (line 341) | class PolymorphicIsEvenImpl {
      method DescribeTo (line 343) | void DescribeTo(ostream* os) const { *os << "is even"; }
      method DescribeNegationTo (line 345) | void DescribeNegationTo(ostream* os) const { *os << "is odd"; }
      method MatchAndExplain (line 348) | bool MatchAndExplain(const T& x, MatchResultListener* listener) const {
    function PolymorphicIsEven (line 360) | PolymorphicMatcher<PolymorphicIsEvenImpl> PolymorphicIsEven() {
    function TEST (line 364) | TEST(MakePolymorphicMatcherTest, ConstructsMatcherUsingNewAPI) {
    function TEST_P (line 391) | TEST_P(MatcherCastTestP, FromPolymorphicMatcher) {
    class IntValue (line 403) | class IntValue {
      method IntValue (line 407) | explicit IntValue(int a_value) : value_(a_value) {}
      method value (line 409) | int value() const { return value_; }
    class MutableIntView (line 418) | class MutableIntView {
      method MutableIntView (line 422) | explicit MutableIntView(int& a_value) : value_(a_value) {}
    function IsPositiveIntValue (line 431) | bool IsPositiveIntValue(const IntValue& foo) { return foo.value() > 0; }
    function IsPositiveMutableIntView (line 434) | bool IsPositiveMutableIntView(MutableIntView foo) { return foo.value()...
    function TEST (line 438) | TEST(MatcherCastTest, FromCompatibleType) {
    function TEST (line 462) | TEST(MatcherCastTest, FromConstReferenceToNonReference) {
    function TEST (line 472) | TEST(MatcherCastTest, FromConstReferenceToReference) {
    function TEST (line 482) | TEST(MatcherCastTest, FromReferenceToNonReference) {
    function TEST (line 496) | TEST(MatcherCastTest, FromNonReferenceToConstReference) {
    function TEST (line 504) | TEST(MatcherCastTest, FromNonReferenceToReference) {
    function TEST (line 514) | TEST(MatcherCastTest, FromSameType) {
    function TEST (line 523) | TEST(MatcherCastTest, FromAValue) {
    function TEST (line 531) | TEST(MatcherCastTest, FromAnImplicitlyConvertibleValue) {
    type NonImplicitlyConstructibleTypeWithOperatorEq (line 538) | struct NonImplicitlyConstructibleTypeWithOperatorEq {
    function TEST (line 554) | TEST(MatcherCastTest, NonImplicitlyConstructibleTypeWithOperatorEq) {
    type convertible_from_any (line 585) | namespace convertible_from_any {
      type ConvertibleFromAny (line 587) | struct ConvertibleFromAny {
        method ConvertibleFromAny (line 588) | ConvertibleFromAny(int a_value) : value(a_value) {}
        method ConvertibleFromAny (line 590) | ConvertibleFromAny(const T& /*a_value*/) : value(-1) {
      function ostream (line 600) | ostream& operator<<(ostream& os, const ConvertibleFromAny& a) {
      function TEST (line 604) | TEST(MatcherCastTest, ConversionConstructorIsUsed) {
      function TEST (line 610) | TEST(MatcherCastTest, FromConvertibleFromAny) {
      function TEST (line 774) | TEST(SafeMatcherCastTest, ConversionConstructorIsUsed) {
      function TEST (line 780) | TEST(SafeMatcherCastTest, FromConvertibleFromAny) {
    type IntReferenceWrapper (line 620) | struct IntReferenceWrapper {
      method IntReferenceWrapper (line 621) | IntReferenceWrapper(const int& a_value) : value(&a_value) {}
    function TEST (line 630) | TEST(MatcherCastTest, ValueIsCopied) {
    class Base (line 663) | class Base {
      method Base (line 666) | Base() = default;
      method Base (line 669) | Base(const Base&) = delete;
      method Base (line 670) | Base& operator=(const Base&) = delete;
    class Derived (line 673) | class Derived : public Base {
      method Derived (line 675) | Derived() : Base() {}
    class OtherDerived (line 679) | class OtherDerived : public Base {}
    function TEST_P (line 684) | TEST_P(SafeMatcherCastTestP, FromPolymorphicMatcher) {
    function TEST (line 698) | TEST(SafeMatcherCastTest, FromLosslesslyConvertibleArithmeticType) {
    function TEST (line 711) | TEST(SafeMatcherCastTest, FromBaseClass) {
    function TEST (line 725) | TEST(SafeMatcherCastTest, FromConstReferenceToNonReference) {
    function TEST (line 735) | TEST(SafeMatcherCastTest, FromConstReferenceToReference) {
    function TEST (line 745) | TEST(SafeMatcherCastTest, FromNonReferenceToConstReference) {
    function TEST (line 754) | TEST(SafeMatcherCastTest, FromNonReferenceToReference) {
    function TEST (line 764) | TEST(SafeMatcherCastTest, FromSameType) {
    type convertible_from_any (line 773) | namespace convertible_from_any {
      type ConvertibleFromAny (line 587) | struct ConvertibleFromAny {
        method ConvertibleFromAny (line 588) | ConvertibleFromAny(int a_value) : value(a_value) {}
        method ConvertibleFromAny (line 590) | ConvertibleFromAny(const T& /*a_value*/) : value(-1) {
      function ostream (line 600) | ostream& operator<<(ostream& os, const ConvertibleFromAny& a) {
      function TEST (line 604) | TEST(MatcherCastTest, ConversionConstructorIsUsed) {
      function TEST (line 610) | TEST(MatcherCastTest, FromConvertibleFromAny) {
      function TEST (line 774) | TEST(SafeMatcherCastTest, ConversionConstructorIsUsed) {
      function TEST (line 780) | TEST(SafeMatcherCastTest, FromConvertibleFromAny) {
    function TEST (line 790) | TEST(SafeMatcherCastTest, ValueIsNotCopied) {
    function TEST (line 797) | TEST(ExpectThat, TakesLiterals) {
    function TEST (line 804) | TEST(ExpectThat, TakesFunctions) {
    function TEST (line 814) | TEST(ATest, MatchesAnyValue) {
    function TEST (line 828) | TEST(ATest, WorksForDerivedClass) {
    function TEST (line 838) | TEST(ATest, CanDescribeSelf) { EXPECT_EQ("is anything", Describe(A<boo...
    function TEST (line 841) | TEST(AnTest, MatchesAnyValue) {
    function TEST (line 856) | TEST(AnTest, CanDescribeSelf) { EXPECT_EQ("is anything", Describe(An<i...
    function TEST (line 860) | TEST(UnderscoreTest, MatchesAnyValue) {
    function TEST (line 875) | TEST(UnderscoreTest, CanDescribeSelf) {
    function TEST (line 881) | TEST(EqTest, MatchesEqualValue) {
    class Unprintable (line 893) | class Unprintable {
      method Unprintable (line 895) | Unprintable() : c_('a') {}
      method dummy_c (line 899) | char dummy_c() { return c_; }
    function TEST (line 905) | TEST(EqTest, CanDescribeSelf) {
    function TEST (line 912) | TEST(EqTest, IsPolymorphic) {
    function TEST (line 923) | TEST(TypedEqTest, ChecksEqualityForGivenType) {
    function TEST (line 934) | TEST(TypedEqTest, CanDescribeSelf) {
    type Type (line 944) | struct Type {
      method IsTypeOf (line 945) | static bool IsTypeOf(const T& /* v */) { return true; }
    function TEST (line 951) | TEST(TypedEqTest, HasSpecifiedType) {
    function TEST (line 958) | TEST(GeTest, ImplementsGreaterThanOrEqual) {
    function TEST (line 966) | TEST(GeTest, CanDescribeSelf) {
    function TEST (line 972) | TEST(GtTest, ImplementsGreaterThan) {
    function TEST (line 980) | TEST(GtTest, CanDescribeSelf) {
    function TEST (line 986) | TEST(LeTest, ImplementsLessThanOrEqual) {
    function TEST (line 994) | TEST(LeTest, CanDescribeSelf) {
    function TEST (line 1000) | TEST(LtTest, ImplementsLessThan) {
    function TEST (line 1008) | TEST(LtTest, CanDescribeSelf) {
    function TEST (line 1014) | TEST(NeTest, ImplementsNotEqual) {
    function TEST (line 1022) | TEST(NeTest, CanDescribeSelf) {
    class MoveOnly (line 1027) | class MoveOnly {
      method MoveOnly (line 1029) | explicit MoveOnly(int i) : i_(i) {}
      method MoveOnly (line 1030) | MoveOnly(const MoveOnly&) = delete;
      method MoveOnly (line 1031) | MoveOnly(MoveOnly&&) = default;
      method MoveOnly (line 1032) | MoveOnly& operator=(const MoveOnly&) = delete;
      method MoveOnly (line 1033) | MoveOnly& operator=(MoveOnly&&) = default;
    type MoveHelper (line 1046) | struct MoveHelper {
    function TEST (line 1052) | TEST(ComparisonBaseTest, DISABLED_WorksWithMoveOnly) {

FILE: googlemock/test/gmock-matchers-containers_test.cc
  type testing (line 55) | namespace testing {
    type gmock_matchers_test (line 56) | namespace gmock_matchers_test {
      function MakeUniquePtrs (line 59) | std::vector<std::unique_ptr<int>> MakeUniquePtrs(const std::vector<i...
      function OfType (line 65) | std::string OfType(const std::string& type_name) {
      function TEST (line 73) | TEST(ContainsTest, WorksWithMoveOnly) {
      function TEST (line 82) | TEST(ElementsAreTest, HugeMatcher) {
      function TEST (line 91) | TEST(ElementsAreTest, HugeMatcherStr) {
      function TEST (line 100) | TEST(ElementsAreTest, HugeMatcherUnordered) {
      function TEST (line 110) | TEST(MatcherAssertionTest, WorksWhenMatcherIsSatisfied) {
      function TEST (line 119) | TEST(MatcherAssertionTest, WorksWhenMatcherIsNotSatisfied) {
      function TEST (line 140) | TEST(MatcherAssertionTest, WorksForByRefArguments) {
      function TEST (line 156) | TEST(MatcherAssertionTest, WorksForMonomorphicMatcher) {
      function TEST (line 175) | TEST(PointeeTest, RawPointer) {
      function TEST (line 185) | TEST(PointeeTest, RawPointerToConst) {
      function TEST (line 195) | TEST(PointeeTest, ReferenceToConstRawPointer) {
      function TEST (line 205) | TEST(PointeeTest, ReferenceToNonConstRawPointer) {
      function TEST (line 217) | TEST(PointeeTest, SmartPointer) {
      function TEST (line 224) | TEST(PointeeTest, SmartPointerToConst) {
      function TEST (line 234) | TEST(PointerTest, RawPointer) {
      function TEST (line 245) | TEST(PointerTest, RawPointerToConst) {
      function TEST (line 256) | TEST(PointerTest, SmartPointer) {
      function TEST (line 264) | TEST(PointerTest, SmartPointerToConst) {
      class ConstPropagatingPtr (line 278) | class ConstPropagatingPtr {
        method ConstPropagatingPtr (line 282) | ConstPropagatingPtr() : val_() {}
        method ConstPropagatingPtr (line 283) | explicit ConstPropagatingPtr(T* t) : val_(t) {}
        method ConstPropagatingPtr (line 284) | ConstPropagatingPtr(const ConstPropagatingPtr& other) : val_(other...
        method T (line 286) | T* get() { return val_; }
        method T (line 287) | T& operator*() { return *val_; }
        method T (line 289) | const T* get() const { return val_; }
        method T (line 290) | const T& operator*() const { return *val_; }
      function TEST (line 298) | TEST(PointeeTest, WorksWithConstPropagatingPointers) {
      function TEST (line 310) | TEST(PointeeTest, NeverMatchesNull) {
      function TEST (line 316) | TEST(PointeeTest, MatchesAgainstAValue) {
      function TEST (line 326) | TEST(PointeeTest, CanDescribeSelf) {
      function TEST_P (line 332) | TEST_P(PointeeTestP, CanExplainMatchResult) {
      function TEST (line 343) | TEST(PointeeTest, AlwaysExplainsPointee) {
      class Uncopyable (line 350) | class Uncopyable {
        method Uncopyable (line 352) | Uncopyable() : value_(-1) {}
        method Uncopyable (line 353) | explicit Uncopyable(int a_value) : value_(a_value) {}
        method value (line 355) | int value() const { return value_; }
        method set_value (line 356) | void set_value(int i) { value_ = i; }
        method Uncopyable (line 360) | Uncopyable(const Uncopyable&) = delete;
        method Uncopyable (line 361) | Uncopyable& operator=(const Uncopyable&) = delete;
      function ValueIsPositive (line 365) | bool ValueIsPositive(const Uncopyable& x) { return x.value() > 0; }
      type AStruct (line 372) | struct AStruct {
        method AStruct (line 373) | AStruct() : x(0), y(1.0), z(5), p(nullptr) {}
        method AStruct (line 374) | AStruct(const AStruct& rhs)
      type DerivedStruct (line 384) | struct DerivedStruct : public AStruct {
      function TEST (line 391) | TEST(FieldTest, WorksForNonConstField) {
      function TEST (line 404) | TEST(FieldTest, WorksForConstField) {
      function TEST (line 418) | TEST(FieldTest, WorksForUncopyableField) {
      function TEST (line 428) | TEST(FieldTest, WorksForPointerField) {
      function TEST (line 445) | TEST(FieldTest, WorksForByRefArgument) {
      function TEST (line 456) | TEST(FieldTest, WorksForArgumentOfSubType) {
      function TEST (line 469) | TEST(FieldTest, WorksForCompatibleMatcherType) {
      function TEST (line 480) | TEST(FieldTest, CanDescribeSelf) {
      function TEST (line 487) | TEST(FieldTest, CanDescribeSelfWithFieldName) {
      function TEST_P (line 496) | TEST_P(FieldTestP, CanExplainMatchResult) {
      function TEST_P (line 509) | TEST_P(FieldTestP, CanExplainMatchResultWithFieldName) {
      function TEST (line 525) | TEST(FieldForPointerTest, WorksForPointerToConst) {
      function TEST (line 535) | TEST(FieldForPointerTest, WorksForPointerToNonConst) {
      function TEST (line 545) | TEST(FieldForPointerTest, WorksForReferenceToConstPointer) {
      function TEST (line 555) | TEST(FieldForPointerTest, DoesNotMatchNull) {
      function TEST (line 562) | TEST(FieldForPointerTest, WorksForArgumentOfSubType) {
      function TEST (line 574) | TEST(FieldForPointerTest, CanDescribeSelf) {
      function TEST (line 581) | TEST(FieldForPointerTest, CanDescribeSelfWithFieldName) {
      function TEST_P (line 590) | TEST_P(FieldForPointerTestP, CanExplainMatchResult) {
      function TEST_P (line 605) | TEST_P(FieldForPointerTestP, CanExplainMatchResultWithFieldName) {
      class AClass (line 622) | class AClass {
        method AClass (line 624) | AClass() : n_(0) {}
        method n (line 627) | int n() const { return n_; }
        method set_n (line 629) | void set_n(int new_n) { n_ = new_n; }
        method set_s (line 636) | void set_s(const std::string& new_s) { s_ = new_s; }
      class DerivedClass (line 651) | class DerivedClass : public AClass {
        method k (line 653) | int k() const { return k_; }
      function TEST (line 663) | TEST(PropertyTest, WorksForNonReferenceProperty) {
      function TEST (line 679) | TEST(PropertyTest, WorksForReferenceToConstProperty) {
      function TEST (line 696) | TEST(PropertyTest, WorksForRefQualifiedProperty) {
      function TEST (line 713) | TEST(PropertyTest, WorksForReferenceToNonConstProperty) {
      function TEST (line 726) | TEST(PropertyTest, WorksForByValueArgument) {
      function TEST (line 739) | TEST(PropertyTest, WorksForArgumentOfSubType) {
      function TEST (line 754) | TEST(PropertyTest, WorksForCompatibleMatcherType) {
      function TEST (line 770) | TEST(PropertyTest, CanDescribeSelf) {
      function TEST (line 778) | TEST(PropertyTest, CanDescribeSelfWithPropertyName) {
      function TEST_P (line 787) | TEST_P(PropertyTestP, CanExplainMatchResult) {
      function TEST_P (line 800) | TEST_P(PropertyTestP, CanExplainMatchResultWithPropertyName) {
      function TEST (line 816) | TEST(PropertyForPointerTest, WorksForPointerToConst) {
      function TEST (line 828) | TEST(PropertyForPointerTest, WorksForPointerToNonConst) {
      function TEST (line 841) | TEST(PropertyForPointerTest, WorksForReferenceToConstPointer) {
      function TEST (line 853) | TEST(PropertyForPointerTest, WorksForReferenceToNonConstProperty) {
      function TEST (line 860) | TEST(PropertyForPointerTest, WorksForArgumentOfSubType) {
      function TEST (line 874) | TEST(PropertyForPointerTest, CanDescribeSelf) {
      function TEST (line 882) | TEST(PropertyForPointerTest, CanDescribeSelfWithPropertyDescription) {
      function TEST_P (line 891) | TEST_P(PropertyForPointerTestP, CanExplainMatchResult) {
      function TEST_P (line 907) | TEST_P(PropertyForPointerTestP, CanExplainMatchResultWithPropertyNam...
      function IntToStringFunction (line 927) | std::string IntToStringFunction(int input) {
      function TEST (line 933) | TEST(ResultOfTest, WorksForFunctionPointers) {
      function TEST (line 941) | TEST(ResultOfTest, CanDescribeItself) {
      function TEST (line 955) | TEST(ResultOfTest, CanDescribeItselfWithResultDescription) {
      function IntFunction (line 965) | int IntFunction(int input) { return input == 42 ? 80 : 90; }
      function TEST_P (line 967) | TEST_P(ResultOfTestP, CanExplainMatchResult) {
      function TEST_P (line 978) | TEST_P(ResultOfTestP, CanExplainMatchResultWithResultDescription) {
      function TEST (line 991) | TEST(ResultOfTest, WorksForNonReferenceResults) {
      function Uncopyable (line 1002) | Uncopyable& RefUncopyableFunction(Uncopyable& obj) {  // NOLINT
        method Uncopyable (line 352) | Uncopyable() : value_(-1) {}
        method Uncopyable (line 353) | explicit Uncopyable(int a_value) : value_(a_value) {}
        method value (line 355) | int value() const { return value_; }
        method set_value (line 356) | void set_value(int i) { value_ = i; }
        method Uncopyable (line 360) | Uncopyable(const Uncopyable&) = delete;
        method Uncopyable (line 361) | Uncopyable& operator=(const Uncopyable&) = delete;
      function TEST (line 1006) | TEST(ResultOfTest, WorksForReferenceToNonConstResults) {
      function TEST (line 1027) | TEST(ResultOfTest, WorksForReferenceToConstResults) {
      function TEST (line 1038) | TEST(ResultOfTest, WorksForCompatibleMatcherTypes) {
      function TEST (line 1048) | TEST(ResultOfDeathTest, DiesOnNullFunctionPointers) {
      function TEST (line 1057) | TEST(ResultOfTest, WorksForFunctionReferences) {
      type Functor (line 1065) | struct Functor {
      function TEST (line 1069) | TEST(ResultOfTest, WorksForFunctors) {
      type PolymorphicFunctor (line 1079) | struct PolymorphicFunctor {
      function TEST (line 1086) | TEST(ResultOfTest, WorksForPolymorphicFunctors) {
      function TEST (line 1098) | TEST(ResultOfTest, WorksForPolymorphicFunctorsIgnoringResultType) {
      function TEST (line 1106) | TEST(ResultOfTest, WorksForLambdas) {
      function TEST (line 1116) | TEST(ResultOfTest, WorksForNonCopyableArguments) {
      type ReferencingFunctor (line 1128) | struct ReferencingFunctor {
        method result_type (line 1130) | result_type operator()(const int& n) { return &n; }
      function TEST (line 1133) | TEST(ResultOfTest, WorksForReferencingCallables) {
      function TEST (line 1145) | TEST(SizeIsTest, ImplementsSizeIs) {
      function TEST (line 1157) | TEST(SizeIsTest, WorksWithMap) {
      function TEST (line 1169) | TEST(SizeIsTest, WorksWithReferences) {
      function TEST (line 1177) | TEST(SizeIsTest, WorksWithMoveOnly) {
      type MinimalistCustomType (line 1185) | struct MinimalistCustomType {
        method size (line 1186) | int size() const { return 1; }
      function TEST (line 1188) | TEST(SizeIsTest, WorksWithMinimalistCustomType) {
      function TEST (line 1194) | TEST(SizeIsTest, CanDescribeSelf) {
      function TEST (line 1200) | TEST(SizeIsTest, ExplainsResult) {
      function TEST (line 1221) | TEST(WhenSortedByTest, WorksForEmptyContainer) {
      function TEST (line 1227) | TEST(WhenSortedByTest, WorksForNonEmptyContainer) {
      function TEST (line 1239) | TEST(WhenSortedByTest, WorksForNonVectorContainer) {
      function TEST (line 1250) | TEST(WhenSortedByTest, WorksForNativeArray) {
      function TEST (line 1259) | TEST(WhenSortedByTest, CanDescribeSelf) {
      function TEST (line 1273) | TEST(WhenSortedByTest, ExplainsMatchResult) {
      function TEST (line 1285) | TEST(WhenSortedTest, WorksForEmptyContainer) {
      function TEST (line 1291) | TEST(WhenSortedTest, WorksForNonEmptyContainer) {
      function TEST (line 1301) | TEST(WhenSortedTest, WorksForMapTypes) {
      function TEST (line 1314) | TEST(WhenSortedTest, WorksForMultiMapTypes) {
      function TEST (line 1330) | TEST(WhenSortedTest, WorksForPolymorphicMatcher) {
      function TEST (line 1338) | TEST(WhenSortedTest, WorksForVectorConstRefMatcher) {
      class Streamlike (line 1351) | class Streamlike {
        class ConstIter (line 1353) | class ConstIter
          method ConstIter (line 1376) | ConstIter(const Streamlike* s, typename std::list<value_type>::i...
          method value_type (line 1379) | const value_type& operator*() const { return *pos_; }
          method value_type (line 1380) | const value_type* operator->() const { return &*pos_; }
          method ConstIter (line 1381) | ConstIter& operator++() {
          class PostIncrProxy (line 1388) | class PostIncrProxy {
            method PostIncrProxy (line 1390) | explicit PostIncrProxy(const value_type& value) : value_(value...
            method value_type (line 1391) | value_type operator*() const { return value_; }
          method PostIncrProxy (line 1396) | PostIncrProxy operator++(int) {
            method PostIncrProxy (line 1390) | explicit PostIncrProxy(const value_type& value) : value_(value...
            method value_type (line 1391) | value_type operator*() const { return value_; }
        method Streamlike (line 1360) | Streamlike(InIter first, InIter last) : remainder_(first, last) {}
        method const_iterator (line 1362) | const_iterator begin() const {
        method const_iterator (line 1365) | const_iterator end() const { return const_iterator(this, remainder...
        class ConstIter (line 1368) | class ConstIter {
          method ConstIter (line 1376) | ConstIter(const Streamlike* s, typename std::list<value_type>::i...
          method value_type (line 1379) | const value_type& operator*() const { return *pos_; }
          method value_type (line 1380) | const value_type* operator->() const { return &*pos_; }
          method ConstIter (line 1381) | ConstIter& operator++() {
          class PostIncrProxy (line 1388) | class PostIncrProxy {
            method PostIncrProxy (line 1390) | explicit PostIncrProxy(const value_type& value) : value_(value...
            method value_type (line 1391) | value_type operator*() const { return value_; }
          method PostIncrProxy (line 1396) | PostIncrProxy operator++(int) {
            method PostIncrProxy (line 1390) | explicit PostIncrProxy(const value_type& value) : value_(value...
            method value_type (line 1391) | value_type operator*() const { return value_; }
      function TEST (line 1429) | TEST(StreamlikeTest, Iteration) {
      function TEST (line 1442) | TEST(BeginEndDistanceIsTest, WorksWithForwardList) {
      function TEST (line 1454) | TEST(BeginEndDistanceIsTest, WorksWithNonStdList) {
      function TEST (line 1460) | TEST(BeginEndDistanceIsTest, CanDescribeSelf) {
      function TEST (line 1467) | TEST(BeginEndDistanceIsTest, WorksWithMoveOnly) {
      function TEST_P (line 1473) | TEST_P(BeginEndDistanceIsTestP, ExplainsResult) {
      function TEST (line 1507) | TEST(WhenSortedTest, WorksForStreamlike) {
      function TEST (line 1516) | TEST(WhenSortedTest, WorksForVectorConstRefMatcherOnStreamlike) {
      function TEST (line 1524) | TEST(IsSupersetOfTest, WorksForNativeArray) {
      function TEST (line 1535) | TEST(IsSupersetOfTest, WorksWithDuplicates) {
      function TEST (line 1543) | TEST(IsSupersetOfTest, WorksForEmpty) {
      function TEST (line 1561) | TEST(IsSupersetOfTest, WorksForStreamlike) {
      function TEST (line 1575) | TEST(IsSupersetOfTest, TakesStlContainer) {
      function TEST (line 1587) | TEST(IsSupersetOfTest, Describe) {
      function TEST (line 1601) | TEST(IsSupersetOfTest, DescribeNegation) {
      function TEST (line 1615) | TEST(IsSupersetOfTest, MatchAndExplain) {
      function TEST (line 1638) | TEST(IsSupersetOfTest, WorksForRhsInitializerList) {
      function TEST (line 1644) | TEST(IsSupersetOfTest, WorksWithMoveOnly) {
      function TEST (line 1652) | TEST(IsSubsetOfTest, WorksForNativeArray) {
      function TEST (line 1663) | TEST(IsSubsetOfTest, WorksWithDuplicates) {
      function TEST (line 1671) | TEST(IsSubsetOfTest, WorksForEmpty) {
      function TEST (line 1689) | TEST(IsSubsetOfTest, WorksForStreamlike) {
      function TEST (line 1701) | TEST(IsSubsetOfTest, TakesStlContainer) {
      function TEST (line 1714) | TEST(IsSubsetOfTest, Describe) {
      function TEST (line 1729) | TEST(IsSubsetOfTest, DescribeNegation) {
      function TEST (line 1743) | TEST(IsSubsetOfTest, MatchAndExplain) {
      function TEST (line 1766) | TEST(IsSubsetOfTest, WorksForRhsInitializerList) {
      function TEST (line 1772) | TEST(IsSubsetOfTest, WorksWithMoveOnly) {
      class CharString (line 1782) | class CharString {
        class const_iterator (line 1786) | class const_iterator {
          method const_iterator (line 1795) | explicit const_iterator(const char* ptr) : ptr_(ptr) {}
          method const_iterator (line 1803) | const_iterator& operator++() {
        method CharString (line 1821) | explicit CharString(const std::string& s) : s_(s) {}
        method const_iterator (line 1824) | const_iterator begin() const { return const_iterator(s_.c_str()); }
          method const_iterator (line 1795) | explicit const_iterator(const char* ptr) : ptr_(ptr) {}
          method const_iterator (line 1803) | const_iterator& operator++() {
        method const_iterator (line 1827) | const_iterator end() const { return const_iterator(s_.c_str() + s_...
          method const_iterator (line 1795) | explicit const_iterator(const char* ptr) : ptr_(ptr) {}
          method const_iterator (line 1803) | const_iterator& operator++() {
      function TEST (line 1835) | TEST(ElementsAreTest, WorksWithContainerThatReturnsTempInIterator) {
      function TEST (line 1843) | TEST(ElementsAreArrayTest, WorksWithContainerThatReturnsTempInIterat...
      class CharString2 (line 1851) | class CharString2 {
        class const_iterator (line 1855) | class const_iterator {
          method const_iterator (line 1865) | const_iterator(const const_iterator&) = default;
          method const_iterator (line 1866) | const_iterator& operator=(const const_iterator&) = delete;
          method const_iterator (line 1869) | explicit const_iterator(const char* ptr) : ptr_(ptr) {}
          method const_iterator (line 1877) | const_iterator& operator++() {
        method CharString2 (line 1895) | explicit CharString2(const std::string& s) : s_(s) {}
        method const_iterator (line 1898) | const_iterator begin() const { return const_iterator(s_.c_str()); }
          method const_iterator (line 1865) | const_iterator(const const_iterator&) = default;
          method const_iterator (line 1866) | const_iterator& operator=(const const_iterator&) = delete;
          method const_iterator (line 1869) | explicit const_iterator(const char* ptr) : ptr_(ptr) {}
          method const_iterator (line 1877) | const_iterator& operator++() {
        method const_iterator (line 1901) | const_iterator end() const { return const_iterator(s_.c_str() + s_...
          method const_iterator (line 1865) | const_iterator(const const_iterator&) = default;
          method const_iterator (line 1866) | const_iterator& operator=(const const_iterator&) = delete;
          method const_iterator (line 1869) | explicit const_iterator(const char* ptr) : ptr_(ptr) {}
          method const_iterator (line 1877) | const_iterator& operator++() {
      function TEST (line 1909) | TEST(ElementsAreTest, WorksWithContainerThatReturnsTempInUnassignabl...
      function TEST (line 1917) | TEST(ElementsAreArrayTest,
      class CharString3 (line 1926) | class CharString3 {
        class const_iterator (line 1930) | class const_iterator {
          method const_iterator (line 1939) | const_iterator(const const_iterator&) = delete;
          method const_iterator (line 1940) | const_iterator& operator=(const const_iterator&) = delete;
          method const_iterator (line 1943) | explicit const_iterator(const char* ptr) : ptr_(ptr) {}
          method const_iterator (line 1951) | const_iterator& operator++() {
        method CharString3 (line 1969) | explicit CharString3(const std::string& s) : s_(s) {}
        method const_iterator (line 1972) | const_iterator begin() const { return const_iterator(s_.c_str()); }
          method const_iterator (line 1939) | const_iterator(const const_iterator&) = delete;
          method const_iterator (line 1940) | const_iterator& operator=(const const_iterator&) = delete;
          method const_iterator (line 1943) | explicit const_iterator(const char* ptr) : ptr_(ptr) {}
          method const_iterator (line 1951) | const_iterator& operator++() {
        method const_iterator (line 1975) | const_iterator end() const { return const_iterator(s_.c_str() + s_...
          method const_iterator (line 1939) | const_iterator(const const_iterator&) = delete;
          method const_iterator (line 1940) | const_iterator& operator=(const const_iterator&) = delete;
          method const_iterator (line 1943) | explicit const_iterator(const char* ptr) : ptr_(ptr) {}
          method const_iterator (line 1951) | const_iterator& operator++() {
      function TEST (line 1983) | TEST(ElementsAreTest, WorksWithContainerThatReturnsTempInUncopyableI...
      function TEST (line 1991) | TEST(ElementsAreArrayTest,
      class CharString4 (line 2000) | class CharString4 {
        class const_iterator (line 2004) | class const_iterator {
          method const_iterator (line 2009) | const_iterator(const const_iterator&) = delete;
          method const_iterator (line 2010) | const_iterator& operator=(const const_iterator&) = delete;
          method const_iterator (line 2013) | explicit const_iterator(const char* ptr) : ptr_(ptr) {}
          method const_iterator (line 2021) | const_iterator& operator++() {
        method CharString4 (line 2039) | explicit CharString4(const std::string& s) : s_(s) {}
        method const_iterator (line 2042) | const_iterator begin() const { return const_iterator(s_.c_str()); }
          method const_iterator (line 2009) | const_iterator(const const_iterator&) = delete;
          method const_iterator (line 2010) | const_iterator& operator=(const const_iterator&) = delete;
          method const_iterator (line 2013) | explicit const_iterator(const char* ptr) : ptr_(ptr) {}
          method const_iterator (line 2021) | const_iterator& operator++() {
        method const_iterator (line 2045) | const_iterator end() const { return const_iterator(s_.c_str() + s_...
          method const_iterator (line 2009) | const_iterator(const const_iterator&) = delete;
          method const_iterator (line 2010) | const_iterator& operator=(const const_iterator&) = delete;
          method const_iterator (line 2013) | explicit const_iterator(const char* ptr) : ptr_(ptr) {}
          method const_iterator (line 2021) | const_iterator& operator++() {
      function TEST (line 2054) | TEST(ElementsAreTest, WorksWithContainerWithIteratorWithNoMemberType...
      function TEST (line 2063) | TEST(ElementsAreArrayTest, WorksWithContainerWithIteratorWithNoMembe...
      function TEST (line 2072) | TEST(ElemensAreStreamTest, WorksForStreamlike) {
      function TEST (line 2079) | TEST(ElemensAreArrayStreamTest, WorksForStreamlike) {
      function TEST (line 2095) | TEST(ElementsAreTest, WorksWithUncopyable) {
      function TEST (line 2102) | TEST(ElementsAreTest, WorksWithMoveOnly) {
      function TEST (line 2111) | TEST(ElementsAreTest, TakesStlContainer) {
      function TEST (line 2126) | TEST(UnorderedElementsAreArrayTest, SucceedsWhenExpected) {
      function TEST (line 2136) | TEST(UnorderedElementsAreArrayTest, VectorBool) {
      function TEST (line 2147) | TEST(UnorderedElementsAreArrayTest, WorksForStreamlike) {
      function TEST (line 2166) | TEST(UnorderedElementsAreArrayTest, TakesStlContainer) {
      function TEST (line 2179) | TEST(UnorderedElementsAreArrayTest, TakesInitializerList) {
      function TEST (line 2185) | TEST(UnorderedElementsAreArrayTest, TakesInitializerListOfCStrings) {
      function TEST (line 2191) | TEST(UnorderedElementsAreArrayTest, TakesInitializerListOfSameTypedM...
      function TEST (line 2199) | TEST(UnorderedElementsAreArrayTest,
      function TEST (line 2211) | TEST(UnorderedElementsAreArrayTest, WorksWithMoveOnly) {
      class UnorderedElementsAreTest (line 2218) | class UnorderedElementsAreTest : public testing::Test {
      function TEST_F (line 2223) | TEST_F(UnorderedElementsAreTest, WorksWithUncopyable) {
      function TEST_F (line 2231) | TEST_F(UnorderedElementsAreTest, SucceedsWhenExpected) {
      function TEST_F (line 2241) | TEST_F(UnorderedElementsAreTest, FailsWhenAnElementMatchesNoMatcher) {
      function TEST_F (line 2254) | TEST_F(UnorderedElementsAreTest, WorksForStreamlike) {
      function TEST_F (line 2265) | TEST_F(UnorderedElementsAreTest, WorksWithMoveOnly) {
      function TEST_F (line 2277) | TEST_F(UnorderedElementsAreTest, Performance) {
      function TEST_F (line 2293) | TEST_F(UnorderedElementsAreTest, PerformanceHalfStrict) {
      function TEST_F (line 2309) | TEST_F(UnorderedElementsAreTest, FailMessageCountWrong) {
      function TEST_F (line 2325) | TEST_F(UnorderedElementsAreTest, FailMessageCountWrongZero) {
      function TEST_F (line 2337) | TEST_F(UnorderedElementsAreTest, FailMessageUnmatchedMatchers) {
      function TEST_F (line 2349) | TEST_F(UnorderedElementsAreTest, FailMessageUnmatchedElements) {
      function TEST_F (line 2361) | TEST_F(UnorderedElementsAreTest, FailMessageUnmatchedMatcherAndEleme...
      function EMString (line 2379) | static std::string EMString(int element, int matcher) {
      function TEST_F (line 2385) | TEST_F(UnorderedElementsAreTest, FailMessageImperfectMatchOnly) {
      function TEST_F (line 2413) | TEST_F(UnorderedElementsAreTest, Describe) {
      function TEST_F (line 2425) | TEST_F(UnorderedElementsAreTest, DescribeNegation) {
      function TEST_P (line 2443) | TEST_P(EachTestP, ExplainsMatchResultCorrectly) {
      function TEST (line 2468) | TEST(EachTest, DescribesItselfCorrectly) {
      function TEST (line 2476) | TEST(EachTest, MatchesVectorWhenAllElementsMatch) {
      function TEST (line 2496) | TEST(EachTest, MatchesMapWhenAllElementsMatch) {
      function TEST (line 2514) | TEST(EachTest, AcceptsMatcher) {
      function TEST (line 2520) | TEST(EachTest, WorksForNativeArrayAsTuple) {
      function TEST (line 2527) | TEST(EachTest, WorksWithMoveOnly) {
      class IsHalfOfMatcher (line 2534) | class IsHalfOfMatcher {
        method MatchAndExplain (line 2537) | bool MatchAndExplain(const std::tuple<T1, T2>& a_pair,
        method DescribeTo (line 2548) | void DescribeTo(ostream* os) const {
        method DescribeNegationTo (line 2552) | void DescribeNegationTo(ostream* os) const {
      function IsHalfOf (line 2557) | PolymorphicMatcher<IsHalfOfMatcher> IsHalfOf() {
      function TEST (line 2561) | TEST(PointwiseTest, DescribesSelf) {
      function TEST (line 2578) | TEST(PointwiseTest, MakesCopyOfRhs) {
      function TEST (line 2592) | TEST(PointwiseTest, WorksForLhsNativeArray) {
      function TEST (line 2602) | TEST(PointwiseTest, WorksForRhsNativeArray) {
      function TEST (line 2613) | TEST(PointwiseTest, WorksForVectorOfBool) {
      function TEST (line 2622) | TEST(PointwiseTest, WorksForRhsInitializerList) {
      function TEST (line 2628) | TEST(PointwiseTest, RejectsWrongSize) {
      function TEST (line 2638) | TEST(PointwiseTest, RejectsWrongContent) {
      function TEST (line 2648) | TEST(PointwiseTest, AcceptsCorrectContent) {
      function TEST (line 2655) | TEST(PointwiseTest, AllowsMonomorphicInnerMatcher) {
      function TEST (line 2674) | TEST(PointwiseTest, WorksWithMoveOnly) {
      function TEST (line 2680) | TEST(UnorderedPointwiseTest, DescribesSelf) {
      function TEST (line 2706) | TEST(UnorderedPointwiseTest, MakesCopyOfRhs) {
      function TEST (line 2720) | TEST(UnorderedPointwiseTest, WorksForLhsNativeArray) {
      function TEST (line 2730) | TEST(UnorderedPointwiseTest, WorksForRhsNativeArray) {
      function TEST (line 2740) | TEST(UnorderedPointwiseTest, WorksForRhsInitializerList) {
      function TEST (line 2746) | TEST(UnorderedPointwiseTest, RejectsWrongSize) {
      function TEST (line 2757) | TEST(UnorderedPointwiseTest, RejectsWrongContent) {
      function TEST (line 2767) | TEST(UnorderedPointwiseTest, AcceptsCorrectContentInSameOrder) {
      function TEST (line 2773) | TEST(UnorderedPointwiseTest, AcceptsCorrectContentInDifferentOrder) {
      function TEST (line 2779) | TEST(UnorderedPointwiseTest, AllowsMonomorphicInnerMatcher) {
      function TEST (line 2791) | TEST(UnorderedPointwiseTest, WorksWithMoveOnly) {
      function TEST (line 2798) | TEST(PointeeTest, WorksOnMoveOnlyType) {
      class PredicateFormatterFromMatcherTest (line 2804) | class PredicateFormatterFromMatcherTest : public ::testing::Test {
        type Behavior (line 2806) | enum Behavior { kInitialSuccess, kAlwaysFail, kFlaky }
        class MockMatcher (line 2811) | class MockMatcher : public MatcherInterface<Behavior> {
          method MatchAndExplain (line 2813) | bool MatchAndExplain(Behavior behavior,
          method DescribeTo (line 2838) | void DescribeTo(ostream* os) const override { *os << "[DescribeT...
          method DescribeNegationTo (line 2840) | void DescribeNegationTo(ostream* os) const override {
        method AssertionResult (line 2845) | AssertionResult RunPredicateFormatter(Behavior behavior) {
      function TEST_F (line 2853) | TEST_F(PredicateFormatterFromMatcherTest, ShortCircuitOnSuccess) {
      function TEST_F (line 2860) | TEST_F(PredicateFormatterFromMatcherTest, NoShortCircuitOnFailure) {
      function TEST_F (line 2870) | TEST_F(PredicateFormatterFromMatcherTest, DetectsFlakyShortCircuit) {
      function TEST (line 2884) | TEST(ElementsAreTest, CanDescribeExpectingNoElement) {
      function TEST (line 2889) | TEST(ElementsAreTest, CanDescribeExpectingOneElement) {
      function TEST (line 2894) | TEST(ElementsAreTest, CanDescribeExpectingManyElements) {
      function TEST (line 2903) | TEST(ElementsAreTest, CanDescribeNegationOfExpectingNoElement) {
      function TEST (line 2908) | TEST(ElementsAreTest, CanDescribeNegationOfExpectingOneElement) {
      function TEST (line 2916) | TEST(ElementsAreTest, CanDescribeNegationOfExpectingManyElements) {
      function TEST (line 2925) | TEST(ElementsAreTest, DoesNotExplainTrivialMatch) {
      function TEST_P (line 2934) | TEST_P(ElementsAreTestP, ExplainsNonTrivialMatch) {
      function TEST (line 2946) | TEST(ElementsAreTest, CanExplainMismatchWrongSize) {
      function TEST_P (line 2957) | TEST_P(ElementsAreTestP, CanExplainMismatchRightSize) {
      function TEST (line 2970) | TEST(ElementsAreTest, MatchesOneElementVector) {
      function TEST (line 2977) | TEST(ElementsAreTest, MatchesOneElementList) {
      function TEST (line 2984) | TEST(ElementsAreTest, MatchesThreeElementVector) {
      function TEST (line 2993) | TEST(ElementsAreTest, MatchesOneElementEqMatcher) {
      function TEST (line 3000) | TEST(ElementsAreTest, MatchesOneElementAnyMatcher) {
      function TEST (line 3007) | TEST(ElementsAreTest, MatchesOneElementValue) {
      function TEST (line 3014) | TEST(ElementsAreTest, MatchesThreeElementsMixedMatchers) {
      function TEST (line 3023) | TEST(ElementsAreTest, MatchesTenElementVector) {
      function TEST (line 3033) | TEST(ElementsAreTest, DoesNotMatchWrongSize) {
      function TEST (line 3042) | TEST(ElementsAreTest, DoesNotMatchWrongValue) {
      function TEST (line 3050) | TEST(ElementsAreTest, DoesNotMatchWrongOrder) {
      function TEST (line 3061) | TEST(ElementsAreTest, WorksForNestedContainer) {
      function TEST (line 3075) | TEST(ElementsAreTest, WorksWithByRefElementMatchers) {
      function TEST (line 3083) | TEST(ElementsAreTest, WorksWithContainerPointerUsingPointee) {
      function TEST (line 3091) | TEST(ElementsAreTest, WorksWithNativeArrayPassedByReference) {
      class NativeArrayPassedAsPointerAndSize (line 3098) | class NativeArrayPassedAsPointerAndSize {
        method NativeArrayPassedAsPointerAndSize (line 3100) | NativeArrayPassedAsPointerAndSize() = default;
        method NativeArrayPassedAsPointerAndSize (line 3105) | NativeArrayPassedAsPointerAndSize(const NativeArrayPassedAsPointer...
        method NativeArrayPassedAsPointerAndSize (line 3107) | NativeArrayPassedAsPointerAndSize& operator=(
      function TEST (line 3111) | TEST(ElementsAreTest, WorksWithNativeArrayPassedAsPointerAndSize) {
      function TEST (line 3122) | TEST(ElementsAreTest, WorksWithTwoDimensionalNativeArray) {
      function TEST (line 3131) | TEST(ElementsAreTest, AcceptsStringLiteral) {
      function TEST (line 3140) | TEST(ElementsAreTest, AcceptsArrayWithUnknownSize) {
      function TEST (line 3153) | TEST(ElementsAreTest, MakesCopyOfArguments) {
      function TEST (line 3171) | TEST(ElementsAreArrayTest, CanBeCreatedWithValueArray) {
      function TEST (line 3181) | TEST(ElementsAreArrayTest, CanBeCreatedWithArraySize) {
      function TEST (line 3192) | TEST(ElementsAreArrayTest, CanBeCreatedWithoutArraySize) {
      function TEST (line 3202) | TEST(ElementsAreArrayTest, CanBeCreatedWithMatcherArray) {
      function TEST (line 3216) | TEST(ElementsAreArrayTest, CanBeCreatedWithVector) {
      function TEST (line 3225) | TEST(ElementsAreArrayTest, TakesInitializerList) {
      function TEST (line 3232) | TEST(ElementsAreArrayTest, TakesInitializerListOfCStrings) {
      function TEST (line 3239) | TEST(ElementsAreArrayTest, TakesInitializerListOfSameTypedMatchers) {
      function TEST (line 3245) | TEST(ElementsAreArrayTest, TakesInitializerListOfDifferentTypedMatch...
      function TEST (line 3256) | TEST(ElementsAreArrayTest, CanBeCreatedWithMatcherVector) {
      function TEST (line 3267) | TEST(ElementsAreArrayTest, CanBeCreatedWithIteratorRange) {
      function TEST (line 3282) | TEST(ElementsAreArrayTest, WorksWithNativeArray) {
      function TEST (line 3291) | TEST(ElementsAreArrayTest, SourceLifeSpan) {
      function TEST (line 3312) | TEST(ContainsTest, ListMatchesWhenElementIsInContainer) {
      function TEST (line 3330) | TEST(ContainsTest, ListDoesNotMatchWhenElementIsNotInContainer) {
      function TEST (line 3337) | TEST(ContainsTest, SetMatchesWhenElementIsInContainer) {
      function TEST (line 3354) | TEST(ContainsTest, SetDoesNotMatchWhenElementIsNotInContainer) {
      function TEST_P (line 3365) | TEST_P(ContainsTestP, ExplainsMatchResultCorrectly) {
      function TEST (line 3380) | TEST(ContainsTest, DescribesItselfCorrectly) {
      function TEST (line 3388) | TEST(ContainsTest, MapMatchesWhenElementIsInContainer) {
      function TEST (line 3404) | TEST(ContainsTest, MapDoesNotMatchWhenElementIsNotInContainer) {
      function TEST (line 3411) | TEST(ContainsTest, ArrayMatchesWhenElementIsInContainer) {
      function TEST (line 3416) | TEST(ContainsTest, ArrayDoesNotMatchWhenElementIsNotInContainer) {
      function TEST (line 3421) | TEST(ContainsTest, AcceptsMatcher) {
      function TEST (line 3427) | TEST(ContainsTest, WorksForNativeArrayAsTuple) {
      function TEST (line 3434) | TEST(ContainsTest, WorksForTwoDimensionalNativeArray) {

FILE: googlemock/test/gmock-matchers-misc_test.cc
  type testing (line 51) | namespace testing {
    type gmock_matchers_test (line 52) | namespace gmock_matchers_test {
      function TEST (line 55) | TEST(AddressTest, NonConst) {
      function TEST (line 70) | TEST(AddressTest, Const) {
      function TEST (line 81) | TEST(AddressTest, MatcherDoesntCopy) {
      function TEST (line 88) | TEST(AddressTest, Describe) {
      class NotCopyable (line 99) | class NotCopyable {
        method NotCopyable (line 101) | explicit NotCopyable(int a_value) : value_(a_value) {}
        method value (line 103) | int value() const { return value_; }
        method NotCopyable (line 116) | NotCopyable(const NotCopyable&) = delete;
        method NotCopyable (line 117) | NotCopyable& operator=(const NotCopyable&) = delete;
      function TEST (line 120) | TEST(ByRefTest, AllowsNotCopyableConstValueInMatchers) {
      function TEST (line 129) | TEST(ByRefTest, AllowsNotCopyableValueInMatchers) {
      function TEST (line 138) | TEST(IsEmptyTest, ImplementsIsEmpty) {
      function TEST (line 147) | TEST(IsEmptyTest, WorksWithString) {
      function TEST (line 156) | TEST(IsEmptyTest, CanDescribeSelf) {
      function TEST (line 162) | TEST(IsEmptyTest, ExplainsResult) {
      function TEST (line 170) | TEST(IsEmptyTest, WorksWithMoveOnly) {
      function TEST (line 176) | TEST(IsTrueTest, IsTrueIsFalse) {
      class ContainerEqTest (line 217) | class ContainerEqTest : public testing::Test {}
      function TYPED_TEST (line 225) | TYPED_TEST(ContainerEqTest, EqualsSelf) {
      function TYPED_TEST (line 234) | TYPED_TEST(ContainerEqTest, ValueMissing) {
      function TYPED_TEST (line 246) | TYPED_TEST(ContainerEqTest, ValueAdded) {
      function TYPED_TEST (line 257) | TYPED_TEST(ContainerEqTest, ValueAddedAndRemoved) {
      function TYPED_TEST (line 271) | TYPED_TEST(ContainerEqTest, DuplicateDifference) {
      function TEST (line 285) | TEST(ContainerEqExtraTest, MultipleValuesMissing) {
      function TEST (line 298) | TEST(ContainerEqExtraTest, MultipleValuesAdded) {
      function TEST (line 310) | TEST(ContainerEqExtraTest, MultipleValuesAddedAndRemoved) {
      function TEST (line 325) | TEST(ContainerEqExtraTest, MultiSetOfIntDuplicateDifference) {
      function TEST (line 339) | TEST(ContainerEqExtraTest, WorksForMaps) {
      function TEST (line 358) | TEST(ContainerEqExtraTest, WorksForNativeArray) {
      function TEST (line 367) | TEST(ContainerEqExtraTest, WorksForTwoDimensionalNativeArray) {
      function TEST (line 381) | TEST(ContainerEqExtraTest, WorksForNativeArrayAsTuple) {
      function TEST (line 394) | TEST(ContainerEqExtraTest, CopiesNativeArrayParameter) {
      class BacktrackingMaxBPMState (line 413) | class BacktrackingMaxBPMState {
        method BacktrackingMaxBPMState (line 416) | explicit BacktrackingMaxBPMState(const Graph* g) : graph_(g) {}
        method ElementMatcherPairs (line 418) | ElementMatcherPairs Compute() {
        method PushMatch (line 435) | void PushMatch(size_t lhs, size_t rhs) {
        method PopMatch (line 444) | void PopMatch() {
        method RecurseInto (line 451) | bool RecurseInto(size_t irhs) {
      function ElementMatcherPairs (line 489) | ElementMatcherPairs FindBacktrackingMaxBPM(const Graph& g) {
      class BacktrackingBPMTest (line 493) | class BacktrackingBPMTest : public ::testing::Test {}
      class BipartiteTest (line 497) | class BipartiteTest : public ::testing::TestWithParam<size_t> {}
      function TEST_P (line 500) | TEST_P(BipartiteTest, Exhaustive) {
      class BipartiteNonSquareTest (line 528) | class BipartiteNonSquareTest
      function TEST_F (line 531) | TEST_F(BipartiteNonSquareTest, SimpleBacktracking) {
      function TEST_P (line 551) | TEST_P(BipartiteNonSquareTest, Exhaustive) {
      class BipartiteRandomTest (line 572) | class BipartiteRandomTest
      function TEST_P (line 576) | TEST_P(BipartiteRandomTest, LargerNets) {
      function TEST (line 608) | TEST(IsReadableTypeNameTest, ReturnsTrueForShortNames) {
      function TEST (line 615) | TEST(IsReadableTypeNameTest, ReturnsTrueForLongNonTemplateNonFunctio...
      function TEST (line 621) | TEST(IsReadableTypeNameTest, ReturnsFalseForLongTemplateNames) {
      function TEST (line 627) | TEST(IsReadableTypeNameTest, ReturnsFalseForLongFunctionTypeNames) {
      function TEST (line 633) | TEST(FormatMatcherDescriptionTest, WorksForEmptyDescription) {
      function TEST_P (line 649) | TEST_P(MatcherTupleTestP, ExplainsMatchFailure) {
      class SampleOptional (line 683) | class SampleOptional {
        method SampleOptional (line 686) | explicit SampleOptional(T value)
        method SampleOptional (line 688) | SampleOptional() : value_(), has_value_(false) {}
        method T (line 690) | const T& operator*() const { return value_; }
      class SampleOptionalWithoutBoolConversion (line 701) | class SampleOptionalWithoutBoolConversion {
        method SampleOptionalWithoutBoolConversion (line 704) | explicit SampleOptionalWithoutBoolConversion(T value)
        method SampleOptionalWithoutBoolConversion (line 706) | SampleOptionalWithoutBoolConversion() : value_(), has_value_(false...
        method has_value (line 707) | bool has_value() const { return has_value_; }
        method T (line 708) | const T& operator*() const { return value_; }
      class OptionalTest (line 716) | class OptionalTest : public testing::Test {}
      function TYPED_TEST (line 724) | TYPED_TEST(OptionalTest, DescribesSelf) {
      function TYPED_TEST (line 729) | TYPED_TEST(OptionalTest, ExplainsSelf) {
      function TYPED_TEST (line 735) | TYPED_TEST(OptionalTest, MatchesNonEmptyOptional) {
      function TYPED_TEST (line 745) | TYPED_TEST(OptionalTest, DoesNotMatchNullopt) {
      function TYPED_TEST (line 751) | TYPED_TEST(OptionalTest, ComposesWithMonomorphicMatchersTakingRefere...
      function TYPED_TEST (line 760) | TYPED_TEST(OptionalTest, ComposesWithMonomorphicMatchersRequiringCon...
      class MoveOnlyOptionalTest (line 770) | class MoveOnlyOptionalTest : public testing::Test {}
      function TYPED_TEST (line 778) | TYPED_TEST(MoveOnlyOptionalTest, WorksWithMoveOnly) {
      class SampleVariantIntString (line 785) | class SampleVariantIntString {
        method SampleVariantIntString (line 787) | SampleVariantIntString(int i) : i_(i), has_int_(true) {}
        method SampleVariantIntString (line 788) | SampleVariantIntString(const std::string& s) : s_(s), has_int_(fal...
        method holds_alternative (line 791) | bool holds_alternative(const SampleVariantIntString& value) {
        method T (line 796) | const T& get(const SampleVariantIntString& value) {
      function TEST (line 809) | TEST(VariantTest, DescribesSelf) {
      function TEST (line 815) | TEST(VariantTest, ExplainsSelf) {
      function TEST (line 825) | TEST(VariantTest, FullMatch) {
      function TEST (line 833) | TEST(VariantTest, TypeDoesNotMatch) {
      function TEST (line 841) | TEST(VariantTest, InnerDoesNotMatch) {
      class SampleAnyType (line 849) | class SampleAnyType {
        method SampleAnyType (line 851) | explicit SampleAnyType(int i) : index_(0), i_(i) {}
        method SampleAnyType (line 852) | explicit SampleAnyType(const std::string& s) : index_(1), s_(s) {}
        method T (line 855) | const T* any_cast(const SampleAnyType* any) {
      function TEST (line 870) | TEST(AnyWithTest, FullMatch) {
      function TEST (line 875) | TEST(AnyWithTest, TestBadCastType) {
      function TEST (line 880) | TEST(AnyWithTest, TestUseInContainers) {
      function TEST (line 896) | TEST(AnyWithTest, TestCompare) {
      function TEST (line 900) | TEST(AnyWithTest, DescribesSelf) {
      function TEST (line 906) | TEST(AnyWithTest, ExplainsSelf) {
      function TEST (line 917) | TEST(ArgsTest, AcceptsZeroTemplateArg) {
      function TEST (line 923) | TEST(ArgsTest, AcceptsOneTemplateArg) {
      function TEST (line 930) | TEST(ArgsTest, AcceptsTwoTemplateArgs) {
      function TEST (line 938) | TEST(ArgsTest, AcceptsRepeatedTemplateArgs) {
      function TEST (line 944) | TEST(ArgsTest, AcceptsDecreasingTemplateArgs) {
      function TEST (line 954) | TEST(ArgsTest, AcceptsMoreTemplateArgsThanArityOfOriginalTuple) {
      function TEST (line 959) | TEST(ArgsTest, CanBeNested) {
      function TEST (line 965) | TEST(ArgsTest, CanMatchTupleByValue) {
      function TEST (line 972) | TEST(ArgsTest, CanMatchTupleByReference) {
      function TEST (line 982) | TEST(ArgsTest, AcceptsTenTemplateArgs) {
      function TEST (line 991) | TEST(ArgsTest, DescirbesSelfCorrectly) {
      function TEST (line 999) | TEST(ArgsTest, DescirbesNestedArgsCorrectly) {
      function TEST (line 1008) | TEST(ArgsTest, DescribesNegationCorrectly) {
      function TEST (line 1016) | TEST(ArgsTest, ExplainsMatchResultWithoutInnerExplanation) {
      class LessThanMatcher (line 1025) | class LessThanMatcher : public MatcherInterface<std::tuple<char, int...
        method DescribeTo (line 1027) | void DescribeTo(::std::ostream* /*os*/) const override {}
        method MatchAndExplain (line 1029) | bool MatchAndExplain(std::tuple<char, int> value,
      function LessThan (line 1040) | Matcher<std::tuple<char, int>> LessThan() {
      function TEST (line 1044) | TEST(ArgsTest, ExplainsMatchResultWithInnerExplanation) {
      function TEST (line 1060) | TEST(MatcherMacroTest, Works) {
      function TEST (line 1104) | TEST(MatcherMacroTest, DescriptionCanReferenceNegationAndParameters) {
      function TEST (line 1115) | TEST(MatcherMacroTest, CanExplainMatchResult) {
      function TEST (line 1138) | TEST(MatcherMacroTest, CanReferenceArgType) {
      type matcher_test (line 1148) | namespace matcher_test {
      function TEST (line 1152) | TEST(MatcherMacroTest, WorksInNamespace) {
      function TEST (line 1163) | TEST(MatcherMacroTest, CanBeComposedUsingValue) {
      function TEST (line 1173) | TEST(MatcherPMacroTest, Works) {
      function TEST (line 1187) | TEST(MatcherPMacroTest, GeneratesCorrectDescription) {
      class UncopyableFoo (line 1199) | class UncopyableFoo {
        method UncopyableFoo (line 1201) | explicit UncopyableFoo(char value) : value_(value) { (void)value_; }
        method UncopyableFoo (line 1203) | UncopyableFoo(const UncopyableFoo&) = delete;
      function TEST (line 1212) | TEST(MatcherPMacroTest, WorksWhenExplicitlyInstantiatedWithReference) {
      function TEST (line 1238) | TEST(MatcherPnMacroTest, CanReferenceParamTypes) {
      function TEST (line 1249) | TEST(MatcherPnMacroTest, WorksWhenExplicitlyInstantiatedWithReferenc...
      function TEST (line 1266) | TEST(MatcherPnMacroTest,
      function TEST (line 1286) | TEST(MatcherPnMacroTest, Works) {
      function TEST (line 1323) | TEST(MatcherPnMacroTest, CanBeOverloadedOnNumberOfParameters) {
      function TEST (line 1363) | TEST(MatcherPnMacroTest, WorksForDifferentParameterTypes) {
      function TEST (line 1380) | TEST(MatcherPnMacroTest, SimpleTypePromotion) {
      function TEST (line 1391) | TEST(MatcherPnMacroTest, TypesAreCorrect) {
      function TEST (line 1441) | TEST(MatcherPnMacroTest, CanUseMatcherTypedParameterInValue) {
      function TEST (line 1450) | TEST(ContainsTimes, ListMatchesWhenElementQuantityMatches) {
      function TEST_P (line 1469) | TEST_P(ContainsTimesP, ExplainsMatchResultCorrectly) {
      function TEST (line 1509) | TEST(ContainsTimes, DescribesItselfCorrectly) {
      function TEST (line 1521) | TEST(AllOfArrayTest, BasicForms) {
      function TEST (line 1563) | TEST(AllOfArrayTest, Matchers) {
      function TEST (line 1576) | TEST(AnyOfArrayTest, BasicForms) {
      function TEST (line 1616) | TEST(AnyOfArrayTest, Matchers) {
      function TEST_P (line 1628) | TEST_P(AnyOfArrayTestP, ExplainsMatchResultCorrectly) {
      function TEST (line 1667) | TEST(MatcherMacroTest, WorksOnMoveOnlyType) {
      function TEST (line 1677) | TEST(MatcherPMacroTest, WorksOnMoveOnlyType) {
      function TEST (line 1685) | TEST(MockMethodMockFunctionTest, EnsureNoUnusedButMarkedUnusedWarnin...
      function TEST (line 1703) | TEST(ThrowsTest, Examples) {
      function TEST (line 1713) | TEST(ThrowsTest, PrintsExceptionWhat) {
      function TEST (line 1719) | TEST(ThrowsTest, DoesNotGenerateDuplicateCatchClauseWarning) {
      function TEST (line 1724) | TEST(ThrowsTest, CallableExecutedExactlyOnce) {
      function TEST (line 1757) | TEST(ThrowsTest, Describe) {
      function TEST (line 1765) | TEST(ThrowsTest, Success) {
      function TEST (line 1773) | TEST(ThrowsTest, FailWrongType) {
      function TEST (line 1782) | TEST(ThrowsTest, FailWrongTypeNonStd) {
      function TEST (line 1790) | TEST(ThrowsTest, FailNoThrow) {
      class ThrowsPredicateTest (line 1797) | class ThrowsPredicateTest
      function TEST_P (line 1800) | TEST_P(ThrowsPredicateTest, Describe) {
      function TEST_P (line 1809) | TEST_P(ThrowsPredicateTest, Success) {
      function TEST_P (line 1817) | TEST_P(ThrowsPredicateTest, FailWrongType) {
      function TEST_P (line 1826) | TEST_P(ThrowsPredicateTest, FailWrongTypeNonStd) {
      function TEST_P (line 1834) | TEST_P(ThrowsPredicateTest, FailNoThrow) {
      function TEST (line 1847) | TEST(ThrowsPredicateCompilesTest, ExceptionMatcherAcceptsBroadType) {
      function TEST (line 1867) | TEST(ThrowsPredicateCompilesTest, MessageMatcherAcceptsNonMatcher) {

FILE: googlemock/test/gmock-matchers_test.h
  function namespace (line 66) | namespace testing {

FILE: googlemock/test/gmock-more-actions_test.cc
  type testing (line 51) | namespace testing {
    type gmock_more_actions_test (line 52) | namespace gmock_more_actions_test {
      function Short (line 70) | inline short Short(short n) { return n; }
      function Char (line 71) | inline char Char(char ch) { return ch; }
      function Nullary (line 74) | int Nullary() { return 1; }
      function Unary (line 78) | bool Unary(int x) { return x < 0; }
      function ByConstRef (line 80) | bool ByConstRef(const std::string& s) { return s == "Hi"; }
      function ReferencesGlobalDouble (line 83) | bool ReferencesGlobalDouble(const double& x) { return &x == &g_doubl...
      type UnaryFunctor (line 85) | struct UnaryFunctor {
      type UnaryMoveOnlyFunctor (line 89) | struct UnaryMoveOnlyFunctor : UnaryFunctor {
        method UnaryMoveOnlyFunctor (line 90) | UnaryMoveOnlyFunctor() = default;
        method UnaryMoveOnlyFunctor (line 91) | UnaryMoveOnlyFunctor(const UnaryMoveOnlyFunctor&) = delete;
        method UnaryMoveOnlyFunctor (line 92) | UnaryMoveOnlyFunctor(UnaryMoveOnlyFunctor&&) = default;
      type OneShotUnaryFunctor (line 95) | struct OneShotUnaryFunctor {
      function Ternary (line 101) | int Ternary(int x, char y, short z) { return x + y + z; }
      function SumOf4 (line 103) | int SumOf4(int a, int b, int c, int d) { return a + b + c + d; }
      function SumOfFirst2 (line 105) | int SumOfFirst2(int a, int b, Unused, Unused) { return a + b; }
      function SumOf5 (line 107) | int SumOf5(int a, int b, int c, int d, int e) { return a + b + c + d...
      type SumOf5Functor (line 109) | struct SumOf5Functor {
      function SumOf6 (line 115) | int SumOf6(int a, int b, int c, int d, int e, int f) {
      type SumOf6Functor (line 119) | struct SumOf6Functor {
      function Concat7 (line 125) | std::string Concat7(const char* s1, const char* s2, const char* s3,
      function Concat8 (line 131) | std::string Concat8(const char* s1, const char* s2, const char* s3,
      function Concat9 (line 137) | std::string Concat9(const char* s1, const char* s2, const char* s3,
      function Concat10 (line 143) | std::string Concat10(const char* s1, const char* s2, const char* s3,
      class Foo (line 150) | class Foo {
        method Foo (line 152) | Foo() : value_(123) {}
        method Nullary (line 154) | int Nullary() const { return value_; }
        method Unary (line 156) | short Unary(long x) { return static_cast<short>(value_ + x); }
        method Binary (line 158) | std::string Binary(const std::string& str, char c) const { return ...
        method Ternary (line 160) | int Ternary(int x, bool y, char z) { return value_ + x + y * z; }
        method SumOf4 (line 162) | int SumOf4(int a, int b, int c, int d) const {
        method SumOfLast2 (line 166) | int SumOfLast2(Unused, Unused, int a, int b) const { return a + b; }
        method SumOf5 (line 168) | int SumOf5(int a, int b, int c, int d, int e) { return a + b + c +...
        method SumOf6 (line 170) | int SumOf6(int a, int b, int c, int d, int e, int f) {
        method Concat7 (line 174) | std::string Concat7(const char* s1, const char* s2, const char* s3,
        method Concat8 (line 180) | std::string Concat8(const char* s1, const char* s2, const char* s3,
        method Concat9 (line 186) | std::string Concat9(const char* s1, const char* s2, const char* s3,
        method Concat10 (line 192) | std::string Concat10(const char* s1, const char* s2, const char* s3,
      function TEST (line 204) | TEST(InvokeTest, Nullary) {
      function TEST (line 210) | TEST(InvokeTest, Unary) {
      function TEST (line 217) | TEST(InvokeTest, Binary) {
      function TEST (line 224) | TEST(InvokeTest, Ternary) {
      function TEST (line 230) | TEST(InvokeTest, FunctionThatTakes4Arguments) {
      function TEST (line 236) | TEST(InvokeTest, FunctionThatTakes5Arguments) {
      function TEST (line 242) | TEST(InvokeTest, FunctionThatTakes6Arguments) {
      function TEST (line 253) | TEST(InvokeTest, FunctionThatTakes7Arguments) {
      function TEST (line 264) | TEST(InvokeTest, FunctionThatTakes8Arguments) {
      function TEST (line 275) | TEST(InvokeTest, FunctionThatTakes9Arguments) {
      function TEST (line 287) | TEST(InvokeTest, FunctionThatTakes10Arguments) {
      function TEST (line 300) | TEST(InvokeTest, FunctionWithUnusedParameters) {
      function TEST (line 312) | TEST(InvokeTest, MethodWithUnusedParameters) {
      function TEST (line 322) | TEST(InvokeTest, Functor) {
      function TEST (line 328) | TEST(InvokeTest, FunctionWithCompatibleType) {
      function TEST (line 336) | TEST(InvokeMethodTest, Nullary) {
      function TEST (line 343) | TEST(InvokeMethodTest, Unary) {
      function TEST (line 350) | TEST(InvokeMethodTest, Binary) {
      function TEST (line 359) | TEST(InvokeMethodTest, Ternary) {
      function TEST (line 366) | TEST(InvokeMethodTest, MethodThatTakes4Arguments) {
      function TEST (line 373) | TEST(InvokeMethodTest, MethodThatTakes5Arguments) {
      function TEST (line 381) | TEST(InvokeMethodTest, MethodThatTakes6Arguments) {
      function TEST (line 390) | TEST(InvokeMethodTest, MethodThatTakes7Arguments) {
      function TEST (line 402) | TEST(InvokeMethodTest, MethodThatTakes8Arguments) {
      function TEST (line 414) | TEST(InvokeMethodTest, MethodThatTakes9Arguments) {
      function TEST (line 427) | TEST(InvokeMethodTest, MethodThatTakes10Arguments) {
      function TEST (line 441) | TEST(InvokeMethodTest, MethodWithCompatibleType) {
      function TEST (line 449) | TEST(WithoutArgsTest, NoArg) {
      function TEST (line 455) | TEST(WithArgTest, OneArg) {
      function TEST (line 461) | TEST(ReturnArgActionTest, WorksForOneArgIntArg0) {
      function TEST (line 466) | TEST(ReturnArgActionTest, WorksForMultiArgBoolArg0) {
      function TEST (line 471) | TEST(ReturnArgActionTest, WorksForMultiArgStringArg2) {
      function TEST (line 476) | TEST(ReturnArgActionTest, WorksForNonConstRefArg0) {
      function TEST (line 482) | TEST(SaveArgActionTest, WorksForSameType) {
      function TEST (line 489) | TEST(SaveArgActionTest, WorksForCompatibleType) {
      type MoveOnly (line 496) | struct MoveOnly {
        method MoveOnly (line 497) | explicit MoveOnly(int v) : i(v) {}
        method MoveOnly (line 498) | MoveOnly(MoveOnly&& o) {
        method MoveOnly (line 502) | MoveOnly& operator=(MoveOnly&& o) {
      function TEST (line 510) | TEST(SaveArgByMoveActionTest, WorksForSameType) {
      function TEST (line 517) | TEST(SaveArgByMoveActionTest, WorksForCompatibleType) {
      function TEST (line 524) | TEST(SaveArgPointeeActionTest, WorksForSameType) {
      function TEST (line 532) | TEST(SaveArgPointeeActionTest, WorksForCompatibleType) {
      function TEST (line 540) | TEST(SetArgRefereeActionTest, WorksForSameType) {
      function TEST (line 547) | TEST(SetArgRefereeActionTest, WorksForCompatibleType) {
      function TEST (line 554) | TEST(SetArgRefereeActionTest, WorksWithExtraArguments) {
      class DeletionTester (line 563) | class DeletionTester {
        method DeletionTester (line 565) | explicit DeletionTester(bool* is_deleted) : is_deleted_(is_deleted) {
      function TEST (line 576) | TEST(DeleteArgActionTest, OneArg) {
      function TEST (line 585) | TEST(DeleteArgActionTest, TenArgs) {
      function TEST (line 598) | TEST(ThrowActionTest, ThrowsGivenExceptionInVoidFunction) {
      class MyException (line 603) | class MyException {}
      function TEST (line 605) | TEST(ThrowActionTest, ThrowsGivenExceptionInNonVoidFunction) {
      function TEST (line 610) | TEST(ThrowActionTest, ThrowsGivenExceptionInNullaryFunction) {
      class Object (line 615) | class Object {
        method Func (line 618) | virtual void Func() {}
      class MockObject (line 621) | class MockObject : public Object {
      function TEST (line 627) | TEST(ThrowActionTest, Times0) {
      function TEST (line 646) | TEST(SetArrayArgumentTest, SetsTheNthArray) {
      function TEST (line 682) | TEST(SetArrayArgumentTest, SetsTheNthArrayWithEmptyRange) {
      function TEST (line 698) | TEST(SetArrayArgumentTest, SetsTheNthArrayWithConvertibleType) {
      function TEST (line 713) | TEST(SetArrayArgumentTest, SetsTheNthArrayWithIteratorArgument) {
      function TEST (line 723) | TEST(ReturnPointeeTest, Works) {
      function TEST (line 735) | TEST(InvokeArgumentTest, Function0) {
      function TEST (line 741) | TEST(InvokeArgumentTest, Functor1) {
      function TEST (line 747) | TEST(InvokeArgumentTest, Functor1MoveOnly) {
      function TEST (line 753) | TEST(InvokeArgumentTest, OneShotFunctor1) {
      function TEST (line 759) | TEST(InvokeArgumentTest, Function5) {
      function TEST (line 766) | TEST(InvokeArgumentTest, Functor5) {
      function TEST (line 773) | TEST(InvokeArgumentTest, Function6) {
      function TEST (line 780) | TEST(InvokeArgumentTest, Functor6) {
      function TEST (line 787) | TEST(InvokeArgumentTest, Function7) {
      function TEST (line 796) | TEST(InvokeArgumentTest, Function8) {
      function TEST (line 805) | TEST(InvokeArgumentTest, Function9) {
      function TEST (line 814) | TEST(InvokeArgumentTest, Function10) {
      function TEST (line 823) | TEST(InvokeArgumentTest, ByPointerFunction) {
      function TEST (line 831) | TEST(InvokeArgumentTest, FunctionWithCStringLiteral) {
      function TEST (line 838) | TEST(InvokeArgumentTest, ByConstReferenceFunction) {
      function TEST (line 849) | TEST(InvokeArgumentTest, ByExplicitConstReferenceFunction) {
      function TEST (line 860) | TEST(InvokeArgumentTest, MoveOnlyType) {
      function TEST (line 877) | TEST(DoAllTest, TwoActions) {
      function TEST (line 886) | TEST(DoAllTest, ThreeActions) {
      function TEST (line 896) | TEST(DoAllTest, FourActions) {
      function TEST (line 909) | TEST(DoAllTest, FiveActions) {
      function TEST (line 923) | TEST(DoAllTest, SixActions) {
      function TEST (line 938) | TEST(DoAllTest, SevenActions) {
      function TEST (line 955) | TEST(DoAllTest, EightActions) {
      function TEST (line 975) | TEST(DoAllTest, NineActions) {
      function TEST (line 996) | TEST(DoAllTest, TenActions) {
      function TEST (line 1020) | TEST(DoAllTest, NoArgs) {
      function TEST (line 1027) | TEST(DoAllTest, MoveOnlyArgs) {
      function TEST (line 1036) | TEST(DoAllTest, ImplicitlyConvertsActionArguments) {
      function ACTION (line 1058) | ACTION(Return5) { return 5; }
      function TEST (line 1060) | TEST(ActionMacroTest, WorksWhenNotReferencingArguments) {
      function ACTION (line 1069) | ACTION(IncrementArg1) { (*arg1)++; }
      function TEST (line 1071) | TEST(ActionMacroTest, WorksWhenReturningVoid) {
      function ACTION (line 1080) | ACTION(IncrementArg2) {
      function TEST (line 1086) | TEST(ActionMacroTest, CanReferenceArgumentType) {
      function ACTION (line 1095) | ACTION(Sum2) {
      function TEST (line 1101) | TEST(ActionMacroTest, CanReferenceArgumentTuple) {
      function Dummy (line 1111) | int Dummy(bool flag) { return flag ? 1 : 0; }
      function ACTION (line 1115) | ACTION(InvokeDummy) {
      function TEST (line 1121) | TEST(ActionMacroTest, CanReferenceMockFunctionType) {
      function ACTION (line 1129) | ACTION(InvokeDummy2) {
      function TEST (line 1135) | TEST(ActionMacroTest, CanReferenceMockFunctionReturnType) {
      function ACTION (line 1142) | ACTION(ReturnAddrOfConstBoolReferenceArg) {
      function TEST (line 1147) | TEST(ActionMacroTest, WorksForConstReferenceArg) {
      function ACTION (line 1154) | ACTION(ReturnAddrOfIntReferenceArg) {
      function TEST (line 1159) | TEST(ActionMacroTest, WorksForNonConstReferenceArg) {
      type action_test (line 1166) | namespace action_test {
        function ACTION (line 1167) | ACTION(Sum) { return arg0 + arg1; }
      function TEST (line 1170) | TEST(ActionMacroTest, WorksInNamespace) {
      function ACTION (line 1177) | ACTION(PlusTwo) { return arg0 + 2; }
      function TEST (line 1179) | TEST(ActionMacroTest, WorksForDifferentArgumentNumbers) {
      function ACTION_P (line 1189) | ACTION_P(Plus, n) { return arg0 + n; }
      function TEST (line 1191) | TEST(ActionPMacroTest, DefinesParameterizedAction) {
      function ACTION_P (line 1198) | ACTION_P(TypedPlus, n) {
      function TEST (line 1204) | TEST(ActionPMacroTest, CanReferenceArgumentAndParameterTypes) {
      function TEST (line 1211) | TEST(ActionPMacroTest, WorksInCompatibleMockFunction) {
      function ACTION (line 1221) | ACTION(OverloadedAction) { return arg0 ? arg1 : "hello"; }
      function ACTION_P (line 1223) | ACTION_P(OverloadedAction, default_value) {
      function ACTION_P2 (line 1227) | ACTION_P2(OverloadedAction, true_value, false_value) {
      function TEST (line 1231) | TEST(ActionMacroTest, CanDefineOverloadedActions) {
      function ACTION_P3 (line 1249) | ACTION_P3(Plus, m, n, k) { return arg0 + m + n + k; }
      function TEST (line 1251) | TEST(ActionPnMacroTest, WorksFor3Parameters) {
      function ACTION_P4 (line 1261) | ACTION_P4(Plus, p0, p1, p2, p3) { return arg0 + p0 + p1 + p2 + p3; }
      function TEST (line 1263) | TEST(ActionPnMacroTest, WorksFor4Parameters) {
      function ACTION_P5 (line 1268) | ACTION_P5(Plus, p0, p1, p2, p3, p4) { return arg0 + p0 + p1 + p2 + p...
      function TEST (line 1270) | TEST(ActionPnMacroTest, WorksFor5Parameters) {
      function ACTION_P6 (line 1275) | ACTION_P6(Plus, p0, p1, p2, p3, p4, p5) {
      function TEST (line 1279) | TEST(ActionPnMacroTest, WorksFor6Parameters) {
      function ACTION_P7 (line 1284) | ACTION_P7(Plus, p0, p1, p2, p3, p4, p5, p6) {
      function TEST (line 1288) | TEST(ActionPnMacroTest, WorksFor7Parameters) {
      function ACTION_P8 (line 1293) | ACTION_P8(Plus, p0, p1, p2, p3, p4, p5, p6, p7) {
      function TEST (line 1297) | TEST(ActionPnMacroTest, WorksFor8Parameters) {
      function ACTION_P9 (line 1303) | ACTION_P9(Plus, p0, p1, p2, p3, p4, p5, p6, p7, p8) {
      function TEST (line 1307) | TEST(ActionPnMacroTest, WorksFor9Parameters) {
      function ACTION_P10 (line 1313) | ACTION_P10(Plus, p0, p1, p2, p3, p4, p5, p6, p7, p8, last_param) {
      function TEST (line 1319) | TEST(ActionPnMacroTest, WorksFor10Parameters) {
      function ACTION_P2 (line 1327) | ACTION_P2(PadArgument, prefix, suffix) {
      function TEST (line 1334) | TEST(ActionPnMacroTest, SimpleTypePromotion) {
      function ACTION_P3 (line 1348) | ACTION_P3(ConcatImpl, a, b, c) {
      function Concat (line 1363) | ConcatImplActionP3<std::string, T1, T2> Concat(const std::string& a,...
      function Concat (line 1382) | ConcatImplActionP3<T1, int, T2> Concat(T1 a, int b, T2 c) {
      function TEST (line 1386) | TEST(ActionPnMacroTest, CanPartiallyRestrictParameterTypes) {
      function ACTION (line 1396) | ACTION(DoFoo) {}
      function ACTION_P (line 1397) | ACTION_P(DoFoo, p) {}
      function ACTION_P2 (line 1398) | ACTION_P2(DoFoo, p0, p1) {}
      function TEST (line 1400) | TEST(ActionPnMacroTest, TypesAreCorrect) {
      function ACTION_P (line 1440) | ACTION_P(Plus1, x) { return x; }
      function ACTION_P2 (line 1441) | ACTION_P2(Plus2, x, y) { return x + y; }
      function ACTION_P3 (line 1442) | ACTION_P3(Plus3, x, y, z) { return x + y + z; }
      function ACTION_P10 (line 1443) | ACTION_P10(Plus10, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {
      function TEST (line 1447) | TEST(ActionPnMacroTest, CanExplicitlyInstantiateWithReferenceTypes) {
      class TenArgConstructorClass (line 1467) | class TenArgConstructorClass {
        method TenArgConstructorClass (line 1469) | TenArgConstructorClass(int a1, int a2, int a3, int a4, int a5, int...
      function TEST (line 1481) | TEST(ActionTemplateTest, WorksWithoutValueParam) {
      function TEST (line 1493) | TEST(ActionTemplateTest, WorksWithValueParams) {
      function ACTION_TEMPLATE (line 1501) | ACTION_TEMPLATE(MyDeleteArg, HAS_1_TEMPLATE_PARAMS(int, k),
      class BoolResetter (line 1507) | class BoolResetter {
        method BoolResetter (line 1509) | explicit BoolResetter(bool* value) : value_(value) {}
      function TEST (line 1516) | TEST(ActionTemplateTest, WorksForIntegralTemplateParams) {
      function TEST (line 1533) | TEST(ActionTemplateTest, WorksForTemplateTemplateParameters) {
      type GiantTemplate (line 1543) | struct GiantTemplate {
        method GiantTemplate (line 1545) | explicit GiantTemplate(int a_value) : value(a_value) {}
      function TEST (line 1558) | TEST(ActionTemplateTest, WorksFor10TemplateParameters) {
      function TEST (line 1573) | TEST(ActionTemplateTest, WorksFor10ValueParameters) {
      function ACTION (line 1581) | ACTION(ReturnSum) { return 0; }
      function ACTION_P (line 1583) | ACTION_P(ReturnSum, x) { return x; }
      function TEST (line 1600) | TEST(ActionTemplateTest, CanBeOverloadedOnNumberOfValueParameters) {

FILE: googlemock/test/gmock-nice-strict_test.cc
  class Mock (line 41) | class Mock {
    method Mock (line 43) | Mock() = default;
    method Mock (line 48) | Mock(const Mock&) = delete;
    method Mock (line 49) | Mock& operator=(const Mock&) = delete;
  type testing (line 52) | namespace testing {
    type gmock_nice_strict_test (line 53) | namespace gmock_nice_strict_test {
      class NotDefaultConstructible (line 66) | class NotDefaultConstructible {
        method NotDefaultConstructible (line 68) | explicit NotDefaultConstructible(int) {}
      class CallsMockMethodInDestructor (line 71) | class CallsMockMethodInDestructor {
      class Foo (line 79) | class Foo {
      class MockFoo (line 87) | class MockFoo : public Foo {
        method MockFoo (line 89) | MockFoo() = default;
        method Delete (line 90) | void Delete() { delete this; }
        method MockFoo (line 97) | MockFoo(const MockFoo&) = delete;
        method MockFoo (line 98) | MockFoo& operator=(const MockFoo&) = delete;
      class MockBar (line 101) | class MockBar {
        method MockBar (line 103) | explicit MockBar(const std::string& s) : str_(s) {}
        method MockBar (line 105) | MockBar(char a1, char a2, std::string a3, std::string a4, int a5, ...
        method MockBar (line 122) | MockBar(const MockBar&) = delete;
        method MockBar (line 123) | MockBar& operator=(const MockBar&) = delete;
      class MockBaz (line 126) | class MockBaz {
        class MoveOnly (line 128) | class MoveOnly {
          method MoveOnly (line 130) | MoveOnly() = default;
          method MoveOnly (line 132) | MoveOnly(const MoveOnly&) = delete;
          method MoveOnly (line 133) | MoveOnly& operator=(const MoveOnly&) = delete;
          method MoveOnly (line 135) | MoveOnly(MoveOnly&&) = default;
          method MoveOnly (line 136) | MoveOnly& operator=(MoveOnly&&) = default;
        method MockBaz (line 139) | MockBaz(MoveOnly) {}
      function TEST (line 145) | TEST(RawMockTest, WarningForUninterestingCall) {
      function TEST (line 162) | TEST(RawMockTest, WarningForUninterestingCallAfterDeath) {
      function TEST (line 180) | TEST(RawMockTest, InfoForUninterestingCall) {
      function TEST (line 193) | TEST(RawMockTest, IsNaggy_IsNice_IsStrict) {
      function TEST (line 201) | TEST(NiceMockTest, NoWarningForUninterestingCall) {
      function TEST (line 212) | TEST(NiceMockTest, NoWarningForUninterestingCallAfterDeath) {
      function TEST (line 225) | TEST(NiceMockTest, InfoForUninterestingCall) {
      function TEST (line 241) | TEST(NiceMockTest, AllowsExpectedCall) {
      function TEST (line 251) | TEST(NiceMockTest, ThrowsExceptionForUnknownReturnTypes) {
      function TEST (line 266) | TEST(NiceMockTest, UnexpectedCallFails) {
      function TEST (line 275) | TEST(NiceMockTest, NonDefaultConstructor) {
      function TEST (line 285) | TEST(NiceMockTest, NonDefaultConstructor10) {
      function TEST (line 294) | TEST(NiceMockTest, AllowLeak) {
      function TEST (line 301) | TEST(NiceMockTest, MoveOnlyConstructor) {
      function TEST (line 307) | TEST(NiceMockTest, AcceptsClassNamedMock) {
      function TEST (line 313) | TEST(NiceMockTest, IsNiceInDestructor) {
      function TEST (line 320) | TEST(NiceMockTest, IsNaggy_IsNice_IsStrict) {
      function TEST (line 330) | TEST(NaggyMockTest, WarningForUninterestingCall) {
      function TEST (line 347) | TEST(NaggyMockTest, WarningForUninterestingCallAfterDeath) {
      function TEST (line 367) | TEST(NaggyMockTest, AllowsExpectedCall) {
      function TEST (line 375) | TEST(NaggyMockTest, UnexpectedCallFails) {
      function TEST (line 385) | TEST(NaggyMockTest, NonDefaultConstructor) {
      function TEST (line 395) | TEST(NaggyMockTest, NonDefaultConstructor10) {
      function TEST (line 404) | TEST(NaggyMockTest, AllowLeak) {
      function TEST (line 411) | TEST(NaggyMockTest, MoveOnlyConstructor) {
      function TEST (line 417) | TEST(NaggyMockTest, AcceptsClassNamedMock) {
      function TEST (line 423) | TEST(NaggyMockTest, IsNaggyInDestructor) {
      function TEST (line 439) | TEST(NaggyMockTest, IsNaggy_IsNice_IsStrict) {
      function TEST (line 447) | TEST(StrictMockTest, AllowsExpectedCall) {
      function TEST (line 455) | TEST(StrictMockTest, UnexpectedCallFails) {
      function TEST (line 464) | TEST(StrictMockTest, UninterestingCallFails) {
      function TEST (line 473) | TEST(StrictMockTest, UninterestingCallFailsAfterDeath) {
      function TEST (line 485) | TEST(StrictMockTest, NonDefaultConstructor) {
      function TEST (line 495) | TEST(StrictMockTest, NonDefaultConstructor10) {
      function TEST (line 504) | TEST(StrictMockTest, AllowLeak) {
      function TEST (line 511) | TEST(StrictMockTest, MoveOnlyConstructor) {
      function TEST (line 517) | TEST(StrictMockTest, AcceptsClassNamedMock) {
      function TEST (line 523) | TEST(StrictMockTest, IsStrictInDestructor) {
      function TEST (line 533) | TEST(StrictMockTest, IsNaggy_IsNice_IsStrict) {

FILE: googlemock/test/gmock-port_test.cc
  function TEST (line 42) | TEST(DummyTest, Dummy) {}

FILE: googlemock/test/gmock-pp-string_test.cc
  type testing (line 38) | namespace testing {
    function SameExceptSpaces (line 43) | ::testing::Matcher<const std::string&> SameExceptSpaces(const std::str...
    function TEST (line 58) | TEST(Macros, Cat) {
    function TEST (line 63) | TEST(Macros, Narg) {
    function TEST (line 75) | TEST(Macros, Comma) {
    function TEST (line 81) | TEST(Macros, IsEmpty) {
    function TEST (line 91) | TEST(Macros, If) {
    function TEST (line 96) | TEST(Macros, HeadTail) {
    function TEST (line 106) | TEST(Macros, Parentheses) {
    function TEST (line 122) | TEST(Macros, Increment) {
    function TEST (line 135) | TEST(Macros, Repeat) {
    function TEST (line 164) | TEST(Macros, ForEach) {

FILE: googlemock/test/gmock-pp_test.cc
  type testing (line 9) | namespace testing {
    type internal (line 10) | namespace internal {
      type gmockpp (line 11) | namespace gmockpp {
        type Test (line 55) | struct Test {

FILE: googlemock/test/gmock-spec-builders_test.cc
  type testing (line 48) | namespace testing {
    class Incomplete (line 64) | class Incomplete
    class MockIncomplete (line 66) | class MockIncomplete {
    function TEST (line 76) | TEST(MockMethodTest, CanInstantiateWithIncompleteArgType) {
    function PrintTo (line 87) | void PrintTo(const Incomplete& /* x */, ::std::ostream* os) {
    class Result (line 91) | class Result {}
    class NonDefaultConstructible (line 94) | class NonDefaultConstructible {
      method NonDefaultConstructible (line 96) | explicit NonDefaultConstructible(int /* dummy */) {}
    class MockA (line 99) | class MockA {
      method MockA (line 101) | MockA() = default;
      method MockA (line 110) | MockA(const MockA&) = delete;
      method MockA (line 111) | MockA& operator=(const MockA&) = delete;
    class MockB (line 114) | class MockB {
      method MockB (line 116) | MockB() = default;
      method MockB (line 122) | MockB(const MockB&) = delete;
      method MockB (line 123) | MockB& operator=(const MockB&) = delete;
    class ReferenceHoldingMock (line 126) | class ReferenceHoldingMock {
      method ReferenceHoldingMock (line 128) | ReferenceHoldingMock() = default;
      method ReferenceHoldingMock (line 133) | ReferenceHoldingMock(const ReferenceHoldingMock&) = delete;
      method ReferenceHoldingMock (line 134) | ReferenceHoldingMock& operator=(const ReferenceHoldingMock&) = delete;
    class CC (line 144) | class CC {
    class MockCC (line 149) | class MockCC : public CC {
      method MockCC (line 151) | MockCC() = default;
      method MockCC (line 156) | MockCC(const MockCC&) = delete;
      method MockCC (line 157) | MockCC& operator=(const MockCC&) = delete;
    function TEST (line 161) | TEST(OnCallSyntaxTest, CompilesWithMethodNameExpandedFromMacro) {
    function TEST (line 168) | TEST(OnCallSyntaxTest, WorksWithMethodNameExpandedFromMacro) {
    function TEST (line 175) | TEST(ExpectCallSyntaxTest, CompilesWithMethodNameExpandedFromMacro) {
    function TEST (line 182) | TEST(ExpectCallSyntaxTest, WorksWithMethodNameExpandedFromMacro) {
    function TEST (line 192) | TEST(OnCallSyntaxTest, EvaluatesFirstArgumentOnce) {
    function TEST (line 200) | TEST(OnCallSyntaxTest, EvaluatesSecondArgumentOnce) {
    function TEST (line 210) | TEST(OnCallSyntaxTest, WithIsOptional) {
    function TEST (line 217) | TEST(OnCallSyntaxTest, WithCanAppearAtMostOnce) {
    function TEST (line 230) | TEST(OnCallSyntaxTest, WillByDefaultIsMandatory) {
    function TEST (line 241) | TEST(OnCallSyntaxTest, WillByDefaultCanAppearAtMostOnce) {
    function TEST (line 253) | TEST(ExpectCallSyntaxTest, EvaluatesFirstArgumentOnce) {
    function TEST (line 262) | TEST(ExpectCallSyntaxTest, EvaluatesSecondArgumentOnce) {
    function TEST (line 273) | TEST(ExpectCallSyntaxTest, WithIsOptional) {
    function TEST (line 280) | TEST(ExpectCallSyntaxTest, WithCanAppearAtMostOnce) {
    function TEST (line 292) | TEST(ExpectCallSyntaxTest, WithMustBeFirstClause) {
    function TEST (line 312) | TEST(ExpectCallSyntaxTest, TimesCanBeInferred) {
    function TEST (line 324) | TEST(ExpectCallSyntaxTest, TimesCanAppearAtMostOnce) {
    function TEST (line 337) | TEST(ExpectCallSyntaxTest, TimesMustBeBeforeInSequence) {
    function TEST (line 350) | TEST(ExpectCallSyntaxTest, InSequenceIsOptional) {
    function TEST (line 361) | TEST(ExpectCallSyntaxTest, InSequenceCanAppearMultipleTimes) {
    function TEST (line 370) | TEST(ExpectCallSyntaxTest, InSequenceMustBeBeforeAfter) {
    function TEST (line 384) | TEST(ExpectCallSyntaxTest, InSequenceMustBeBeforeWillOnce) {
    function TEST (line 397) | TEST(ExpectCallSyntaxTest, AfterMustBeBeforeWillOnce) {
    function TEST (line 409) | TEST(ExpectCallSyntaxTest, WillIsOptional) {
    function TEST (line 419) | TEST(ExpectCallSyntaxTest, WillCanAppearMultipleTimes) {
    function TEST (line 429) | TEST(ExpectCallSyntaxTest, WillMustBeBeforeWillRepeatedly) {
    function TEST (line 441) | TEST(ExpectCallSyntaxTest, WillRepeatedlyIsOptional) {
    function TEST (line 452) | TEST(ExpectCallSyntaxTest, WillRepeatedlyCannotAppearMultipleTimes) {
    function TEST (line 464) | TEST(ExpectCallSyntaxTest, WillRepeatedlyMustBeBeforeRetiresOnSaturati...
    function TEST (line 474) | TEST(ExpectCallSyntaxTest, RetiresOnSaturationIsOptional) {
    function TEST (line 484) | TEST(ExpectCallSyntaxTest, RetiresOnSaturationCannotAppearMultipleTime...
    function TEST (line 496) | TEST(ExpectCallSyntaxTest, DefaultCardinalityIsOnce) {
    function TEST (line 522) | TEST(ExpectCallSyntaxTest, DoesNotWarnOnAdequateActionCount) {
    function TEST (line 552) | TEST(ExpectCallSyntaxTest, WarnsOnTooManyActions) {
    function TEST (line 607) | TEST(ExpectCallSyntaxTest, WarnsOnTooFewActions) {
    function TEST (line 623) | TEST(ExpectCallSyntaxTest, WarningIsErrorWithFlag) {
    function TEST (line 685) | TEST(OnCallTest, TakesBuiltInDefaultActionWhenNoOnCall) {
    function TEST (line 694) | TEST(OnCallTest, TakesBuiltInDefaultActionWhenNoOnCallMatches) {
    function TEST (line 703) | TEST(OnCallTest, PicksLastMatchingOnCall) {
    function TEST (line 716) | TEST(ExpectCallTest, AllowsAnyCallWhenNoSpec) {
    function TEST (line 729) | TEST(ExpectCallTest, PicksLastMatchingExpectCall) {
    function TEST (line 738) | TEST(ExpectCallTest, CatchesTooFewCalls) {
    function TEST (line 754) | TEST(ExpectCallTest, InfersCardinalityWhenThereIsNoWillRepeatedly) {
    function TEST (line 782) | TEST(ExpectCallTest, InfersCardinality1WhenThereIsWillRepeatedly) {
    function TEST (line 812) | TEST(ExpectCallTest, NonMoveableType) {
    function TEST (line 853) | TEST(ExpectCallTest, NthMatchTakesNthAction) {
    function TEST (line 865) | TEST(ExpectCallTest, TakesRepeatedActionWhenWillListIsExhausted) {
    function TEST (line 878) | TEST(ExpectCallTest, TakesDefaultActionWhenWillListIsExhausted) {
    function TEST (line 908) | TEST(FunctionMockerMessageTest, ReportsExpectCallLocationForExhaustedA...
    function TEST (line 922) | TEST(FunctionMockerMessageTest,
    function TEST (line 938) | TEST(UninterestingCallTest, DoesDefaultAction) {
    function TEST (line 952) | TEST(UnexpectedCallTest, DoesDefaultAction) {
    function TEST (line 975) | TEST(UnexpectedCallTest, GeneratesFailureForVoidFunction) {
    function TEST (line 1024) | TEST(UnexpectedCallTest, GeneartesFailureForNonVoidFunction) {
    function TEST (line 1044) | TEST(UnexpectedCallTest, RetiredExpectation) {
    function TEST (line 1056) | TEST(UnexpectedCallTest, UnmatchedArguments) {
    function TEST (line 1068) | TEST(UnexpectedCallTest, UnsatisfiedPrerequisites) {
    function TEST (line 1113) | TEST(UndefinedReturnValueTest,
    function TEST (line 1128) | TEST(ExcessiveCallTest, DoesDefaultAction) {
    function TEST (line 1153) | TEST(ExcessiveCallTest, GeneratesFailureForVoidFunction) {
    function TEST (line 1167) | TEST(ExcessiveCallTest, GeneratesFailureForNonVoidFunction) {
    function TEST (line 1183) | TEST(InSequenceTest, AllExpectationInScopeAreInSequence) {
    function TEST (line 1202) | TEST(InSequenceTest, NestedInSequence) {
    function TEST (line 1227) | TEST(InSequenceTest, ExpectationsOutOfScopeAreNotAffected) {
    function TEST (line 1249) | TEST(SequenceTest, AnyOrderIsOkByDefault) {
    function TEST (line 1275) | TEST(SequenceTest, CallsMustBeInStrictOrderWhenSaidSo1) {
    function TEST (line 1295) | TEST(SequenceTest, CallsMustBeInStrictOrderWhenSaidSo2) {
    class PartialOrderTest (line 1311) | class PartialOrderTest : public testing::Test {
      method PartialOrderTest (line 1313) | PartialOrderTest() {
    function TEST_F (line 1332) | TEST_F(PartialOrderTest, CallsMustConformToSpecifiedDag1) {
    function TEST_F (line 1343) | TEST_F(PartialOrderTest, CallsMustConformToSpecifiedDag2) {
    function TEST_F (line 1353) | TEST_F(PartialOrderTest, CallsMustConformToSpecifiedDag3) {
    function TEST_F (line 1363) | TEST_F(PartialOrderTest, CallsMustConformToSpecifiedDag4) {
    function TEST (line 1373) | TEST(SequenceTest, Retirement) {
    function TEST (line 1388) | TEST(ExpectationTest, ConstrutorsWork) {
    function TEST (line 1420) | TEST(ExpectationTest, AssignmentWorks) {
    function TEST (line 1435) | TEST(ExpectationSetTest, MemberTypesAreCorrect) {
    function TEST (line 1439) | TEST(ExpectationSetTest, ConstructorsWork) {
    function TEST (line 1468) | TEST(ExpectationSetTest, AssignmentWorks) {
    function TEST (line 1478) | TEST(ExpectationSetTest, InsertionWorks) {
    function TEST (line 1498) | TEST(ExpectationSetTest, SizeWorks) {
    function TEST (line 1512) | TEST(ExpectationSetTest, IsEnumerable) {
    function TEST (line 1526) | TEST(AfterTest, SucceedsWhenPartialOrderIsSatisfied) {
    function TEST (line 1538) | TEST(AfterTest, SucceedsWhenTotalOrderIsSatisfied) {
    function TEST (line 1554) | TEST(AfterTest, CallsMustBeInStrictOrderWhenSpecifiedSo1) {
    function TEST (line 1574) | TEST(AfterTest, CallsMustBeInStrictOrderWhenSpecifiedSo2) {
    function TEST (line 1595) | TEST(AfterTest, CallsMustSatisfyPartialOrderWhenSpecifiedSo) {
    function TEST (line 1615) | TEST(AfterTest, CallsMustSatisfyPartialOrderWhenSpecifiedSo2) {
    function TEST (line 1635) | TEST(AfterTest, CanBeUsedWithInSequence) {
    function TEST (line 1652) | TEST(AfterTest, CanBeCalledManyTimes) {
    function TEST (line 1666) | TEST(AfterTest, AcceptsUpToFiveArguments) {
    function TEST (line 1684) | TEST(AfterTest, AcceptsDuplicatedInput) {
    function TEST (line 1709) | TEST(AfterTest, ChangesToExpectationSetHaveNoEffectAfterwards) {
    function TEST (line 1725) | TEST(DeletingMockEarlyTest, Success1) {
    function TEST (line 1750) | TEST(DeletingMockEarlyTest, Success2) {
    function ACTION_P (line 1775) | ACTION_P(Delete, ptr) { delete ptr; }
    function TEST (line 1779) | TEST(DeletingMockEarlyTest, CanDeleteSelfInActionReturningVoid) {
    function TEST (line 1785) | TEST(DeletingMockEarlyTest, CanDeleteSelfInActionReturningValue) {
    function TEST (line 1792) | TEST(DeletingMockEarlyTest, Failure1) {
    function TEST (line 1812) | TEST(DeletingMockEarlyTest, Failure2) {
    class EvenNumberCardinality (line 1831) | class EvenNumberCardinality : public CardinalityInterface {
      method IsSatisfiedByCallCount (line 1835) | bool IsSatisfiedByCallCount(int call_count) const override {
      method IsSaturatedByCallCount (line 1841) | bool IsSaturatedByCallCount(int /* call_count */) const override {
      method DescribeTo (line 1846) | void DescribeTo(::std::ostream* os) const override {
    function Cardinality (line 1851) | Cardinality EvenNumber() { return Cardinality(new EvenNumberCardinalit...
    function TEST (line 1853) | TEST(ExpectationBaseTest,
    type Printable (line 1871) | struct Printable {}
    type Unprintable (line 1877) | struct Unprintable {
      method Unprintable (line 1878) | Unprintable() : value(0) {}
    class MockC (line 1882) | class MockC {
      method MockC (line 1884) | MockC() = default;
      method MockC (line 1891) | MockC(const MockC&) = delete;
      method MockC (line 1892) | MockC& operator=(const MockC&) = delete;
    class VerboseFlagPreservingFixture (line 1895) | class VerboseFlagPreservingFixture : public testing::Test {
      method VerboseFlagPreservingFixture (line 1897) | VerboseFlagPreservingFixture()
      method VerboseFlagPreservingFixture (line 1907) | VerboseFlagPreservingFixture(const VerboseFlagPreservingFixture&) = ...
      method VerboseFlagPreservingFixture (line 1908) | VerboseFlagPreservingFixture& operator=(const VerboseFlagPreservingF...
    function TEST (line 1917) | TEST(FunctionCallMessageTest,
    function TEST (line 1931) | TEST(FunctionCallMessageTest,
    function TEST (line 1962) | TEST(FunctionCallMessageTest,
    class GMockVerboseFlagTest (line 1993) | class GMockVerboseFlagTest : public VerboseFlagPreservingFixture {
      method VerifyOutput (line 1999) | void VerifyOutput(const std::string& output, bool should_print,
      method TestExpectedCall (line 2018) | void TestExpectedCall(bool should_print) {
      method TestUninterestingCallOnNaggyMock (line 2044) | void TestUninterestingCallOnNaggyMock(bool should_print) {
    function TEST_F (line 2080) | TEST_F(GMockVerboseFlagTest, Info) {
    function TEST_F (line 2088) | TEST_F(GMockVerboseFlagTest, Warning) {
    function TEST_F (line 2096) | TEST_F(GMockVerboseFlagTest, Error) {
    function TEST_F (line 2104) | TEST_F(GMockVerboseFlagTest, InvalidFlagIsTreatedAsWarning) {
    class PrintMeNot (line 2115) | class PrintMeNot {}
    function PrintTo (line 2117) | void PrintTo(PrintMeNot /* dummy */, ::std::ostream* /* os */) {
    class LogTestHelper (line 2122) | class LogTestHelper {
      method LogTestHelper (line 2124) | LogTestHelper() = default;
      method LogTestHelper (line 2129) | LogTestHelper(const LogTestHelper&) = delete;
      method LogTestHelper (line 2130) | LogTestHelper& operator=(const LogTestHelper&) = delete;
    class GMockLogTest (line 2133) | class GMockLogTest : public VerboseFlagPreservingFixture {
    function TEST_F (line 2138) | TEST_F(GMockLogTest, DoesNotPrintGoodCallInternallyIfVerbosityIsWarnin...
    function TEST_F (line 2144) | TEST_F(GMockLogTest, DoesNotPrintGoodCallInternallyIfVerbosityIsError) {
    function TEST_F (line 2150) | TEST_F(GMockLogTest, DoesNotPrintWarningInternallyIfVerbosityIsError) {
    function TEST (line 2158) | TEST(AllowLeakTest, AllowsLeakingUnusedMockObject) {
    function TEST (line 2163) | TEST(AllowLeakTest, CanBeCalledBeforeOnCall) {
    function TEST (line 2170) | TEST(AllowLeakTest, CanBeCalledAfterOnCall) {
    function TEST (line 2176) | TEST(AllowLeakTest, CanBeCalledBeforeExpectCall) {
    function TEST (line 2183) | TEST(AllowLeakTest, CanBeCalledAfterExpectCall) {
    function TEST (line 2189) | TEST(AllowLeakTest, WorksWhenBothOnCallAndExpectCallArePresent) {
    function TEST (line 2198) | TEST(VerifyAndClearExpectationsTest, NoMethodHasExpectations) {
    function TEST (line 2211) | TEST(VerifyAndClearExpectationsTest, SomeMethodsHaveExpectationsAndSuc...
    function TEST (line 2226) | TEST(VerifyAndClearExpectationsTest, SomeMethodsHaveExpectationsAndFai...
    function TEST (line 2242) | TEST(VerifyAndClearExpectationsTest, AllMethodsHaveExpectations) {
    function TEST (line 2258) | TEST(VerifyAndClearExpectationsTest, AMethodHasManyExpectations) {
    function TEST (line 2276) | TEST(VerifyAndClearExpectationsTest, CanCallManyTimes) {
    function TEST (line 2295) | TEST(VerifyAndClearTest, NoMethodHasDefaultActions) {
    function TEST (line 2304) | TEST(VerifyAndClearTest, SomeMethodsHaveDefaultActions) {
    function TEST (line 2316) | TEST(VerifyAndClearTest, AllMethodsHaveDefaultActions) {
    function TEST (line 2332) | TEST(VerifyAndClearTest, AMethodHasManyDefaultActions) {
    function TEST (line 2347) | TEST(VerifyAndClearTest, CanCallManyTimes) {
    function TEST (line 2361) | TEST(VerifyAndClearTest, Success) {
    function TEST (line 2377) | TEST(VerifyAndClearTest, Failure) {
    function TEST (line 2396) | TEST(VerifyAndClearTest, Const) {
    function TEST (line 2414) | TEST(VerifyAndClearTest, CanSetDefaultActionsAndExpectationsAfterwards) {
    function TEST (line 2431) | TEST(VerifyAndClearTest, DoesNotAffectOtherMockObjects) {
    function TEST (line 2457) | TEST(VerifyAndClearTest,
    function TEST (line 2477) | TEST(VerifyAndClearTest,
    function TEST (line 2501) | TEST(SynchronizationTest, CanCallMockMethodInAction) {
    function TEST (line 2519) | TEST(ParameterlessExpectationsTest, CanSetExpectationsWithoutMatchers) {
    function TEST (line 2539) | TEST(ParameterlessExpectationsTest, CanSetExpectationsForOverloadedMet...
    type MockWithConstMethods (line 2549) | struct MockWithConstMethods {
    function TEST (line 2555) | TEST(ParameterlessExpectationsTest, CanSetExpectationsForConstMethods) {
    class MockConstOverload (line 2564) | class MockConstOverload {
    function TEST (line 2570) | TEST(ParameterlessExpectationsTest,
  function main (line 2591) | int main(int argc, char** argv) {

FILE: googlemock/test/gmock_ex_test.cc
  class NonDefaultConstructible (line 45) | class NonDefaultConstructible {
    method NonDefaultConstructible (line 47) | explicit NonDefaultConstructible(int /* dummy */) {}
  class MockFoo (line 50) | class MockFoo {
  function TEST (line 57) | TEST(DefaultValueTest, ThrowsRuntimeErrorWhenNoDefaultValue) {

FILE: googlemock/test/gmock_leak_test.py
  class GMockLeakTest (line 52) | class GMockLeakTest(gmock_test_utils.TestCase):
    method testCatchesLeakedMockByDefault (line 54) | def testCatchesLeakedMockByDefault(self):
    method testDoesNotCatchLeakedMockWhenDisabled (line 65) | def testDoesNotCatchLeakedMockWhenDisabled(self):
    method testCatchesLeakedMockWhenEnabled (line 80) | def testCatchesLeakedMockWhenEnabled(self):
    method testCatchesLeakedMockWhenEnabledWithExplictFlagValue (line 94) | def testCatchesLeakedMockWhenEnabledWithExplictFlagValue(self):
    method testCatchesMultipleLeakedMocks (line 103) | def testCatchesMultipleLeakedMocks(self):

FILE: googlemock/test/gmock_leak_test_.cc
  class FooInterface (line 41) | class FooInterface {
  class MockFoo (line 47) | class MockFoo : public FooInterface {
    method MockFoo (line 49) | MockFoo() = default;
    method MockFoo (line 54) | MockFoo(const MockFoo&) = delete;
    method MockFoo (line 55) | MockFoo& operator=(const MockFoo&) = delete;
  function TEST (line 58) | TEST(LeakTest, LeakedMockWithExpectCallCausesFailureWhenLeakCheckingIsEn...
  function TEST (line 71) | TEST(LeakTest, LeakedMockWithOnCallCausesFailureWhenLeakCheckingIsEnable...
  function TEST (line 83) | TEST(LeakTest, CatchesMultipleLeakedMockObjects) {

FILE: googlemock/test/gmock_link_test.h
  function class (line 196) | class Interface {
  function class (line 210) | class Mock : public Interface {
  function class (line 229) | class InvokeHelper {
  function class (line 239) | class FieldHelper {
  function ACTION (line 439) | ACTION(Return1) { return 1; }
  function namespace (line 450) | namespace {
  function namespace (line 462) | namespace {

FILE: googlemock/test/gmock_output_test.py
  function ToUnixLineEnding (line 58) | def ToUnixLineEnding(s):
  function RemoveReportHeaderAndFooter (line 64) | def RemoveReportHeaderAndFooter(output):
  function RemoveLocations (line 75) | def RemoveLocations(output):
  function NormalizeErrorMarker (line 91) | def NormalizeErrorMarker(output):
  function RemoveMemoryAddresses (line 97) | def RemoveMemoryAddresses(output):
  function RemoveTestNamesOfLeakedMocks (line 103) | def RemoveTestNamesOfLeakedMocks(output):
  function GetLeakyTests (line 109) | def GetLeakyTests(output):
  function GetNormalizedOutputAndLeakyTests (line 118) | def GetNormalizedOutputAndLeakyTests(output):
  function GetShellCommandOutput (line 137) | def GetShellCommandOutput(cmd):
  function GetNormalizedCommandOutputAndLeakyTests (line 143) | def GetNormalizedCommandOutputAndLeakyTests(cmd):
  class GMockOutputTest (line 155) | class GMockOutputTest(gmock_test_utils.TestCase):
    method testOutput (line 157) | def testOutput(self):

FILE: googlemock/test/gmock_output_test_.cc
  class MockFoo (line 53) | class MockFoo {
    method MockFoo (line 55) | MockFoo() = default;
    method MockFoo (line 62) | MockFoo(const MockFoo&) = delete;
    method MockFoo (line 63) | MockFoo& operator=(const MockFoo&) = delete;
  class GMockOutputTest (line 66) | class GMockOutputTest : public testing::Test {
  function TEST_F (line 71) | TEST_F(GMockOutputTest, ExpectedCall) {
  function TEST_F (line 80) | TEST_F(GMockOutputTest, ExpectedCallToVoidFunction) {
  function TEST_F (line 89) | TEST_F(GMockOutputTest, ExplicitActionsRunOut) {
  function TEST_F (line 95) | TEST_F(GMockOutputTest, UnexpectedCall) {
  function TEST_F (line 102) | TEST_F(GMockOutputTest, UnexpectedCallToVoidFunction) {
  function TEST_F (line 109) | TEST_F(GMockOutputTest, ExcessiveCall) {
  function TEST_F (line 116) | TEST_F(GMockOutputTest, ExcessiveCallToVoidFunction) {
  function TEST_F (line 123) | TEST_F(GMockOutputTest, UninterestingCall) {
  function TEST_F (line 127) | TEST_F(GMockOutputTest, UninterestingCallToVoidFunction) {
  function TEST_F (line 131) | TEST_F(GMockOutputTest, RetiredExpectation) {
  function TEST_F (line 140) | TEST_F(GMockOutputTest, UnsatisfiedPrerequisite) {
  function TEST_F (line 154) | TEST_F(GMockOutputTest, UnsatisfiedPrerequisites) {
  function TEST_F (line 167) | TEST_F(GMockOutputTest, UnsatisfiedWith) {
  function TEST_F (line 171) | TEST_F(GMockOutputTest, UnsatisfiedExpectation) {
  function TEST_F (line 178) | TEST_F(GMockOutputTest, MismatchArguments) {
  function TEST_F (line 186) | TEST_F(GMockOutputTest, MismatchWith) {
  function TEST_F (line 193) | TEST_F(GMockOutputTest, MismatchArgumentsAndWith) {
  function TEST_F (line 200) | TEST_F(GMockOutputTest, UnexpectedCallWithDefaultAction) {
  function TEST_F (line 210) | TEST_F(GMockOutputTest, ExcessiveCallWithDefaultAction) {
  function TEST_F (line 223) | TEST_F(GMockOutputTest, UninterestingCallWithDefaultAction) {
  function TEST_F (line 231) | TEST_F(GMockOutputTest, ExplicitActionsRunOutWithDefaultAction) {
  function TEST_F (line 239) | TEST_F(GMockOutputTest, CatchesLeakedMocks) {
  function TEST_F (line 260) | TEST_F(GMockOutputTest, PrintsMatcher) {
  function TestCatchesLeakedMocksInAdHocTests (line 265) | void TestCatchesLeakedMocksInAdHocTests() {
  function main (line 275) | int main(int argc, char** argv) {

FILE: googlemock/test/gmock_stress_test.cc
  type testing (line 36) | namespace testing {
    class MockFoo (line 49) | class MockFoo {
    function JoinAndDelete (line 57) | void JoinAndDelete(ThreadWithParam<T>* t) {
    type Dummy (line 62) | struct Dummy {}
    function TestConcurrentMockObjects (line 66) | void TestConcurrentMockObjects(Dummy /* dummy */) {
    type Helper1Param (line 88) | struct Helper1Param {
    function Helper1 (line 93) | void Helper1(Helper1Param param) {
    function TestConcurrentCallsOnSameObject (line 113) | void TestConcurrentCallsOnSameObject(Dummy /* dummy */) {
    function Helper2 (line 141) | void Helper2(MockFoo* foo) {
    function TestPartiallyOrderedExpectationsWithThreads (line 149) | void TestPartiallyOrderedExpectationsWithThreads(Dummy /* dummy */) {
    function TEST (line 184) | TEST(StressTest, CanUseGMockWithThreads) {
  function main (line 219) | int main(int argc, char** argv) {

FILE: googlemock/test/gmock_test.cc
  function TestInitGoogleMock (line 48) | void TestInitGoogleMock(const Char* (&argv)[M], const Char* (&new_argv)[N],
  function TEST (line 64) | TEST(InitGoogleMockTest, ParsesInvalidCommandLine) {
  function TEST (line 72) | TEST(InitGoogleMockTest, ParsesEmptyCommandLine) {
  function TEST (line 80) | TEST(InitGoogleMockTest, ParsesSingleFlag) {
  function TEST (line 88) | TEST(InitGoogleMockTest, ParsesMultipleFlags) {
  function TEST (line 101) | TEST(InitGoogleMockTest, ParsesUnrecognizedFlag) {
  function TEST (line 109) | TEST(InitGoogleMockTest, ParsesGoogleMockFlagAndUnrecognizedFlag) {
  function TEST (line 118) | TEST(WideInitGoogleMockTest, ParsesInvalidCommandLine) {
  function TEST (line 126) | TEST(WideInitGoogleMockTest, ParsesEmptyCommandLine) {
  function TEST (line 134) | TEST(WideInitGoogleMockTest, ParsesSingleFlag) {
  function TEST (line 142) | TEST(WideInitGoogleMockTest, ParsesMultipleFlags) {
  function TEST (line 155) | TEST(WideInitGoogleMockTest, ParsesUnrecognizedFlag) {
  function TEST (line 163) | TEST(WideInitGoogleMockTest, ParsesGoogleMockFlagAndUnrecognizedFlag) {
  function TEST (line 175) | TEST(FlagTest, IsAccessibleInCode) {

FILE: googlemock/test/gmock_test_utils.py
  function GetSourceDir (line 38) | def GetSourceDir():
  function GetTestExecutablePath (line 44) | def GetTestExecutablePath(executable_name):
  function GetExitStatus (line 60) | def GetExitStatus(exit_code):
  function Main (line 88) | def Main():

FILE: googletest/include/gtest/gtest-assertion-result.h
  function namespace (line 52) | namespace testing {

FILE: googletest/include/gtest/gtest-death-test.h
  function namespace (line 52) | namespace testing {

FILE: googletest/include/gtest/gtest-matchers.h
  function namespace (line 66) | namespace testing {
  function DescribeImpl (line 348) | void DescribeImpl(const MatcherBase& m, std::ostream* os,
  function MatcherDescriberInterface (line 358) | const MatcherDescriberInterface* GetDescriberImpl(
  function VTable (line 374) | VTable* GetVTable() {
  function Destroy (line 390) | void Destroy() {
  function IsInlined (line 397) | constexpr bool IsInlined() {
  function M (line 405) | static const M& Get(const MatcherBase& m) {
  function Init (line 412) | static void Init(MatcherBase& m, M impl) {
  function M (line 421) | static const M& Get(const MatcherBase& m) {
  function M (line 435) | static const M& Get(const MatcherBase& m) {
  function Init (line 438) | static void Init(MatcherBase& m, M* impl) {
  function explicit (line 509) | explicit Matcher(const MatcherInterface<const std::string&>* impl)
  function explicit (line 533) | explicit Matcher(const MatcherInterface<std::string>* impl)
  function explicit (line 559) | explicit Matcher(const MatcherInterface<const internal::StringView&>* impl)
  function explicit (line 587) | explicit Matcher(const MatcherInterface<internal::StringView>* impl)
  function DescribeTo (line 650) | void DescribeTo(::std::ostream* os) const override { impl_.DescribeTo(os...
  function DescribeNegationTo (line 652) | void DescribeNegationTo(::std::ostream* os) const override {
  function MatchAndExplain (line 656) | bool MatchAndExplain(T x, MatchResultListener* listener) const override {
  function namespace (line 690) | namespace internal {
  function DescribeTo (line 859) | void DescribeTo(::std::ostream* os) const {
  function DescribeNegationTo (line 864) | void DescribeNegationTo(::std::ostream* os) const {
  function PolymorphicMatcher (line 878) | inline PolymorphicMatcher<internal::MatchesRegexMatcher> MatchesRegex(
  function PolymorphicMatcher (line 890) | inline PolymorphicMatcher<internal::MatchesRegexMatcher> ContainsRegex(

FILE: googletest/include/gtest/gtest-message.h
  function namespace (line 73) | namespace testing {
  function namespace (line 235) | namespace internal {

FILE: googletest/include/gtest/gtest-param-test.h
  function class (line 157) | class BaseTest : public ::testing::Test {
  function namespace (line 185) | namespace testing {
  function internal (line 360) | inline internal::ParamGenerator<bool> Bool() { return Values(false, true...

FILE: googletest/include/gtest/gtest-printers.h
  function namespace (line 137) | namespace testing {
  function else (line 204) | struct FunctionPointerPrinter {
  function else (line 219) | struct PointerPrinter {
  function namespace (line 233) | namespace internal_stream_operator_without_lexical_name_lookup {
  type ConvertibleToIntegerPrinter (line 280) | struct ConvertibleToIntegerPrinter {
  type ConvertibleToStringViewPrinter (line 293) | struct ConvertibleToStringViewPrinter {
  type ConvertibleToAbslStringifyPrinter (line 302) | struct ConvertibleToAbslStringifyPrinter {
  type RawBytesPrinter (line 316) | struct RawBytesPrinter {
  type FallbackPrinter (line 328) | struct FallbackPrinter {
  function ostream (line 356) | ostream* os) {
  function string (line 467) | string FormatForComparisonFailureMessage(const T1& value,
  function ostream (line 494) | ostream* os) {
  function PrintTo (line 505) | inline void PrintTo(char c, ::std::ostream* os) {
  function PrintTo (line 513) | inline void PrintTo(bool x, ::std::ostream* os) {
  function PrintTo (line 527) | inline void PrintTo(char16_t c, ::std::ostream* os) {
  function PrintTo (line 533) | inline void PrintTo(char8_t c, ::std::ostream* os) {
  function PrintTo (line 627) | inline void PrintTo(float f, ::std::ostream* os) {
  function PrintTo (line 634) | inline void PrintTo(double d, ::std::ostream* os) {
  function PrintTo (line 643) | inline void PrintTo(char* s, ::std::ostream* os) {
  function PrintTo (line 649) | inline void PrintTo(const signed char* s, ::std::ostream* os) {
  function PrintTo (line 652) | inline void PrintTo(signed char* s, ::std::ostream* os) {
  function PrintTo (line 655) | inline void PrintTo(const unsigned char* s, ::std::ostream* os) {
  function PrintTo (line 658) | inline void PrintTo(unsigned char* s, ::std::ostream* os) {
  function PrintTo (line 664) | inline void PrintTo(char8_t* s, ::std::ostream* os) {
  function PrintTo (line 670) | inline void PrintTo(char16_t* s, ::std::ostream* os) {
  function PrintTo (line 675) | inline void PrintTo(char32_t* s, ::std::ostream* os) {
  function PrintTo (line 687) | inline void PrintTo(wchar_t* s, ::std::ostream* os) {
  function PrintTo (line 708) | inline void PrintTo(const ::std::string& s, ::std::ostream* os) {
  function PrintTo (line 711) | inline void PrintTo(::std::string_view s, ::std::ostream* os) {
  function PrintTo (line 718) | inline void PrintTo(const ::std::u8string& s, ::std::ostream* os) {
  function PrintTo (line 721) | inline void PrintTo(::std::u8string_view s, ::std::ostream* os) {
  function PrintTo (line 728) | inline void PrintTo(const ::std::u16string& s, ::std::ostream* os) {
  function PrintTo (line 731) | inline void PrintTo(::std::u16string_view s, ::std::ostream* os) {
  function PrintTo (line 737) | inline void PrintTo(const ::std::u32string& s, ::std::ostream* os) {
  function PrintTo (line 740) | inline void PrintTo(::std::u32string_view s, ::std::ostream* os) {
  function PrintTo (line 747) | inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) {
  function PrintTo (line 750) | inline void PrintTo(::std::wstring_view s, ::std::ostream* os) {
  function PrintTo (line 761) | void PrintTo(internal::StringView sp, ::std::ostream* os) {
  function PrintTo (line 766) | inline void PrintTo(std::nullptr_t, ::std::ostream* os) { *os << "(nullp...
  function PrintTo (line 769) | inline void PrintTo(const std::type_info& info, std::ostream* os) {
  function PrintTo (line 830) | inline void PrintTo(std::strong_ordering ordering, std::ostream* os) {
  function PrintTo (line 838) | inline void PrintTo(std::partial_ordering ordering, std::ostream* os) {
  function PrintTo (line 846) | inline void PrintTo(std::weak_ordering ordering, std::ostream* os) {
  function ostream (line 859) | ostream* os) {
  function Print (line 901) | static void Print(const T& value, ::std::ostream* os) {
  function Print (line 1051) | static void Print(const T& value, ::std::ostream* os) {
  function ostream (line 1180) | ostream* os) {
  function ostream (line 1189) | ostream* os) {
  type std (line 1196) | typedef ::std::vector<::std::string> Strings;
  function string (line 1229) | string PrintToString(const T& value) {

FILE: googletest/include/gtest/gtest-spi.h
  function namespace (line 43) | namespace testing {

FILE: googletest/include/gtest/gtest-test-part.h
  function namespace (line 49) | namespace testing {
  function class (line 135) | class GTEST_API_ [[nodiscard]] TestPartResultArray {
  function class (line 156) | class GTEST_API_ [[nodiscard]] TestPartResultReporterInterface {
  function namespace (line 163) | namespace internal {

FILE: googletest/include/gtest/gtest.h
  function namespace (line 165) | namespace testing {
  function class (line 1402) | class [[nodiscard]] EqHelper {
  type AssertHelperData (line 1637) | struct AssertHelperData {
  function ParamType (line 1702) | [[nodiscard]] static const ParamType& GetParam() {
  function class (line 2078) | class GTEST_API_ [[nodiscard]] ScopedTrace {
  function StaticAssertTypeEq (line 2162) | bool StaticAssertTypeEq() noexcept {
  function class (line 2311) | class FactoryImpl : public internal::TestFactoryBase {
  function RUN_ALL_TESTS (line 2341) | inline int RUN_ALL_TESTS() { return ::testing::UnitTest::GetInstance()->...

FILE: googletest/include/gtest/gtest_pred_impl.h
  function namespace (line 43) | namespace testing {

FILE: googletest/include/gtest/internal/gtest-death-test-internal.h
  function namespace (line 53) | namespace testing {

FILE: googletest/include/gtest/internal/gtest-filepath.h
  function pathname_ (line 73) | FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) {}
  function explicit (line 76) | explicit FilePath(std::string pathname) : pathname_(std::move(pathname)) {
  function Set (line 89) | void Set(const FilePath& rhs) { pathname_ = rhs.pathname_; }

FILE: googletest/include/gtest/internal/gtest-internal.h
  function namespace (line 97) | namespace proto2 {
  function namespace (line 101) | namespace testing {
  type typename (line 768) | typedef typename Tests::Head Head;
  function AlwaysFalse (line 816) | inline bool AlwaysFalse() { return !AlwaysTrue(); }
  function ConstCharPtr (line 821) | struct GTEST_API_ ConstCharPtr {
  type TrueWithString (line 829) | struct TrueWithString {
  function class (line 842) | class GTEST_API_ [[nodiscard]] Random {
  type IsContainer (line 914) | typedef int IsContainer;
  type IsNotContainer (line 925) | typedef char IsNotContainer;
  function IsContainerTest (line 927) | IsContainerTest(long /* dummy */) {
  function ArrayEq (line 992) | bool ArrayEq(const T& lhs, const U& rhs) {
  function ArrayEq (line 998) | bool ArrayEq(const T (&lhs)[N], const U (&rhs)[N]) {
  function CopyArray (line 1032) | void CopyArray(const T& from, U* to) {
  function CopyArray (line 1038) | void CopyArray(const T (&from)[N], U (*to)[N]) {
  type RelationToSourceReference (line 1056) | struct RelationToSourceReference {}
  type RelationToSourceCopy (line 1057) | struct RelationToSourceCopy {}
  type Element (line 1072) | typedef Element* iterator;
  type Element (line 1073) | typedef const Element* const_iterator;
  function InitCopy (line 1108) | void InitCopy(const Element* array, size_t a_size) {
  function InitRef (line 1117) | void InitRef(const Element* array, size_t a_size) {
  type FlatTupleConstructTag (line 1151) | struct FlatTupleConstructTag {}
  function InstantiateTestCase_P_IsDeprecated (line 1232) | [[deprecated(
  function TypedTestCase_P_IsDeprecated (line 1239) | [[deprecated(
  function TypedTestCaseIsDeprecated (line 1246) | [[deprecated(
  function RegisterTypedTestCase_P_IsDeprecated (line 1253) | [[deprecated(
  function InstantiateTypedTestCase_P_IsDeprecated (line 1260) | [[deprecated(
  function namespace (line 1270) | namespace std {
  function namespace (line 1318) | namespace testing {

FILE: googletest/include/gtest/internal/gtest-param-util.h
  type PrintToStringParamName (line 73) | struct PrintToStringParamName {
  type T (line 133) | typedef const T& reference;
  type difference_type (line 134) | typedef ptrdiff_t difference_type;
  function impl_ (line 137) | ParamIterator(const ParamIterator& other) : impl_(other.impl_->Clone()) {}

FILE: googletest/include/gtest/internal/gtest-port.h
  type GTEST_CRITICAL_SECTION (line 392) | typedef struct _CRITICAL_SECTION GTEST_CRITICAL_SECTION;
  type GTEST_CRITICAL_SECTION (line 397) | typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
  function namespace (line 915) | namespace testing {
  function To (line 1147) | To ImplicitCast_(To x) {
  function class (line 1205) | class GTEST_API_ [[nodiscard]] AutoHandle {
  function class (line 1288) | class [[nodiscard]] ThreadWithParamBase {
  function Join (line 1335) | void Join() {
  function Run (line 1342) | void Run() override {
  function class (line 1384) | class GTEST_API_ [[nodiscard]] Mutex {
  function class (line 1437) | class [[nodiscard]] GTestMutexLock {
  type GTestMutexLock (line 1449) | typedef GTestMutexLock MutexLock;
  function class (line 1453) | class [[nodiscard]] ThreadLocalValueHolderBase {
  function class (line 1460) | class [[nodiscard]] ThreadLocalBase {
  function class (line 1480) | class GTEST_API_ [[nodiscard]] ThreadLocalRegistry {
  function class (line 1492) | class GTEST_API_ [[nodiscard]] ThreadWithParamBase {
  function Run (line 1525) | void Run() override { func_(param_); }
  function explicit (line 1570) | explicit ThreadLocal(const T& value)
  function T (line 1575) | T* pointer() { return GetOrCreateValue(); }
  function T (line 1576) | const T* pointer() const { return GetOrCreateValue(); }
  function set (line 1578) | void set(const T& value) { *pointer() = value; }
  function explicit (line 1586) | explicit ValueHolder(const T& value) : value_(value) {}
  function T (line 1588) | T* pointer() { return &value_; }
  function T (line 1596) | T* GetOrCreateValue() const {
  function ThreadLocalValueHolderBase (line 1602) | ThreadLocalValueHolderBase* NewValueForCurrentThread() const override {
  function class (line 1606) | class ValueHolderFactory {
  function class (line 1617) | class DefaultValueHolderFactory : public ValueHolderFactory {
  function class (line 1628) | class InstanceValueHolderFactory : public ValueHolderFactory {
  function class (line 1652) | class [[nodiscard]] MutexBase {
  function class (line 1710) | class [[nodiscard]] Mutex : public MutexBase {
  function class (line 1728) | class [[nodiscard]] GTestMutexLock {
  type GTestMutexLock (line 1740) | typedef GTestMutexLock MutexLock;
  function class (line 1748) | class GTEST_API_ [[nodiscard]] ThreadLocalValueHolderBase {
  function DeleteThreadLocalValue (line 1755) | inline void DeleteThreadLocalValue(void* value_holder) {
  function GTEST_API_ (line 1761) | GTEST_API_ [[nodiscard]] ThreadLocal {
  function set (line 1781) | void set(const T& value) { *pointer() = value; }
  function explicit (line 1788) | explicit ValueHolder(const T& value) : value_(value) {}
  function T (line 1790) | T* pointer() { return &value_; }
  function pthread_key_t (line 1798) | static pthread_key_t CreateKey() {
  function T (line 1807) | T* GetOrCreateValue() const {
  function class (line 1820) | class ValueHolderFactory {
  function class (line 1831) | class DefaultValueHolderFactory : public ValueHolderFactory {
  function class (line 1842) | class InstanceValueHolderFactory : public ValueHolderFactory {
  function class (line 1874) | class [[nodiscard]] Mutex {
  function class (line 1892) | class [[nodiscard]] GTestMutexLock {
  type GTestMutexLock (line 1897) | typedef GTestMutexLock MutexLock;
  function GTEST_API_ (line 1900) | GTEST_API_ [[nodiscard]] ThreadLocal {
  function IsAlpha (line 1934) | inline bool IsAlpha(char ch) {
  function IsAlNum (line 1937) | inline bool IsAlNum(char ch) {
  function IsDigit (line 1940) | inline bool IsDigit(char ch) {
  function IsLower (line 1943) | inline bool IsLower(char ch) {
  function IsSpace (line 1946) | inline bool IsSpace(char ch) {
  function IsUpper (line 1949) | inline bool IsUpper(char ch) {
  function IsXDigit (line 1952) | inline bool IsXDigit(char ch) {
  function IsXDigit (line 1956) | inline bool IsXDigit(char8_t ch) {
  function IsXDigit (line 1960) | inline bool IsXDigit(char16_t ch) {
  function IsXDigit (line 1964) | inline bool IsXDigit(char32_t ch) {
  function IsXDigit (line 1968) | inline bool IsXDigit(wchar_t ch) {
  function ToLower (line 1973) | inline char ToLower(char ch) {
  function ToUpper (line 1976) | inline char ToUpper(char ch) {
  function std (line 1980) | inline std::string StripTrailingSpaces(std::string str) {
  function namespace (line 1992) | namespace posix {
  function namespace (line 2356) | namespace testing {
  function namespace (line 2369) | namespace testing {

FILE: googletest/include/gtest/internal/gtest-string.h
  function namespace (line 59) | namespace testing {

FILE: googletest/include/gtest/internal/gtest-type-util.h
  function namespace (line 54) | namespace testing {

FILE: googletest/samples/prime_tables.h
  function class (line 40) | class PrimeTable {
  function class (line 53) | class OnTheFlyPrimeTable : public PrimeTable {
  function class (line 77) | class PreCalculatedPrimeTable : public PrimeTable {
  function IsPrime (line 87) | bool IsPrime(int n) const override {
  function GetNextPrime (line 91) | int GetNextPrime(int p) const override {

FILE: googletest/samples/sample1.cc
  function Factorial (line 35) | int Factorial(int n) {
  function IsPrime (line 45) | bool IsPrime(int n) {

FILE: googletest/samples/sample10_unittest.cc
  class Water (line 45) | class Water {
    method allocated (line 60) | static int allocated() { return allocated_; }
  class LeakChecker (line 72) | class LeakChecker : public EmptyTestEventListener {
    method OnTestStart (line 75) | void OnTestStart(const TestInfo& /* test_info */) override {
    method OnTestEnd (line 80) | void OnTestEnd(const TestInfo& /* test_info */) override {
  function TEST (line 92) | TEST(ListenersTest, DoesNotLeak) {
  function TEST (line 99) | TEST(ListenersTest, LeaksWater) {
  function main (line 105) | int main(int argc, char** argv) {

FILE: googletest/samples/sample1_unittest.cc
  function TEST (line 76) | TEST(FactorialTest, Negative) {
  function TEST
Condensed preview — 251 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,282K chars).
[
  {
    "path": ".clang-format",
    "chars": 116,
    "preview": "# Run manually to reformat a file:\n# clang-format -i --style=file <file>\nLanguage:        Cpp\nBasedOnStyle:  Google\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/00-bug_report.yml",
    "chars": 2064,
    "preview": "name: Bug Report\ndescription: Let us know that something does not work as expected.\ntitle: \"[Bug]: Please title this bug"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/10-feature_request.yml",
    "chars": 1058,
    "preview": "name: Feature request\ndescription: Propose a new feature.\ntitle: \"[FR]: Please title this feature request\"\nlabels: \"enha"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 175,
    "preview": "blank_issues_enabled: false\ncontact_links:\n    - name: Get Help\n      url: https://github.com/google/googletest/discussi"
  },
  {
    "path": ".gitignore",
    "chars": 1623,
    "preview": "# Ignore CI build directory\nbuild/\nxcuserdata\ncmake-build-debug/\n.idea/\nbazel-bin\nbazel-genfiles\nbazel-googletest\nbazel-"
  },
  {
    "path": "BUILD.bazel",
    "chars": 7422,
    "preview": "# Copyright 2017 Google Inc.\n# All Rights Reserved.\n#\n#\n# Redistribution and use in source and binary forms, with or wit"
  },
  {
    "path": "CMakeLists.txt",
    "chars": 986,
    "preview": "# Note: CMake support is community-based. The maintainers do not use CMake\n# internally.\n\ncmake_minimum_required(VERSION"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 5690,
    "preview": "# How to become a contributor and submit your own code\n\n## Contributor License Agreements\n\nWe'd love to accept your patc"
  },
  {
    "path": "CONTRIBUTORS",
    "chars": 2286,
    "preview": "# This file contains a list of people who've made non-trivial\n# contribution to the Google C++ Testing Framework project"
  },
  {
    "path": "LICENSE",
    "chars": 1475,
    "preview": "Copyright 2008, Google Inc.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmod"
  },
  {
    "path": "MODULE.bazel",
    "chars": 2699,
    "preview": "# Copyright 2024 Google Inc.\n# All Rights Reserved.\n#\n#\n# Redistribution and use in source and binary forms, with or wit"
  },
  {
    "path": "README.md",
    "chars": 5261,
    "preview": "# GoogleTest\n\n### Announcements\n\n#### Documentation Updates\n\nOur documentation is now live on GitHub Pages at\nhttps://go"
  },
  {
    "path": "WORKSPACE",
    "chars": 2655,
    "preview": "# Copyright 2024 Google Inc.\n# All Rights Reserved.\n#\n#\n# Redistribution and use in source and binary forms, with or wit"
  },
  {
    "path": "WORKSPACE.bzlmod",
    "chars": 1794,
    "preview": "# Copyright 2024 Google Inc.\n# All Rights Reserved.\n#\n#\n# Redistribution and use in source and binary forms, with or wit"
  },
  {
    "path": "ci/linux-presubmit.sh",
    "chars": 6225,
    "preview": "#!/bin/bash\n#\n# Copyright 2020, Google Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms"
  },
  {
    "path": "ci/macos-presubmit.sh",
    "chars": 3354,
    "preview": "#!/bin/bash\n#\n# Copyright 2020, Google Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms"
  },
  {
    "path": "ci/windows-presubmit.bat",
    "chars": 2473,
    "preview": "SETLOCAL ENABLEDELAYEDEXPANSION\n\nSET BAZEL_EXE=%KOKORO_GFILE_DIR%\\bazel-9.0.0-windows-x86_64.exe\n\nSET PATH=C:\\Python34;%"
  },
  {
    "path": "docs/_config.yml",
    "chars": 18,
    "preview": "title: GoogleTest\n"
  },
  {
    "path": "docs/_data/navigation.yml",
    "chars": 1200,
    "preview": "nav:\n- section: \"Get Started\"\n  items:\n  - title: \"Supported Platforms\"\n    url: \"/platforms.html\"\n  - title: \"Quickstar"
  },
  {
    "path": "docs/_layouts/default.html",
    "chars": 2187,
    "preview": "<!DOCTYPE html>\n<html lang=\"{{ site.lang | default: \"en-US\" }}\">\n  <head>\n    <meta charset=\"UTF-8\">\n    <meta http-equi"
  },
  {
    "path": "docs/_sass/main.scss",
    "chars": 2915,
    "preview": "// Styles for GoogleTest docs website on GitHub Pages.\n// Color variables are defined in\n// https://github.com/pages-the"
  },
  {
    "path": "docs/advanced.md",
    "chars": 90876,
    "preview": "# Advanced GoogleTest Topics\n\n## Introduction\n\nNow that you have read the [GoogleTest Primer](primer.md) and learned how"
  },
  {
    "path": "docs/assets/css/style.scss",
    "chars": 56,
    "preview": "---\n---\n\n@import \"jekyll-theme-primer\";\n@import \"main\";\n"
  },
  {
    "path": "docs/community_created_documentation.md",
    "chars": 342,
    "preview": "# Community-Created Documentation\n\nThe following is a list, in no particular order, of links to documentation\ncreated by"
  },
  {
    "path": "docs/faq.md",
    "chars": 28212,
    "preview": "# GoogleTest FAQ\n\n## Why should test suite names and test names not contain underscore?\n\n{: .callout .note}\nNote: Google"
  },
  {
    "path": "docs/gmock_cheat_sheet.md",
    "chars": 7377,
    "preview": "# gMock Cheat Sheet\n\n## Defining a Mock Class\n\n### Mocking a Normal Class {#MockClass}\n\nGiven\n\n```cpp\nclass Foo {\n publi"
  },
  {
    "path": "docs/gmock_cook_book.md",
    "chars": 150467,
    "preview": "# gMock Cookbook\n\nYou can find recipes for using gMock here. If you haven't yet, please read\n[the dummy guide](gmock_for"
  },
  {
    "path": "docs/gmock_faq.md",
    "chars": 14980,
    "preview": "# Legacy gMock FAQ\n\n### When I call a method on my mock object, the method for the real object is invoked instead. What'"
  },
  {
    "path": "docs/gmock_for_dummies.md",
    "chars": 29225,
    "preview": "# gMock for Dummies\n\n## What Is gMock?\n\nWhen you write a prototype or test, often it's not feasible or wise to rely on\nr"
  },
  {
    "path": "docs/index.md",
    "chars": 1034,
    "preview": "# GoogleTest User's Guide\n\n## Welcome to GoogleTest!\n\nGoogleTest is Google's C++ testing and mocking framework. This use"
  },
  {
    "path": "docs/pkgconfig.md",
    "chars": 4980,
    "preview": "## Using GoogleTest from various build systems\n\nGoogleTest comes with pkg-config files that can be used to determine all"
  },
  {
    "path": "docs/platforms.md",
    "chars": 343,
    "preview": "# Supported Platforms\n\nGoogleTest follows Google's\n[Foundational C++ Support Policy](https://opensource.google/documenta"
  },
  {
    "path": "docs/primer.md",
    "chars": 19101,
    "preview": "# GoogleTest Primer\n\n## Introduction: Why GoogleTest?\n\n*GoogleTest* helps you write better C++ tests.\n\nGoogleTest is a t"
  },
  {
    "path": "docs/quickstart-bazel.md",
    "chars": 5040,
    "preview": "# Quickstart: Building with Bazel\n\nThis tutorial aims to get you up and running with GoogleTest using the Bazel\nbuild sy"
  },
  {
    "path": "docs/quickstart-cmake.md",
    "chars": 5097,
    "preview": "# Quickstart: Building with CMake\n\nThis tutorial aims to get you up and running with GoogleTest using CMake. If\nyou're u"
  },
  {
    "path": "docs/reference/actions.md",
    "chars": 7020,
    "preview": "# Actions Reference\n\n[**Actions**](../gmock_for_dummies.md#actions-what-should-it-do) specify what a\nmock function shoul"
  },
  {
    "path": "docs/reference/assertions.md",
    "chars": 21963,
    "preview": "# Assertions Reference\n\nThis page lists the assertion macros provided by GoogleTest for verifying code\nbehavior. To use "
  },
  {
    "path": "docs/reference/matchers.md",
    "chars": 23614,
    "preview": "# Matchers Reference\n\n<!-- disableFinding(LINK_RELATIVE_G3DOC) -->\n\nA **matcher** matches a *single* argument. You can u"
  },
  {
    "path": "docs/reference/mocking.md",
    "chars": 21135,
    "preview": "# Mocking Reference\n\nThis page lists the facilities provided by GoogleTest for creating and working\nwith mock objects. T"
  },
  {
    "path": "docs/reference/testing.md",
    "chars": 49050,
    "preview": "# Testing Reference\n\n<!--* toc_depth: 3 *-->\n\nThis page lists the facilities provided by GoogleTest for writing test pro"
  },
  {
    "path": "docs/samples.md",
    "chars": 1116,
    "preview": "# Googletest Samples\n\nIf you're like us, you'd like to look at\n[googletest samples.](https://github.com/google/googletes"
  },
  {
    "path": "fake_fuchsia_sdk.bzl",
    "chars": 1974,
    "preview": "\"\"\"Provides a fake @fuchsia_sdk implementation that's used when the real one isn't available.\n\nGoogleTest can be used wi"
  },
  {
    "path": "googlemock/CMakeLists.txt",
    "chars": 7964,
    "preview": "########################################################################\n# Note: CMake support is community-based. The m"
  },
  {
    "path": "googlemock/README.md",
    "chars": 1537,
    "preview": "# Googletest Mocking (gMock) Framework\n\n### Overview\n\nGoogle's framework for writing and using C++ mock classes. It can "
  },
  {
    "path": "googlemock/cmake/gmock.pc.in",
    "chars": 347,
    "preview": "libdir=@CMAKE_INSTALL_FULL_LIBDIR@\nincludedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@\n\nName: gmock\nDescription: GoogleMock (with"
  },
  {
    "path": "googlemock/cmake/gmock_main.pc.in",
    "chars": 354,
    "preview": "libdir=@CMAKE_INSTALL_FULL_LIBDIR@\nincludedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@\n\nName: gmock_main\nDescription: GoogleMock "
  },
  {
    "path": "googlemock/docs/README.md",
    "chars": 139,
    "preview": "# Content Moved\n\nWe are working on updates to the GoogleTest documentation, which has moved to\nthe top-level [docs](../."
  },
  {
    "path": "googlemock/include/gmock/gmock-actions.h",
    "chars": 92885,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/include/gmock/gmock-cardinalities.h",
    "chars": 6146,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/include/gmock/gmock-function-mocker.h",
    "chars": 25796,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/include/gmock/gmock-matchers.h",
    "chars": 224384,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/include/gmock/gmock-more-actions.h",
    "chars": 38344,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/include/gmock/gmock-more-matchers.h",
    "chars": 4513,
    "preview": "// Copyright 2013, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/include/gmock/gmock-nice-strict.h",
    "chars": 10984,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/include/gmock/gmock-spec-builders.h",
    "chars": 82064,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/include/gmock/gmock.h",
    "chars": 3954,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/include/gmock/internal/custom/README.md",
    "chars": 510,
    "preview": "# Customization Points\n\nThe custom directory is an injection point for custom user configurations.\n\n## Header `gmock-por"
  },
  {
    "path": "googlemock/include/gmock/internal/custom/gmock-generated-actions.h",
    "chars": 314,
    "preview": "// IWYU pragma: private, include \"gmock/gmock.h\"\n// IWYU pragma: friend gmock/.*\n\n#ifndef GOOGLEMOCK_INCLUDE_GMOCK_INTER"
  },
  {
    "path": "googlemock/include/gmock/internal/custom/gmock-matchers.h",
    "chars": 1918,
    "preview": "// Copyright 2015, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/include/gmock/internal/custom/gmock-port.h",
    "chars": 1953,
    "preview": "// Copyright 2015, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/include/gmock/internal/gmock-internal-utils.h",
    "chars": 19723,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/include/gmock/internal/gmock-port.h",
    "chars": 6266,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/include/gmock/internal/gmock-pp.h",
    "chars": 13491,
    "preview": "#ifndef GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PP_H_\n#define GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PP_H_\n\n// Expands "
  },
  {
    "path": "googlemock/src/gmock-all.cc",
    "chars": 2107,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/src/gmock-cardinalities.cc",
    "chars": 5330,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/src/gmock-internal-utils.cc",
    "chars": 9461,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/src/gmock-matchers.cc",
    "chars": 18644,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/src/gmock-spec-builders.cc",
    "chars": 29365,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/src/gmock.cc",
    "chars": 8547,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/src/gmock_main.cc",
    "chars": 3092,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/BUILD.bazel",
    "chars": 3349,
    "preview": "# Copyright 2017 Google Inc.\n# All Rights Reserved.\n#\n#\n# Redistribution and use in source and binary forms, with or wit"
  },
  {
    "path": "googlemock/test/gmock-actions_test.cc",
    "chars": 74371,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock-cardinalities_test.cc",
    "chars": 12174,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock-function-mocker_test.cc",
    "chars": 35258,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock-internal-utils_test.cc",
    "chars": 28441,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock-matchers-arithmetic_test.cc",
    "chars": 60268,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock-matchers-comparisons_test.cc",
    "chars": 83762,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock-matchers-containers_test.cc",
    "chars": 112073,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock-matchers-misc_test.cc",
    "chars": 63901,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock-matchers_test.h",
    "chars": 6273,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock-more-actions_test.cc",
    "chars": 55452,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock-nice-strict_test.cc",
    "chars": 15676,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock-port_test.cc",
    "chars": 1977,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock-pp-string_test.cc",
    "chars": 8788,
    "preview": "// Copyright 2018, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock-pp_test.cc",
    "chars": 3519,
    "preview": "#include \"gmock/internal/gmock-pp.h\"\n\n// Used to test MSVC treating __VA_ARGS__ with a comma in it as one value\n#define "
  },
  {
    "path": "googlemock/test/gmock-spec-builders_test.cc",
    "chars": 74718,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock_all_test.cc",
    "chars": 2491,
    "preview": "// Copyright 2009, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock_ex_test.cc",
    "chars": 3300,
    "preview": "// Copyright 2013, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock_leak_test.py",
    "chars": 4070,
    "preview": "#!/usr/bin/env python\n#\n# Copyright 2009, Google Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and bi"
  },
  {
    "path": "googlemock/test/gmock_leak_test_.cc",
    "chars": 3284,
    "preview": "// Copyright 2009, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock_link2_test.cc",
    "chars": 1875,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock_link_test.cc",
    "chars": 1875,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock_link_test.h",
    "chars": 19804,
    "preview": "// Copyright 2009, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock_output_test.py",
    "chars": 6334,
    "preview": "#!/usr/bin/env python\n#\n# Copyright 2008, Google Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and bi"
  },
  {
    "path": "googlemock/test/gmock_output_test_.cc",
    "chars": 8440,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock_output_test_golden.txt",
    "chars": 13629,
    "preview": "[ RUN      ] GMockOutputTest.ExpectedCall\n\nFILE:#: EXPECT_CALL(foo_, Bar2(0, _)) invoked\nStack trace:\n\nFILE:#: Mock func"
  },
  {
    "path": "googlemock/test/gmock_stress_test.cc",
    "chars": 7249,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock_test.cc",
    "chars": 6414,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googlemock/test/gmock_test_utils.py",
    "chars": 3108,
    "preview": "# Copyright 2006, Google Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or with"
  },
  {
    "path": "googletest/CMakeLists.txt",
    "chars": 11956,
    "preview": "########################################################################\n# Note: CMake support is community-based. The m"
  },
  {
    "path": "googletest/README.md",
    "chars": 8958,
    "preview": "### Generic Build Instructions\n\n#### Setup\n\nTo build GoogleTest and your tests that use it, you need to tell your build\n"
  },
  {
    "path": "googletest/cmake/Config.cmake.in",
    "chars": 361,
    "preview": "@PACKAGE_INIT@\ninclude(CMakeFindDependencyMacro)\nif (@GTEST_HAS_PTHREAD@)\n  set(THREADS_PREFER_PTHREAD_FLAG @THREADS_PRE"
  },
  {
    "path": "googletest/cmake/gtest.pc.in",
    "chars": 311,
    "preview": "libdir=@CMAKE_INSTALL_FULL_LIBDIR@\nincludedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@\n\nName: gtest\nDescription: GoogleTest (with"
  },
  {
    "path": "googletest/cmake/gtest_main.pc.in",
    "chars": 354,
    "preview": "libdir=@CMAKE_INSTALL_FULL_LIBDIR@\nincludedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@\n\nName: gtest_main\nDescription: GoogleTest "
  },
  {
    "path": "googletest/cmake/internal_utils.cmake",
    "chars": 14134,
    "preview": "# Defines functions and macros useful for building Google Test and\n# Google Mock.\n#\n# Note:\n#\n# - This file will be run "
  },
  {
    "path": "googletest/cmake/libgtest.la.in",
    "chars": 499,
    "preview": "# libgtest.la - a libtool library file\n# Generated by libtool (GNU libtool) 2.4.6\n\n# Please DO NOT delete this file!\n# I"
  },
  {
    "path": "googletest/docs/README.md",
    "chars": 139,
    "preview": "# Content Moved\n\nWe are working on updates to the GoogleTest documentation, which has moved to\nthe top-level [docs](../."
  },
  {
    "path": "googletest/include/gtest/gtest-assertion-result.h",
    "chars": 8717,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/gtest-death-test.h",
    "chars": 14945,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/gtest-matchers.h",
    "chars": 34792,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/gtest-message.h",
    "chars": 9147,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/gtest-param-test.h",
    "chars": 26376,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/gtest-printers.h",
    "chars": 44341,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/gtest-spi.h",
    "chars": 12871,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/gtest-test-part.h",
    "chars": 7228,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/gtest-typed-test.h",
    "chars": 15837,
    "preview": "// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or w"
  },
  {
    "path": "googletest/include/gtest/gtest.h",
    "chars": 93126,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/gtest_pred_impl.h",
    "chars": 12783,
    "preview": "// Copyright 2006, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/gtest_prod.h",
    "chars": 2502,
    "preview": "// Copyright 2006, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/internal/custom/README.md",
    "chars": 1269,
    "preview": "# Customization Points\n\nThe custom directory is an injection point for custom user configurations.\n\n## Header `gtest.h`\n"
  },
  {
    "path": "googletest/include/gtest/internal/custom/gtest-port.h",
    "chars": 1873,
    "preview": "// Copyright 2015, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/internal/custom/gtest-printers.h",
    "chars": 2094,
    "preview": "// Copyright 2015, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/internal/custom/gtest.h",
    "chars": 1858,
    "preview": "// Copyright 2015, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/internal/gtest-death-test-internal.h",
    "chars": 13952,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/internal/gtest-filepath.h",
    "chars": 10566,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/internal/gtest-internal.h",
    "chars": 61783,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/internal/gtest-param-util.h",
    "chars": 40004,
    "preview": "// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or w"
  },
  {
    "path": "googletest/include/gtest/internal/gtest-port-arch.h",
    "chars": 4452,
    "preview": "// Copyright 2015, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/internal/gtest-port.h",
    "chars": 87577,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/internal/gtest-string.h",
    "chars": 7328,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/include/gtest/internal/gtest-type-util.h",
    "chars": 7324,
    "preview": "// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or w"
  },
  {
    "path": "googletest/samples/prime_tables.h",
    "chars": 4327,
    "preview": "// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or w"
  },
  {
    "path": "googletest/samples/sample1.cc",
    "chars": 2471,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/samples/sample1.h",
    "chars": 1919,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/samples/sample10_unittest.cc",
    "chars": 4961,
    "preview": "// Copyright 2009 Google Inc. All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or with"
  },
  {
    "path": "googletest/samples/sample1_unittest.cc",
    "chars": 5108,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/samples/sample2.cc",
    "chars": 2258,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/samples/sample2.h",
    "chars": 2981,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/samples/sample2_unittest.cc",
    "chars": 3908,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/samples/sample3-inl.h",
    "chars": 5376,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/samples/sample3_unittest.cc",
    "chars": 5352,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/samples/sample4.cc",
    "chars": 2105,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/samples/sample4.h",
    "chars": 2132,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/samples/sample4_unittest.cc",
    "chars": 1995,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/samples/sample5_unittest.cc",
    "chars": 6578,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/samples/sample6_unittest.cc",
    "chars": 8858,
    "preview": "// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or w"
  },
  {
    "path": "googletest/samples/sample7_unittest.cc",
    "chars": 4616,
    "preview": "// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or w"
  },
  {
    "path": "googletest/samples/sample8_unittest.cc",
    "chars": 6210,
    "preview": "// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or w"
  },
  {
    "path": "googletest/samples/sample9_unittest.cc",
    "chars": 5834,
    "preview": "// Copyright 2009 Google Inc. All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or with"
  },
  {
    "path": "googletest/src/gtest-all.cc",
    "chars": 2201,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/src/gtest-assertion-result.cc",
    "chars": 3009,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/src/gtest-death-test.cc",
    "chars": 62728,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/src/gtest-filepath.cc",
    "chars": 15726,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/src/gtest-internal-inl.h",
    "chars": 48421,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/src/gtest-matchers.cc",
    "chars": 3724,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/src/gtest-port.cc",
    "chars": 49623,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/src/gtest-printers.cc",
    "chars": 18617,
    "preview": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/src/gtest-test-part.cc",
    "chars": 4064,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/src/gtest-typed-test.cc",
    "chars": 3823,
    "preview": "// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or w"
  },
  {
    "path": "googletest/src/gtest.cc",
    "chars": 268471,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/src/gtest_main.cc",
    "chars": 2430,
    "preview": "// Copyright 2006, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/BUILD.bazel",
    "chars": 16612,
    "preview": "# Copyright 2017 Google Inc.\n# All Rights Reserved.\n#\n#\n# Redistribution and use in source and binary forms, with or wit"
  },
  {
    "path": "googletest/test/googletest-break-on-failure-unittest.py",
    "chars": 6926,
    "preview": "#!/usr/bin/env python\n#\n# Copyright 2006, Google Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and bi"
  },
  {
    "path": "googletest/test/googletest-break-on-failure-unittest_.cc",
    "chars": 3252,
    "preview": "// Copyright 2006, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-catch-exceptions-test.py",
    "chars": 10424,
    "preview": "#!/usr/bin/env python\n#\n# Copyright 2010 Google Inc.  All Rights Reserved.\n#\n# Redistribution and use in source and bina"
  },
  {
    "path": "googletest/test/googletest-catch-exceptions-test_.cc",
    "chars": 8380,
    "preview": "// Copyright 2010, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-color-test.py",
    "chars": 5170,
    "preview": "#!/usr/bin/env python\n#\n# Copyright 2008, Google Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and bi"
  },
  {
    "path": "googletest/test/googletest-color-test_.cc",
    "chars": 2503,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-death-test-test.cc",
    "chars": 47907,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-death-test_ex_test.cc",
    "chars": 3559,
    "preview": "// Copyright 2010, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-env-var-test.py",
    "chars": 4173,
    "preview": "#!/usr/bin/env python\n#\n# Copyright 2008, Google Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and bi"
  },
  {
    "path": "googletest/test/googletest-env-var-test_.cc",
    "chars": 3702,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-fail-if-no-test-linked-test-with-disabled-test_.cc",
    "chars": 1801,
    "preview": "// Copyright 2025, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-fail-if-no-test-linked-test-with-enabled-test_.cc",
    "chars": 1791,
    "preview": "// Copyright 2025, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-fail-if-no-test-linked-test.py",
    "chars": 6178,
    "preview": "#!/usr/bin/env python3  # pylint: disable=g-interpreter-mismatch\n#\n# Copyright 2025, Google Inc.\n# All rights reserved.\n"
  },
  {
    "path": "googletest/test/googletest-fail-if-no-test-selected-test.py",
    "chars": 3713,
    "preview": "#!/usr/bin/env python3  # pylint: disable=g-interpreter-mismatch\n#\n# Copyright 2025, Google Inc.\n# All rights reserved.\n"
  },
  {
    "path": "googletest/test/googletest-failfast-unittest.py",
    "chars": 14376,
    "preview": "#!/usr/bin/env python\n#\n# Copyright 2020 Google Inc. All Rights Reserved.\n#\n# Redistribution and use in source and binar"
  },
  {
    "path": "googletest/test/googletest-failfast-unittest_.cc",
    "chars": 5594,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-filepath-test.cc",
    "chars": 23708,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-filter-unittest.py",
    "chars": 24018,
    "preview": "#!/usr/bin/env python\n#\n# Copyright 2005 Google Inc. All Rights Reserved.\n#\n# Redistribution and use in source and binar"
  },
  {
    "path": "googletest/test/googletest-filter-unittest_.cc",
    "chars": 3435,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-global-environment-unittest.py",
    "chars": 4889,
    "preview": "# Copyright 2021 Google Inc. All Rights Reserved.\n#\n# Redistribution and use in source and binary forms, with or without"
  },
  {
    "path": "googletest/test/googletest-global-environment-unittest_.cc",
    "chars": 2286,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-json-outfiles-test.py",
    "chars": 5829,
    "preview": "#!/usr/bin/env python\n# Copyright 2018, Google Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and bina"
  },
  {
    "path": "googletest/test/googletest-json-output-unittest.py",
    "chars": 30681,
    "preview": "#!/usr/bin/env python\n# Copyright 2018, Google Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and bina"
  },
  {
    "path": "googletest/test/googletest-list-tests-unittest.py",
    "chars": 6555,
    "preview": "#!/usr/bin/env python\n#\n# Copyright 2006, Google Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and bi"
  },
  {
    "path": "googletest/test/googletest-list-tests-unittest_.cc",
    "chars": 4743,
    "preview": "// Copyright 2006, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-listener-test.cc",
    "chars": 24343,
    "preview": "// Copyright 2009 Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or with"
  },
  {
    "path": "googletest/test/googletest-message-test.cc",
    "chars": 5830,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-options-test.cc",
    "chars": 8079,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-output-test-golden-lin.txt",
    "chars": 42974,
    "preview": "The non-test part of the code is expected to have 2 failures.\n\ngoogletest-output-test_.cc:#: Failure\nValue of: false\n  A"
  },
  {
    "path": "googletest/test/googletest-output-test.py",
    "chars": 12645,
    "preview": "#!/usr/bin/env python\n#\n# Copyright 2008, Google Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and bi"
  },
  {
    "path": "googletest/test/googletest-output-test_.cc",
    "chars": 36397,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-param-test-invalid-name1-test.py",
    "chars": 2398,
    "preview": "#!/usr/bin/env python\n#\n# Copyright 2015 Google Inc. All rights reserved.\n#\n# Redistribution and use in source and binar"
  },
  {
    "path": "googletest/test/googletest-param-test-invalid-name1-test_.cc",
    "chars": 1995,
    "preview": "// Copyright 2015, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-param-test-invalid-name2-test.py",
    "chars": 2352,
    "preview": "#!/usr/bin/env python\n#\n# Copyright 2015 Google Inc. All rights reserved.\n#\n# Redistribution and use in source and binar"
  },
  {
    "path": "googletest/test/googletest-param-test-invalid-name2-test_.cc",
    "chars": 2129,
    "preview": "// Copyright 2015, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-param-test-test.cc",
    "chars": 45496,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-param-test-test.h",
    "chars": 2280,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "googletest/test/googletest-param-test2-test.cc",
    "chars": 2768,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  }
]

// ... and 51 more files (download for full content)

About this extraction

This page contains the full source code of the google/googletest GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 251 files (3.9 MB), approximately 1.0M tokens, and a symbol index with 5410 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!