summaryrefslogtreecommitdiffstats
path: root/googletest/include
Commit message (Collapse)AuthorAgeFilesLines
...
* | Googletest exportdmauro2021-11-031-60/+35
|/ | | | | | | | | | 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
* Googletest exportAbseil Team2021-10-131-0/+6
| | | | | | Add printer for __{u,}int128_t. PiperOrigin-RevId: 402417369
* Merge pull request #3581 from cclauss:codespelldinord2021-10-052-4/+4
|\ | | | | | | PiperOrigin-RevId: 400792845
| * Fix remaining typos discovered by codespellrefs/pull/3581/headChristian Clauss2021-09-242-4/+4
| |
* | Googletest exportAbseil Team2021-09-302-0/+10
|/ | | | | googletest: Add printer for {std,absl}::nullopt. PiperOrigin-RevId: 399928554
* Internal changeAbseil Team2021-07-291-6/+6
| | | | PiperOrigin-RevId: 387381497
* Googletest exportAbseil Team2021-07-2217-36/+0
| | | | | | Delete GOOGLETEST_CM.* tags from C++ code. PiperOrigin-RevId: 386268534
* Googletest exportAbseil Team2021-07-221-1/+1
| | | | | | Fix include guards in gen_pred_test.py PiperOrigin-RevId: 386052814
* Merge pull request #3472 from jwnimmer-tri:fix-dont-macrosCJ Johnson2021-07-221-3/+4
|\ | | | | | | PiperOrigin-RevId: 385627491
| * Fix location of GOOGLETEST_CM0011 markerrefs/pull/3472/headDerek Mauro2021-07-141-1/+1
| |
| * Use GTEST_DONT_DEFINE_TEST_F to guard TEST_FJeremy Nimmer2021-07-011-4/+5
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Googletest exportAbseil Team2021-07-075-26/+45
| | | | | | | | | | | | Introduce GTEST_FLAG_GET and GTEST_FLAG_SET macros. PiperOrigin-RevId: 382808313
* | Googletest exportAbseil Team2021-07-071-0/+6
|/ | | | | | | | | | | | | | | | | | | 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
* Fix EXPECT_DEATH() and ASSERT_DEATH() triggering -Wcovered-switch-defaultrefs/pull/3457/headAlex Karatarakis2021-06-231-2/+0
| | | | | | | | | | 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
* Merge pull request #3200 from ellert:port-to-GNU/HurdCJ Johnson2021-06-172-3/+8
|\ | | | | | | PiperOrigin-RevId: 379383941
| * Port to GNU/Hurdrefs/pull/3200/headMattias Ellert2020-12-302-3/+8
| |
* | Merge pull request #3183 from georgthegreat:patch-1CJ Johnson2021-06-171-1/+1
|\ \ | | | | | | | | | PiperOrigin-RevId: 378915968
| * | Use proper feature test macro to test if library supports char8_trefs/pull/3183/headYuriy Chernyshov2020-12-241-1/+1
| | | | | | | | | | | | | | | 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`
* | | Merge pull request #3421 from florin-crisan:bugfix/3420-dll-link-failureDerek Mauro2021-06-082-4/+4
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 377367006
| * | | #3420 Declare MarkAsIgnored as a DLL exportrefs/pull/3421/headFlorin Crișan2021-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) ```
| * | | #3420 Properly declare all overloads of testing::internal::PrintTo as DLL ↵Florin Crișan2021-06-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) ```
* | | | Googletest exportdmauro2021-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge pull request #3393 from JC3:patch-1Derek Mauro2021-06-081-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | PiperOrigin-RevId: 377289133
| * | | isalnum -> IsAlNum for correct handling of signed charsrefs/pull/3393/headJason C2021-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
* | | | Googletest exportdurandal2021-05-131-15/+19
|/ / / | | | | | | | | | | | | | | | Add a note documenting that death test macros accept arbitrary gmock matchers against child-process stderr, not just regexes. PiperOrigin-RevId: 372365998
* | | Googletest exportAbseil Team2021-04-291-17/+0
| | | | | | | | | | | | | | | | | | Revert https://github.com/google/googletest/commit/ac3c2a8d0496893787015014a5abd397b766cce2 -- it seems to break some gcc users (#3384) PiperOrigin-RevId: 370834917
* | | chore: fix spellingrefs/pull/3364/headJohn Bampton2021-04-153-3/+3
| | |
* | | Googletest exportAbseil Team2021-04-142-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Googletest exportAbseil Team2021-04-051-4/+23
| | | | | | | | | | | | | | | | | | Add macros to omit {EXPECT,ASSERT}_{TRUE,FALSE} PiperOrigin-RevId: 366455905
* | | Googletest exportAbseil Team2021-03-222-15/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Internal changeAbseil Team2021-03-161-4/+4
| | | | | | | | | | | | PiperOrigin-RevId: 362216935
* | | Merge pull request #3184 from N-Dekker:PrintTo-type_index-overloadDino Radaković2021-03-091-0/+17
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 361175466
| * | | overload PrintTo for std::type_info and std::type_indexrefs/pull/3184/headNiels Dekker2021-02-251-0/+23
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Googletest exportAbseil Team2021-02-1822-67/+66
| | | | | | | | | | | | | | | | | | Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard, attempt #2 PiperOrigin-RevId: 357056902
* | | Googletest exportAbseil Team2021-02-1122-66/+67
| | | | | | | | | | | | | | | | | | Revert include guard fix PiperOrigin-RevId: 356588893
* | | Internal changeAbseil Team2021-02-111-7/+6
| | | | | | | | | | | | PiperOrigin-RevId: 356572459
* | | Googletest exportAbseil Team2021-02-111-0/+4
| | | | | | | | | | | | | | | | | | | | | Fix #2987 Removing const before passing any types through UniversalPrinter. PiperOrigin-RevId: 356508875
* | | Googletest exportAbseil Team2021-02-1122-67/+66
| | | | | | | | | | | | | | | | | | Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard PiperOrigin-RevId: 355882793
* | | Googletest exportAbseil Team2021-02-051-4/+0
| | | | | | | | | | | | | | | | | | Delete Google-internal IWYU pragmas PiperOrigin-RevId: 355398547
* | | Googletest exportAbseil Team2021-02-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Googletest exportAbseil Team2021-02-051-0/+1
| | | | | | | | | | | | | | | | | | Document the fact that MatchAndExplain(T, MatchResultListener*) is supported. PiperOrigin-RevId: 354172275
* | | Googletest exportAbseil Team2021-02-053-16/+0
| | | | | | | | | | | | | | | | | | Remove uses of GTEST_HAS_TYPED_TEST_P and GTEST_HAS_TYPED_TEST. PiperOrigin-RevId: 353935996
* | | Googletest exportAbseil Team2021-01-261-2/+0
| | | | | | | | | | | | | | | | | | Delete obsolete comment, gtest-param-test.h isn't generated by pump anymore PiperOrigin-RevId: 353680589
* | | Googletest exportAbseil Team2021-01-263-344/+0
| | | | | | | | | | | | | | | | | | Stop using pump for generating internal/custom/gmock-generated-actions.h PiperOrigin-RevId: 352660735
* | | Merge pull request #3204 from kuzkry:CmpHelperXX-overloads-removalCJ Johnson2021-01-261-16/+1
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 352626267
| * | | remove explicit function overloads of CmpHelper?? for BiggestInt argumentsrefs/pull/3204/headKrystian Kuzniarek2021-01-031-16/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | | Googletest exportkrzysio2021-01-261-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
* | | Googletest exportAbseil Team2021-01-263-0/+344
| |/ |/| | | | | | | | | Merge CONTRIBUTORS, delete LICENSEs in googletest/ and googlemock/ PiperOrigin-RevId: 352558822
* | Googletest exportdmauro2021-01-141-1/+1
| | | | | | | | | | | | Fix build under GCC 5 PiperOrigin-RevId: 351607537
* | Googletest exportAbseil Team2021-01-141-0/+39
| | | | | | | | | | | | | | | | Print unique_ptr/shared_ptr recursively. Given that they are smart pointers, it is unlikely that the inner object is invalid. PiperOrigin-RevId: 351586888