summaryrefslogtreecommitdiffstats
path: root/googletest/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Googletest exportAbseil Team2021-10-131-0/+45
| | | | | | Add printer for __{u,}int128_t. PiperOrigin-RevId: 402417369
* Merge pull request #3195 from Inujel:fix-3194dinord2021-09-231-1/+1
|\ | | | | | | PiperOrigin-RevId: 398271948
| * Using auto instead of container::const_iteratorrefs/pull/3195/headJulien JEMINE2020-12-291-1/+1
| |
* | Googletest exportAbseil Team2021-09-231-1/+7
| | | | | | | | | | | | | | | | | | | | Do not attempt to continue running a test suite if it already failed during `SetUpTestSuite`. The suite already failed and running the tests might just add noise to the run, or even crash the process unnecessarily. Fixes #2187 PiperOrigin-RevId: 397770405
* | Googletest exportAbseil Team2021-09-141-1/+1
| | | | | | | | | | | | Avoid segfault on null premature_exit_filepath. PiperOrigin-RevId: 395965853
* | Format test properties in xml printerrefs/pull/3513/headvictordk132021-08-061-3/+3
| |
* | fix: typo codespelling commentrefs/pull/3499/headslowy072021-07-242-4/+4
| |
* | Googletest exportAbseil Team2021-07-221-1/+0
| | | | | | | | | | | | Delete GOOGLETEST_CM.* tags from C++ code. PiperOrigin-RevId: 386268534
* | Googletest exportAbseil Team2021-07-074-229/+228
| | | | | | | | | | | | Introduce GTEST_FLAG_GET and GTEST_FLAG_SET macros. PiperOrigin-RevId: 382808313
* | Googletest exportAbseil Team2021-07-072-9/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gtest: Add a flag to only set up/tear down test environments once when repeating Currently when running a test multiple times using `--gtest_repeat` the global test environment(s) are set up and torn down for each iteration of the test. When checking for flakes in tests that have expensive dependencies that are set up in the test environment (subprocesses, external dependencies, etc) this can become expensive. To support finding flakes in tests that fit into this category, where the setup phase is expensive but each test case is fast, allow callers to specify via `--gtest_recreate_environments_when_repeating=false` that the test environments should only be set up once, for the first iteration, and only torn down once, on the last iteration. This makes running a test with `--gtest_repeat=1000` a much faster and more pleasant experience. PiperOrigin-RevId: 382748942
* | Merge pull request #3200 from ellert:port-to-GNU/HurdCJ Johnson2021-06-171-1/+1
|\ \ | | | | | | | | | PiperOrigin-RevId: 379383941
| * | Port to GNU/Hurdrefs/pull/3200/headMattias Ellert2020-12-301-1/+1
| |/
* | Googletest exportAbseil Team2021-06-111-2/+2
| | | | | | | | | | cleanup: fix spurious MSAN warnings with Clang 12 PiperOrigin-RevId: 378430614
* | Googletest exportAbseil Team2021-05-251-17/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the dependency on Objective C++ in iOS builds. 252ce9c52d304659eff6be558209c811b7191963 introduced the use of NSTemporaryDirectory() on iOS, which requires Core Foundation, and Objective C++. This CL replaces NSTemporaryDirectory() with an equivalent solution (according to Apple's documentation at [1]) available to C/C++ code. Avoiding Objective C++ and Core Foundation makes it easier to integrate googletest in projects that can't use the supplied Bazel build files. [1] https://developer.apple.com/library/archive/documentation/Security/Conceptual/SecureCodingGuide/Articles/RaceConditions.html#//apple_ref/doc/uid/TP40002585-SW10 PiperOrigin-RevId: 375474990
* | Googletest exportAbseil Team2021-05-131-3/+3
| | | | | | | | | | | | This callsite was previously updated to use ZX_INFO_PROCESS_V2 as a part of a soft transition. It is now time to revert back to `ZX_INFO_PROCESS` (which is now an alias of the former). See fxbug.dev/30751 for more details. PiperOrigin-RevId: 372339833
* | Googletest exportAbseil Team2021-04-261-1/+11
| | | | | | | | | | | | Fix iOS logging issues in tests PiperOrigin-RevId: 370484087
* | Googletest exportAbseil Team2021-04-211-3/+3
| | | | | | | | | | | | This callsite was previously updated to use ZX_INFO_PROCESS_V2 as a part of a soft transition. It is now time to revert back to `ZX_INFO_PROCESS` (which is now an alias of the former). See fxbug.dev/30751 for more details. PiperOrigin-RevId: 369370855
* | Googletest exportAbseil Team2021-04-211-3/+3
| | | | | | | | | | | | This callsite was previously updated to use ZX_INFO_PROCESS_V2 as a part of a soft transition. It is now time to revert back to `ZX_INFO_PROCESS` (which is now an alias of the former). See fxbug.dev/30751 for more details. PiperOrigin-RevId: 369349579
* | Merge pull request #3364 from jbampton:fix-spellingAndy Soffer2021-04-212-3/+3
|\ \ | | | | | | | | | PiperOrigin-RevId: 369217358
| * | chore: fix spellingrefs/pull/3364/headJohn Bampton2021-04-152-3/+3
| | |
* | | Googletest exportdmauro2021-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | Use the time_point from steady_clock instead of the template This fixes the build on some embedded compilers PiperOrigin-RevId: 368879480
* | | Googletest exportAbseil Team2021-04-161-2/+2
|/ / | | | | | | | | | | Fix -Wconversion issues on Fuchsia PiperOrigin-RevId: 368520510
* | Googletest exportAbseil Team2021-04-142-3/+8
| | | | | | | | | | | | | | | | | | | | | | Add support to run gtest on Xtensa platform. This add support to run GTest base test suits on Xtensa (https://ip.cadence.com/ipportfolio/tensilica-ip) base simulator. Xtensa only provides libc and some basic operations and does not run an operating system by default. PiperOrigin-RevId: 368162205
* | Googletest exportAbseil Team2021-04-081-3/+3
| | | | | | | | | | | | | | This is part of a soft transition over to having ZX_INFO_PROCESS populate a new struct. See fxbug.dev/30751 for more details. PiperOrigin-RevId: 367083068
* | Googletest exportAbseil Team2021-03-221-49/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print std::u8string, std::u16string, and std::u32string as string literals Previously, these types were printed as "{ U+123, U+456, U+789 }". However, printed output in that form is difficult to compare against any literals that might be defined in code. Instead, just treat these types like std::string and std::wstring, escaping non-ASCII characters with a hexadecimal escape sequence. The tests have also been updated to cover the new functionality: as a bonus, the tests now also pass with the MSVC toolchain. Internally, the code has been reorganized to primarily operate in terms of char32_t, under the assumption that char32_t will always be at least as big as wchar_t. While that assumption is currently true, perhaps it won't be in the future... PiperOrigin-RevId: 364033132
* | Googletest exportAbseil Team2021-03-161-0/+104
| | | | | | | | | | | | | | | | | | | | gtest: Output a canned test suite for environment failures in XML/JSON This surfaces useful information about the environment failure in a structured form. As we can see from the updated test, previously unsurfaced information is now present. PiperOrigin-RevId: 362292322
* | Googletest exportAbseil Team2021-03-091-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | Use monotonic time to measure test duration System time may be updated while a test is running. When this occurs a duration measured using system time may appear to move backwards, or jump far forwards. This change updates the duration measurement to use monotonic time instead. Timestamps for the test start still use system time. PiperOrigin-RevId: 361700881
* | Googletest exportAbseil Team2021-03-091-0/+20
| | | | | | | | | | | | | | | | gtest.cc: Split out functions for printing `TestResult` objects This will make it possible to reuse this code for outputting the "ad_hoc" `TestResult` objects in structured form in XML/JSON. PiperOrigin-RevId: 361604860
* | Googletest exportAbseil Team2021-02-261-1/+1
| | | | | | | | | | | | Update gtest doc link PiperOrigin-RevId: 359622286
* | Googletest exportAbseil Team2021-02-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly skip tests after fatal global environment setup errors Previously the tests were all skipped, but the resulting output claimed all tests passed. Before: ``` [----------] Global test environment set-up. <failure message> [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (83 ms total) [ PASSED ] 1 test. [ FAILED ] 0 tests, listed below: ``` After: ``` [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. <failure message> [----------] 1 test from SomeTest [ RUN ] SomeTest.DoesFoo <...>: Skipped [ SKIPPED ] SomeTest.DoesFoo (0 ms) [----------] 1 test from SomeTest (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (68 ms total) [ PASSED ] 0 tests. [ SKIPPED ] 1 test, listed below: [ SKIPPED ] SomeTest.DoesFoo [ FAILED ] 0 tests, listed below: ``` PiperOrigin-RevId: 358026389
* | Googletest exportAbseil Team2021-02-181-3/+3
| | | | | | | | | | | | Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard, attempt #2 PiperOrigin-RevId: 357056902
* | Googletest exportAbseil Team2021-02-111-3/+3
| | | | | | | | | | | | Revert include guard fix PiperOrigin-RevId: 356588893
* | Googletest exportAbseil Team2021-02-111-3/+3
| | | | | | | | | | | | Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard PiperOrigin-RevId: 355882793
* | Googletest exportdmcardle2021-02-052-41/+69
| | | | | | | | | | | | | | | | | | | | Use linear-time string globbing in UnitTestOptions::MatchesFilter. Algorithm is based on https://research.swtch.com/glob. Closes #3227 PiperOrigin-RevId: 355222440
* | Googletest exportAbseil Team2021-02-051-4/+0
| | | | | | | | | | | | Remove uses of GTEST_HAS_TYPED_TEST_P and GTEST_HAS_TYPED_TEST. PiperOrigin-RevId: 353935996
* | Merge pull request #3204 from kuzkry:CmpHelperXX-overloads-removalCJ Johnson2021-01-261-51/+0
|\ \ | | | | | | | | | PiperOrigin-RevId: 352626267
| * | remove explicit function overloads of CmpHelper?? for BiggestInt argumentsrefs/pull/3204/headKrystian Kuzniarek2021-01-031-51/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Affects macros {ASSERT|EXPECT}_{EQ|NE|LE|LT|GE|GT}. According to removed comments, these overloads were supposed to reduce code bloat and allow anonymous enums on GCC 4. However, the way it works on GCC 4 and the latest GCC (10.2 by now) is that having: template <typename T1, typename T2> void foo(T1, T2); using BiggestInt = long long; void foo(BiggestInt, BiggestInt); the template version takes precedence for almost every combination of integral types except for two long long integers - i.e. implicit promotion to long long is a worse match than generating a specific template function. Tested on GCC 4.8.1 (as GoogleTest requires C++11 and this was the first C++11 feature-complete release of GCC), GCC 4.8.5 (last of 4.8.x series) and the latest GCC (10.2.0).
* | Restore GTEST_ATTRIBUTE_PRINTF_ on ColoredPrintfrefs/pull/3206/headDavid Benjamin2021-01-061-1/+2
|/ | | | | | | | | This fixes build issues with GoogleTest when built with -Wformat-nonliteral and unblocks updating GoogleTest in BoringSSL. It was added in 53c478d639b8eebd2942e88266610ebc79c541f6, which caught some bugs. Then it was moved to the header and accidentally dropped in 482ac6ee63429af2aa9c44f4e6427873fb68fb1f.
* Googletest exportAbseil Team2020-12-101-6/+4
| | | | | | | | | Remove ZX_WAIT_ASYNC_ONCE flag It is deprecated and will soon be removed in fuchsia source. It's currently defined as 0 and references should be changed to 0. PiperOrigin-RevId: 346787585
* Fix typo in CLI help messagerefs/pull/3159/headmalcops2020-12-051-1/+1
|
* Initialize TestInfo member is_in_another_shard_ in constructor.refs/pull/3118/headVinson Lee2020-11-141-0/+1
| | | | Signed-off-by: Vinson Lee <vlee@freedesktop.org>
* Googletest exportAbseil Team2020-11-121-5/+14
| | | | | | | | | Use environment variable TEST_TMPDIR in Linux environments for temporary directory if available otherwise use /tmp/. Bazel sets the environment variable TEST_TMPDIR when launching tests. PiperOrigin-RevId: 342058921
* Googletest exportAbseil Team2020-11-111-3/+1
| | | | | | Remove unreachable code when GTEST_CUSTOM_TEMPDIR_FUNCTION_ is defined. PiperOrigin-RevId: 341810264
* Merge pull request #3109 from hyukmyeong:typoMark Barolak2020-11-102-10/+10
|\ | | | | | | PiperOrigin-RevId: 341604515
| * fix typosrefs/pull/3109/headHyuk Myeong2020-11-082-10/+10
| |
* | Merge pull request #3090 from knutpett:working_dir_on_disklessMark Barolak2020-11-101-0/+2
|\ \ | |/ |/| | | PiperOrigin-RevId: 341604408
| * Only save original working directory if death tests are enabledrefs/pull/3090/headKnut Petter Svendsen2020-11-091-0/+2
|/ | | | | | | | | On a diskless system you cannot get the current directory. So if death tests are disabled anyway, there is no point trying to get current directory. Without this fix, running tests on diskless systems will fail, even when death tests are disabled.
* Merge pull request #3044 from manavrion:improve_file_path_normalizevslashg2020-10-271-7/+5
|\ | | | | | | PiperOrigin-RevId: 339242159
| * Improve FilePath::Normalize methodrefs/pull/3044/headRuslan Manaev2020-10-071-7/+5
| |
* | Fix typo "definedin in" => "defined in"Arthur Sonzogni2020-10-201-1/+1
|/ | | | | | Replace "definedin in" by "defined in" in files: - googletest/src/gtest.cc - googletest/test/googletest-output-test-golden-lin.txt