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

Unified Diff: mojo/public/cpp/bindings/tests/binding_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
« no previous file with comments | « mojo/gpu/texture_uploader.cc ('k') | mojo/public/cpp/bindings/tests/interface_ptr_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/binding_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/binding_unittest.cc b/mojo/public/cpp/bindings/tests/binding_unittest.cc
index 59d250199812f8c00e2b76cb32d513144e9eaf76..73374c0e859b0775793fbd400ebef91009010389 100644
--- a/mojo/public/cpp/bindings/tests/binding_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/binding_unittest.cc
@@ -85,7 +85,7 @@ TEST_F(BindingTest, DestroyClosesMessagePipe) {
auto called_cb = [&called](int32_t result) { called = true; };
{
Binding<sample::Service> binding(&impl, request.Pass());
- ptr->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ ptr->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
called_cb);
loop().RunUntilIdle();
EXPECT_TRUE(called);
@@ -98,7 +98,7 @@ TEST_F(BindingTest, DestroyClosesMessagePipe) {
// And calls should fail.
called = false;
- ptr->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ ptr->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
called_cb);
loop().RunUntilIdle();
EXPECT_FALSE(called);
@@ -176,7 +176,7 @@ TEST_F(BindingTest, Unbind) {
bool called = false;
auto called_cb = [&called](int32_t result) { called = true; };
- ptr->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ ptr->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
called_cb);
loop().RunUntilIdle();
EXPECT_TRUE(called);
@@ -185,7 +185,7 @@ TEST_F(BindingTest, Unbind) {
auto request = binding.Unbind();
EXPECT_FALSE(binding.is_bound());
// All calls should fail when not bound...
- ptr->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ ptr->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
called_cb);
loop().RunUntilIdle();
EXPECT_FALSE(called);
@@ -194,7 +194,7 @@ TEST_F(BindingTest, Unbind) {
binding.Bind(request.Pass());
EXPECT_TRUE(binding.is_bound());
// ...and should succeed again when the rebound.
- ptr->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ ptr->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
called_cb);
loop().RunUntilIdle();
EXPECT_TRUE(called);
@@ -208,7 +208,7 @@ class IntegerAccessorImpl : public sample::IntegerAccessor {
private:
// sample::IntegerAccessor implementation.
void GetInteger(const GetIntegerCallback& callback) override {
- callback.Run(1, sample::ENUM_VALUE);
+ callback.Run(1, sample::Enum::VALUE);
}
void SetInteger(int64_t data, sample::Enum type) override {}
@@ -240,7 +240,7 @@ TEST_F(StrongBindingTest, DestroyClosesMessagePipe) {
auto called_cb = [&called](int32_t result) { called = true; };
{
StrongBinding<sample::Service> binding(&impl, request.Pass());
- ptr->Frobinate(nullptr, sample::Service::BAZ_OPTIONS_REGULAR, nullptr,
+ ptr->Frobinate(nullptr, sample::Service::BazOptions::REGULAR, nullptr,
called_cb);
loop().RunUntilIdle();
EXPECT_TRUE(called);
« no previous file with comments | « mojo/gpu/texture_uploader.cc ('k') | mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698