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

Side by Side Diff: tools/json_schema_compiler/test/arrays_unittest.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 25 matching lines...) Expand all
36 numbers_value->AppendDouble(6.1); 36 numbers_value->AppendDouble(6.1);
37 value->Set("numbers", numbers_value); 37 value->Set("numbers", numbers_value);
38 value->Set("booleans", booleans_value); 38 value->Set("booleans", booleans_value);
39 value->Set("strings", strings_value); 39 value->Set("strings", strings_value);
40 value->Set("integers", integers_value); 40 value->Set("integers", integers_value);
41 return value; 41 return value;
42 } 42 }
43 43
44 std::unique_ptr<base::DictionaryValue> CreateItemValue(int val) { 44 std::unique_ptr<base::DictionaryValue> CreateItemValue(int val) {
45 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); 45 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
46 value->Set("val", new base::FundamentalValue(val)); 46 value->Set("val", new base::Value(val));
47 return value; 47 return value;
48 } 48 }
49 49
50 } // namespace 50 } // namespace
51 51
52 TEST(JsonSchemaCompilerArrayTest, BasicArrayType) { 52 TEST(JsonSchemaCompilerArrayTest, BasicArrayType) {
53 { 53 {
54 std::unique_ptr<base::DictionaryValue> value = 54 std::unique_ptr<base::DictionaryValue> value =
55 CreateBasicArrayTypeDictionary(); 55 CreateBasicArrayTypeDictionary();
56 std::unique_ptr<BasicArrayType> basic_array_type(new BasicArrayType()); 56 std::unique_ptr<BasicArrayType> basic_array_type(new BasicArrayType());
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 std::unique_ptr<base::ListValue> expected_argument(new base::ListValue()); 269 std::unique_ptr<base::ListValue> expected_argument(new base::ListValue());
270 std::unique_ptr<base::DictionaryValue> first(new base::DictionaryValue()); 270 std::unique_ptr<base::DictionaryValue> first(new base::DictionaryValue());
271 first->SetInteger("val", 1); 271 first->SetInteger("val", 1);
272 expected_argument->Append(std::move(first)); 272 expected_argument->Append(std::move(first));
273 std::unique_ptr<base::DictionaryValue> second(new base::DictionaryValue()); 273 std::unique_ptr<base::DictionaryValue> second(new base::DictionaryValue());
274 second->SetInteger("val", 2); 274 second->SetInteger("val", 2);
275 expected_argument->Append(std::move(second)); 275 expected_argument->Append(std::move(second));
276 expected.Append(std::move(expected_argument)); 276 expected.Append(std::move(expected_argument));
277 EXPECT_TRUE(results->Equals(&expected)); 277 EXPECT_TRUE(results->Equals(&expected));
278 } 278 }
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/test/any_unittest.cc ('k') | tools/json_schema_compiler/test/choices_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698