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 b0ed54f1ceaf32d22635701e086d1dd7b514e933..7db6f7ad9aad79cf3e7f310a80ead50ee2fcea1b 100644 |
| --- a/tools/json_schema_compiler/test/objects_unittest.cc |
| +++ b/tools/json_schema_compiler/test/objects_unittest.cc |
| @@ -52,8 +52,20 @@ TEST(JsonSchemaCompilerObjectsTest, ReturnsObjectResultCreate) { |
| scoped_ptr<Value> result_value( |
| ReturnsObject::Result::Create(*info)); |
| DictionaryValue* result_dict = NULL; |
| - EXPECT_TRUE(result_value->GetAsDictionary(&result_dict)); |
| + ASSERT_TRUE(result_value->GetAsDictionary(&result_dict)); |
| std::string state; |
| EXPECT_TRUE(result_dict->GetString("state", &state)); |
| EXPECT_EQ("foo", state); |
| } |
| + |
| +TEST(JsonSchemaCompilerObjectsTest, OnObjectFiredCreate) { |
| + OnObjectFired::SomeObject object; |
| + object.state = OnObjectFired::SomeObject::STATE_BAR; |
| + scoped_ptr<Value> result_value(OnObjectFired::Create(object)); |
| + |
| + DictionaryValue* result_dict = NULL; |
| + ASSERT_TRUE(result_value->GetAsDictionary(&result_dict)); |
| + std::string state; |
| + EXPECT_TRUE(result_dict->GetString("state", &state)); |
| + EXPECT_EQ("bar", state); |
|
not at google - send to devlin
2012/07/03 14:21:39
Another alternative to this is to build up the exp
|
| +} |