How google/googletest works
GoogleTest is a C++ test framework, bundled with GoogleMock. Test authors define tests and assertions; the framework discovers and runs tests, records failures, and reports results. Its capabilities include death, value-parameterized, and type-parameterized tests; GoogleMock adds expectation matching and configurable actions. The graph groups public test authoring, execution and support, and mocking. Edges are limited to README statements and SOURCE INDEX references; unsampled implementation details are not inferred.
Main entry points: gtest.h Test API · gmock.h Mock API · gmock-spec-builders.h Expectations · gmock-matchers.h Mock matchers
Components 22
Test authoring
- Test API
googletest/include/gtest/gtest.h - Assertions
googletest/include/gtest/gtest-assertion-result.h - Death tests
googletest/include/gtest/gtest-death-test.h - Value parameters
googletest/include/gtest/gtest-param-test.h - Type parameters
googletest/include/gtest/gtest-typed-test.h
Test execution
- Test runner
googletest/src/gtest.cc - Test registry
googletest/src/gtest-internal-inl.h - Test results
googletest/include/gtest/gtest-test-part.h
Runtime support
- Value printers
googletest/include/gtest/gtest-printers.h - Messages
googletest/include/gtest/gtest-message.h - Test internals
googletest/include/gtest/internal/gtest-internal.h - Platform support
googletest/include/gtest/internal/gtest-port.h - String utilities
googletest/include/gtest/internal/gtest-string.h
Mock behavior
- Mock API
googlemock/include/gmock/gmock.h - Expectations
googlemock/include/gmock/gmock-spec-builders.h - Mock actions
googlemock/include/gmock/gmock-actions.h - Call counts
googlemock/include/gmock/gmock-cardinalities.h - Mock matchers
googlemock/include/gmock/gmock-matchers.h - Mock utilities
googlemock/include/gmock/internal/gmock-internal-utils.h - Mock portability
googlemock/include/gmock/internal/gmock-port.h - Mock macros
googlemock/include/gmock/internal/gmock-pp.h
Other components
- Test author
Connections 26
- Test author → Test API: defines tests
- Test author → Mock API: uses mocks
- Test API → Assertions: includes
googletest/include/gtest/gtest.h - Test API → Death tests: includes
googletest/include/gtest/gtest.h - Test API → Value parameters: includes
googletest/include/gtest/gtest.h - Test API → Type parameters: includes
googletest/include/gtest/gtest.h - Test API → Test internals: includes
googletest/include/gtest/gtest.h - Test API → Messages: includes
googletest/include/gtest/gtest.h - Test API → Test results: includes
googletest/include/gtest/gtest.h - Test runner → Test registry: uses
googletest/src/gtest.cc - Test runner → Test results: records failures
- Test internals → Platform support: uses
googletest/include/gtest/internal/gtest-internal.h - Test internals → String utilities: uses
googletest/include/gtest/internal/gtest-internal.h - Test API → Value printers: includes
googletest/include/gtest/gtest.h - Mock API → Expectations: includes
googlemock/include/gmock/gmock.h - Mock API → Mock actions: includes
googlemock/include/gmock/gmock.h - Mock API → Call counts: includes
googlemock/include/gmock/gmock.h - Mock API → Mock matchers: includes
googlemock/include/gmock/gmock.h - Expectations → Mock actions: uses
googlemock/include/gmock/gmock-spec-builders.h - Expectations → Call counts: uses
googlemock/include/gmock/gmock-spec-builders.h - Expectations → Mock matchers: uses
googlemock/include/gmock/gmock-spec-builders.h - Mock matchers → Mock utilities: uses
googlemock/include/gmock/gmock-matchers.h - Mock utilities → Mock portability: uses
googlemock/include/gmock/internal/gmock-internal-utils.h - Mock portability → Platform support: uses
googlemock/include/gmock/internal/gmock-port.h - Mock actions → Mock utilities: uses
googlemock/include/gmock/gmock-actions.h - Mock matchers → Mock macros: uses
googlemock/include/gmock/gmock-matchers.h