Google's C++ testing and mocking framework
open sourceBSD-3-Clausefree
GoogleTest is Google's C++ testing and mocking framework, which merged the formerly separate GoogleTest and GoogleMock. It's an xUnit-style framework that discovers and runs tests automatically, with a rich set of assertions and your own, death tests (code that should crash), fatal and non-fatal failures, value- and type-parameterized tests and many options for running tests, plus mock objects with matchers and actions. It builds with Bazel or CMake, and requires at least C++17.
Ways to install
Package managers
Problems it solves
- write unit tests for my C++ code
- mock dependencies in C++ tests
- test that C++ code crashes or exits as expected
- run parameterized tests over many inputs in C++
Features
- automatic test discovery
- rich and user-defined assertions
- death tests
- value- and type-parameterized tests
- GoogleMock mocks, matchers and actions
- Bazel and CMake builds
