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

Try rolling a new version of googletest (2021->2023). #48285

Merged
merged 8 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ deps = {
Var('chromium_git') + '/external/github.com/google/benchmark' + '@' + '431abd149fd76a072f821913c0340137cc755f36',

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

'src/third_party/boringssl':
Var('dart_git') + '/boringssl_gen.git' + '@' + Var('dart_boringssl_gen_rev'),
Expand Down
67 changes: 7 additions & 60 deletions build/secondary/third_party/googletest/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,41 +21,12 @@ static_library("gtest") {
"googletest/include/gtest/gtest-spi.h",
"googletest/include/gtest/gtest.h",
]
sources = [
"googletest/include/gtest/gtest-death-test.h",
"googletest/include/gtest/gtest-message.h",
"googletest/include/gtest/gtest-param-test.h",
"googletest/include/gtest/gtest-printers.h",
"googletest/include/gtest/gtest-test-part.h",
"googletest/include/gtest/gtest-typed-test.h",
"googletest/include/gtest/gtest_pred_impl.h",
"googletest/include/gtest/gtest_prod.h",
"googletest/include/gtest/internal/custom/gtest-port.h",
"googletest/include/gtest/internal/custom/gtest-printers.h",
"googletest/include/gtest/internal/custom/gtest.h",
"googletest/include/gtest/internal/gtest-death-test-internal.h",
"googletest/include/gtest/internal/gtest-filepath.h",
"googletest/include/gtest/internal/gtest-internal.h",
"googletest/include/gtest/internal/gtest-linked_ptr.h",
"googletest/include/gtest/internal/gtest-param-util-generated.h",
"googletest/include/gtest/internal/gtest-param-util.h",
"googletest/include/gtest/internal/gtest-port-arch.h",
"googletest/include/gtest/internal/gtest-port.h",
"googletest/include/gtest/internal/gtest-string.h",
"googletest/include/gtest/internal/gtest-tuple.h",
"googletest/include/gtest/internal/gtest-type-util.h",
"googletest/src/gtest-all.cc",
"googletest/src/gtest-death-test.cc",
"googletest/src/gtest-filepath.cc",
"googletest/src/gtest-internal-inl.h",
"googletest/src/gtest-matchers.cc",
"googletest/src/gtest-port.cc",
"googletest/src/gtest-printers.cc",
"googletest/src/gtest-test-part.cc",
"googletest/src/gtest-typed-test.cc",
"googletest/src/gtest.cc",
]
sources -= [ "googletest/src/gtest-all.cc" ]

# Only add the "*-all.cc" files (and no headers) to improve maintainability
# from upstream refactoring. The "*-all.cc" files include the respective
# source files.
sources = [ "googletest/src/gtest-all.cc" ]

public_configs = [ ":gtest_config" ]
configs += [ ":gtest_private_config" ]

Expand Down Expand Up @@ -217,31 +188,7 @@ config("gmock_config") {
static_library("gmock") {
testonly = true
public = [ "googlemock/include/gmock/gmock.h" ]
sources = [
"googlemock/include/gmock/gmock-actions.h",
"googlemock/include/gmock/gmock-cardinalities.h",
"googlemock/include/gmock/gmock-generated-actions.h",
"googlemock/include/gmock/gmock-generated-function-mockers.h",
"googlemock/include/gmock/gmock-generated-matchers.h",
"googlemock/include/gmock/gmock-generated-nice-strict.h",
"googlemock/include/gmock/gmock-matchers.h",
"googlemock/include/gmock/gmock-more-actions.h",
"googlemock/include/gmock/gmock-more-matchers.h",
"googlemock/include/gmock/gmock-spec-builders.h",
"googlemock/include/gmock/internal/custom/gmock-generated-actions.h",
"googlemock/include/gmock/internal/custom/gmock-matchers.h",
"googlemock/include/gmock/internal/custom/gmock-port.h",
"googlemock/include/gmock/internal/gmock-generated-internal-utils.h",
"googlemock/include/gmock/internal/gmock-internal-utils.h",
"googlemock/include/gmock/internal/gmock-port.h",
"googlemock/src/gmock-all.cc",
"googlemock/src/gmock-cardinalities.cc",
"googlemock/src/gmock-internal-utils.cc",
"googlemock/src/gmock-matchers.cc",
"googlemock/src/gmock-spec-builders.cc",
"googlemock/src/gmock.cc",
]
sources -= [ "googlemock/src/gmock-all.cc" ]
sources = [ "googlemock/src/gmock-all.cc" ]
public_configs = [ ":gmock_config" ]
configs += [ ":gmock_private_config" ]
deps = [ ":gtest" ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

#include "flutter/fml/macros.h"

namespace fuchsia {
namespace math {

inline bool operator==(const fuchsia::math::SizeU& a,
const fuchsia::math::SizeU& b) {
return a.width == b.width && a.height == b.height;
Expand Down Expand Up @@ -56,6 +59,20 @@ inline bool operator==(const fuchsia::math::RectF& a,
return a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height;
}

inline bool operator==(const std::optional<fuchsia::math::Rect>& a,
const std::optional<fuchsia::math::Rect>& b) {
if (a.has_value() != b.has_value()) {
return false;
}
if (!a.has_value()) {
}
return a.value() == b.value();
}

} // namespace math

namespace ui::composition {

inline bool operator==(const fuchsia::ui::composition::ContentId& a,
const fuchsia::ui::composition::ContentId& b) {
return a.value == b.value;
Expand Down Expand Up @@ -125,15 +142,8 @@ inline bool operator==(
return true;
}

inline bool operator==(const std::optional<fuchsia::math::Rect>& a,
const std::optional<fuchsia::math::Rect>& b) {
if (a.has_value() != b.has_value()) {
return false;
}
if (!a.has_value()) {
}
return a.value() == b.value();
}
} // namespace ui::composition
} // namespace fuchsia

namespace flutter_runner::testing {

Expand Down