summaryrefslogtreecommitdiffstats
path: root/googletest/include
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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
* Fix formatting of C++ filesTom Hughes2023-01-245-22/+23
| | | | | PiperOrigin-RevId: 504325204 Change-Id: Iaa1d6d0ab1dccaaeef26f9cb109d530835499240
* Remove FloatingPoint::Max() in favor of std::numeric_limits::max()Derek Mauro2023-01-241-14/+0
| | | | | | | | | | | In #4113 a user says Max clashes with a macro. Since it is only used in a test, use std::numeric_limits::max() instead. Note that in headers, the macro issue can be mitigated with parenthesis like this: `(std::numeric_limits<T>::max)()` PiperOrigin-RevId: 504284906 Change-Id: Ibf430caec1a6afdf6b303534fec6a4fd00a6373f
* Fix -Wimplicit-int-float-conversion warningTom Hughes2023-01-171-2/+8
| | | | | | | | | | | | | | | | | | | We're intentionally losing precision in this case, so add a cast. googletest/googletest/include/gtest/gtest-printers.h:532:9: error: implicit conversion from 'int32_t' (aka 'int') to 'float' may lose precision [-Werror,-Wimplicit-int-float-conversion] if (static_cast<int32_t>(val * mulfor6 + 0.5) / mulfor6 == val) return 6; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ googletest/googletest/include/gtest/gtest-printers.h:544:9: error: implicit conversion from 'int32_t' (aka 'int') to 'float' may lose precision [-Werror,-Wimplicit-int-float-conversion] if (static_cast<int32_t>(val / divfor6 + 0.5) * divfor6 == val) return 6; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ PiperOrigin-RevId: 502646042 Change-Id: I05989ee42675b531a9907616c9582a5a7c77bed6
* Add an explicit #error that C++ versions less than C++14 are not supportedDerek Mauro2023-01-121-0/+13
| | | | | PiperOrigin-RevId: 501568410 Change-Id: I0f78cd96dc9204c8ec97a1cdd09a9d63a613cc5b
* IWYU: Add missing std includesTom Hughes2023-01-0512-0/+24
| | | | | PiperOrigin-RevId: 499893032 Change-Id: I33304802b7c82ae2d008f3ee89df38866e5f57ba
* Fix _MSC_VER checkTom Hughes2023-01-041-1/+1
| | | | | | | Use "#if defined(_MSC_VER)" instead of "#if _MSC_VER" to be consistent with other usages in the file and to work with the "-Wundef" warning. PiperOrigin-RevId: 499471290 Change-Id: I34a9442eecf266afd74d4332cab7d39766df4ed9
* Introduces a new porting flag (GTEST_HAS_FILE_SYSTEM) to indicate whether a ↵Abseil Team2022-12-122-36/+70
| | | | | | | platform supports filesystem operations. PiperOrigin-RevId: 494751986 Change-Id: I07f73bdf478a73934b8f1a69c1ab4abda1b231ae
* When printing floating-point numbers, print full precision by default.Abseil Team2022-11-161-0/+75
| | | | | | | | | | | To make debug output readable, we still use the faster 6-digit precision sometimes, but only if it will round-trip. This way, when a test fails due to a very small difference in floating-point numbers, users will have enough digits to see the difference. PiperOrigin-RevId: 488958311 Change-Id: Ibcac43f48a97006d89217530c69386cc4fa2735c
* Remove incorrect usage of GTEST_ATTRIBUTE_UNUSED_ on classes.Abseil Team2022-11-153-14/+6
| | | | | | Fixes: #4054 PiperOrigin-RevId: 488721587 Change-Id: I8742d8475376635c83edcf524796a6107042e89b
* Defined a testing::SrcDir() function that returns the name of a directoryAbseil Team2022-11-111-2/+9
| | | | | | | where ancillary data files can be found. PiperOrigin-RevId: 487896836 Change-Id: Ie6b1ba734e900fa33872b63090879ee6efe33411
* Merge pull request #4039 from zloylos:fix-return-fail-at-4038Copybara-Service2022-11-101-3/+3
|\ | | | | | | | | PiperOrigin-RevId: 487516335 Change-Id: Ib475750586fc7e6ab01729f65253e3a86916b994
| * Add return for GTEST_FAIL_ATrefs/pull/4039/headDenis Hananein2022-10-151-2/+2
| |
* | RecordProperty serializes ints and 64-bit ints, including size_tsAbseil Team2022-11-071-1/+2
| | | | | | | | | | PiperOrigin-RevId: 486685761 Change-Id: I164d2646e65670d341dbf437ee571953c456677a
* | Fix typo in documentation of ConvertGenerator()Abseil Team2022-11-051-1/+1
| | | | | | | | | | PiperOrigin-RevId: 486316328 Change-Id: I91d5d5ba1aaf4a4ab14019c8963e7fe181722f95
* | Adds Win32 UNC path support to FilePath::IsAbsolutePath() and ↵Abseil Team2022-10-181-0/+10
| | | | | | | | | | | | | | | | FilePath::IsRootDirectory() in GoogleTest Fixes: #3025 PiperOrigin-RevId: 481932601 Change-Id: I90fcb5b3d189aea79a0fd18735bad038b3511270
* | 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
|/ /