Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1450)

Unified Diff: mojo/public/cpp/bindings/tests/equals_unittest.cc

Issue 2031823002: Mojo C++ bindings: more consistent Clone() and Equals(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/map.h ('k') | mojo/public/cpp/bindings/tests/struct_traits_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/tests/equals_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/equals_unittest.cc b/mojo/public/cpp/bindings/tests/equals_unittest.cc
index 1501a3dc800b0d98342dd43701dae65e63f87762..1add5b0b4043f8a0301a15ef4744858a714480ba 100644
--- a/mojo/public/cpp/bindings/tests/equals_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/equals_unittest.cc
@@ -5,7 +5,6 @@
#include <utility>
#include "base/message_loop/message_loop.h"
-#include "mojo/public/cpp/bindings/lib/value_traits.h"
#include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -115,50 +114,45 @@ TEST_F(EqualsTest, Map) {
}
TEST_F(EqualsTest, InterfacePtr) {
- using InterfaceValueTraits = mojo::internal::ValueTraits<SomeInterfacePtr>;
-
base::MessageLoop message_loop;
SomeInterfacePtr inf1;
SomeInterfacePtr inf2;
- EXPECT_TRUE(InterfaceValueTraits::Equals(inf1, inf1));
- EXPECT_TRUE(InterfaceValueTraits::Equals(inf1, inf2));
+ EXPECT_TRUE(inf1.Equals(inf1));
+ EXPECT_TRUE(inf1.Equals(inf2));
auto inf1_request = GetProxy(&inf1);
ALLOW_UNUSED_LOCAL(inf1_request);
- EXPECT_TRUE(InterfaceValueTraits::Equals(inf1, inf1));
- EXPECT_FALSE(InterfaceValueTraits::Equals(inf1, inf2));
+ EXPECT_TRUE(inf1.Equals(inf1));
+ EXPECT_FALSE(inf1.Equals(inf2));
auto inf2_request = GetProxy(&inf2);
ALLOW_UNUSED_LOCAL(inf2_request);
- EXPECT_FALSE(InterfaceValueTraits::Equals(inf1, inf2));
+ EXPECT_FALSE(inf1.Equals(inf2));
}
TEST_F(EqualsTest, InterfaceRequest) {
- using RequestValueTraits =
- mojo::internal::ValueTraits<InterfaceRequest<SomeInterface>>;
-
base::MessageLoop message_loop;
InterfaceRequest<SomeInterface> req1;
InterfaceRequest<SomeInterface> req2;
- EXPECT_TRUE(RequestValueTraits::Equals(req1, req1));
- EXPECT_TRUE(RequestValueTraits::Equals(req1, req2));
+ EXPECT_TRUE(req1.Equals(req1));
+ EXPECT_TRUE(req1.Equals(req2));
SomeInterfacePtr inf1;
req1 = GetProxy(&inf1);
- EXPECT_TRUE(RequestValueTraits::Equals(req1, req1));
- EXPECT_FALSE(RequestValueTraits::Equals(req1, req2));
+ EXPECT_TRUE(req1.Equals(req1));
+ EXPECT_FALSE(req1.Equals(req2));
SomeInterfacePtr inf2;
req2 = GetProxy(&inf2);
- EXPECT_FALSE(RequestValueTraits::Equals(req1, req2));
+ EXPECT_FALSE(req1.Equals(req2));
}
} // test
« no previous file with comments | « mojo/public/cpp/bindings/map.h ('k') | mojo/public/cpp/bindings/tests/struct_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698