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

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

Issue 2608513002: Remove mojo::String. (Closed)
Patch Set: Created 3 years, 12 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/wtf_types_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/wtf_types_unittest.cc b/mojo/public/cpp/bindings/tests/wtf_types_unittest.cc
index d18241e56848829aee7291de44ba0e8bf39273e7..03644726665073499a2c9fe5aed43e4ca286c28b 100644
--- a/mojo/public/cpp/bindings/tests/wtf_types_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/wtf_types_unittest.cc
@@ -167,14 +167,14 @@ TEST_F(WTFTypesTest, Serialization_WTFArrayToMojoArray) {
mojo::internal::Serialize<MojomType>(strs, &buf, &data, &validate_params,
&context);
- Array<mojo::String> strs2;
+ Array<base::Optional<std::string>> strs2;
mojo::internal::Deserialize<MojomType>(data, &strs2, &context);
ASSERT_EQ(4u, strs2.size());
- EXPECT_TRUE(strs2[0].is_null());
- EXPECT_TRUE("" == strs2[1]);
- EXPECT_TRUE(kHelloWorld == strs2[2]);
- EXPECT_TRUE(kUTF8HelloWorld == strs2[3]);
+ EXPECT_FALSE(strs2[0]);
+ EXPECT_EQ("", *strs2[1]);
+ EXPECT_EQ(kHelloWorld, *strs2[2]);
+ EXPECT_EQ(kUTF8HelloWorld, *strs2[3]);
}
TEST_F(WTFTypesTest, Serialization_PublicAPI) {

Powered by Google App Engine
This is Rietveld 408576698