Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit c26e6ce

Browse files
authored
Roll a new version of googletest (2021->2023). (#48285)
1 parent 63484b3 commit c26e6ce

File tree

3 files changed

+27
-70
lines changed

3 files changed

+27
-70
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ deps = {
303303
Var('chromium_git') + '/external/github.com/google/benchmark' + '@' + '431abd149fd76a072f821913c0340137cc755f36',
304304

305305
'src/third_party/googletest':
306-
Var('chromium_git') + '/external/github.com/google/googletest' + '@' + '054a986a8513149e8374fc669a5fe40117ca6b41',
306+
Var('chromium_git') + '/external/github.com/google/googletest' + '@' + '7f036c5563af7d0329f20e8bb42effb04629f0c0',
307307

308308
'src/third_party/boringssl':
309309
Var('dart_git') + '/boringssl_gen.git' + '@' + Var('dart_boringssl_gen_rev'),

build/secondary/third_party/googletest/BUILD.gn

Lines changed: 7 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -21,41 +21,12 @@ static_library("gtest") {
2121
"googletest/include/gtest/gtest-spi.h",
2222
"googletest/include/gtest/gtest.h",
2323
]
24-
sources = [
25-
"googletest/include/gtest/gtest-death-test.h",
26-
"googletest/include/gtest/gtest-message.h",
27-
"googletest/include/gtest/gtest-param-test.h",
28-
"googletest/include/gtest/gtest-printers.h",
29-
"googletest/include/gtest/gtest-test-part.h",
30-
"googletest/include/gtest/gtest-typed-test.h",
31-
"googletest/include/gtest/gtest_pred_impl.h",
32-
"googletest/include/gtest/gtest_prod.h",
33-
"googletest/include/gtest/internal/custom/gtest-port.h",
34-
"googletest/include/gtest/internal/custom/gtest-printers.h",
35-
"googletest/include/gtest/internal/custom/gtest.h",
36-
"googletest/include/gtest/internal/gtest-death-test-internal.h",
37-
"googletest/include/gtest/internal/gtest-filepath.h",
38-
"googletest/include/gtest/internal/gtest-internal.h",
39-
"googletest/include/gtest/internal/gtest-linked_ptr.h",
40-
"googletest/include/gtest/internal/gtest-param-util-generated.h",
41-
"googletest/include/gtest/internal/gtest-param-util.h",
42-
"googletest/include/gtest/internal/gtest-port-arch.h",
43-
"googletest/include/gtest/internal/gtest-port.h",
44-
"googletest/include/gtest/internal/gtest-string.h",
45-
"googletest/include/gtest/internal/gtest-tuple.h",
46-
"googletest/include/gtest/internal/gtest-type-util.h",
47-
"googletest/src/gtest-all.cc",
48-
"googletest/src/gtest-death-test.cc",
49-
"googletest/src/gtest-filepath.cc",
50-
"googletest/src/gtest-internal-inl.h",
51-
"googletest/src/gtest-matchers.cc",
52-
"googletest/src/gtest-port.cc",
53-
"googletest/src/gtest-printers.cc",
54-
"googletest/src/gtest-test-part.cc",
55-
"googletest/src/gtest-typed-test.cc",
56-
"googletest/src/gtest.cc",
57-
]
58-
sources -= [ "googletest/src/gtest-all.cc" ]
24+
25+
# Only add the "*-all.cc" files (and no headers) to improve maintainability
26+
# from upstream refactoring. The "*-all.cc" files include the respective
27+
# source files.
28+
sources = [ "googletest/src/gtest-all.cc" ]
29+
5930
public_configs = [ ":gtest_config" ]
6031
configs += [ ":gtest_private_config" ]
6132

@@ -217,31 +188,7 @@ config("gmock_config") {
217188
static_library("gmock") {
218189
testonly = true
219190
public = [ "googlemock/include/gmock/gmock.h" ]
220-
sources = [
221-
"googlemock/include/gmock/gmock-actions.h",
222-
"googlemock/include/gmock/gmock-cardinalities.h",
223-
"googlemock/include/gmock/gmock-generated-actions.h",
224-
"googlemock/include/gmock/gmock-generated-function-mockers.h",
225-
"googlemock/include/gmock/gmock-generated-matchers.h",
226-
"googlemock/include/gmock/gmock-generated-nice-strict.h",
227-
"googlemock/include/gmock/gmock-matchers.h",
228-
"googlemock/include/gmock/gmock-more-actions.h",
229-
"googlemock/include/gmock/gmock-more-matchers.h",
230-
"googlemock/include/gmock/gmock-spec-builders.h",
231-
"googlemock/include/gmock/internal/custom/gmock-generated-actions.h",
232-
"googlemock/include/gmock/internal/custom/gmock-matchers.h",
233-
"googlemock/include/gmock/internal/custom/gmock-port.h",
234-
"googlemock/include/gmock/internal/gmock-generated-internal-utils.h",
235-
"googlemock/include/gmock/internal/gmock-internal-utils.h",
236-
"googlemock/include/gmock/internal/gmock-port.h",
237-
"googlemock/src/gmock-all.cc",
238-
"googlemock/src/gmock-cardinalities.cc",
239-
"googlemock/src/gmock-internal-utils.cc",
240-
"googlemock/src/gmock-matchers.cc",
241-
"googlemock/src/gmock-spec-builders.cc",
242-
"googlemock/src/gmock.cc",
243-
]
244-
sources -= [ "googlemock/src/gmock-all.cc" ]
191+
sources = [ "googlemock/src/gmock-all.cc" ]
245192
public_configs = [ ":gmock_config" ]
246193
configs += [ ":gmock_private_config" ]
247194
deps = [ ":gtest" ]

shell/platform/fuchsia/flutter/tests/fakes/scenic/fake_flatland_types.h

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525

2626
#include "flutter/fml/macros.h"
2727

28+
namespace fuchsia {
29+
namespace math {
30+
2831
inline bool operator==(const fuchsia::math::SizeU& a,
2932
const fuchsia::math::SizeU& b) {
3033
return a.width == b.width && a.height == b.height;
@@ -56,6 +59,20 @@ inline bool operator==(const fuchsia::math::RectF& a,
5659
return a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height;
5760
}
5861

62+
inline bool operator==(const std::optional<fuchsia::math::Rect>& a,
63+
const std::optional<fuchsia::math::Rect>& b) {
64+
if (a.has_value() != b.has_value()) {
65+
return false;
66+
}
67+
if (!a.has_value()) {
68+
}
69+
return a.value() == b.value();
70+
}
71+
72+
} // namespace math
73+
74+
namespace ui::composition {
75+
5976
inline bool operator==(const fuchsia::ui::composition::ContentId& a,
6077
const fuchsia::ui::composition::ContentId& b) {
6178
return a.value == b.value;
@@ -125,15 +142,8 @@ inline bool operator==(
125142
return true;
126143
}
127144

128-
inline bool operator==(const std::optional<fuchsia::math::Rect>& a,
129-
const std::optional<fuchsia::math::Rect>& b) {
130-
if (a.has_value() != b.has_value()) {
131-
return false;
132-
}
133-
if (!a.has_value()) {
134-
}
135-
return a.value() == b.value();
136-
}
145+
} // namespace ui::composition
146+
} // namespace fuchsia
137147

138148
namespace flutter_runner::testing {
139149

0 commit comments

Comments
 (0)