Chromium Code Reviews| Index: tools/json_schema_compiler/test/objects_unittest.cc |
| diff --git a/tools/json_schema_compiler/test/objects_unittest.cc b/tools/json_schema_compiler/test/objects_unittest.cc |
| index cd08793532364e7ef42132c6d1902b9872d01c6c..fbd31ce44d6fee1403ec55dbae7b08679815ee16 100644 |
| --- a/tools/json_schema_compiler/test/objects_unittest.cc |
| +++ b/tools/json_schema_compiler/test/objects_unittest.cc |
| @@ -96,6 +96,7 @@ TEST(JsonSchemaCompilerMovableObjectsTest, MovableObjectsTest) { |
| parent.pods = std::move(pods); |
| parent.strs.push_back("pstr"); |
| parent.blob.additional_properties.SetString("key", "val"); |
| + parent.choice.as_string.reset(new std::string("string")); |
| MovableParent parent2(std::move(parent)); |
| ASSERT_EQ(2u, parent2.pods.size()); |
| @@ -109,6 +110,8 @@ TEST(JsonSchemaCompilerMovableObjectsTest, MovableObjectsTest) { |
| EXPECT_FALSE(parent2.pods[1].b); |
| ASSERT_EQ(1u, parent2.strs.size()); |
| EXPECT_EQ("pstr", parent2.strs[0]); |
| + ASSERT_TRUE(parent2.choice.as_string.get()); |
| + EXPECT_EQ("string", *parent2.choice.as_string); |
|
asargent_no_longer_on_chrome
2016/03/31 21:56:34
maybe also add a test of as_movable_pod?
Devlin
2016/04/01 00:09:01
Done.
|
| std::string blob_string; |
| EXPECT_TRUE( |
| parent2.blob.additional_properties.GetString("key", &blob_string)); |