summaryrefslogtreecommitdiffstats
path: root/googletest
Commit message (Collapse)AuthorAgeFilesLines
* extend GTEST_HAS_PTHREAD default to enable threading on Solaris, AIX and z/OSPaul Groke2022-08-311-1/+2
| | | | fix #3990
* Merge pull request #3916 from asmodai27:mainCopybara-Service2022-08-301-1/+1
|\ | | | | | | | | PiperOrigin-RevId: 471062949 Change-Id: I3f063c441b3d4275d931016c431519c14e68d51c
| * Avoid implicit conversion from int to charrefs/pull/3916/headJérôme Travert2022-06-261-1/+1
| |
* | Consider all TERM values ending in "-256color" to be color supporting. In ↵Abseil Team2022-08-261-6/+3
| | | | | | | | | | | | | | particular this handles TERM=hterm-256color correctly. PiperOrigin-RevId: 470232889 Change-Id: Iea594a3fde2b8b0a10e527956d70ba0bb3452e08
* | gtest_unittest: Call FAIL() in lambda, fix incorrect fatality expectationDino Radakovic2022-08-081-2/+2
| | | | | | | | | | | | | | | | | | | | FAIL() evaluates into a return statement: https://github.com/google/googletest/blob/5b909beeec178f338be997830b6c31a80cda7a93/googletest/include/gtest/internal/gtest-internal.h#L1347 Calling it from the body of the test case turns all subsequent expectations into no-ops. Fixes #3941 PiperOrigin-RevId: 466104977 Change-Id: Ic15f43acb734295a5c9690a2b5eec6f65e8c0814
* | 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
* | Merge pull request #3918 from assafpr:master2mainCopybara-Service2022-08-013-4/+4
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 464586117 Change-Id: Icda62f13b962f7408bb5698ae2b627391257d152
| * | Update gtest.ccassafpr2022-06-271-1/+1
| | | | | | | | | fix a broken link
| * | Update gtest-death-test.ccassafpr2022-06-271-1/+1
| | |
| * | documentation, change mater branch to mainassafpr2022-06-221-2/+2
| |/
* | Merge pull request #3951 from matdibu:mainCopybara-Service2022-08-011-1/+1
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 464546862 Change-Id: I6ee696f4f66a5f76015a36737b5cde5edc91a9bc
| * | gtest-death-test: add 'noreturn'refs/pull/3951/headMatei Dibu2022-07-201-1/+1
| | |
* | | 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 #3940 from anpol:pdb-static-libCopybara-Service2022-07-181-1/+2
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 461703446 Change-Id: I61773eafa6d6bf6294218a5117fdebf5dd8a7bb1
| * | cmake: make PDB output directory match that of a static library.refs/pull/3940/headAndrei Polushin2022-07-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PDB files should be created at the same location as their primary artifact, which is either static library or a DLL. On Windows, an artifact location is controlled by: * RUNTIME_OUTPUT_DIRECTORY is a directory of a DLL artifact. * ARCHIVE_OUTPUT_DIRECTORY is a directory of a LIB artifact. A PDB file location is controlled: * PDB_OUTPUT_DIRECTORY should match a directory of a DLL artifact. * COMPILE_PDB_OUTPUT_DIRECTORY should match a directory of a LIB artifact.
* | | 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 #3939 from anpol:python-find-strategyCopybara-Service2022-07-181-0/+6
|\ \ \ | | | | | | | | | | | | | | | | PiperOrigin-RevId: 461699564 Change-Id: Id7043073f106f57433a99fea0e8e4ab015bf896d
| * | | cmake: find python in order specified by PATH environment variable.refs/pull/3939/headAndrei Polushin2022-07-121-0/+6
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake policy CMP0094 controls a lookup strategy used to find a Python executable: * CMP0094=OLD selects a Python executable with a higher version. * CMP0094=NEW selects a Python executable found earlier in PATH. NEW behavior is critical in presence of a Python virtual environment established and activated, i.e. added to the PATH variable. In case GoogleTest is embedded into a larger project, the result of `find_package(Python)` affects the whole build, not only GoogleTest component itself.
* | | Merge pull request #3927 from yutotnh:fix-typoCopybara-Service2022-07-183-7/+7
|\ \ \ | |/ / |/| | | | | | | | PiperOrigin-RevId: 461699509 Change-Id: I9bab4474c5f52d4d66691dfb96a4d20f89fbcfeb
| * | fix: some typos in sourcerefs/pull/3927/headyutotnh2022-07-012-4/+4
| | |
| * | fix: some typos in commentyutotnh2022-07-012-3/+3
| | |
* | | Merge pull request #3928 from venik:venik-clean-upCopybara-Service2022-07-125-8/+7
|\ \ \ | | | | | | | | | | | | | | | | PiperOrigin-RevId: 460455562 Change-Id: I29efc09887651d8734586703fe0691482ba4c981
| * | | cleanup from unique_ptr branchrefs/pull/3928/headAlexander Nikforov2022-07-015-8/+7
| |/ /
* | | Merge pull request #3868 from eidosmontreal:fix_undefined_symbol_kMaxRangeCopybara-Service2022-07-111-0/+2
|\ \ \ | | | | | | | | | | | | | | | | PiperOrigin-RevId: 460222898 Change-Id: I652b8058aa98b56d849c5ab1399f75e531dcc959
| * | | Fix for undefined symbol: testing::internal::Random::kMaxRangerefs/pull/3868/headGaspard Petit2022-05-311-0/+2
| | | |
* | | | Merge pull request #3844 from akohlmey:intel-llvm-utf8-fixCopybara-Service2022-07-111-1/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 460222266 Change-Id: I2fbeac0b333ca16639f172ca1f23794ea9ddc2ad
| * | | | set -utf-8 flag only for real MSVC compilers. E.g. not Intel's icx.exerefs/pull/3844/headAxel Kohlmeyer2022-05-181-1/+3
| |/ / /
* | | | CMake: raise the default C++ standard to cxx_std_14Derek Mauro2022-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 459761499 Change-Id: Ifb4b8b9f2dc598f3f4afc66a9efc403e001e0262
* | | | Enable heterogeneous lookup for RegisteredTestsMap.Chris Kennelly2022-07-071-1/+2
| |/ / |/| | | | | | | | | | | PiperOrigin-RevId: 459529190 Change-Id: I6b29693000023b3562990742f27a98cc279b6452
* | | docs: update googletest README for release 1.12.0refs/pull/3912/headJulian Arkenau2022-06-251-2/+2
| |/ |/|
* | Disable warning C4251 around refactored codeDerek Mauro2022-06-162-0/+9
| | | | | | | | | | PiperOrigin-RevId: 455452553 Change-Id: I1dc3772ae61daf6d2d39484a0b1aad7eb0134525
* | Merge pull request #3863 from eidosmontreal:fix_unused-variable_warningCopybara-Service2022-06-141-9/+9
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 454940948 Change-Id: Ic87dadfe9c6fc8882b0f425aa2056f0cc7a90b55
| * | Move declaration of kStdOutFileNo and kStdErrFilenorefs/pull/3863/headGaspard Petit2022-06-111-11/+9
| | | | | | | | | | | | Move declaration of kStdOutFileNo and kStdErrFileno closer to where they are used to avoid having to guard for GTEST_HAS_STREAM_REDIRECTION twice
| * | Fix "unused variable" warningGaspard Petit2022-05-301-0/+2
| |/ | | | | | | Fix "unused variable" warning when GTEST_HAS_STREAM_REDIRECTION is set to false in gtest-port.cc
* | Merge pull request #3866 from eidosmontreal:simplify_shouldusecolorCopybara-Service2022-06-132-6/+2
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 454616721 Change-Id: I33b5671646ec027da48cc941baf84b4ddc722e07
| * | Simplify ColoredPrintf to rely on ShouldUseColorGaspard Petit2022-05-302-8/+3
| |/ | | | | | | 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
* Do a consistent way of searching for a temporary directory.Abseil Team2022-05-111-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | The way temporary directories were discovered from environment variables in different operating systems was inconsistent. On Windows, only the system-specific environment variable TEMP was considered, but not the bazel-common TEST_TMPDIR. On Unix, only TEST_TMPDIR was considered, but not the otherwise typical system specific TMPDIR. Now, always consider TEST_TMPDIR first, followed by the system-typical environment variable (TEMP on Windows, TMPDIR on Unix) before falling back to a default on that particular system. Also: the value for the temporary directory coming from the environment variable was only checked for a trailing directory separator on Windows (and appended if needed), not on the other platforms. Make this also consistent accross the systems: Now always apply the same logic to all of these (to accomodate tests that just concatenate TempDir() without directory separator). PiperOrigin-RevId: 447909830 Change-Id: I9ea17acdf5944eb2a965615fd9cf142878c33a58
* 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
* Merge pull request #3818 from joshiayush:typoCopybara-Service2022-05-061-3/+3
|\ | | | | | | | | PiperOrigin-RevId: 447003874 Change-Id: Ide8d879f6c939dbf4c10cc6d515c175d9b691e0c
| * Fix typo in the test name of `NormalizeTest`refs/pull/3818/headAyush Joshi2022-04-301-3/+3
| | | | | | | | Signed-off-by: Ayush Joshi <ayush854032@gmail.com>
* | Use TEST_TMPDIR on MacOS as well if available.Abseil Team2022-05-031-2/+2
|/ | | | | | | | | | | | | | | Currently MacOS falls back to generic /tmp, but for all intents and purposes it should behave like other Unixes using the TEST_TMPDIR environment variable if available (this environment variable is set in bazel, which sets up a unique temp directory for the test process). While at it, remove an incorrect #endif comment, that looks like a leftover from some older implementation. PiperOrigin-RevId: 446108391 Change-Id: I118eacf6e86a41d26cb81a130f7c54cccc0c5665
* Use RE2 for the regex implementation when building with Bazel and using AbseilDerek Mauro2022-04-262-35/+45
| | | | | | | | | | | | | | | | | | | 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-2215-113/+189
| | | | | | | | | | PiperOrigin-RevId: 443715444 Change-Id: I3ffd54b63d2728ae4a668ee7875c8c3c8188087c
* | Eliminate the legacy GTEST_COMPILE_ASSERT_ macroDerek Mauro2022-04-212-29/+16
|/ | | | | PiperOrigin-RevId: 443462203 Change-Id: I0c43f981663a7531ff5da4d4be01fb3d6762273d
* Use the Abseil flags library when Abseil is presentDerek Mauro2022-04-046-88/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | 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