| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Suggested workaround from https://github.com/Nekto89/googletest/commit/751760ad543f205e1d76797bcc5c7e2ca0c30cce
Fixes #4570
PiperOrigin-RevId: 651044944
Change-Id: I21f099a15dd3182d335a7891d99b9b1293e5c53e
|
|
|
|
|
|
|
|
|
| |
If death tests were not supported the macro would try
to force the second parameter as a string. The second
parameter can be a matcher or a string.
PiperOrigin-RevId: 633199517
Change-Id: If5e71b4be0b569adb273eb4960202197bb264a8f
|
|\
| |
| |
| |
| | |
PiperOrigin-RevId: 631167807
Change-Id: I563883341972bbb82c7407ebf3755d64317b84fc
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
PiperOrigin-RevId: 628105419
Change-Id: I364e8089b62050c44059e208b610e324eb5a656d
|
| |
| |
| |
| |
| |
| |
| | |
-Wused-but-marked-unused warnings
PiperOrigin-RevId: 625430612
Change-Id: Ia9d2e47984e1e6f91966afae8a6750119ae69446
|
| |
| |
| |
| |
| | |
PiperOrigin-RevId: 622203227
Change-Id: Ic3c24edf917dbda7b02c6ab8ce695398a436dc4c
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Applies for `std::index_sequence`, `std::make_index_sequence`, and `std::index_sequence_for` replacing `IndexSequence`, `MakeIndexSequence` and IndexSequenceFor`
* Also deleted implementation helper `DoubleSequence`
* The standard interfaces [have been in the standard library since C++14](https://en.cppreference.com/w/cpp/utility/integer_sequence), which [is the minimum supported C++ version by Google Test](https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md)
PiperOrigin-RevId: 621939977
Change-Id: Id264266f08da66c0fa2a6e6fbb8f86fd3cb3a421
|
| |\
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 621631167
Change-Id: I0790f7082ce3c20fef92958c820d40ec854fe91d
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Support for Xbox platforms, requires the code to support compilation with the
WINAPI_FAMILY_GAMES subset of the Win32 API.
- Add support for WINAPI_FAMILY_GAMES to enable GTEST_OS_WINDOWS_GAMES platform.
- Disable stream redirection (GTEST_HAS_STREAM_REDIRECTION = 0) and colored TTY
printing for GTEST_OS_WINDOWS_GAMES platform. Both features currently require
Win32 functions that don't exist in the WINAPI_FAMILY_GAMES subset.
Misc fixes:
- gtest-port.cc: Move GTEST_DISABLE_MSC_DEPRECATED_PUSH_ into
GTEST_HAS_STREAM_REDIRECTION conditional section where the corresponding
GTEST_DISABLE_MSC_DEPRECATED_POP_ is located.
- googletest-port-test.cc: Switch stream redirection tests to be conditional on
GTEST_HAS_STREAM_REDIRECTION instead of !defined(GTEST_OS_WINDOWS_MOBILE).
|
| |/
| |
| |
| |
| | |
PiperOrigin-RevId: 620448229
Change-Id: I487a0d8a8f89ebe82c9ec66fbb60cbe2203188c9
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Google Test performs hidden test registration during process
startup. For test binaries that contain a large number of tests, this
registration can be costly. In this CL, we reduce the overhead of
registration via several tactics:
- Treat CodeLocation and FilePath as value types, using std::move to
pass them around.
- Reduce string copies in various places by either passing std::string
values via std::move, or passing const-refs to std::string instances.
- Use std::to_string to stringify an int in DefaultParamName rather than
a std::stringstream.
- Pull some std::string instances out of nested loops in
ParameterizedTestSuiteInfo::RegisterTests so as to reuse some
allocations, and replace stringstream with ordinary string appends.
- Use std::unordered_map in UnitTestImpl::GetTestSuite and
ParameterizedTestSuiteRegistry::GetTestSuitePatternHolder to spend a
little memory to turn O(N) lookups into constant time lookpus.
- Use range-based for loops in a few places.
- Use emplace-ish methods to add to containers where appropriate.
All together, these changes reduce the overall runtime of a series of 50
death tests in a single Chromium test executable by ~38% due to the
fact that the registration costs are paid in every death test's child
process.
PiperOrigin-RevId: 613833210
Change-Id: I51a262a770edff98ffa1e3b60c4d78a8308f9a9f
|
| |
| |
| |
| |
| | |
PiperOrigin-RevId: 612878184
Change-Id: Ia8e23da1ad09c2e0ce635a855f0c250f368f6878
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Google Test performs hidden test registration during process
startup. For test binaries that contain a large number of tests, this
registration can be costly. In this CL, we reduce the overhead of
registration via several tactics:
- Treat CodeLocation and FilePath as value types, using std::move to
pass them around.
- Reduce string copies in various places by either passing std::string
values via std::move, or passing const-refs to std::string instances.
- Use std::to_string to stringify an int in DefaultParamName rather than
a std::stringstream.
- Pull some std::string instances out of nested loops in
ParameterizedTestSuiteInfo::RegisterTests so as to reuse some
allocations, and replace stringstream with ordinary string appends.
- Use std::unordered_map in UnitTestImpl::GetTestSuite and
ParameterizedTestSuiteRegistry::GetTestSuitePatternHolder to spend a
little memory to turn O(N) lookups into constant time lookpus.
- Use range-based for loops in various places.
- Use emplace-ish methods to add to containers where appropriate.
All together, these changes reduce the overall runtime of a series of 50
death tests in a single Chromium test executable by ~38% due to the
fact that the registration costs are paid in every death test's child
process.
PiperOrigin-RevId: 612763676
Change-Id: I1f46e012ccb9004c009e1027e4f7c38780ffb9e2
|
| |
| |
| |
| |
| |
| |
| | |
while writing for thread-safety.
PiperOrigin-RevId: 610810340
Change-Id: I37f33510373dff04b8e9c9e8a9f32d30fcce46ff
|
| |
| |
| |
| |
| | |
PiperOrigin-RevId: 607136416
Change-Id: Ia29dd3156d4d455194745e58501eaee9d77045a1
|
| |
| |
| |
| |
| |
| |
| |
| | |
_Exit is standardized since C99, whereas _exit is POSIX-only.
Fixes: #4447
PiperOrigin-RevId: 605000352
Change-Id: Ibfa84edaa043bd003a21383e8148bf45be7217f6
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Destruction in static teardown causes issues for Environments which own threads and try to join them in their destruction.
This may be a breaking change for users who call RUN_ALL_TESTS multiple times in the same main function if they also install environments, or those who access registered environments after RUN_ALL_TESTS.
The easiest fix is to only call RUN_ALL_TESTS once as the last line of the main function. Another potential fix is to re-register new instances of the Environment once before each call to RUN_ALL_TESTS.
PiperOrigin-RevId: 604800795
Change-Id: I37c44d4aca4a238052649f45a4b6b9cfb5355b71
|
| |
| |
| |
| |
| |
| |
| | |
When -Wdouble-promotion is enabled, the templatized function AppropriateResolution fails to compile since its float instantiation promotes floats to doubles when doing arithmetic and comparisons. Add static casts to resolve these errors.
PiperOrigin-RevId: 600776333
Change-Id: Ia530b4bbca6ddce27caf0a817196d87efef711cb
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`internal::MakeAndRegisterTestInfo`
This was probably a copy-paste from the comment about `type_param`.
PiperOrigin-RevId: 600493462
Change-Id: I4a41c2673dd6560db0f68856aab3d32b103164b1
|
| |
| |
| |
| |
| |
| |
| | |
will not be used by googletest, even if GTEST_HAS_ABSL is #defined.
PiperOrigin-RevId: 599625032
Change-Id: Ieb994a15683dec89e88578120071eca8ac9fead1
|
| |
| |
| |
| |
| |
| |
| |
| | |
This enables automatic color output without filesystem support, as that only requires testing to see if the output is a terminal.
Fixes: #4439
PiperOrigin-RevId: 598929397
Change-Id: Idca7490e6e090951a78cd1cdd710f41d756a68b4
|
| |
| |
| |
| |
| |
| |
| | |
This function makes exact floating point that are correct in this context, but trigger the compiler warning.
PiperOrigin-RevId: 596944060
Change-Id: I4bba3c2abcf3ac189107530978961955ad47d6f0
|
| |
| |
| |
| |
| |
| |
| | |
`FAIL_AT` is shorthand for `GTEST_FAIL_AT` like `FAIL` is for `GTEST_FAIL`.
PiperOrigin-RevId: 590393926
Change-Id: I68263af8fa2f98ca0bbef509d475c84e22068018
|
| |
| |
| |
| |
| | |
PiperOrigin-RevId: 574992011
Change-Id: Id6030a9e5f317966186cc48ef2c09ad97fa15d3e
|
| |
| |
| |
| |
| |
| |
| | |
These are not used anywhere in googletest and they are in namespace `testing::internal`
PiperOrigin-RevId: 574171727
Change-Id: I5f668157a81ba3efaed77c1302b40cf07eeda52b
|
| |
| |
| |
| |
| |
| |
| |
| | |
`GTEST_LINKED_AS_SHARED_LIBRARY` with shared libraries in GoogleTest
Fixes: #4372
PiperOrigin-RevId: 568327612
Change-Id: Ifc47f1a2a2648c29858a22966331557cc928cc47
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
macros where possible.
This also avoids conflating C++ language versions with standard library versions, which don't always align.
PiperOrigin-RevId: 567662118
Change-Id: I7c023bd043c81c540c9430eaeb7b450feaadb206
|
| |
| |
| |
| |
| | |
PiperOrigin-RevId: 567349341
Change-Id: I35f2679901aecbe9cb90d2e78ff28c5e383e7257
|
| |
| |
| |
| |
| |
| |
| | |
Fixes #4318
PiperOrigin-RevId: 560089120
Change-Id: I9d0d098140033520266747a1689e953ee8307c47
|
| | |
|
| |
| |
| |
| |
| | |
PiperOrigin-RevId: 557910190
Change-Id: Ia965a6c96e4cc5997d8af2611abc62c42e81653e
|
| |\
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 554867591
Change-Id: Ib32da50384951532419cb54fb70f8ab0920178d7
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit removes `<iomanip>` from public GoogleTest header files.
As `<iomanip>` is not a common included file, its content is unlikely
to be included in translation units other than through GoogleTest
includes.
By reducing the number of include directives public headers in
GoogleTest, this may reduce the time taken to compile tests as it would
reduce the amount of work that the preprocessor and compiler front-end
need to do.
|
| | |
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 553150809
Change-Id: I10d19a45a85c5f63a5e65dc322413307116e1c25
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This allows types that provide an AbslStringify definition to be streamed into GoogleTest macros.
PiperOrigin-RevId: 552914482
Change-Id: I5fb386980d4d24873f95f0a8ef83067a6a3c86ac
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes #4314
PiperOrigin-RevId: 549986457
Change-Id: Iff74f02ab1c106696f288540e9c623d56b76e3f7
|
| | |
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 549456180
Change-Id: I10862e6de981087a5c590cccf6152255e9a176a0
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 549039222
Change-Id: I96bea310beede5ba0ed6160155251ffd9d7a2103
|
| | | | |
|
| |\ \ \
| | |_|/
| |/| |
| | | |
| | | | |
PiperOrigin-RevId: 549006105
Change-Id: Ifbe2bf57e10df4c71e51dbfaf1687f4f621f5106
|
| | | |
| | | |
| | | |
| | | | |
Added support for Nordic nRF52 series of MCUs
|
| |\ \ \
| | |_|/
| |/| |
| | | |
| | | | |
PiperOrigin-RevId: 547250378
Change-Id: I084c30e45f331cb296535822923da1cb7e848e11
|
| | | | |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
ordering.
PiperOrigin-RevId: 546373360
Change-Id: I2538b45d8c7710592071cc352da6771480c324e6
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This was shown to work for C++14, C++17, and C++20 after patched into googletest for the protobuf repo's CI.
Closes #3659
PiperOrigin-RevId: 544795507
Change-Id: I3e0a94f675e78a6ee9aeccae86c23d940efed8eb
|
| |/
| |
| |
| |
| |
| |
| | |
attempt to instantiate the incomplete `testing::internal::Secret` type.
PiperOrigin-RevId: 543799815
Change-Id: Ic0a4f48d825bef26cb8cc74d8a0117b3a5ef3f14
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is useful for running individual tests in a separate process, which is
useful for testing e.g. flag changes which have a process-global effect.
PiperOrigin-RevId: 540580573
Change-Id: I18a5d24d79425a9d595be3369efc44e2f655f6f8
|