summaryrefslogtreecommitdiff
path: root/googletest/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4146 from lygstate:fixes_std_pair_diffCopybara-Service2023-05-021-5/+1
|\ | | | | | | | | PiperOrigin-RevId: 528781910 Change-Id: I4038332a6255921792bfb4a8098aa84243d48e15
| * Merge branch 'main' into fixes_std_pair_diffAndy Soffer2023-05-0127-238/+258
| |\ | |/ |/|
* | Merge pull request #4227 from Vertexwahn:fix-spellingCopybara-Service2023-05-012-2/+2
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 528474013 Change-Id: I60cd509aded8d8b02423ea1b07c2c27e3709a808
| * | Fix spellingVertexwahn2023-04-252-2/+2
| | |
* | | Use Abseil Flag public API for flag parsing.Abseil Team2023-04-262-11/+9
|/ / | | | | | | | | | | | | This change brings InitGoogleTest semantic in accordance with the official documentation: only GoogleTest flags are removed from argc/argv. The rest of the flags remains in place. We do nothing special for flags with unrecognized gunit_/gtest_ prefix and we do not report them. PiperOrigin-RevId: 527257221 Change-Id: Ibb29a1bda1a44251a4ee579c0fb5bbdfd9965c21
* | Use '=default' to define trivial constructor/destructorsTom Hughes2023-04-214-7/+7
| | | | | | | | | | | | | | https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html PiperOrigin-RevId: 526079054 Change-Id: Ia4db21e3e5f58b90de05d52fd94b291ed06d785d
* | Add missing std includesTom Hughes2023-04-207-0/+14
| | | | | | | | | | PiperOrigin-RevId: 525850646 Change-Id: I64387f5b933beb79cd05636dca81b7a75213383e
* | Fix spellingTom Hughes2023-04-201-4/+4
| | | | | | | | | | PiperOrigin-RevId: 525820426 Change-Id: Ib5baa8da4a54ebb17b6ace12240ed03eedb46091
* | Add missing std includesTom Hughes2023-04-207-59/+66
| | | | | | | | | | PiperOrigin-RevId: 525794940 Change-Id: Ib2639058610c91cbffbb0f22a5e71573e0cbd651
* | Support --gtest_stream_result_to on macOSAbseil Team2023-04-111-1/+2
| | | | | | | | | | | | | | | | | | | | 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
* | gtest.cc: add a newline after a failure when there is no OS stack trace.Aaron Jacobs2023-03-223-15/+19
| | | | | | | | | | | | | | | | This makes the behavior consistent when GTEST_STACK_TRACE_DEPTH is set to zero and not: there is always vertical whitespace separating failure messages. PiperOrigin-RevId: 518744611 Change-Id: I5b4af40633849850660504c3f497a76601d4311d
* | Fix typo in test case name.Abseil Team2023-03-191-1/+1
| | | | | | | | | | PiperOrigin-RevId: 517814929 Change-Id: I2bc498ba048d4deab1cf2a021487f63fe44c466d
* | Merge pull request #4182 from venik:venik-char8-lib-fixCopybara-Service2023-03-171-5/+5
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 517470997 Change-Id: I12b079dc1536f136dd0514871fe79f9678b1fd6a
| * | __cpp_char8_t does not cover std::u8string implementation, but ↵Alexander Nikforov2023-03-061-1/+3
| | | | | | | | | | | | __cpp_lib_char8_t does
* | | Apply clang-tidy fixesAbseil Team2023-03-092-4/+5
| | | | | | | | | | | | | | | PiperOrigin-RevId: 515265927 Change-Id: Iea11668fa4bbf08f6d418a3823e836fb5b874dcc
* | | Apply clang-tidy fixesAbseil Team2023-03-076-16/+3
| | | | | | | | | | | | | | | PiperOrigin-RevId: 514936218 Change-Id: I24c443a2ca75c875052b0cf2d0a48e808d03ae43
* | | Fix compilation of googletest-printers-test.cc when using -WundefTom Hughes2023-03-071-2/+4
| | | | | | | | | | | | | | | | | | | | | #3267 PiperOrigin-RevId: 514858420 Change-Id: Ic712aafad25f5e63ae48f647557de95cef890978
* | | Replace "#if GTEST_HAS_ABSL" with "#ifdef GTEST_HAS_ABSL"Tom Hughes2023-03-062-6/+6
| | | | | | | | | | | | | | | | | | | | | This allows compilation with "-Wundef" (#3267). PiperOrigin-RevId: 513945230 Change-Id: I45ef19c7ff3d20e97216bd031d406a03365471da
* | | Use "#ifdef" with public macrosTom Hughes2023-03-067-20/+20
| | | | | | | | | | | | | | | | | | | | | This allows compilation with "-Wundef" (#3267). PiperOrigin-RevId: 513944726 Change-Id: I1a3854bb2333d5dec6c0ff91ee1eddd9a766ab91
* | | Use "#ifdef GTEST_OS_..." instead of "#if GTEST_OS_..."Tom Hughes2023-03-068-69/+71
|/ / | | | | | | | | | | | | This is compatible with compiling with "-Wundef" (#3267). PiperOrigin-RevId: 513943378 Change-Id: I47cf5fabbb77be061c4483a0adc54511af6b191c
* | Remove int64_t cast in RecordPropertyTom Hughes2023-02-213-13/+11
| | | | | | | | | | | | | | | | | | | | 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-7/+9
| | | | | | | | | | PiperOrigin-RevId: 509947007 Change-Id: I31e1274afa889776829c877c40c9af589298dcf2
* | Remove some filesystem APIs and tests under !GTEST_HAS_FILE_SYSTEMAbseil Team2023-02-141-0/+4
| | | | | | | | | | PiperOrigin-RevId: 509537606 Change-Id: I68f7054e34b1fe76c1fd85099fffa4ee3c2b00c0
| * Fixes the test gmock_output_test.py with MSVCYonggang Luo2023-03-011-4/+0
|/ | | | | | | | | | | | | | | | | | | | | | 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 _MSC_VER checkTom Hughes2023-02-081-1/+1
| | | | | | | | Use "#if defined(_MSC_VER)" instead of "#if _MSC_VER" to be consistent with other usages in googletest and to work with the "-Wundef" warning. PiperOrigin-RevId: 508087630 Change-Id: I29c16fd2fa51a9dfecd55e10362a020318318956
* Remove GTEST_USES_PCRE referencesTom Hughes2023-02-071-21/+0
| | | | | | | | | | | | | Nothing defines GTEST_USES_PCRE anymore. It was only meant for internal use, so nothing public should be relying on it: https://github.com/google/googletest/issues/2735#issuecomment-644849438. Found when compiling with "-Wundef". Fixes #2735. PiperOrigin-RevId: 507823660 Change-Id: Ie19e576ff01dc3b16381338578ece92adccfc09b
* Fix -Wsign-conversion warningsTom Hughes2023-02-023-10/+43
| | | | | | | | | | | | | | | | | | | | | | 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
* Remove unneccessary "#if _MSC_VER"Tom Hughes2023-02-022-6/+2
| | | | | | | | | The GTEST_DISABLE_MSC_WARNINGS macros already have an _MSC_VER check. This change also adds a missing GTEST_DISABLE_MSC_WARNINGS_POP_ in gtest-typed-test_test.cc. PiperOrigin-RevId: 506636248 Change-Id: Ifdc044528f5448fbf0175887d1671f1e1f3040b9
* Add a trailing decimal point to FormatTimeInMillisAsSeconds() output when inputAbseil Team2023-02-022-4/+14
| | | | | | | is an exact N seconds. PiperOrigin-RevId: 506610898 Change-Id: Idcd705c719e0e721148c350c8a14f27b9eb5c4f7
* Test current behavior of doubles and floats in RecordPropertyTom Hughes2023-01-273-4/+21
| | | | | PiperOrigin-RevId: 505104193 Change-Id: I4c2758f22ee1321ed6b6662ab2668f6c5b6aa661
* Fix formatting in Python filesTom Hughes2023-01-265-84/+158
| | | | | PiperOrigin-RevId: 504890435 Change-Id: Ia9a89d0d7a07fe70c12f7f0202c8256c94d2f118
* Fix Python docstrings to match style guideTom Hughes2023-01-267-33/+88
| | | | | | | https://google.github.io/styleguide/pyguide.html#s3.8.3-functions-and-methods PiperOrigin-RevId: 504857416 Change-Id: I7815ce27e454a120b3974ae7e2bea952108b836c
* Use more specific assertLess instead of assertTrueTom Hughes2023-01-251-2/+1
| | | | | PiperOrigin-RevId: 504670738 Change-Id: Ib68b676403204098e89f536f9b8317f9f717c24d
* Fix pylint warningTom Hughes2023-01-251-15/+23
| | | | | | | | | Possible unbalanced tuple unpacking with sequence defined at line N: left side has 1 label(s), right side has 0 value(s) [unbalanced-tuple-unpacking] PiperOrigin-RevId: 504640001 Change-Id: If8d6038a9acf74a409cb6b6ee30cea7745b4b303
* Remove pylint disable comments that no longer trigger warningsTom Hughes2023-01-252-7/+3
| | | | | PiperOrigin-RevId: 504633130 Change-Id: I3fdbc83975fea97aa53f7325d323adead0a30e24
* Fix formatting in subset of Python filesTom Hughes2023-01-2522-1322/+1441
| | | | | | | | These files were formatted with automated tools. The remaining Python files require some manual fix ups, so they will be fixed separately. PiperOrigin-RevId: 504579820 Change-Id: I3923bd414bffe3ded6163ec496cd09ace3951928
* Replace numeric lints with their string equivalentTom Hughes2023-01-252-6/+6
| | | | | PiperOrigin-RevId: 504570278 Change-Id: Iab9c988b3a781eaafbdd97c924a74c2269125799
* Fix formatting of C++ filesTom Hughes2023-01-241-3/+3
| | | | | PiperOrigin-RevId: 504325204 Change-Id: Iaa1d6d0ab1dccaaeef26f9cb109d530835499240
* Replace deprecated python callsTom Hughes2023-01-1713-183/+269
| | | | | | | | assert_ -> assertTrue/assertFalse/assertIn/assertNotIn assertEquals -> assertEqual PiperOrigin-RevId: 502654909 Change-Id: I25d30095a83c3806606cb80d676b3c979495e6bd
* IWYU: Add missing std includesTom Hughes2023-01-057-0/+11
| | | | | PiperOrigin-RevId: 499893032 Change-Id: I33304802b7c82ae2d008f3ee89df38866e5f57ba
* When printing floating-point numbers, print full precision by default.Abseil Team2022-11-161-1/+9
| | | | | | | | | | | 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
* Merge pull request #4058 from zloylos:support-kitty-termCopybara-Service2022-11-142-0/+4
|\ | | | | | | | | PiperOrigin-RevId: 488463135 Change-Id: I4180d766dabbe438210904e743e6e963122540f5
| * Support kitty TERMDenis Hananein2022-11-102-0/+4
| | | | | | | | Signed-off-by: Denis Hananein <i@zloylos.me>
* | Defined a testing::SrcDir() function that returns the name of a directoryAbseil Team2022-11-111-0/+97
| | | | | | | | | | | | | | where ancillary data files can be found. PiperOrigin-RevId: 487896836 Change-Id: Ie6b1ba734e900fa33872b63090879ee6efe33411
* | RecordProperty serializes ints and 64-bit ints, including size_tsAbseil Team2022-11-071-1/+3
|/ | | | | PiperOrigin-RevId: 486685761 Change-Id: I164d2646e65670d341dbf437ee571953c456677a
* Adds Win32 UNC path support to FilePath::IsAbsolutePath() and ↵Abseil Team2022-10-181-0/+18
| | | | | | | | FilePath::IsRootDirectory() in GoogleTest Fixes: #3025 PiperOrigin-RevId: 481932601 Change-Id: I90fcb5b3d189aea79a0fd18735bad038b3511270
* Terse printing of std::reference_wrapper hides pointerAbseil Team2022-10-141-0/+23
| | | | | | | 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-041-9/+69
|\ | | | | | | | | PiperOrigin-RevId: 478775323 Change-Id: I92231bb8edd8e01b9b7cbe445c43dcf84f458521
| * Merge branch 'google:main' into custom_type_combineBaruch2022-08-251-2/+2
| |\ | |/ |/|
| * Custom type with Combine(). Fix for #3781Baruch Burstein2022-07-311-9/+67
| |