OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "tools/json_schema_compiler/test/additionalProperties.h" | 5 #include "tools/json_schema_compiler/test/additional_properties.h" |
6 | 6 |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
9 using namespace test::api::additional_properties; | 9 using namespace test::api::additional_properties; |
10 | 10 |
11 TEST(JsonSchemaCompilerAdditionalPropertiesTest, | 11 TEST(JsonSchemaCompilerAdditionalPropertiesTest, |
12 AdditionalPropertiesTypePopulate) { | 12 AdditionalPropertiesTypePopulate) { |
13 { | 13 { |
14 scoped_ptr<ListValue> list_value(new ListValue()); | 14 scoped_ptr<ListValue> list_value(new ListValue()); |
15 list_value->Append(Value::CreateStringValue("asdf")); | 15 list_value->Append(Value::CreateStringValue("asdf")); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 Value* int_temp_value_out = NULL; | 63 Value* int_temp_value_out = NULL; |
64 int int_temp = 0; | 64 int int_temp = 0; |
65 EXPECT_TRUE(result_dict->Remove("integer", &int_temp_value_out)); | 65 EXPECT_TRUE(result_dict->Remove("integer", &int_temp_value_out)); |
66 scoped_ptr<Value> int_temp_value(int_temp_value_out); | 66 scoped_ptr<Value> int_temp_value(int_temp_value_out); |
67 EXPECT_TRUE(int_temp_value->GetAsInteger(&int_temp)); | 67 EXPECT_TRUE(int_temp_value->GetAsInteger(&int_temp)); |
68 EXPECT_EQ(5, int_temp); | 68 EXPECT_EQ(5, int_temp); |
69 | 69 |
70 EXPECT_TRUE(result_dict->Equals(result_object_value.get())); | 70 EXPECT_TRUE(result_dict->Equals(result_object_value.get())); |
71 } | 71 } |
OLD | NEW |