summaryrefslogtreecommitdiffstats
path: root/googletest
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Skip find_package(Python3) when not building testsDerek Mauro2023-12-041-1/+3
| |/ | | | | | | | | | | | | | | #4424 claims this saves several seconds of build time Closes #4424 PiperOrigin-RevId: 587827426 Change-Id: I207779a6539f9af16a39d6b40887770dc930b74f
| * Merge pull request #4397 from botovq:raiseCopybara-Service2023-10-301-0/+1
| |\ | | | | | | | | | | | | PiperOrigin-RevId: 577958594 Change-Id: I8a27f67dc5b6817b741bfd2fc0f27c6302291a00
| | * Add missing include for raise(3)refs/pull/4397/headTheo Buehler2023-10-251-0/+1
| |/ | | | | | | | | | | If SIGTRAP is defined, this file may end up using raise(3), which is defined in csignal, leading to a compilation failure on at least OpenBSD/sparc64 with gcc 8.
| * Improve error message for invalid parameterized test names.Abseil Team2023-10-191-2/+2
| | | | | | | | | | PiperOrigin-RevId: 574992011 Change-Id: Id6030a9e5f317966186cc48ef2c09ad97fa15d3e
| * gtest-death-test-internal: Delete obsolete string constantsDino Radakovic2023-10-171-3/+1
| | | | | | | | | | | | | | These are not used anywhere in googletest and they are in namespace `testing::internal` PiperOrigin-RevId: 574171727 Change-Id: I5f668157a81ba3efaed77c1302b40cf07eeda52b
| * Fix RE::Init for Android and NetBSD.Abseil Team2023-10-052-4/+15
| | | | | | | | | | | | | | | | | | This is a somewhat recent change for Android (I'm not clear on whether it's a recent change for NetBSD, or if Android was just very behind on its implementation), so while this worked fine as recently as API 32 devices, REG_GNU is required for API 34 (API 33 untested). A test actually caught this, but https://github.com/google/googletest/pull/4334 "fixed" the test rather than the implementation. This CL also reverts the test change so it can catch the failure. PiperOrigin-RevId: 571126374 Change-Id: I420dfcedea58f2c8b605f699515d744006c0a9d9
| * Merge pull request #4382 from idzm:fix_cmake_commentsCopybara-Service2023-10-022-31/+31
| |\ | | | | | | | | | | | | PiperOrigin-RevId: 570161165 Change-Id: Idf7eafb163bb067b0031e25a183d5c9cc3e3f378
| | * cmake: Fix comments in cmake filesrefs/pull/4382/headDzmitry Ivaniuk2023-09-292-32/+31
| |/ | | | | | | Remove extra spaces. Fix so that the comment line starts with a capital letter and ends with a dot.
| * Resolve `-Wundef` triggering on `GTEST_CREATE_SHARED_LIBRARY` and ↵Abseil Team2023-09-251-2/+2
| | | | | | | | | | | | | | | | `GTEST_LINKED_AS_SHARED_LIBRARY` with shared libraries in GoogleTest Fixes: #4372 PiperOrigin-RevId: 568327612 Change-Id: Ifc47f1a2a2648c29858a22966331557cc928cc47
| * Update C++ feature detection in `gtest-port.h` to rely on feature test ↵Abseil Team2023-09-221-24/+36
| | | | | | | | | | | | | | | | | | macros where possible. This also avoids conflating C++ language versions with standard library versions, which don't always align. PiperOrigin-RevId: 567662118 Change-Id: I7c023bd043c81c540c9430eaeb7b450feaadb206
| * Use `absl::HasAbslStringify`, instead of the internal version.Abseil Team2023-09-212-15/+13
| | | | | | | | | | PiperOrigin-RevId: 567349341 Change-Id: I35f2679901aecbe9cb90d2e78ff28c5e383e7257
| * Use the `empty()` method to check for emptiness instead of `length()`Abseil Team2023-09-182-2/+2
| | | | | | | | | | PiperOrigin-RevId: 566247438 Change-Id: I8199ef53310a057abbe23f8f4295507b60d6b707
| * Merge pull request #4342 from tanzislam:prefer-tmpdir-on-androidCopybara-Service2023-09-141-8/+24
| |\ | | | | | | | | | | | | PiperOrigin-RevId: 565230380 Change-Id: I6e91eea46d05413d4d87e73a11941786604d9f27
| | * Reuse TempDir() functionrefs/pull/4342/headTanzinul Islam2023-08-261-4/+1
| | |
| | * Prefer $TMPDIR to /data/local/tmp on AndroidTanzinul Islam2023-08-181-1/+7
| | | | | | | | | Newer devices can have the latter location read-only. (I observed this with Termux on a non-rooted Pixel 6.)
| * | Count threads after thread-creation while still holding mutex lockrefs/pull/4365/headTanzinul Islam2023-09-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `Mutex` is locked with the `MutexLock` before spawning the thread, so that the thread is prevented from completing (by being blocked on `Mutex`) before the new thread count is obtained. However, the existing bug (introduced in 22e6055) releases `Mutex` before obtaining the new thread count, which allows the thread to run to completion in the meantime. Also, since the `(thread_count_after_create != starting_count + 1)` condition (line 328) skips the remainder of the `for`-loop body on every iteration, `thread_count_after_join` stays uninitialized. I believe this is why [this test failed][1] on the macOS CI with this trace: ``` [----------] 1 test from GetThreadCountTest [ RUN ] GetThreadCountTest.ReturnsCorrectValue googletest/test/googletest-port-test.cc:350: Failure Expected equality of these values: thread_count_after_create Which is: 1 starting_count + 1 Which is: 2 googletest/test/googletest-port-test.cc:351: Failure Expected equality of these values: thread_count_after_join Which is: 140493185949400 starting_count Which is: 1 [ FAILED ] GetThreadCountTest.ReturnsCorrectValue (2 ms) [----------] 1 test from GetThreadCountTest (2 ms total) ``` [1]: https://github.com/google/googletest/actions/runs/6064919420/job/16453860690?pr=3049
| * | googletest: Add universal printer for `std::span`Dino Radakovic2023-08-253-2/+53
| | | | | | | | | | | | | | | | | | | | | Fixes #4318 PiperOrigin-RevId: 560089120 Change-Id: I9d0d098140033520266747a1689e953ee8307c47
| * | Merge pull request #4349 from sthd:httpToHttpsCopybara-Service2023-08-237-11/+11
| |\ \ | | | | | | | | | | | | | | | | PiperOrigin-RevId: 559452348 Change-Id: I6f72001fd6b8e5a739c34121c8847c281d563b0f
| | * | changed http to httpsrefs/pull/4349/headsthd2023-08-227-11/+11
| |/ /
| * | Merge pull request #4322 from pgawro:ansi_colorsCopybara-Service2023-08-181-1/+2
| |\ \ | | |/ | |/| | | | | | | PiperOrigin-RevId: 558224853 Change-Id: Ib2d8ad41fcc4d38f58aa5702b537467d8867d82e
| | * googletest: ansi color fixrefs/pull/4322/headPatryk Gawroński2023-08-161-1/+2
| | | | | | | | | | | | | | | | | | | | | Adds prevents from returning nullptr by choosing default color. Issue: #4321
| * | Improve error message for invalid parameterized test names.Abseil Team2023-08-171-1/+3
| | | | | | | | | | | | | | | PiperOrigin-RevId: 557910190 Change-Id: Ia965a6c96e4cc5997d8af2611abc62c42e81653e
| * | Merge pull request #4333 from ngie-eign:gtest_help_test-fix-FreeBSDCopybara-Service2023-08-151-3/+14
| |\ \ | | | | | | | | | | | | | | | | PiperOrigin-RevId: 557197748 Change-Id: I55b86353f5351bbcbdf8e6bca70e82d7383a5080
| | * | Fix GTestHelpTest.TestHelpFlag on FreeBSDrefs/pull/4333/headEnji Cooper2023-08-081-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test supported a variety of BSDs, including kFreeBSD, but not FreeBSD. Move the BSD checks to a separate function and support checking for FreeBSD, in addition to kFreeBSD. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
| * | | gtest_help_test: Make method names `snake_case`, conforming with [the style ↵Dino Radakovic2023-08-151-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | guide](https://google.github.io/styleguide/pyguide#316-naming) PiperOrigin-RevId: 557133618 Change-Id: I27202ee91ee81b3d2e4c28102190d2bde8efba05
| * | | gtest_help_test: Inline test helper functionsDino Radakovic2023-08-151-23/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `TestNonHelpFlag` is only a few asserts with no logic, which is easier to read in line, and helper `TestHelpFlag` is used in a single test case. PiperOrigin-RevId: 557122793 Change-Id: I7367424abfbb883c10c260fae066a2071e5dfa0e
| * | | Merge pull request #4334 from ngie-eign:fix-RETest-non-ABSLCopybara-Service2023-08-151-2/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 557122083 Change-Id: I77fb7fe99baf9cbf341ad37d4b651a0ac606b549
| | * | | Fix RETest/1.ImplicitConstructorWorks on non-ABSL platformsrefs/pull/4334/headEnji Cooper2023-08-081-2/+2
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last regular expression specified in the test is not technically POSIX compatible. Use `[[:alnum:]_]` instead of `\w+`; the latter is a Perl-compatible regular expression. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
| * | | gtest_help_test: Delete obsolete helper `TestUnknownFlagWithAbseil`Dino Radakovic2023-08-151-13/+0
| | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 557116814 Change-Id: I91e06b0d6001952366c50201b67491475a1f98af
| * | | Merge pull request #4330 from IncludeGuardian:remove-iomanipCopybara-Service2023-08-082-6/+4
| |\ \ \ | | |/ / | |/| | | | | | | | | | PiperOrigin-RevId: 554867591 Change-Id: Ib32da50384951532419cb54fb70f8ab0920178d7
| | * | Remove public includes of `<iomanip>`refs/pull/4330/headElliot Goodrich2023-08-032-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes `<iomanip>` from public GoogleTest header files. As `<iomanip>` is not a common included file, its content is unlikely to be included in translation units other than through GoogleTest includes. By reducing the number of include directives public headers in GoogleTest, this may reduce the time taken to compile tests as it would reduce the amount of work that the preprocessor and compiler front-end need to do.
| * | | Merge pull request #4323 from ↵Copybara-Service2023-08-031-1/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pgawro:gtest_ExpectThrowTest_DoesNotGenerateUnreachableCodeWarning PiperOrigin-RevId: 553485739 Change-Id: I6581215e6db514397177af39381eea4d121f32bd
| | * | | gtest: Supress warning about set unused variablerefs/pull/4323/headPatryk Gawroński2023-07-261-1/+1
| | | |/ | | |/| | | | | | | | | Modified test ExpectThrowTest.DoesNotGenerateUnreachableCodeWarning
| * | | Update documentation to refer to v1.14Derek Mauro2023-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 553172719 Change-Id: Ie09afa3788c8ed5c95913d8ca0b436f1df28241a
| * | | Remove the GTEST_HAS_DOWNCAST_ customization point.Derek Mauro2023-08-021-14/+4
| | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 553150809 Change-Id: I10d19a45a85c5f63a5e65dc322413307116e1c25
| * | | Add googletest-message-test to the Bazel testsDerek Mauro2023-08-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears to have been unintentionally left out PiperOrigin-RevId: 553141410 Change-Id: I8adac55a3df0ec12d6fe03446f71858fc702e178
| * | | Make testing::Message support streamed AbslStringify valuesPhoebe Liang2023-08-012-2/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows types that provide an AbslStringify definition to be streamed into GoogleTest macros. PiperOrigin-RevId: 552914482 Change-Id: I5fb386980d4d24873f95f0a8ef83067a6a3c86ac
| * | | Merge pull request #4325 from juliencombattelli:mainCopybara-Service2023-07-311-1/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 552577282 Change-Id: I2b4d20d155ad5746e36711c039293d5c996a332e
| | * | | Use #if and not #ifdef to check filesystem supportrefs/pull/4325/headJulien Combattelli2023-07-291-1/+1
| | |/ /
| * | | Adjust includes to use <> instead of "", consistent with quickstart pages.Abseil Team2023-07-281-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, gtest documentation uses different #include syntax. The quickstart pages (e.g., http://google.github.io/googletest/quickstart-bazel.html#create-and-run-a-binary) are checked in with `#include <gtest/gtest.h>` However, other documentation (such as the primer) uses `#include "gtest/gtest.h"` (e.g., https://google.github.io/googletest/primer.html#writing-the-main-function). PiperOrigin-RevId: 551878641 Change-Id: Iab93cc1da3ef4870a07b624071b75d6e9d3568c1
| * | Make `AbslStringify` usage public in GoogleTestAbseil Team2023-07-212-0/+50
| | | | | | | | | | | | | | | | | | | | | 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-184-4/+9
| |\ \ \ | | |_|/ | |/| | | | | | | | | | PiperOrigin-RevId: 549006105 Change-Id: Ifbe2bf57e10df4c71e51dbfaf1687f4f621f5106
| | * | add support for nrf52refs/pull/4302/headChris Johnson2023-06-274-4/+8
| | | | | | | | | | | | | | | | 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-013-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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