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

Side by Side Diff: tools/json_schema_compiler/test/test_util.h

Issue 2884933002: Remove raw base::DictionaryValue::SetWithoutPathExpansion (Closed)
Patch Set: Include Created 3 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef TOOLS_JSON_SCHEMA_COMPILER_TEST_TEST_UTIL_H_ 5 #ifndef TOOLS_JSON_SCHEMA_COMPILER_TEST_TEST_UTIL_H_
6 #define TOOLS_JSON_SCHEMA_COMPILER_TEST_TEST_UTIL_H_ 6 #define TOOLS_JSON_SCHEMA_COMPILER_TEST_TEST_UTIL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 16 matching lines...) Expand all
27 arr.push_back(b); 27 arr.push_back(b);
28 return arr; 28 return arr;
29 } 29 }
30 template <typename T> 30 template <typename T>
31 std::vector<T> Vector(const T& a, const T& b, const T& c) { 31 std::vector<T> Vector(const T& a, const T& b, const T& c) {
32 std::vector<T> arr = Vector(a, b); 32 std::vector<T> arr = Vector(a, b);
33 arr.push_back(c); 33 arr.push_back(c);
34 return arr; 34 return arr;
35 } 35 }
36 36
37 // TODO(dcheng): These various helpers should all take std::unique_ptr 37 std::unique_ptr<base::ListValue> List(std::unique_ptr<base::Value> a);
38 // arguments. See https://crbug.com/581865. 38 std::unique_ptr<base::ListValue> List(std::unique_ptr<base::Value> a,
39 std::unique_ptr<base::ListValue> List(base::Value* a); 39 std::unique_ptr<base::Value> b);
40 std::unique_ptr<base::ListValue> List(base::Value* a, base::Value* b); 40 std::unique_ptr<base::ListValue> List(std::unique_ptr<base::Value> a,
41 std::unique_ptr<base::ListValue> List(base::Value* a, 41 std::unique_ptr<base::Value> b,
42 base::Value* b, 42 std::unique_ptr<base::Value> c);
43 base::Value* c);
44 43
45 std::unique_ptr<base::DictionaryValue> Dictionary(const std::string& ak, 44 std::unique_ptr<base::DictionaryValue> Dictionary(
46 base::Value* av); 45 const std::string& ak,
47 std::unique_ptr<base::DictionaryValue> Dictionary(const std::string& ak, 46 std::unique_ptr<base::Value> av);
48 base::Value* av, 47 std::unique_ptr<base::DictionaryValue> Dictionary(
49 const std::string& bk, 48 const std::string& ak,
50 base::Value* bv); 49 std::unique_ptr<base::Value> av,
51 std::unique_ptr<base::DictionaryValue> Dictionary(const std::string& ak, 50 const std::string& bk,
52 base::Value* av, 51 std::unique_ptr<base::Value> bv);
53 const std::string& bk, 52 std::unique_ptr<base::DictionaryValue> Dictionary(
54 base::Value* bv, 53 const std::string& ak,
55 const std::string& ck, 54 std::unique_ptr<base::Value> av,
56 base::Value* cv); 55 const std::string& bk,
56 std::unique_ptr<base::Value> bv,
57 const std::string& ck,
58 std::unique_ptr<base::Value> cv);
57 59
58 } // namespace test_util 60 } // namespace test_util
59 } // namespace json_schema_compiler 61 } // namespace json_schema_compiler
60 62
61 #endif // TOOLS_JSON_SCHEMA_COMPILER_TEST_TEST_UTIL_H_ 63 #endif // TOOLS_JSON_SCHEMA_COMPILER_TEST_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/test/simple_api_unittest.cc ('k') | tools/json_schema_compiler/test/test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698