aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-01-24Upgrade googletest to 563ebf1769af08d448765c31064260e1a16fcced am: 05911fd931HEADndk-r27-releasemastermainemu-34-2-devElliott Hughes
Original change: https://android-review.googlesource.com/c/platform/external/googletest/+/2924713 Change-Id: I19ae0acc5f76297e6800ede64a5703110bdafa8b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-23Upgrade googletest to 563ebf1769af08d448765c31064260e1a16fccedemu-34-3-releaseElliott Hughes
This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update googletest For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md Test: TreeHugger Change-Id: I0b7af55ccc51e1f23377d3bc414ccb2a187e46a0
2024-01-23Fix double-promotion warnings in AppropriateResolution()Abseil Team
When -Wdouble-promotion is enabled, the templatized function AppropriateResolution fails to compile since its float instantiation promotes floats to doubles when doing arithmetic and comparisons. Add static casts to resolve these errors. PiperOrigin-RevId: 600776333 Change-Id: Ia530b4bbca6ddce27caf0a817196d87efef711cb
2024-01-22Merge pull request #4444 from ↵Copybara-Service
michaeldleslie:only_apply_lregex_for_qnx710_and_newer PiperOrigin-RevId: 600548775 Change-Id: Ia693791321602e728aef9135b349602c790a058a
2024-01-22googletest: Fix incorrect comment about `value_param` of ↵Dino Radakovic
`internal::MakeAndRegisterTestInfo` This was probably a copy-paste from the comment about `type_param`. PiperOrigin-RevId: 600493462 Change-Id: I4a41c2673dd6560db0f68856aab3d32b103164b1
2024-01-18If GTEST_NO_ABSL_FLAGS is #defined, then the Abseil flag libraryAbseil Team
will not be used by googletest, even if GTEST_HAS_ABSL is #defined. PiperOrigin-RevId: 599625032 Change-Id: Ieb994a15683dec89e88578120071eca8ac9fead1
2024-01-16Make posix::FileNo available under !GTEST_HAS_FILE_SYSTEMAbseil Team
This enables automatic color output without filesystem support, as that only requires testing to see if the output is a terminal. Fixes: #4439 PiperOrigin-RevId: 598929397 Change-Id: Idca7490e6e090951a78cd1cdd710f41d756a68b4
2024-01-16Do not emit stack traces for messages generated by GTEST_SKIP()Abseil Team
Stack traces in assertion failures are an extremely useful tool for developers tasked with investigating failing tests. It's difficult to understate this. In contrast to ordinary test assertions (e.g., ASSERT_TRUE or EXPECT_FALSE), GTEST_SKIP is a developer-authored directive to skip one or more tests. Stack traces emitted in skip messages do not give the developer useful information, as the skip message itself contains the code location where GTEST_SKIP was used. In addition to being noise in the output, symbolization of stack traces is not free. In some Chromium configurations, symbolization in a skipped test can incur a cost in excess of 25 seconds for a test that otherwise takes 0-1ms; see https://crbug.com/1517343#c9. In this CL, we suppress generation and emission of stack traces for kSkip messages to reduce the output noise and overhead of GTEST_SKIP(). PiperOrigin-RevId: 598899010 Change-Id: I46926fed452c8d7edcb3d636d8fed42cb6c0a9e9
2024-01-10only apply -lregex for qnx710 and newerMichael Leslie
2024-01-09Update CI builds to use Bazel 7.0.0Derek Mauro
--features=external_include_paths has been removed from Windows builds since it appears cause build command errors currently PiperOrigin-RevId: 597020418 Change-Id: Ie37be0d05f3a154ab0d3c3f7d39b4e2c0ed650a3
2024-01-09Add a note about argv requiring NULL termination.Abseil Team
Fixes: #4434 PiperOrigin-RevId: 596960654 Change-Id: I1f70cc0801764fe0328030c46254f82eb9893a49
2024-01-09Disable -Wfloat-equal in AppropriateResolution().Krzysztof Kosiński
This function makes exact floating point that are correct in this context, but trigger the compiler warning. PiperOrigin-RevId: 596944060 Change-Id: I4bba3c2abcf3ac189107530978961955ad47d6f0
2023-12-28Accept move-only callables in `InvokeArguments`Abseil Team
PiperOrigin-RevId: 594223533 Change-Id: I491fae7d851d4e0df07fb3627416949071fec8d6
2023-12-22Minor documentation correction.Abseil Team
PiperOrigin-RevId: 593126348 Change-Id: I78e12ab5dd2e5acc69b21250bdb04e62990b6309
2023-12-19Fix broken links in primer.mdDerek Mauro
Closes #4432 PiperOrigin-RevId: 592335698 Change-Id: I9859451981f58f1426255067d702a0767718b1d5
2023-12-18Fix data race in leak detectionAbseil Team
TSAN identified a data race between updates to the states_ map (ex. in Mock::UnregisterLocked) and the iteration done in this destructor. Writes to the map use g_gmock_mutex, but the destructor does not acquire it. Acquiring the lock here fixes the data race. It should only be possible to trigger this TSAN finding in cases where a mock object is deleted by a thread other than the main thread. PiperOrigin-RevId: 591935393 Change-Id: I9dd1faa40058d78e165a91333346514b4b73365c
2023-12-12Add `FAIL_AT` macro variant of `FAIL` matching `ADD_FAILURE`, `ADD_FAILURE_AT`Abseil Team
`FAIL_AT` is shorthand for `GTEST_FAIL_AT` like `FAIL` is for `GTEST_FAIL`. PiperOrigin-RevId: 590393926 Change-Id: I68263af8fa2f98ca0bbef509d475c84e22068018
2023-12-11Remove unnecessary conversionTom Hughes
`GetAbsolutePathToOutputFile` returns a `std::string` and `OpenFileForWriting` takes a `std::string&`. PiperOrigin-RevId: 589984409 Change-Id: I75be9cb105f49b3a279a5d33b1b82dfcfc912cfd
2023-12-04Merge pull request #4426 from tamaskenez:cmake_external_absl_re2Copybara-Service
PiperOrigin-RevId: 587836393 Change-Id: Ia8895898bd0a826b35dc0ebedd8c76503bc8cd43
2023-12-04Skip find_package(Python3) when not building testsDerek Mauro
#4424 claims this saves several seconds of build time Closes #4424 PiperOrigin-RevId: 587827426 Change-Id: I207779a6539f9af16a39d6b40887770dc930b74f
2023-12-01Allow using external absl and re2.Tamas Kenez
2023-11-27Implement `testing::Rethrow` to throw exceptions more easily via ↵Abseil Team
`std::exception_ptr` We avoid overloading or specializing `testing::Throw` as this is fundamentally a different operation than throwing the object. However, we disable the corresponding overload of `testing::Throw` to prevent likely mistakes in the usage. Fixes: #4412 PiperOrigin-RevId: 585745469 Change-Id: I03bb585427ce51983d914e88f2bf65a13545c920
2023-10-30Merge pull request #4397 from botovq:raiseCopybara-Service
PiperOrigin-RevId: 577958594 Change-Id: I8a27f67dc5b6817b741bfd2fc0f27c6302291a00
2023-10-26Export gmock-spec-builders.Abseil Team
gmock.h is the umbrella header to be used for rest of the library, and it also enables users to export certain details. This wasn't working for some interfaces like EXPECT_CALL because gmock-spec-builders wasn't explicitly exported. PiperOrigin-RevId: 576966583 Change-Id: Ie050430cf11384977cd95f4ed6e73235d6857057
2023-10-25Add missing include for raise(3)Theo Buehler
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.
2023-10-23StartsWith: Explicitly construct matcher-typed strings from matchee parameterDino Radakovic
The current implementation breaks for absl::string_view on gcc, c++14: https://godbolt.org/z/Tzd3q1fqx Closes #4391 PiperOrigin-RevId: 575853981 Change-Id: I7b782598add480eb69d4ca27ea4a4bf5f758f6a3
2023-10-19Improve error message for invalid parameterized test names.Abseil Team
PiperOrigin-RevId: 574992011 Change-Id: Id6030a9e5f317966186cc48ef2c09ad97fa15d3e
2023-10-17s/::testing::/testing::/ in test documentation outside of using statements ↵Abseil Team
to align with best practice PiperOrigin-RevId: 574377544 Change-Id: I0ca69a3bf14cc1aab75784eba220a48bf50cef04
2023-10-17gtest-death-test-internal: Delete obsolete string constantsDino Radakovic
These are not used anywhere in googletest and they are in namespace `testing::internal` PiperOrigin-RevId: 574171727 Change-Id: I5f668157a81ba3efaed77c1302b40cf07eeda52b
2023-10-05Fix RE::Init for Android and NetBSD.Abseil Team
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
2023-10-03gmock_cook_book: Document `DoAll`'s return type requirementDino Radakovic
The requirement is vaguely documented by "Only the return value of the last action in the sequence will be used.". However, this can be misleading, as users could potentially expect default-constructed values to be returned in absence of a matching return type. PiperOrigin-RevId: 570450839 Change-Id: Ibd98a6e6b2aaf2a8cfc15ed6aeab442526eab98e
2023-10-02Merge pull request #4382 from idzm:fix_cmake_commentsCopybara-Service
PiperOrigin-RevId: 570161165 Change-Id: Idf7eafb163bb067b0031e25a183d5c9cc3e3f378
2023-09-30Upgrade googletest to most recent upstream version. am: a00801a508 am: ↵Krzysztof Kosiński
1fe5590332 am: b4567e5fb1 am: 48eac985ab am: 890e5b7689 Original change: https://android-review.googlesource.com/c/platform/external/googletest/+/2765314 Change-Id: Iabbe4959ee7de3dc720a2afc81bd819d645bad41 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-30Upgrade googletest to most recent upstream version. am: a00801a508 am: ↵Krzysztof Kosiński
1fe5590332 am: b4567e5fb1 am: 48eac985ab Original change: https://android-review.googlesource.com/c/platform/external/googletest/+/2765314 Change-Id: I2daa58e6acde389e9697cebc16b060f4b35fbca1 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-30Upgrade googletest to most recent upstream version. am: a00801a508 am: ↵Krzysztof Kosiński
1fe5590332 am: b4567e5fb1 Original change: https://android-review.googlesource.com/c/platform/external/googletest/+/2765314 Change-Id: I2574a4de82a4033b42730857bf6705c3eab9de06 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29Upgrade googletest to most recent upstream version. am: a00801a508 am: ↵Krzysztof Kosiński
1fe5590332 Original change: https://android-review.googlesource.com/c/platform/external/googletest/+/2765314 Change-Id: I1cb3e865d672e28f4776f228516af437ab80b7b1 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29Upgrade googletest to most recent upstream version. am: a00801a508Krzysztof Kosiński
Original change: https://android-review.googlesource.com/c/platform/external/googletest/+/2765314 Change-Id: I9b03f5f234c0117bca0a1fcd58a60a6d4caf50f6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29cmake: Fix comments in cmake filesDzmitry Ivaniuk
Remove extra spaces. Fix so that the comment line starts with a capital letter and ends with a dot.
2023-09-28Upgrade googletest to most recent upstream version.Krzysztof Kosiński
Changes needed to complete the upgrade: - Bump GMock C++ version to C++14. - Set gmock_tests to C++14 to work around an issue with ExpectCallTest.NonMoveableType, which fails to compile with the current AOSP compiler. - Disable -Wthread-safety-negative for the Notification type (breaks code that enables -Werror). - Disable -Wfloat-equal in AppropriateResolution (ditto). - Disable -Wuser-defined-warnings for the pointer printer to avoid errors in mock methods from the std namespace manipulation in android-base/logging.h. - Temporarily add an inclusion of <iomanip> to gtest/internal/custom/gtest-port.h. This header was previously included by gtest/internal/gtest-internal.h and many tests do not include it explicitly. - Remove the newline added in AddTestPartResult so that the golden output tests in gtest_isolated_tests do not break. Bug: 271622675 Test: presubmit Change-Id: Ic34a9add234dbbc5fc5162d0408c78844f2ae1e6
2023-09-25Resolve `-Wundef` triggering on `GTEST_CREATE_SHARED_LIBRARY` and ↵Abseil Team
`GTEST_LINKED_AS_SHARED_LIBRARY` with shared libraries in GoogleTest Fixes: #4372 PiperOrigin-RevId: 568327612 Change-Id: Ifc47f1a2a2648c29858a22966331557cc928cc47
2023-09-25Merge pull request #4374 from masbug:mainCopybara-Service
PiperOrigin-RevId: 568317621 Change-Id: Icf7fb519f96f5e88eb0df491eed143134c8ac6eb
2023-09-22Update C++ feature detection in `gtest-port.h` to rely on feature test ↵Abseil Team
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
2023-09-21Use `absl::HasAbslStringify`, instead of the internal version.Abseil Team
PiperOrigin-RevId: 567349341 Change-Id: I35f2679901aecbe9cb90d2e78ff28c5e383e7257
2023-09-21googletest: Update absl to version with HasAbslStringifyDino Radakovic
https://github.com/abseil/abseil-cpp/commit/9e1789ffea47fdeb3133aa42aa9592f3673fb6ed PiperOrigin-RevId: 567324946 Change-Id: I8adc5803a81075a635dad79aa0312d4455e1ad63
2023-09-21Fix compile warnings in gmock-function-mocker.hMitja Spes
Template type int changed to size_t. This fixes compile warning `conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result` in gmock-function-mocker.h.
2023-09-18Update code with IWYU annotations.Abseil Team
PiperOrigin-RevId: 566424331 Change-Id: I0e16d979b9d79643c882c5082e154842983a5317
2023-09-18Use the `empty()` method to check for emptiness instead of `length()`Abseil Team
PiperOrigin-RevId: 566247438 Change-Id: I8199ef53310a057abbe23f8f4295507b60d6b707
2023-09-14GoogleTest FAQ: minor punctuation fixesMichael Hirshleifer
PiperOrigin-RevId: 565411290 Change-Id: I57e94c679183e39eec2a2835f330b52fc9302767
2023-09-14Remove Googletest FAQ entry for obsolete `ProtocolMessageEquals` and ↵Michael Hirshleifer
`ProtocolMessageEquiv` * These long-dead variants of the proto matchers don't exist in the current version of Googletest. * No evidence of external usage: [the only external references I see](https://www.google.com/search?q=%22protocolmessageequals%22+OR+%22protocolmessageequals%22) are copies of this guide. Possibly they were already removed by the time Googletest was publicly released. PiperOrigin-RevId: 565358401 Change-Id: I61379b7333fa8ee19cd5520caedf2c539f54c2d7
2023-09-13Merge pull request #4342 from tanzislam:prefer-tmpdir-on-androidCopybara-Service
PiperOrigin-RevId: 565230380 Change-Id: I6e91eea46d05413d4d87e73a11941786604d9f27