summaryrefslogtreecommitdiffstats
path: root/googletest/include
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Fix detection of the no_sanitize("hwaddress") attributeDerek Mauro2022-10-171-1/+12
| |/ / | | | | | | | | | | | | PiperOrigin-RevId: 481765573 Change-Id: I1ba829c3cbf364a51d3ba383ee3b474c0e109578
| * | Use attribute testing to simplify portable attribute macrosDerek Mauro2022-10-141-48/+37
| | | | | | | | | | | | | | | | | | | | | Fixes #4025 PiperOrigin-RevId: 481186097 Change-Id: Id7d09e4626e5ccf564e8cfaa65581c1cd827918d
| * | Terse printing of std::reference_wrapper hides pointerAbseil Team2022-10-141-0/+7
| | | | | | | | | | | | | | | | | | | | | This matches the intention and documentation of terse printing which generally avoids printing the pointer. PiperOrigin-RevId: 481178950 Change-Id: I27039dac1870934d2d5b212e2cc7e97ab82c5b34
| * | Merge pull request #3967 from BMBurstein:custom_type_combineCopybara-Service2022-10-043-1/+113
| |\ \ | | | | | | | | | | | | | | | | PiperOrigin-RevId: 478775323 Change-Id: I92231bb8edd8e01b9b7cbe445c43dcf84f458521
| | * \ Merge branch 'google:main' into custom_type_combineBaruch2022-09-282-11/+23
| | |\ \
| | * \ \ Merge branch 'google:main' into custom_type_combineBaruch2022-08-251-1/+1
| | |\ \ \ | | | | |/ | | | |/|
| | * | | Custom type with Combine(). Fix for #3781Baruch Burstein2022-07-313-1/+112
| | | | |
| * | | | Uses a simpler mechanism to disable the copying of GoogleTest test suites, ↵Abseil Team2022-09-302-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to move code out of the TEST_P macro. PiperOrigin-RevId: 478031678 Change-Id: I45f0ce17a4add526c86b8212d836d98d63b3a193
| * | | | Rollback: Moves boilerplate disabling copy constructor/assignment from ↵Abseil Team2022-09-282-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GoogleTest's TEST_P macro into a header file to avoid triggering warnings in user code. PiperOrigin-RevId: 477566426 Change-Id: Ia417e295d839f43be6e61a5699457866108f2a01
| * | | | Rollback: Uses a simpler mechanism to disable the copying of GoogleTest test ↵Abseil Team2022-09-282-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | suites. PiperOrigin-RevId: 477560280 Change-Id: I1c1f5a1d6645859ec38cb1a75cd267816d2aff35
| * | | | Uses a simpler mechanism to disable the copying of GoogleTest test suites.Abseil Team2022-09-282-13/+6
| | | | | | | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 477549427 Change-Id: I6421ca09f0f1296cebdc3e54565049f1542dfa8a
| * | | | Moves boilerplate disabling copy constructor/assignment from GoogleTest's ↵Abseil Team2022-09-282-6/+16
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TEST_P macro into a header file to avoid triggering warnings in user code. Fixes #4015 PiperOrigin-RevId: 477513399 Change-Id: Ia21928ee12e85946b4c8db86835d225cb257eecc
| * | | Merge pull request #4016 from Maratyszcza:qurtCopybara-Service2022-09-272-11/+23
| |\ \ \ | | |_|/ | |/| | | | | | | | | | PiperOrigin-RevId: 477265396 Change-Id: I781dae4ef2c5b6c771d960f1ec5a3c5cff0e97ad
| | * | Port GoogleTest to QuRT (Hexagon RTOS)refs/pull/4016/headMarat Dukhan2022-09-262-8/+19
| |/ /
* | | extend GTEST_HAS_PTHREAD default to enable threading on Solaris, AIX and z/OSPaul Groke2022-08-311-1/+2
|/ / | | | | | | fix #3990
* | Explicitly instantiate matchee std::string in MatchesRegexDino Radakovic2022-08-041-1/+1
|/ | | | | | | | | If this ever turns out to be a performance issue, we could use std::conditional and std::is_same to avoid copying std::strings. Fixes #3949 PiperOrigin-RevId: 465353572 Change-Id: If2d691bccb626c692c87e006df5afe88a4ed1542
* Continuation for #3183refs/pull/3953/headYuriy Chernyshov2022-07-211-2/+2
| | | | Some of the #ifdefs were missed in original PR. Should be fixed now.
* Merge pull request #3946 from anpol:export-tlvhbaseCopybara-Service2022-07-181-1/+1
|\ | | | | | | | | PiperOrigin-RevId: 461701938 Change-Id: I92601aeef9f0bb18a6d1c8b08e497d93dde4012a
| * export ThreadLocalValueHolderBase which is required by exported APIs.refs/pull/3946/headAndrei Polushin2022-07-141-1/+1
| | | | | | | | fixes #3944
* | Merge pull request #3927 from yutotnh:fix-typoCopybara-Service2022-07-181-1/+1
|\ \ | |/ |/| | | | | PiperOrigin-RevId: 461699509 Change-Id: I9bab4474c5f52d4d66691dfb96a4d20f89fbcfeb
| * fix: some typos in commentyutotnh2022-07-011-1/+1
| |
* | Merge pull request #3928 from venik:venik-clean-upCopybara-Service2022-07-121-2/+1
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 460455562 Change-Id: I29efc09887651d8734586703fe0691482ba4c981
| * | cleanup from unique_ptr branchrefs/pull/3928/headAlexander Nikforov2022-07-011-2/+1
| |/
* | Enable heterogeneous lookup for RegisteredTestsMap.Chris Kennelly2022-07-071-1/+2
|/ | | | | PiperOrigin-RevId: 459529190 Change-Id: I6b29693000023b3562990742f27a98cc279b6452
* Disable warning C4251 around refactored codeDerek Mauro2022-06-162-0/+9
| | | | | PiperOrigin-RevId: 455452553 Change-Id: I1dc3772ae61daf6d2d39484a0b1aad7eb0134525
* Merge pull request #3866 from eidosmontreal:simplify_shouldusecolorCopybara-Service2022-06-131-1/+2
|\ | | | | | | | | PiperOrigin-RevId: 454616721 Change-Id: I33b5671646ec027da48cc941baf84b4ddc722e07
| * Simplify ColoredPrintf to rely on ShouldUseColorGaspard Petit2022-05-301-1/+2
| | | | | | | | Use ShouldUseColor to set use_color instead of having a separate check for the windows mobile cases; these cases are now moved directly to `DoIsATTY`
* | Remove undefined internal function.Abseil Team2022-06-091-8/+0
|/ | | | | | | Fixes #3856 PiperOrigin-RevId: 453992227 Change-Id: I5f3330a454bdcd6b0522ebba4cdfe2c888f8e638
* Add clarifying comments about when to use EXPECT_NONFATAL_FAILURE vs. ↵Abseil Team2022-05-121-4/+6
| | | | | | | EXPECT_FATAL_FAILURE. PiperOrigin-RevId: 448237839 Change-Id: Id6242f278912f8c47cf19e3ea8c061f8b18ba832
* Fixup some missing overrides in googletest.Abseil Team2022-05-101-2/+2
| | | | | | | | | This CL adds a couple missing overrides in the googletest sources. These were found downstream when -Wsuggest-override and -Wsuggest-destructor-override were enabled. PiperOrigin-RevId: 447754883 Change-Id: I7bf35a8757cbc5ae157827037aa3d13f47392406
* Use RE2 for the regex implementation when building with Bazel and using AbseilDerek Mauro2022-04-261-28/+42
| | | | | | | | | | | | | | | | | | | bazel build --define=absl=1 ... A dependency on RE2 is now required when building GoogleTest with Abseil. Using RE2 will provide a consistent cross-platform regex experience. Users will need to add the com_googlesource_code_re2, bazel_skylib, and platforms repository to their WORKSPACE files. See our WORKSPACE file in the root directory of this project for an example of how to add the dependencies. Please note that the com_googlesource_code_re2 dependency must use a commit from the `abseil` branch of the project: https://github.com/google/re2/tree/abseil PiperOrigin-RevId: 444650118 Change-Id: I45c55b26684c0c50d721a05b81c5f8a0c092400f
* Merge pull request #3797 from glandium:issue3514Copybara-Service2022-04-261-3/+4
|\ | | | | | | | | PiperOrigin-RevId: 444444700 Change-Id: I8ac5cc96cc6eb9d583fa7e3fb304ef3dcaa95b5b
| * Always initialize fields in MatcherBase constructorsrefs/pull/3797/headMike Hommey2022-04-201-3/+4
| | | | | | | | | | | | This fixes -Wuninitialized warnings with GCC. Fixes #3514.
* | Remove the legacy internal GTEST_DISALLOW_* macrosDerek Mauro2022-04-229-95/+146
| | | | | | | | | | PiperOrigin-RevId: 443715444 Change-Id: I3ffd54b63d2728ae4a668ee7875c8c3c8188087c
* | Eliminate the legacy GTEST_COMPILE_ASSERT_ macroDerek Mauro2022-04-211-11/+0
|/ | | | | PiperOrigin-RevId: 443462203 Change-Id: I0c43f981663a7531ff5da4d4be01fb3d6762273d
* Use the Abseil flags library when Abseil is presentDerek Mauro2022-04-042-41/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | When built with `--define=absl=1` under Bazel, GoogleTest flags use ABSL_FLAG instead of GoogleTest's own implementation. There are some minor behavior differences in this mode. The most notable difference is that unrecognized flags result in a flag parsing error, and are not returned to the user though a modified argc/argv, unless they appear after the positional argument delimiter ("--"). For example, to pass a non-Abseil flag, you would have to do ./mytest --gtest_color=false -- --myflag=myvalue The documentation at https://abseil.io/docs/cpp/guides/flags may be helpful in understanding the behavior. There are some other minor differences. For example, passing --help results in the program returning 1 instead of 0. https://github.com/google/googletest/issues/3646 PiperOrigin-RevId: 439312700 Change-Id: Id696a25f50f24a5b1785c45ca8fa59794f86fd5c
* Running clang-format over all of GoogleTestAbseil Team2022-03-1519-1057/+957
| | | | | | | | | | | | | | | | 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
* Remove references to deleted script gen_gtest_pred_impl.pyDino Radakovic2022-03-141-3/+0
| | | | | PiperOrigin-RevId: 434464892 Change-Id: Iaa2277f26d0049b3d792e87f64679774a28205c6
* GetCurrentOsStackTraceExceptTop (both the method of UnitTestImpl and the ↵Abseil Team2022-02-011-0/+14
| | | | | | | | | wrapper function in gtest.cc) rely on the fact that the inner call is not getting optimized. This CL annotates them with the appropriate attributes. PiperOrigin-RevId: 425663217 Change-Id: Ib9ec2a69a7dd98d37640b56d4d7798572da66669
* Factor out AssertionResult into dedicated gtest-assertion-result header + ↵Abseil Team2022-01-193-188/+237
| | | | | | | implementation files to prevent cyclic includes between gtest.h and gtest_pred_impl.h PiperOrigin-RevId: 422863083 Change-Id: I299018a860152216adc206780c32923c03bedb2a
* Consistently apply IWYU pragmas across googletest and googlemock headersAbseil Team2022-01-1819-18/+73
| | | | | PiperOrigin-RevId: 422559250 Change-Id: I9f630f2186724950e5e9fbd7093d5264e8bf0a71
* Merge pull request #3725 from bsilver8192:remove-another-disallow-assignCopybara-Service2022-01-111-15/+0
| | | | | PiperOrigin-RevId: 421044680 Change-Id: If585089811f1b67eab6f339125c27174ee5bc290
* Add NOLINT to address modernize-use-trailing-return-type in TEST_F usesAbseil Team2021-12-071-4/+8
| | | | | | | | | | | | | | | | | | Example command: ``` clang_tidy '--config={Checks: "modernize-use-trailing-return-type"}' googletest-death-test-test.cc ``` Example error: ``` warning: use a trailing return type for this function [modernize-use-trailing-return-type] TEST(NotADeathTest, Test) { ^ ``` PiperOrigin-RevId: 414836261 Change-Id: I5f758423667559abfbf313190543666bc4ce0e6e
* Googletest exportAbseil Team2021-11-091-0/+1
| | | | | | | | | | | | Add missing InitGoogleTest line in "Registering tests" example code Copying the original code gives the following error message """ IMPORTANT NOTICE - DO NOT IGNORE: This test program did NOT call testing::InitGoogleTest() before calling RUN_ALL_TESTS(). This is INVALID. Soon Google Test will start to enforce the valid usage. Please fix it ASAP, or IT WILL START TO FAIL. """ PiperOrigin-RevId: 408385714
* Googletest exportAbseil Team2021-11-091-0/+6
| | | | | | Add printer for std::type_info. PiperOrigin-RevId: 408375407
* Googletest exportAbseil Team2021-11-031-1/+1
| | | | | | | | Address unused variable warning in gtest.h Closes #3645 PiperOrigin-RevId: 407393922
* Merge pull request #3638 from limitedAtonement:3637-disabled-outputCJ Johnson2021-11-031-0/+4
|\ | | | | | | PiperOrigin-RevId: 407356792
| * Re #3637 Show Disabled Tests in testing outputrefs/pull/3638/headlmat2021-11-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Showing disabled tests is implemented by a new member function on the TestEventListener interface (which is responsible for printing testing output). The new function is called OnTestSkipped and it is invoked when a disabled test is encountered. The PrettyUnitTestResultPrinter has the canonical implementation of this new function. The BriefUnitTestResultPrinter and the EmptyTestEventListener get a nullary implementation. The JsonUnitTestResultPrinter and XmlUnitTestResultPrinter inherit that trivial implementation from the EmptyTestEventListener.
* | Googletest exportdmauro2021-11-031-9/+14
| | | | | | | | | | | | | | | | | | Guard #includes for threading related headers with GTEST_IS_THREADSAFE Some platforms that don't support threading give errors for including these headers PiperOrigin-RevId: 406133623
* | Googletest exportdmauro2021-11-031-15/+1
| | | | | | | | | | | | | | Remove GoogleTest's SleepMilliseconds function. It is only used in tests and a portable implementation is available. PiperOrigin-RevId: 405437102