| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
-Wused-but-marked-unused warnings
PiperOrigin-RevId: 625430612
Change-Id: Ia9d2e47984e1e6f91966afae8a6750119ae69446
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
`internal::MakeAndRegisterTestInfo`
This was probably a copy-paste from the comment about `type_param`.
PiperOrigin-RevId: 600493462
Change-Id: I4a41c2673dd6560db0f68856aab3d32b103164b1
|
| |
|
|\
| |
| |
| |
| | |
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: 549039222
Change-Id: I96bea310beede5ba0ed6160155251ffd9d7a2103
|
|/ |
|
|
|
|
|
|
|
| |
https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html
PiperOrigin-RevId: 526079054
Change-Id: Ia4db21e3e5f58b90de05d52fd94b291ed06d785d
|
|
|
|
|
|
|
| |
This is compatible with compiling with "-Wundef" (#3267).
PiperOrigin-RevId: 513943378
Change-Id: I47cf5fabbb77be061c4483a0adc54511af6b191c
|
|
|
|
|
|
|
|
|
| |
Keep declarations in c++ < 17 using new macro, GTEST_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL.
Fixes #4148.
PiperOrigin-RevId: 511510401
Change-Id: I76c3f2fccf07a0978adcbe5f8f0203b9d0c33872
|
|
|
|
|
|
|
|
|
|
|
| |
In #4113 a user says Max clashes with a macro. Since it is only used in
a test, use std::numeric_limits::max() instead.
Note that in headers, the macro issue can be mitigated with
parenthesis like this: `(std::numeric_limits<T>::max)()`
PiperOrigin-RevId: 504284906
Change-Id: Ibf430caec1a6afdf6b303534fec6a4fd00a6373f
|
|
|
|
|
| |
PiperOrigin-RevId: 499893032
Change-Id: I33304802b7c82ae2d008f3ee89df38866e5f57ba
|
|\
| |
| |
| |
| | |
PiperOrigin-RevId: 461699509
Change-Id: I9bab4474c5f52d4d66691dfb96a4d20f89fbcfeb
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 460455562
Change-Id: I29efc09887651d8734586703fe0691482ba4c981
|
| |/ |
|
|/
|
|
|
| |
PiperOrigin-RevId: 459529190
Change-Id: I6b29693000023b3562990742f27a98cc279b6452
|
|
|
|
|
|
|
| |
Fixes #3856
PiperOrigin-RevId: 453992227
Change-Id: I5f3330a454bdcd6b0522ebba4cdfe2c888f8e638
|
|
|
|
|
| |
PiperOrigin-RevId: 443715444
Change-Id: I3ffd54b63d2728ae4a668ee7875c8c3c8188087c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A few tests are examining code locations and looking af the resulting line
numbers to verify that GoogleTest shows those to users correctly. Some of those
locations change when clang-format is run. For those locations, I've wrapped
portions in:
// clang-format off
...
// clang-format on
There may be other locations that are currently not tickled by running
clang-format.
PiperOrigin-RevId: 434844712
Change-Id: I3a9f0a6f39eff741c576b6de389bef9b1d11139d
|
|
|
|
|
| |
PiperOrigin-RevId: 422559250
Change-Id: I9f630f2186724950e5e9fbd7093d5264e8bf0a71
|
| |
|
|
|
|
|
|
| |
Delete GOOGLETEST_CM.* tags from C++ code.
PiperOrigin-RevId: 386268534
|
| |
|
|
|
|
| |
PiperOrigin-RevId: 362216935
|
|
|
|
|
|
| |
Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard, attempt #2
PiperOrigin-RevId: 357056902
|
|
|
|
|
|
| |
Revert include guard fix
PiperOrigin-RevId: 356588893
|
|
|
|
|
|
| |
Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard
PiperOrigin-RevId: 355882793
|
|
|
|
|
|
| |
Remove uses of GTEST_HAS_TYPED_TEST_P and GTEST_HAS_TYPED_TEST.
PiperOrigin-RevId: 353935996
|
|
|
|
|
|
|
| |
Use a tagged constructor for FlatTuple instead.
Some versions of MSVC are getting confused with that constructor and generating invalid code.
PiperOrigin-RevId: 342050957
|
| |
|
|
|
|
|
|
|
| |
Fixes build warnings from previous CL
Add CMake to internal presubmit to prevent these
PiperOrigin-RevId: 337325504
|
|
|
|
|
| |
Add ::testing::FieldsAre matcher for objects that support get<> and structured bindings.
PiperOrigin-RevId: 337165285
|
|
|
|
|
|
| |
Disable -Wmismatched-tags warning for struct/class tuple_size
PiperOrigin-RevId: 337087493
|
|
|
|
|
|
| |
Fix -Wmismatched-tags error with struct tuple_size vs class tuple_size
PiperOrigin-RevId: 336930166
|
|
|
|
|
|
| |
Add helper methos to internal FlatTuple. Refactor constructors.
PiperOrigin-RevId: 336306681
|
|\
| |
| |
| | |
PiperOrigin-RevId: 336087297
|
| | |
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 325220934
|
| | | |
|
|/ / |
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 320425648
|
|/ /
| |
| |
| |
| |
| | |
EXPECT_THROW and EXPECT_NO_THROW will now print exception type and message when an unexpected std::exception-derived error is thrown.
Fixes #2878
|
|/
|
|
|
|
|
|
| |
Fixed #2823 - Make it so that a semicolon appearing after an invocation of GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_ does not trigger a redundant semicolon warning.
This works by introducing an else block with a statement that intentionally does not end with a semicolon, forcing users to place the semicolon after the expansion. The approach here is preferred as opposed to removing semicolons that appear after each invocation because complete statements that do not have a visible semicolon or braces confuse users and code formatters, since the macro invocation looks superficially like an expression.
PiperOrigin-RevId: 311327491
|
|\
| |
| |
| | |
PiperOrigin-RevId: 308711492
|
|\ \
| |/
| |
| | |
PiperOrigin-RevId: 308650221
|