summaryrefslogtreecommitdiffstats
path: root/googletest/include
Commit message (Collapse)AuthorAgeFilesLines
* Remove the GTEST_HAS_DOWNCAST_ customization point.Derek Mauro2023-08-021-14/+4
| | | | | PiperOrigin-RevId: 553150809 Change-Id: I10d19a45a85c5f63a5e65dc322413307116e1c25
* Make testing::Message support streamed AbslStringify valuesPhoebe Liang2023-08-011-2/+34
| | | | | | | This allows types that provide an AbslStringify definition to be streamed into GoogleTest macros. PiperOrigin-RevId: 552914482 Change-Id: I5fb386980d4d24873f95f0a8ef83067a6a3c86ac
* Make `AbslStringify` usage public in GoogleTestAbseil Team2023-07-211-0/+22
| | | | | | | Fixes #4314 PiperOrigin-RevId: 549986457 Change-Id: Iff74f02ab1c106696f288540e9c623d56b76e3f7
* Remove unused cast implementationDerek Mauro2023-07-191-41/+0
| | | | | PiperOrigin-RevId: 549456180 Change-Id: I10862e6de981087a5c590cccf6152255e9a176a0
* Merge pull request #4313 from kimvaleen:mainCopybara-Service2023-07-182-15/+16
|\ | | | | | | | | PiperOrigin-RevId: 549039222 Change-Id: I96bea310beede5ba0ed6160155251ffd9d7a2103
| * Fixed variables that could be declared 'const'refs/pull/4313/headkimvaleen2023-07-112-2/+2
| |
* | Merge pull request #4302 from ciband:feat/nrf52Copybara-Service2023-07-182-1/+3
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 549006105 Change-Id: Ifbe2bf57e10df4c71e51dbfaf1687f4f621f5106
| * | add support for nrf52refs/pull/4302/headChris Johnson2023-06-272-1/+3
| | | | | | | | | | | | Added support for Nordic nRF52 series of MCUs
* | | Merge pull request #4308 from smr99:fix-float-castCopybara-Service2023-07-111-2/+2
|\ \ \ | |_|/ |/| | | | | | | | PiperOrigin-RevId: 547250378 Change-Id: I084c30e45f331cb296535822923da1cb7e848e11
| * | Use template type FloatType in the cast.refs/pull/4308/headSteve Robbins2023-07-041-2/+2
| | |
* | | Update docstring of PrintWithFallback(..) to reflect the recently changed ↵Abseil Team2023-07-071-1/+1
|/ / | | | | | | | | | | | | ordering. PiperOrigin-RevId: 546373360 Change-Id: I2538b45d8c7710592071cc352da6771480c324e6
* | Fix C++20 compatibility bug.Mike Kruskal2023-07-012-4/+4
| | | | | | | | | | | | | | | | | | This was shown to work for C++14, C++17, and C++20 after patched into googletest for the protobuf repo's CI. Closes #3659 PiperOrigin-RevId: 544795507 Change-Id: I3e0a94f675e78a6ee9aeccae86c23d940efed8eb
* | Resolve an issue where the resolution of `operator<<` overloads would ↵Abseil Team2023-06-271-2/+4
|/ | | | | | | attempt to instantiate the incomplete `testing::internal::Secret` type. PiperOrigin-RevId: 543799815 Change-Id: Ic0a4f48d825bef26cb8cc74d8a0117b3a5ef3f14
* Merge branch 'google:main' into feat/qn9090refs/pull/4301/headChris Johnson2023-06-221-1/+4
|\
| * Allow clients to un-suppress output from gUnit EXPECT_EXIT tests.Abseil Team2023-06-151-1/+4
| | | | | | | | | | | | | | | | This is useful for running individual tests in a separate process, which is useful for testing e.g. flag changes which have a process-global effect. PiperOrigin-RevId: 540580573 Change-Id: I18a5d24d79425a9d595be3369efc44e2f655f6f8
* | add support for nxp qn9090 mcuChris Johnson2023-06-222-1/+4
|/ | | | | Added additional defines to correctly detect the NXP QN9090 MCU platform and allow for native googletest compability.
* Merge pull request #4146 from lygstate:fixes_std_pair_diffCopybara-Service2023-05-021-0/+30
|\ | | | | | | | | PiperOrigin-RevId: 528781910 Change-Id: I4038332a6255921792bfb4a8098aa84243d48e15
| * Merge branch 'main' into fixes_std_pair_diffrefs/pull/4146/headAndy Soffer2023-05-0111-229/+269
| |\ | |/ |/|
* | Use GTEST_INTERNAL_CPLUSPLUS_LANG instead of __cplusplusDino Radakovic2023-04-281-8/+9
| | | | | | | | | | | | | | | | Some versions of MSVC provide incorrect values for the latter and rely on _MSVC_LANG instead. Fixes #4226. PiperOrigin-RevId: 527919195 Change-Id: Ifcca4612074f5ebc5337094426866a187f79f90a
* | Use '=default' to define trivial constructor/destructorsrefs/pull/4221/headTom Hughes2023-04-217-32/+32
| | | | | | | | | | | | | | https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html PiperOrigin-RevId: 526079054 Change-Id: Ia4db21e3e5f58b90de05d52fd94b291ed06d785d
* | Use std::make_uniqueTom Hughes2023-04-201-1/+1
| | | | | | | | | | PiperOrigin-RevId: 525828947 Change-Id: I66f47c835bc93ba171eba0da8df09eff89c6c77b
* | Merge pull request #3993 from pgroke-dt:work-around-GCC-11-ADL-bugCopybara-Service2023-04-121-6/+7
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 523706897 Change-Id: If6dcc97c81a20f8fe675241518ae1d6cf23ebf39
| * | work around GCC 6~11 ADL bugrefs/pull/3993/headPaul Groke2022-09-151-6/+7
| | | | | | | | | | | | | | | | | | | | | see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51577 ADL seems to work properly when we do the SFINAE check via the return type, but not when using a dummy template parameter fix #3992
* | | Support --gtest_stream_result_to on macOSAbseil Team2023-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This seems to just have been an oversight. POSIX socket APIs work just fine on macOS. Fixes https://github.com/google/googletest/issues/4214. PiperOrigin-RevId: 523398386 Change-Id: I9d56cd9c6933318c1f0b0024f7fef44122fd0c83
* | | Merge pull request #4103 from gonzalobg:bugfix/nvcxx_supportCopybara-Service2023-03-281-1/+1
|\ \ \ | | | | | | | | | | | | | | | | PiperOrigin-RevId: 520017251 Change-Id: Ib2be28787b739344c80a5d937f875737ba44a0ec
| * | | Add doc commentrefs/pull/4103/headgonzalobg2023-03-231-1/+1
| | | |
| * | | Fix warnings with nvc++ as the compilerGonzalo Brito Gadeschi2022-12-281-1/+1
| | | | | | | | | | | | | | | | Closes #3849.
* | | | Internal Code ChangeAbseil Team2023-03-242-5/+5
| | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 519071084 Change-Id: I6459d60606e93bf658e505544538367508722857
* | | | Merge pull request #4182 from venik:venik-char8-lib-fixCopybara-Service2023-03-171-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 517470997 Change-Id: I12b079dc1536f136dd0514871fe79f9678b1fd6a
| * | | | __cpp_char8_t does not cover std::u8string implementation, but ↵refs/pull/4182/headAlexander Nikforov2023-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | __cpp_lib_char8_t does
* | | | | Merge pull request #4180 from sergio-nsk:patch-3Copybara-Service2023-03-161-2/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 517200256 Change-Id: I2ad5d4644f9e2095909ef646a7207c42a38082cf
| * | | | | Environment variables are accessible in UWP/WinRT appsrefs/pull/4180/headSergey2023-03-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Environment variables, for example `GTEST_FILTER`, `GTEST_OUTPUT` can be set before getting WinRT app run. GoogleTest can read environment variables and use them. It's easier than setting and passing command line parameters to WinRT app.
* | | | | | [gtest] Drop custom-rolled heterogeneous comparator functors in favor of C++ ↵Lawrence Wolf-Sonkin2023-03-101-49/+16
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | standard ones * Standard heterogeneous comparator functors such as `std::equal_to<>` and `std::less<>` [have been available since C++14](https://en.cppreference.com/w/cpp/utility/functional/less_void) * Now that [C++14 is the minimum supported version of C++ in Googletest](https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md), let's delete these duplications of the standard library PiperOrigin-RevId: 515743068 Change-Id: I1563a2f94039c3a6688429298555545a922f6d7e
* | | | | Suppress std::string DLL interface warning introduced in commit ↵Abseil Team2023-03-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f063cd25c90cbd4089a0ff96f5991df4f2721338 Fixes #4171 PiperOrigin-RevId: 514777144 Change-Id: I6f4b309c407684522fc1bc94dcc980ea1fe09cd9
* | | | | Fix compilation with -Wundef.Tom Hughes2023-03-062-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #3267 PiperOrigin-RevId: 513946600 Change-Id: I0dd1daa04aeb735a238c4c0af6676565d64cbc21
* | | | | Always specify definitions for internal macrosTom Hughes2023-03-061-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These macros should only be used within googletest, so changing them will not affect external users. This allows compiling with -Wundef (#3267). PiperOrigin-RevId: 513946162 Change-Id: I2f2b7df9123adeba4147593b2b55fde349ccce4f
* | | | | Replace "#if GTEST_HAS_ABSL" with "#ifdef GTEST_HAS_ABSL"Tom Hughes2023-03-062-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows compilation with "-Wundef" (#3267). PiperOrigin-RevId: 513945230 Change-Id: I45ef19c7ff3d20e97216bd031d406a03365471da
* | | | | Use "#ifdef" with public macrosTom Hughes2023-03-064-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows compilation with "-Wundef" (#3267). PiperOrigin-RevId: 513944726 Change-Id: I1a3854bb2333d5dec6c0ff91ee1eddd9a766ab91
* | | | | Only define GTEST_IS_THREADSAFE to 1, not 0Tom Hughes2023-03-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the comments, "Feature-indicating macros", such as GTEST_IS_THREADSAFE should be defined to 1 when supported and otherwise undefined (never 0). PiperOrigin-RevId: 513944266 Change-Id: I0f5c8bed107a5f20e957ec7c70339540ca2fe831
* | | | | Always specify definitions for internal macrosTom Hughes2023-03-061-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These macros should only be used within googletest, so changing them will not affect external users. This allows compiling with -Wundef (#3267). PiperOrigin-RevId: 513943800 Change-Id: I697b1005c29b0d5af06f583f202d86db48b567b9
* | | | | Use "#ifdef GTEST_OS_..." instead of "#if GTEST_OS_..."Tom Hughes2023-03-065-68/+99
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | This is compatible with compiling with "-Wundef" (#3267). PiperOrigin-RevId: 513943378 Change-Id: I47cf5fabbb77be061c4483a0adc54511af6b191c
* | | | Reorder printers list.Phoebe Liang2023-02-271-2/+3
| | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 512708763 Change-Id: I1f24f2e1d17359aee5aa4cdf614c9357872ca03b
* | | | Add `const` qualifier to `gtest_sentinel` which doesn't change.Abseil Team2023-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 512094429 Change-Id: I29b116da65bc7471c43021d1650d90f7b2a685c2
* | | | Avoid redundant declaration of static constexpr members in c++17Dino Radakovic2023-02-222-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep declarations in c++ < 17 using new macro, GTEST_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL. Fixes #4148. PiperOrigin-RevId: 511510401 Change-Id: I76c3f2fccf07a0978adcbe5f8f0203b9d0c33872
* | | | Remove int64_t cast in RecordPropertyTom Hughes2023-02-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically, calls to RecordProperty with values that are convertible to int64_t have been casted to int64_t. The result was that types like float or double would be truncated when printed (e.g., 4.75 -> 4). This change removes the cast so that the types are printed in a more appropriate manner. PiperOrigin-RevId: 511238685 Change-Id: I80de5db14462da2a3e1f476086025ae514383a17
* | | | Remove strdup usageAbseil Team2023-02-151-14/+3
| | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 509947007 Change-Id: I31e1274afa889776829c877c40c9af589298dcf2
* | | | Avoid reliance on <any> header without RTTI on MSVCAbseil Team2023-02-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: #4144 PiperOrigin-RevId: 509322023 Change-Id: I52bdf6c25ff433327e174d3f9583b3d50b872d58
| | | * Fixes the test gmock_output_test.py with MSVCYonggang Luo2023-02-281-0/+30
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For MSVC, gmock_output_test.py output struct std::pair<int,bool>, for GCC, it's output std::pair<int, bool>, it's not the same, my intention is getting these to be same by removing struct for MSVC's outptu, and strip redundant space for GCC. As a by-product, ``` #ifdef _MSC_VER #define ERROR_DESC "class std::runtime_error" #else #define ERROR_DESC "std::runtime_error" #endif ``` can be simplified to ``` #define ERROR_DESC "std::runtime_error" ``` Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
* | | Fix -Wsign-conversion warningsTom Hughes2023-02-021-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | googletest/test/gtest_xml_outfile2_test_.cc:48:39: warning: implicit conversion turns floating-point number into integer: 'float' to 'int64_t' (aka 'long') [-Wfloat-conversion] RecordProperty("TestFloatProperty", float_prop); ~~~~~~~~~~~~~~ ^~~~~~~~~~ googletest/test/gtest_xml_outfile2_test_.cc:51:40: warning: implicit conversion turns floating-point number into integer: 'double' to 'int64_t' (aka 'long') [-Wfloat-conversion] RecordProperty("TestDoubleProperty", double_prop); ~~~~~~~~~~~~~~ ^~~~~~~~~~~ googletest/test/gtest_xml_outfile2_test_.cc:57:39: warning: implicit conversion changes signedness: 'size_t' (aka 'unsigned long') to 'int64_t' (aka 'long') [-Wsign-conversion] RecordProperty("TestSizetProperty", size_t_prop); ~~~~~~~~~~~~~~ ^~~~~~~~~~~ PiperOrigin-RevId: 506644143 Change-Id: I9c2cd5f52daebe25e73bb97f696687797ed2cabf
* | | Use GTEST_DISABLE_MSC_WARNINGS macros to disable warningsTom Hughes2023-01-302-15/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this change we had a mixture of pragmas and GTEST_DISABLE_MSC_WARNINGS; this change consolidates all instances to use the macros. PiperOrigin-RevId: 505786926 Change-Id: I2be8f6304387393995081af42ed32c2ad1bba5a7