diff options
author | Krzysztof Kosiński <krzysio@google.com> | 2023-09-28 00:37:09 +0000 |
---|---|---|
committer | Krzysztof Kosiński <krzysio@google.com> | 2023-09-28 09:44:10 +0000 |
commit | a00801a508bed52885e961b08058af6af7206bf9 (patch) | |
tree | e568063ca5d9e9e557d71e24304156a62534b94a /googletest/samples/sample2.cc | |
parent | 817e9f6edc2fc8301b92403962478d2df0024924 (diff) | |
parent | e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b (diff) | |
download | googletest-a00801a508bed52885e961b08058af6af7206bf9.tar.gz |
Upgrade googletest to most recent upstream version.
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
Diffstat (limited to 'googletest/samples/sample2.cc')
-rw-r--r-- | googletest/samples/sample2.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/googletest/samples/sample2.cc b/googletest/samples/sample2.cc index d8e87239..be7c4c99 100644 --- a/googletest/samples/sample2.cc +++ b/googletest/samples/sample2.cc @@ -38,7 +38,7 @@ const char* MyString::CloneCString(const char* a_c_string) { if (a_c_string == nullptr) return nullptr; const size_t len = strlen(a_c_string); - char* const clone = new char[ len + 1 ]; + char* const clone = new char[len + 1]; memcpy(clone, a_c_string, len + 1); return clone; |