aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-09-11Merge pull request #4365 from tanzislam:fix-thread-count-after-thread-creationCopybara-Service
PiperOrigin-RevId: 564472305 Change-Id: I8db9bc0ba0768e7ab9c67f36d9db87edbbf14f10
2023-09-03Count threads after thread-creation while still holding mutex lockTanzinul Islam
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
2023-08-26Reuse TempDir() functionTanzinul Islam
2023-08-25googletest: Add universal printer for `std::span`Dino Radakovic
Fixes #4318 PiperOrigin-RevId: 560089120 Change-Id: I9d0d098140033520266747a1689e953ee8307c47
2023-08-23Merge pull request #4349 from sthd:httpToHttpsCopybara-Service
PiperOrigin-RevId: 559452348 Change-Id: I6f72001fd6b8e5a739c34121c8847c281d563b0f
2023-08-22changed http to httpssthd
2023-08-22Merge pull request #4343 from sthd:http-to-httpsCopybara-Service
PiperOrigin-RevId: 559151399 Change-Id: I8eb2c7c5222d0fd0935db531a0abe5792633fe7e
2023-08-22googletest: Replace http with https in links to docsDino Radakovic
This is a prerequisite for #4341 PiperOrigin-RevId: 559132807 Change-Id: Iadc961913e0ff107c5333dae17be5f8638663836
2023-08-21CI: Update the Linux hybrid-latest docker container used for testingDerek Mauro
The following are the major updates * LLVM 17 branch (https://github.com/llvm/llvm-project b744f4c99cf91155c74a3c92db6f1335232ff3d) * GCC 13.2 * CMake 3.27.1 * Bazel 6.2.1 PiperOrigin-RevId: 558818264 Change-Id: Ib08d8331e2a8b2d68a702670451beaaac5d266f4
2023-08-21Clean up typos: Exhaused => ExhaustedAbseil Team
PiperOrigin-RevId: 558801066 Change-Id: Ia225d12014748db87639414f4c8c28a0d0e9e489
2023-08-20Merge branch 'google:main' into http-to-httpsElior Schneider
2023-08-20Update advanced.mdElior Schneider
http to https
2023-08-18Merge pull request #4322 from pgawro:ansi_colorsCopybara-Service
PiperOrigin-RevId: 558224853 Change-Id: Ib2d8ad41fcc4d38f58aa5702b537467d8867d82e
2023-08-18Prefer $TMPDIR to /data/local/tmp on AndroidTanzinul Islam
Newer devices can have the latter location read-only. (I observed this with Termux on a non-rooted Pixel 6.)
2023-08-18Merge branch 'google:main' into http-to-httpsElior Schneider
2023-08-17Improve error message for invalid parameterized test names.Abseil Team
PiperOrigin-RevId: 557910190 Change-Id: Ia965a6c96e4cc5997d8af2611abc62c42e81653e
2023-08-17googletest: ansi color fixPatryk Gawroński
Adds prevents from returning nullptr by choosing default color. Issue: #4321
2023-08-15Merge pull request #4333 from ngie-eign:gtest_help_test-fix-FreeBSDCopybara-Service
PiperOrigin-RevId: 557197748 Change-Id: I55b86353f5351bbcbdf8e6bca70e82d7383a5080
2023-08-15gtest_help_test: Make method names `snake_case`, conforming with [the style ↵Dino Radakovic
guide](https://google.github.io/styleguide/pyguide#316-naming) PiperOrigin-RevId: 557133618 Change-Id: I27202ee91ee81b3d2e4c28102190d2bde8efba05
2023-08-15gtest_help_test: Inline test helper functionsDino Radakovic
`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
2023-08-15Merge pull request #4334 from ngie-eign:fix-RETest-non-ABSLCopybara-Service
PiperOrigin-RevId: 557122083 Change-Id: I77fb7fe99baf9cbf341ad37d4b651a0ac606b549
2023-08-15gtest_help_test: Delete obsolete helper `TestUnknownFlagWithAbseil`Dino Radakovic
PiperOrigin-RevId: 557116814 Change-Id: I91e06b0d6001952366c50201b67491475a1f98af
2023-08-11Changed 2 public links from http to httpssthd
2023-08-11Changed 3 public links from http to httpssthd
2023-08-11Changed 2 public links from http to httpssthd
2023-08-11Changed 3 public links from http to httpssthd
2023-08-10Specify SetUpTestSuite is required to be public.Abseil Team
PiperOrigin-RevId: 555578256 Change-Id: I9366fc99ae953c29e468fcddb4be203c9c05661b
2023-08-08Merge pull request #4330 from IncludeGuardian:remove-iomanipCopybara-Service
PiperOrigin-RevId: 554867591 Change-Id: Ib32da50384951532419cb54fb70f8ab0920178d7
2023-08-07Fix RETest/1.ImplicitConstructorWorks on non-ABSL platformsEnji Cooper
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>
2023-08-07Fix GTestHelpTest.TestHelpFlag on FreeBSDEnji Cooper
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>
2023-08-07Merge pull request #4328 from robert-shade:suppress_unreachable_warningCopybara-Service
PiperOrigin-RevId: 554578443 Change-Id: Ib5b03605c30fc2974b9597860577ff89532eedcd
2023-08-07Make references to `#include`s consistent across docsDino Radakovic
PiperOrigin-RevId: 554561504 Change-Id: Ia02ab6ac646bf6637d6f500a4aaedd14e0a04798
2023-08-03Remove public includes of `<iomanip>`Elliot Goodrich
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.
2023-08-03Merge pull request #4323 from ↵Copybara-Service
pgawro:gtest_ExpectThrowTest_DoesNotGenerateUnreachableCodeWarning PiperOrigin-RevId: 553485739 Change-Id: I6581215e6db514397177af39381eea4d121f32bd
2023-08-02Avoid unreachable code warningRobert Shade
2023-08-02Update documentation to refer to v1.14Derek Mauro
PiperOrigin-RevId: 553172719 Change-Id: Ie09afa3788c8ed5c95913d8ca0b436f1df28241a
2023-08-02Bump version to v1.14 in preparation for releaseDerek Mauro
PiperOrigin-RevId: 553152072 Change-Id: I0bfbb2da6b3902fc3e41a8e1c4aacb291ffdd098
2023-08-02Remove the GTEST_HAS_DOWNCAST_ customization point.Derek Mauro
PiperOrigin-RevId: 553150809 Change-Id: I10d19a45a85c5f63a5e65dc322413307116e1c25
2023-08-02Add googletest-message-test to the Bazel testsDerek Mauro
It appears to have been unintentionally left out PiperOrigin-RevId: 553141410 Change-Id: I8adac55a3df0ec12d6fe03446f71858fc702e178
2023-08-01Make testing::Message support streamed AbslStringify valuesPhoebe Liang
This allows types that provide an AbslStringify definition to be streamed into GoogleTest macros. PiperOrigin-RevId: 552914482 Change-Id: I5fb386980d4d24873f95f0a8ef83067a6a3c86ac
2023-08-01Update GoogleTest dependenciesDerek Mauro
PiperOrigin-RevId: 552912819 Change-Id: If1b6278f7fe5a8fc41fc3bc390356a94387d0091
2023-07-31Merge pull request #4325 from juliencombattelli:mainCopybara-Service
PiperOrigin-RevId: 552577282 Change-Id: I2b4d20d155ad5746e36711c039293d5c996a332e
2023-07-29Use #if and not #ifdef to check filesystem supportJulien Combattelli
2023-07-28Adjust includes to use <> instead of "", consistent with quickstart pages.Abseil Team
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
2023-07-27gtest: Supress warning about set unused variablePatryk Gawroński
Modified test ExpectThrowTest.DoesNotGenerateUnreachableCodeWarning
2023-07-24Merge pull request #4317 from mrfeod:patch-1Copybara-Service
PiperOrigin-RevId: 550585850 Change-Id: I727f74aeb6f1da5bbbf5a5f49f06c4cfea40a73b
2023-07-21Make `AbslStringify` usage public in GoogleTestAbseil Team
Fixes #4314 PiperOrigin-RevId: 549986457 Change-Id: Iff74f02ab1c106696f288540e9c623d56b76e3f7
2023-07-19Remove unused cast implementationDerek Mauro
PiperOrigin-RevId: 549456180 Change-Id: I10862e6de981087a5c590cccf6152255e9a176a0
2023-07-19Fix typo in gmock_cook_book.mdAnton Sosnin
2023-07-18Merge pull request #4313 from kimvaleen:mainCopybara-Service
PiperOrigin-RevId: 549039222 Change-Id: I96bea310beede5ba0ed6160155251ffd9d7a2103