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

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

Issue 2136733002: Mojo C++ bindings: add a new mode to generator to use native STL/WTF types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@67_new
Patch Set: . Created 4 years, 5 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/stl_converters_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/stl_converters_unittest.cc b/mojo/public/cpp/bindings/tests/stl_converters_unittest.cc
index 282480b1600e56778d8a9acf37ed412f0bfcc3c3..92a31b35391a5c2cb41e88b170e032c091b236e7 100644
--- a/mojo/public/cpp/bindings/tests/stl_converters_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/stl_converters_unittest.cc
@@ -73,20 +73,20 @@ TEST_F(STLConvertersTest, RecursiveConversion) {
TEST_F(STLConvertersTest, StopsAtMojoStruct) {
Array<NamedRegionPtr> mojo_obj(1);
mojo_obj[0] = NamedRegion::New();
- mojo_obj[0]->name = "hello";
- mojo_obj[0]->rects.resize(3);
+ mojo_obj[0]->name.emplace("hello");
+ mojo_obj[0]->rects.emplace(3);
std::vector<NamedRegionPtr> stl_obj = UnwrapToSTLType(std::move(mojo_obj));
ASSERT_EQ(1u, stl_obj.size());
- ASSERT_EQ("hello", stl_obj[0]->name);
- ASSERT_EQ(3u, stl_obj[0]->rects.size());
+ ASSERT_EQ("hello", stl_obj[0]->name.value());
+ ASSERT_EQ(3u, stl_obj[0]->rects->size());
Array<NamedRegionPtr> mojo_obj2 = WrapSTLType(std::move(stl_obj));
ASSERT_EQ(1u, mojo_obj2.size());
- ASSERT_EQ("hello", mojo_obj2[0]->name);
- ASSERT_EQ(3u, mojo_obj2[0]->rects.size());
+ ASSERT_EQ("hello", mojo_obj2[0]->name.value());
+ ASSERT_EQ(3u, mojo_obj2[0]->rects->size());
}
} // namespace test
« no previous file with comments | « mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc ('k') | mojo/public/cpp/bindings/tests/struct_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698