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

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

Issue 10701012: JSON Schema Compiler: Added event compilation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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: 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 b0ed54f1ceaf32d22635701e086d1dd7b514e933..08ee1ad2f72d26bae8e724d292a7f73fd1f0e7c7 100644
--- a/tools/json_schema_compiler/test/objects_unittest.cc
+++ b/tools/json_schema_compiler/test/objects_unittest.cc
@@ -57,3 +57,15 @@ TEST(JsonSchemaCompilerObjectsTest, ReturnsObjectResultCreate) {
EXPECT_TRUE(result_dict->GetString("state", &state));
EXPECT_EQ("foo", state);
}
+
+TEST(JsonSchemaCompilerObjectsTest, OnObjectFiredCreate) {
+ scoped_ptr<OnObjectFired::SomeObject> object(new OnObjectFired::SomeObject());
+ object->state = OnObjectFired::SomeObject::STATE_BAR;
+ scoped_ptr<Value> result_value(OnObjectFired::Create(*object));
+
+ DictionaryValue* result_dict = NULL;
+ EXPECT_TRUE(result_value->GetAsDictionary(&result_dict));
+ std::string state;
+ EXPECT_TRUE(result_dict->GetString("state", &state));
+ EXPECT_EQ("bar", state);
+}
« tools/json_schema_compiler/h_generator.py ('K') | « tools/json_schema_compiler/test/objects.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698