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

Unified Diff: tools/json_schema_compiler/test/additional_properties_unittest.cc

Issue 10701012: JSON Schema Compiler: Added event compilation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Synced. Created 8 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
« no previous file with comments | « tools/json_schema_compiler/schema_bundle_generator.py ('k') | tools/json_schema_compiler/test/any.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/test/additional_properties_unittest.cc
diff --git a/tools/json_schema_compiler/test/additional_properties_unittest.cc b/tools/json_schema_compiler/test/additional_properties_unittest.cc
index ef0ab296eec650c9b29211f50170745b67f18cbf..4c3d720988d1a74d76f7bc4b503a2c024420167a 100644
--- a/tools/json_schema_compiler/test/additional_properties_unittest.cc
+++ b/tools/json_schema_compiler/test/additional_properties_unittest.cc
@@ -48,17 +48,15 @@ TEST(JsonSchemaCompilerAdditionalPropertiesTest,
TEST(JsonSchemaCompilerAdditionalPropertiesTest,
ReturnAdditionalPropertiesResultCreate) {
- scoped_ptr<DictionaryValue> result_object_value(new DictionaryValue());
- result_object_value->SetString("key", "value");
- scoped_ptr<ReturnAdditionalProperties::Result::ResultObject> result_object(
- new ReturnAdditionalProperties::Result::ResultObject());
- result_object->integer = 5;
- result_object->additional_properties.MergeDictionary(
- result_object_value.get());
- scoped_ptr<Value> result(
- ReturnAdditionalProperties::Result::Create(*result_object));
+ DictionaryValue additional;
+ additional.SetString("key", "value");
+ ReturnAdditionalProperties::Results::ResultObject result_object;
+ result_object.integer = 5;
+ result_object.additional_properties.MergeDictionary(&additional);
+ scoped_ptr<ListValue> results =
+ ReturnAdditionalProperties::Results::Create(result_object);
DictionaryValue* result_dict = NULL;
- EXPECT_TRUE(result->GetAsDictionary(&result_dict));
+ EXPECT_TRUE(results->GetDictionary(0, &result_dict));
Value* int_temp_value_out = NULL;
int int_temp = 0;
@@ -67,5 +65,5 @@ TEST(JsonSchemaCompilerAdditionalPropertiesTest,
EXPECT_TRUE(int_temp_value->GetAsInteger(&int_temp));
EXPECT_EQ(5, int_temp);
- EXPECT_TRUE(result_dict->Equals(result_object_value.get()));
+ EXPECT_TRUE(result_dict->Equals(&additional));
}
« no previous file with comments | « tools/json_schema_compiler/schema_bundle_generator.py ('k') | tools/json_schema_compiler/test/any.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698