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

Side by Side Diff: mojo/public/tests/bindings/sample_service_unittest.cc

Issue 141893004: Support default values for arrays of POD data types in mojom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/public/tests/bindings/sample_service.mojom ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 #include <ostream> 6 #include <ostream>
7 #include <string> 7 #include <string>
8 8
9 #include "mojo/public/environment/environment.h" 9 #include "mojo/public/environment/environment.h"
10 #include "mojom/sample_service.h" 10 #include "mojom/sample_service.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 SimpleMessageReceiver receiver; 314 SimpleMessageReceiver receiver;
315 mojo::AllocationScope scope; 315 mojo::AllocationScope scope;
316 316
317 Bar bar = Bar::Builder().Finish(); 317 Bar bar = Bar::Builder().Finish();
318 EXPECT_EQ(255, bar.alpha()); 318 EXPECT_EQ(255, bar.alpha());
319 319
320 Foo foo = Foo::Builder().Finish(); 320 Foo foo = Foo::Builder().Finish();
321 ASSERT_FALSE(foo.name().is_null()); 321 ASSERT_FALSE(foo.name().is_null());
322 EXPECT_EQ("Fooby", foo.name().To<std::string>()); 322 EXPECT_EQ("Fooby", foo.name().To<std::string>());
323 EXPECT_TRUE(foo.a()); 323 EXPECT_TRUE(foo.a());
324 EXPECT_EQ(3u, foo.data().size());
325 EXPECT_EQ(1, foo.data()[0]);
326 EXPECT_EQ(2, foo.data()[1]);
327 EXPECT_EQ(3, foo.data()[2]);
324 } 328 }
325 329
326 } // namespace sample 330 } // namespace sample
OLDNEW
« no previous file with comments | « mojo/public/tests/bindings/sample_service.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698