summaryrefslogtreecommitdiffstats
path: root/googletest/src
Commit message (Collapse)AuthorAgeFilesLines
* Use Abseil Flag public API for flag parsing.Abseil Team2023-04-261-15/+54
| | | | | | | 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/destructorsrefs/pull/4221/headTom Hughes2023-04-212-8/+8
| | | | | | | 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/+21
| | | | | PiperOrigin-RevId: 525850646 Change-Id: I64387f5b933beb79cd05636dca81b7a75213383e
* Make parameter names in function declaration match the names in theTom Hughes2023-04-201-10/+10
| | | | | | | | | definitions https://clang.llvm.org/extra/clang-tidy/checks/readability/inconsistent-declaration-parameter-name.html PiperOrigin-RevId: 525752102 Change-Id: Ibf9d3d1dbae8f95cfc7c6ad29fe4b677f4ee19cf
* gtest.cc: run tests within a test suite in a deterministic order.Abseil Team2023-04-051-0/+20
| | | | | | | | | Ensure that tests are run in the order specified in the source code, even if they are registered manually using RegisterTest. There should be no behavior change for the common case. PiperOrigin-RevId: 522136303 Change-Id: If155e2666780af0e514fbbf5ff2b157d5fe2fef1
* Rolled back due to breaking existing tests.Abseil Team2023-04-031-20/+0
| | | | | PiperOrigin-RevId: 521555658 Change-Id: I09742faceb82b2b7ceb423e850a8b50d532ad6ff
* gtest.cc: run tests within a test suite in a deterministic order.Aaron Jacobs2023-03-301-0/+20
| | | | | | | | | Ensure that tests are run in the order specified in the source code, even if they are registered manually using RegisterTest. There should be no behavior change for the common case. PiperOrigin-RevId: 520729483 Change-Id: I400c78400c6929fccae0676214d993251f31888f
* Internal Code ChangeAbseil Team2023-03-235-12/+9
| | | | | PiperOrigin-RevId: 518810140 Change-Id: Id3f9471f827894761080bc9199b0a092dc829b5f
* gtest.cc: add a newline after a failure when there is no OS stack trace.Aaron Jacobs2023-03-231-0/+2
| | | | | | | | 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 minor bug -- if ExecDeathTestChildMain() ever returns, we should exitAbseil Team2023-03-211-2/+1
| | | | | | | with a non-zero status. PiperOrigin-RevId: 518306642 Change-Id: I72fb2764e477acb0362593c63f7748c4f64db0c6
* 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
* | Add a comment to clarify Fuchsia process launcher requirement.Abseil Team2023-03-081-0/+5
| | | | | | | | | | PiperOrigin-RevId: 515154129 Change-Id: I3dd9e912e160d09d1f74a467336212701d4e1b7d
* | Remove GTEST_FOR_GOOGLE_ macroTom Hughes2023-03-061-4/+0
| | | | | | | | | | | | | | | | The "more details" warning message printed by this macro is no longer needed. PiperOrigin-RevId: 513945729 Change-Id: I644910216dbef2fe92eee3a648f2078e705cc7a1
* | Replace "#if GTEST_HAS_ABSL" with "#ifdef GTEST_HAS_ABSL"Tom Hughes2023-03-062-7/+7
| | | | | | | | | | | | | | This allows compilation with "-Wundef" (#3267). PiperOrigin-RevId: 513945230 Change-Id: I45ef19c7ff3d20e97216bd031d406a03365471da
* | Use "#ifdef" with public macrosTom Hughes2023-03-064-16/+16
| | | | | | | | | | | | | | This allows compilation with "-Wundef" (#3267). PiperOrigin-RevId: 513944726 Change-Id: I1a3854bb2333d5dec6c0ff91ee1eddd9a766ab91
* | Use "#ifdef GTEST_OS_..." instead of "#if GTEST_OS_..."Tom Hughes2023-03-066-104/+113
|/ | | | | | | This is compatible with compiling with "-Wundef" (#3267). PiperOrigin-RevId: 513943378 Change-Id: I47cf5fabbb77be061c4483a0adc54511af6b191c
* Eliminate argv list action parameter.Abseil Team2023-02-281-2/+1
| | | | | PiperOrigin-RevId: 512791992 Change-Id: Ie7fc37ea06ea7d9f595268c9ec84a0e144c297bb
* Merge pull request #4164 from sergio-nsk:patch-2Copybara-Service2023-02-271-0/+4
|\ | | | | | | | | PiperOrigin-RevId: 512753220 Change-Id: I3f7ad6c62c738d1d7405c50924b36deac8a9ac85
| * Fix error in_death_test_child_process: undeclared identifierrefs/pull/4164/headSergey2023-02-211-0/+3
|/ | | The error occurs if !GTEST_HAS_DEATH_TEST on Windows.
* Remove strdup usageAbseil Team2023-02-152-94/+42
| | | | | PiperOrigin-RevId: 509947007 Change-Id: I31e1274afa889776829c877c40c9af589298dcf2
* Remove some filesystem APIs and tests under !GTEST_HAS_FILE_SYSTEMAbseil Team2023-02-141-1/+6
| | | | | PiperOrigin-RevId: 509537606 Change-Id: I68f7054e34b1fe76c1fd85099fffa4ee3c2b00c0
* Fix -Wsign-conversion warningsTom Hughes2023-02-021-5/+0
| | | | | | | | | | | | | | | | | | | | | | 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
* Add a trailing decimal point to FormatTimeInMillisAsSeconds() output when inputAbseil Team2023-02-022-1/+10
| | | | | | | is an exact N seconds. PiperOrigin-RevId: 506610898 Change-Id: Idcd705c719e0e721148c350c8a14f27b9eb5c4f7
* Fix formatting of C++ filesTom Hughes2023-01-242-11/+8
| | | | | PiperOrigin-RevId: 504325204 Change-Id: Iaa1d6d0ab1dccaaeef26f9cb109d530835499240
* Fix GTEST_OS_ESP8266 checkTom Hughes2023-01-051-1/+1
| | | | | | | | Everywhere else in the code, we check the value of GTEST_OS_ESP8266, not just whether it is defined. PiperOrigin-RevId: 499946909 Change-Id: I86f7e8947abb4e928fc24d1416d8237987b27845
* IWYU: Add missing std includesTom Hughes2023-01-051-0/+1
| | | | | PiperOrigin-RevId: 499893032 Change-Id: I33304802b7c82ae2d008f3ee89df38866e5f57ba
* Workaround for GCC12 bug illustrated by https://godbolt.org/z/Pe5aE59xGDerek Mauro2023-01-041-1/+2
| | | | | | | Fixes #4108 PiperOrigin-RevId: 499556061 Change-Id: I1cb1564f9b77e1825fddc9236965f4a3b661d96a
* Introduces a new porting flag (GTEST_HAS_FILE_SYSTEM) to indicate whether a ↵Abseil Team2022-12-123-4/+45
| | | | | | | platform supports filesystem operations. PiperOrigin-RevId: 494751986 Change-Id: I07f73bdf478a73934b8f1a69c1ab4abda1b231ae
* Fall back to the system clock when building with newlib on a system without ↵Tom Hughes2022-12-081-3/+10
| | | | | | | a monotonic clock. PiperOrigin-RevId: 493917905 Change-Id: I20137cfcda3671ffc8edcda2b6554aa392e3a00a
* Remove the unused class TestNameIsDerek Mauro2022-12-061-31/+0
| | | | | | | Fixes #4076 PiperOrigin-RevId: 493158910 Change-Id: Id66c0443a6f5f4d167ae39ac79766b32cf95a383
* Remove incorrect usage of GTEST_ATTRIBUTE_UNUSED_ on classes.Abseil Team2022-11-151-1/+1
| | | | | | Fixes: #4054 PiperOrigin-RevId: 488721587 Change-Id: I8742d8475376635c83edcf524796a6107042e89b
* Merge pull request #4058 from zloylos:support-kitty-termCopybara-Service2022-11-141-9/+10
|\ | | | | | | | | PiperOrigin-RevId: 488463135 Change-Id: I4180d766dabbe438210904e743e6e963122540f5
| * Support kitty TERMrefs/pull/4058/headDenis Hananein2022-11-101-0/+1
| | | | | | | | Signed-off-by: Denis Hananein <i@zloylos.me>
* | Defined a testing::SrcDir() function that returns the name of a directoryAbseil Team2022-11-111-9/+34
| | | | | | | | | | | | | | 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-6/+4
|/ | | | | PiperOrigin-RevId: 486685761 Change-Id: I164d2646e65670d341dbf437ee571953c456677a
* Merge pull request #4036 from zloylos:fix-output-json-3884Copybara-Service2022-10-191-0/+3
|\ | | | | | | | | PiperOrigin-RevId: 482287697 Change-Id: I1179a1570cd64fcb156bda26e5c779b876c51742
| * Fix JSON output format #3884refs/pull/4036/headDenis Hananein2022-10-111-0/+3
| |
* | Adds Win32 UNC path support to FilePath::IsAbsolutePath() and ↵Abseil Team2022-10-181-18/+57
|/ | | | | | | | FilePath::IsRootDirectory() in GoogleTest Fixes: #3025 PiperOrigin-RevId: 481932601 Change-Id: I90fcb5b3d189aea79a0fd18735bad038b3511270
* [fuchsia] Use __builtin_trap to trigger gunit_break_on_failure on non-x86 archAbseil Team2022-10-061-0/+12
| | | | | | | In developing tests for the fuchsia debugger, it was found that in addition to catching gtest failures (which are implemented as software breakpoints) we also see PageFault exceptions, caused by this nullptr dereference. PiperOrigin-RevId: 479365782 Change-Id: I84d805d94c2e46b6f3c982ca1ae49c6ac3ed3430
* Merge pull request #4016 from Maratyszcza:qurtCopybara-Service2022-09-272-2/+14
|\ | | | | | | | | PiperOrigin-RevId: 477265396 Change-Id: I781dae4ef2c5b6c771d960f1ec5a3c5cff0e97ad
| * Port GoogleTest to QuRT (Hexagon RTOS)refs/pull/4016/headMarat Dukhan2022-09-262-2/+14
| |
* | Add GoogleTest workaround for MSVC crash with Address Sanitizer (ASAN) on ↵Abseil Team2022-09-271-1/+2
|/ | | | | | | version 17.3.3 PiperOrigin-RevId: 477240422 Change-Id: I894037850617252e462783c0885e30fc8e7ad122
* 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
* | Merge pull request #3918 from assafpr:master2mainCopybara-Service2022-08-012-2/+2
|\ \ | | | | | | | | | | | | 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
| |/
* | gtest-death-test: add 'noreturn'refs/pull/3951/headMatei Dibu2022-07-201-1/+1
| |