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/arrays.h" | 5 #include "tools/json_schema_compiler/test/arrays.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 9 #include "base/macros.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
8 #include "tools/json_schema_compiler/test/enums.h" | 11 #include "tools/json_schema_compiler/test/enums.h" |
9 | 12 |
10 using namespace test::api::arrays; | 13 using namespace test::api::arrays; |
11 | 14 |
12 namespace { | 15 namespace { |
13 | 16 |
14 // TODO(calamity): Change to AppendString etc once kalman's patch goes through | 17 // TODO(calamity): Change to AppendString etc once kalman's patch goes through |
15 static scoped_ptr<base::DictionaryValue> CreateBasicArrayTypeDictionary() { | 18 static scoped_ptr<base::DictionaryValue> CreateBasicArrayTypeDictionary() { |
16 base::DictionaryValue* value = new base::DictionaryValue(); | 19 base::DictionaryValue* value = new base::DictionaryValue(); |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 base::ListValue* expected_argument = new base::ListValue(); | 265 base::ListValue* expected_argument = new base::ListValue(); |
263 base::DictionaryValue* first = new base::DictionaryValue(); | 266 base::DictionaryValue* first = new base::DictionaryValue(); |
264 first->SetInteger("val", 1); | 267 first->SetInteger("val", 1); |
265 expected_argument->Append(first); | 268 expected_argument->Append(first); |
266 base::DictionaryValue* second = new base::DictionaryValue(); | 269 base::DictionaryValue* second = new base::DictionaryValue(); |
267 second->SetInteger("val", 2); | 270 second->SetInteger("val", 2); |
268 expected_argument->Append(second); | 271 expected_argument->Append(second); |
269 expected.Append(expected_argument); | 272 expected.Append(expected_argument); |
270 EXPECT_TRUE(results->Equals(&expected)); | 273 EXPECT_TRUE(results->Equals(&expected)); |
271 } | 274 } |
OLD | NEW |