googletest
GoogleTest - Google Testing and Mocking Framework
File Explorer
- 00-bug_report.yml
- 10-feature_request.yml
- config.yml
- linux-presubmit.sh
- macos-presubmit.sh
- windows-presubmit.bat
- navigation.yml
- default.html
- main.scss
- style.scss
- actions.md
- assertions.md
- matchers.md
- mocking.md
- testing.md
- _config.yml
- advanced.md
- 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
- samples.md
- gmock.pc.in
- gmock_main.pc.in
- README.md
- gmock-generated-actions.h
- gmock-matchers.h
- gmock-port.h
- README.md
- gmock-internal-utils.h
- gmock-port.h
- gmock-pp.h
- 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
- gmock-all.cc
- gmock-cardinalities.cc
- gmock-internal-utils.cc
- gmock-matchers.cc
- gmock-spec-builders.cc
- gmock.cc
- gmock_main.cc
- 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
- CMakeLists.txt
- README.md
- Config.cmake.in
- gtest.pc.in
- gtest_main.pc.in
- internal_utils.cmake
- libgtest.la.in
- README.md
- gtest-port.h
- gtest-printers.h
- gtest.h
- README.md
- 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
- 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
- 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
- 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
- gmock_dynamic_cast_message_test.proto
- 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
- CMakeLists.txt
- README.md
- .clang-format
- .gitignore
- BUILD.bazel
- CMakeLists.txt
- CONTRIBUTING.md
- CONTRIBUTORS
- fake_fuchsia_sdk.bzl
- googletest_deps.bzl
- LICENSE
- MODULE.bazel
- README.md
- WORKSPACE
- WORKSPACE.bzlmod
# Installation Guide
cmake- C++ Compiler (C++17 supporting) C++17
- CMake 3.5 or higher
- Bazel (Alternative)
Setup Steps
mkdir build
Create a directory for building.
cd build
Navigate to the build directory.
cmake ..
Generate build files using CMake.
cmake --build .
Build the project.
ctest
Run tests to verify the build.
Key Commands
cmake -DCMAKE_BUILD_TYPE=Release ..
Generates platform-specific build files via CMake configuration.
cmake --build . --config Release
Invokes the underlying build tool to compile the project.
ctest --output-on-failure
Executes the unit test suite included in the project.
bazel test //...
Builds and runs tests using the Bazel build system.
# Use via CDN
jsDelivrjsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.
Release Timeline
Actively MaintainedCommand Glossary
Commands referenced in this DOCs, explained below.
write
View Details ▼
write
Write data to memory.
write memory
Write current configuration to memory:
write {{username}} {{terminal_id}}
Send a message to a given user on a given terminal ID:
write {{username}} {{terminal_id}}
Send a message to a given user on a given terminal ID:
