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

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

Issue 1375313006: For c++, Generate enum classes instead of enum from mojom. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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
Index: mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc b/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
index 6c192854ee78ea94f84a4fc6ef75898cf1d3027e..4324c0e976fcff8a74c190a488cee7a77caf76f4 100644
--- a/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
@@ -175,7 +175,7 @@ class IntegerAccessorImpl : public sample::IntegerAccessor {
private:
// sample::IntegerAccessor implementation.
void GetInteger(const GetIntegerCallback& callback) override {
- callback.Run(integer_, sample::ENUM_VALUE);
+ callback.Run(integer_, sample::Enum::VALUE);
}
void SetInteger(int64_t data, sample::Enum type) override { integer_ = data; }
@@ -378,9 +378,9 @@ TEST_F(InterfacePtrTest, ReentrantWaitForIncomingMethodCall) {
sample::ServicePtr proxy;
ReentrantServiceImpl impl(GetProxy(&proxy));
- proxy->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ proxy->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
sample::Service::FrobinateCallback());
- proxy->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ proxy->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
sample::Service::FrobinateCallback());
PumpMessages();
@@ -412,14 +412,14 @@ TEST_F(InterfacePtrTest, RequireVersion) {
ptr.RequireVersion(1u);
EXPECT_EQ(1u, ptr.version());
- ptr->SetInteger(123, sample::ENUM_VALUE);
+ ptr->SetInteger(123, sample::Enum::VALUE);
PumpMessages();
EXPECT_FALSE(ptr.encountered_error());
EXPECT_EQ(123, impl.integer());
ptr.RequireVersion(3u);
EXPECT_EQ(3u, ptr.version());
- ptr->SetInteger(456, sample::ENUM_VALUE);
+ ptr->SetInteger(456, sample::Enum::VALUE);
PumpMessages();
EXPECT_FALSE(ptr.encountered_error());
EXPECT_EQ(456, impl.integer());
@@ -428,7 +428,7 @@ TEST_F(InterfacePtrTest, RequireVersion) {
ptr.RequireVersion(4u);
// This value is set to the input of RequireVersion() synchronously.
EXPECT_EQ(4u, ptr.version());
- ptr->SetInteger(789, sample::ENUM_VALUE);
+ ptr->SetInteger(789, sample::Enum::VALUE);
PumpMessages();
EXPECT_TRUE(ptr.encountered_error());
// The call to SetInteger() after RequireVersion(4u) is ignored.
« no previous file with comments | « mojo/public/cpp/bindings/tests/binding_unittest.cc ('k') | mojo/public/cpp/bindings/tests/request_response_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698