| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/
|
|
|
|
|
|
|
|
| |
Replace the multiple implementations of Notification with a single
portable implementation.
The also removes the awkward loop with sleep in Notification and will
allow the removal of SleepMilliseconds.
PiperOrigin-RevId: 405399733
|
|
|
|
|
|
| |
Add printer for __{u,}int128_t.
PiperOrigin-RevId: 402417369
|
|\
| |
| |
| | |
PiperOrigin-RevId: 400792845
|
| | |
|
|/
|
|
|
| |
googletest: Add printer for {std,absl}::nullopt.
PiperOrigin-RevId: 399928554
|
|
|
|
| |
PiperOrigin-RevId: 387381497
|
|
|
|
|
|
| |
Delete GOOGLETEST_CM.* tags from C++ code.
PiperOrigin-RevId: 386268534
|
|
|
|
|
|
| |
Fix include guards in gen_pred_test.py
PiperOrigin-RevId: 386052814
|
|\
| |
| |
| | |
PiperOrigin-RevId: 385627491
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The documentation is clear that the FOO we'll be guarding always matches
the spelling of the DONT macro. A single guard macro should not toggle
more than one implementation macro.
This fixes a regression in 7413280c52c1f759395572a384165023d24eeb57.
Relatedly, improve the documentation of the DONT macros to bring the
list of valid FOO values up to date.
|
| |
| |
| |
| |
| |
| | |
Introduce GTEST_FLAG_GET and GTEST_FLAG_SET macros.
PiperOrigin-RevId: 382808313
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gtest: Add a flag to only set up/tear down test environments once when repeating
Currently when running a test multiple times using `--gtest_repeat` the global
test environment(s) are set up and torn down for each iteration of the test.
When checking for flakes in tests that have expensive dependencies that are set
up in the test environment (subprocesses, external dependencies, etc) this can
become expensive.
To support finding flakes in tests that fit into this category, where the setup
phase is expensive but each test case is fast, allow callers to specify via
`--gtest_recreate_environments_when_repeating=false` that the test environments
should only be set up once, for the first iteration, and only torn down once, on
the last iteration. This makes running a test with `--gtest_repeat=1000` a much
faster and more pleasant experience.
PiperOrigin-RevId: 382748942
|
|
|
|
|
|
|
|
|
|
| |
EXPECT_DEATH() and ASSERT_DEATH() have a switch case where every
possible case is covered. This makes the default case unnecessary
and triggers -Wcovered-switch-default.
Due to these being macros, the lines are expanded in user code and
are thus subject to warnings of the target codebase.
Fixes #3456
|
|\
| |
| |
| | |
PiperOrigin-RevId: 379383941
|
| | |
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 378915968
|
| | |
| | |
| | |
| | |
| | | |
Reference is here: https://en.cppreference.com/w/cpp/feature_test
This PR fixes the weird case of compiling with `clang++ -std=c++17 -fchar8_t`
|
|\ \ \
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 377367006
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This was causing the following linker error on Microsoft Visual C++ when compiling as a DLL:
```
googletest-param-test-test.cc.obj : error LNK2019: unresolved external symbol "public: __cdecl testing::internal::MarkAsIgnored::MarkAsIgnored(char const *)" (??0MarkAsIgnored@internal@testing@@QEAA@PEBD@Z) referenced in function "void __cdecl works_here::`dynamic initializer for 'gtest_allow_ignore_NotInstantiatedTest''(void)" (??__Egtest_allow_ignore_NotInstantiatedTest@works_here@@YAXXZ)
```
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
exports
This was causing the following linker error on Microsoft Visual C++ when compiling as a DLL:
```
googletest-printers-test.cc.obj : error LNK2019: unresolved external symbol "void __cdecl testing::internal::PrintTo(char16_t const *,class std::basic_ostream<char,struct std::char_traits<char> > *)" (?PrintTo@internal@testing@@YAXPEB_SPEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) referenced in function "public: static void __cdecl testing::internal::UniversalPrinter<char16_t const *>::Print(char16_t const * const &,class std::basic_ostream<char,struct std::char_traits<char> > *)" (?Print@?$UniversalPrinter@PEB_S@internal@testing@@SAXAEBQEB_SPEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
googletest-printers-test.cc.obj : error LNK2019: unresolved external symbol "void __cdecl testing::internal::PrintTo(char32_t const *,class std::basic_ostream<char,struct std::char_traits<char> > *)" (?PrintTo@internal@testing@@YAXPEB_UPEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) referenced in function "public: static void __cdecl testing::internal::UniversalPrinter<char32_t const *>::Print(char32_t const * const &,class std::basic_ostream<char,struct std::char_traits<char> > *)" (?Print@?$UniversalPrinter@PEB_U@internal@testing@@SAXAEBQEB_UPEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
```
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix MSVC warning C4275: non dll-interface class
'testing::MatcherDescriberInterface' used as base for dll-interface
class 'testing::internal::MatcherBase<std::string>'
Fixes #3415
PiperOrigin-RevId: 377352684
|
|\ \ \ \
| |/ / /
|/| | |
| | | | |
PiperOrigin-RevId: 377289133
|
| | | |
| | | |
| | | |
| | | |
| | | | |
I spotted this in https://github.com/assimp/assimp/pull/3880/commits/7dd7a053a91322fad88cdf958c6d0b3b7b91cb90 and figured I'd fix it here, too.
If this is not the right thing to do, please lmk so I can undo it in assimp, too. Seems right, though. It's the only spot in gtest where a ctype call was made directly.
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
Add a note documenting that death test macros accept arbitrary gmock matchers against child-process stderr, not just regexes.
PiperOrigin-RevId: 372365998
|
| | |
| | |
| | |
| | |
| | |
| | | |
Revert https://github.com/google/googletest/commit/ac3c2a8d0496893787015014a5abd397b766cce2 -- it seems to break some gcc users (#3384)
PiperOrigin-RevId: 370834917
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add support to run gtest on Xtensa platform.
This add support to run GTest base test suits on Xtensa
(https://ip.cadence.com/ipportfolio/tensilica-ip) base simulator.
Xtensa only provides libc and some basic operations and does not run an
operating system by default.
PiperOrigin-RevId: 368162205
|
| | |
| | |
| | |
| | |
| | |
| | | |
Add macros to omit {EXPECT,ASSERT}_{TRUE,FALSE}
PiperOrigin-RevId: 366455905
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Print std::u8string, std::u16string, and std::u32string as string literals
Previously, these types were printed as "{ U+123, U+456, U+789 }". However,
printed output in that form is difficult to compare against any literals that
might be defined in code. Instead, just treat these types like std::string
and std::wstring, escaping non-ASCII characters with a hexadecimal escape
sequence.
The tests have also been updated to cover the new functionality: as a bonus,
the tests now also pass with the MSVC toolchain.
Internally, the code has been reorganized to primarily operate in terms of
char32_t, under the assumption that char32_t will always be at least as big
as wchar_t. While that assumption is currently true, perhaps it won't be in
the future...
PiperOrigin-RevId: 364033132
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 362216935
|
|\ \ \
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 361175466
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Included the string returned by their `name()` member function with the output of `PrintTo`.
Typical use case:
std::unique_ptr<AbstractProduct> product = FactoryMethod();
// Assert that the product is of type X:
ASSERT_EQ(std::type_index{typeid(*product)},
std::type_index{typeid(ProductX)});
Possible output in case of a test assert failure, now including the names of the compared type indices:
> error: Expected equality of these values:
> std::type_index(typeid(*product))
> Which is: 8-byte object <D0-65 54-8C F6-7F 00-00> ("class ProductY")
> std::type_index(typeid(ProductX))
> Which is: 8-byte object <40-64 54-8C F6-7F 00-00> ("class ProductX")
With help from Krystian Kuzniarek.
|
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | | |
PiperOrigin-RevId: 356572459
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix #2987
Removing const before passing any types through UniversalPrinter.
PiperOrigin-RevId: 356508875
|
| | |
| | |
| | |
| | |
| | |
| | | |
Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard
PiperOrigin-RevId: 355882793
|
| | |
| | |
| | |
| | |
| | |
| | | |
Delete Google-internal IWYU pragmas
PiperOrigin-RevId: 355398547
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Address `-Wpedantic` issue introduced in https://github.com/google/googletest/pull/3204
Raised via https://github.com/google/googletest/commit/4898cdacfec11e71fa3083cdbc935852ad8162e9#commitcomment-46413996
PiperOrigin-RevId: 354198931
|
| | |
| | |
| | |
| | |
| | |
| | | |
Document the fact that MatchAndExplain(T, MatchResultListener*) is supported.
PiperOrigin-RevId: 354172275
|
| | |
| | |
| | |
| | |
| | |
| | | |
Remove uses of GTEST_HAS_TYPED_TEST_P and GTEST_HAS_TYPED_TEST.
PiperOrigin-RevId: 353935996
|
| | |
| | |
| | |
| | |
| | |
| | | |
Delete obsolete comment, gtest-param-test.h isn't generated by pump anymore
PiperOrigin-RevId: 353680589
|
| | |
| | |
| | |
| | |
| | |
| | | |
Stop using pump for generating internal/custom/gmock-generated-actions.h
PiperOrigin-RevId: 352660735
|
|\ \ \
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 352626267
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Affects macros {ASSERT|EXPECT}_{EQ|NE|LE|LT|GE|GT}.
According to removed comments, these overloads were supposed to reduce
code bloat and allow anonymous enums on GCC 4.
However, the way it works on GCC 4 and the latest GCC (10.2 by now) is
that having:
template <typename T1, typename T2>
void foo(T1, T2);
using BiggestInt = long long;
void foo(BiggestInt, BiggestInt);
the template version takes precedence for almost every combination of
integral types except for two long long integers - i.e. implicit
promotion to long long is a worse match than generating a specific
template function.
Tested on GCC 4.8.1 (as GoogleTest requires C++11 and this was
the first C++11 feature-complete release of GCC),
GCC 4.8.5 (last of 4.8.x series) and the latest GCC (10.2.0).
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove obsolete argument limit documentation.
Combine uses variadic templates now, so there is no inherent limit on the number of arguments.
PiperOrigin-RevId: 352580160
|
| |/
|/|
| |
| |
| |
| | |
Merge CONTRIBUTORS, delete LICENSEs in googletest/ and googlemock/
PiperOrigin-RevId: 352558822
|
| |
| |
| |
| |
| |
| | |
Fix build under GCC 5
PiperOrigin-RevId: 351607537
|
| |
| |
| |
| |
| |
| |
| |
| | |
Print unique_ptr/shared_ptr recursively.
Given that they are smart pointers, it is unlikely that the inner object is
invalid.
PiperOrigin-RevId: 351586888
|