GoogleTest - Google Testing and Mocking Framework
GoogleTest will not accept patches of new features to the v1.14.x branch.
We recommend building GoogleTest from the latest commit instead.
Exceptional critical bug fixes may be considered.
GoogleTest will not accept patches of new features to the v1.13.x branch.
We recommend building GoogleTest from the latest commit instead.
Exceptional critical bug fixes may be considered.
GTEST_FAIL_AT
now terminates the test (like ASSERT_*
), rather than failing and continuing (like EXPECT_*
) (https://github.com/google/googletest/commit/6f149520a19c0bfd6a70075a733a69cd8b03ae94)testing::SrcDir()
, which returns the configured directory for test data files (https://github.com/google/googletest/commit/912db742531bf82efb01194bc08140416e3b3467)GoogleTest will not accept patches of new features to the v1.12.x branch.
We recommend building GoogleTest from the latest commit instead.
Exceptional critical bug fixes may be considered.
WhenBase64Unescaped
(https://github.com/google/googletest/commit/652ec31f9f53ab34af1257e5e2783d77e872ed45)ResultOf()
now has a 3-arg overload that takes a description string for better error messages (https://github.com/google/googletest/commit/0e402173c97aea7a00749e825b194bfede4f2e45)58d77fa8070e8cec2dc1ed015d66b454c8d78850 - Fixes the version number in CMakeLists.txt (#3911)
GoogleTest will not accept patches of new features to v1.12.0.
We recommend building GoogleTest from the latest commit instead.
Exceptional critical bug fixes may be considered.
WhenBase64Unescaped
(https://github.com/google/googletest/commit/652ec31f9f53ab34af1257e5e2783d77e872ed45)ResultOf()
now has a 3-arg overload that takes a description string for better error messages (https://github.com/google/googletest/commit/0e402173c97aea7a00749e825b194bfede4f2e45)GoogleTest will not accept patches of new features to v1.11.0.
We recommend building GoogleTest from the latest commit instead.
Exceptional critical bug fixes may be considered.
MOCK_METHOD
now handles noexcept correctly (https://github.com/google/googletest/pull/2498)MOCK_METHOD
now supports ref-qualifiers (https://github.com/google/googletest/commit/d89b36302116233b8c6377e6e891083f41ee51c5)MOCK_METHOD
now supports returning function pointers (https://github.com/google/googletest/commit/1f9edcd9698162b48d94e1ef2e6a2ab7ab4e6c56)DoAll
now accepts move-only arguments (https://github.com/google/googletest/commit/48ec64092a38621210ecd835fde61d76861269c1)MockFunction
can now be used for mocking std::function
(https://github.com/google/googletest/pull/2350)MockFunction
is now templated for use with other function classes, besides std::function
(https://github.com/google/googletest/commit/662fe38e44900c007eccb65a5d2ea19df7bd520e)ACTION
macros now support more than 10 arguments (https://github.com/google/googletest/commit/63713e1ce49019da205daa1ca91b73fcfc9b333f)IsNan
(https://github.com/google/googletest/commit/bbe4b7363bbaa7c9e07dbacde11602a4c69504d3)FieldsAre
(https://github.com/google/googletest/commit/a4621888650aaae118de93f9faf8ef5a18cab303)Pointer
(https://github.com/google/googletest/commit/a02a591605dfef9addde49634bf010dbe8f95c50)Address
(https://github.com/google/googletest/commit/e5644f5f12ff3d5b2232dabc1c5ea272a52e8155)Throws
and ThrowsMessage
(https://github.com/google/googletest/pull/2904)Matcher<std::string_view>
specialization that internally stores a string
instead of string_view
(https://github.com/google/googletest/commit/6f5fd0d7199b9a19faa9f499ecc266e6ae0329e7)string_view
input (https://github.com/google/googletest/commit/13a433a94dd9c7e55907d7a9b75f44ff82f309eb)DoubleNearPredFormat
matcher now fails on impractically small epsilons (https://github.com/google/googletest/commit/b5687db554a295e697f5d459cf6d3f343d2ca179)Truly
matcher now explains failures (https://github.com/google/googletest/commit/0c400f67fcf305869c5fb113dd296eca266c9725)MatcherInterface
(https://github.com/google/googletest/commit/c13c27a513ecd1cbf5700a45fe590e85e8ae6770)--gtest_brief
shows only test failures in output (https://github.com/google/googletest/pull/2751)--gtest_fail_fast
stops test execution on first failure (https://github.com/google/googletest/commit/1ced315a483f4ecac21893ce6ceeb502afb82eff)SetUpTestSuite
and TearDownTestSuite
now cause tests to fail rather than log (https://github.com/google/googletest/commit/9ed99c6c837ae1cbfcabd36959fc802ebb5ae07f)TEST_P
and TYPED_TEST_P
now fail unless allowlisted using GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST
(https://github.com/google/googletest/commit/d442089d53cecbba59b2d8f35d06eac01f1e46da, https://github.com/google/googletest/commit/a13a0626188b4e7d22d63a4c9fcfe9f441c81e4a, https://github.com/google/googletest/commit/0b024bd91a14a77a7e7d6072ccd88e09c86ddeaa, https://github.com/google/googletest/commit/3e79d366e380ec85b7de9409211b184bc8529655, https://github.com/google/googletest/commit/ec94d9f24c92a5090fda5567156d6dde99cdbf31)std::any
, std::optional
, and std::variant
(https://github.com/google/googletest/pull/2742)std::unique_ptr
and std::shared_ptr
(https://github.com/google/googletest/commit/6b2e74905e9a7e70c7d1017ee0dfe5a8e88a1300)GTEST_HAS_STD_STRING
(https://github.com/google/googletest/pull/2456)Release 1.10.0 1.10.0 Release reflects a current version of the project. The 1.10.x will not consider any requests for any new features, The bug fix requests will only be considered if proven "critical"
High Level Changes: This release deprecated "....TEST_CASE" API in favor of "....TEST_SUITE". In a nutshell if you have code that uses something like "INSTANTIATE_TYPED_TEST_CASE_P " - this and all other "*_TEST_CASE " are now deprecated in favor of more standard _TEST_SUITE. See https://github.com/google/googletest/blob/master/googletest/docs/primer.md#beware-of-the-nomenclature.
There is also new powerful MOCK_METHOD macro. See https://github.com/google/googletest/blob/72adf7a4155b6642da1e6761678fe546590c0269/googlemock/docs/cook_book.md#creating-mock-classes. This replaces older way of mocking. For example (Old) MOCK_METHOD1(Bar, double(std::string s)); (New) MOCK_METHOD(double, Bar, (std::string s), (override)); So there is no need to count the parameters anymore.
1.8.1 Release reflects a current version of the project. The 1.8.x is the last release supporting pre-C++11 compilers. The 1.8.x will not accept any requests for any new features and any bugfix requests will only be accepted if proven "critical"