OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef TOOLS_JSON_SCHEMA_COMPILER_TEST_TEST_UTIL_H_ |
| 6 #define TOOLS_JSON_SCHEMA_COMPILER_TEST_TEST_UTIL_H_ |
| 7 |
| 8 #include <map> |
| 9 |
| 10 #include "base/memory/linked_ptr.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 |
| 13 namespace base { |
| 14 class DictionaryValue; |
| 15 class Value; |
| 16 } |
| 17 |
| 18 namespace json_schema_compiler { |
| 19 namespace test_util { |
| 20 |
| 21 // Converts a map of string->Value |values| to a corresponding DictionaryValue. |
| 22 scoped_ptr<base::DictionaryValue> ValueMapToDictionary( |
| 23 const std::map<std::string, linked_ptr<base::Value> >& values); |
| 24 |
| 25 // Converts a DictionaryValue |dict| to a corresponding map of string->Value. |
| 26 std::map<std::string, linked_ptr<base::Value> > DictionaryToValueMap( |
| 27 const base::DictionaryValue& dict); |
| 28 |
| 29 } // namespace test_util |
| 30 } // namespace json_schema_compiler |
| 31 |
| 32 #endif // TOOLS_JSON_SCHEMA_COMPILER_TEST_TEST_UTIL_H_ |
OLD | NEW |