Index: base/json/json_reader_unittest.cc |
diff --git a/base/json/json_reader_unittest.cc b/base/json/json_reader_unittest.cc |
index 21eec4a07d987a0cda60c3a96c52295c0c1c49f2..1a623561b73afdff5e4d4a24c05497b765fea293 100644 |
--- a/base/json/json_reader_unittest.cc |
+++ b/base/json/json_reader_unittest.cc |
@@ -6,11 +6,12 @@ |
#include <stddef.h> |
+#include <memory> |
+ |
#include "base/base_paths.h" |
#include "base/files/file_util.h" |
#include "base/logging.h" |
#include "base/macros.h" |
-#include "base/memory/scoped_ptr.h" |
#include "base/path_service.h" |
#include "base/strings/string_piece.h" |
#include "base/strings/utf_string_conversions.h" |
@@ -22,7 +23,7 @@ namespace base { |
TEST(JSONReaderTest, Reading) { |
// some whitespace checking |
- scoped_ptr<Value> root = JSONReader().ReadToValue(" null "); |
+ std::unique_ptr<Value> root = JSONReader().ReadToValue(" null "); |
ASSERT_TRUE(root.get()); |
EXPECT_TRUE(root->IsType(Value::TYPE_NULL)); |
@@ -251,7 +252,7 @@ TEST(JSONReaderTest, Reading) { |
EXPECT_EQ(3U, list->GetSize()); |
// Test with trailing comma. Should be parsed the same as above. |
- scoped_ptr<Value> root2 = |
+ std::unique_ptr<Value> root2 = |
JSONReader::Read("[true, false, null, ]", JSON_ALLOW_TRAILING_COMMAS); |
EXPECT_TRUE(root->Equals(root2.get())); |
@@ -553,7 +554,7 @@ TEST(JSONReaderTest, ReadFromFile) { |
path.Append(FILE_PATH_LITERAL("bom_feff.json")), &input)); |
JSONReader reader; |
- scoped_ptr<Value> root(reader.ReadToValue(input)); |
+ std::unique_ptr<Value> root(reader.ReadToValue(input)); |
ASSERT_TRUE(root.get()) << reader.GetErrorMessage(); |
EXPECT_TRUE(root->IsType(Value::TYPE_DICTIONARY)); |
} |
@@ -561,15 +562,15 @@ TEST(JSONReaderTest, ReadFromFile) { |
// Tests that the root of a JSON object can be deleted safely while its |
// children outlive it. |
TEST(JSONReaderTest, StringOptimizations) { |
- scoped_ptr<Value> dict_literal_0; |
- scoped_ptr<Value> dict_literal_1; |
- scoped_ptr<Value> dict_string_0; |
- scoped_ptr<Value> dict_string_1; |
- scoped_ptr<Value> list_value_0; |
- scoped_ptr<Value> list_value_1; |
+ std::unique_ptr<Value> dict_literal_0; |
+ std::unique_ptr<Value> dict_literal_1; |
+ std::unique_ptr<Value> dict_string_0; |
+ std::unique_ptr<Value> dict_string_1; |
+ std::unique_ptr<Value> list_value_0; |
+ std::unique_ptr<Value> list_value_1; |
{ |
- scoped_ptr<Value> root = JSONReader::Read( |
+ std::unique_ptr<Value> root = JSONReader::Read( |
"{" |
" \"test\": {" |
" \"foo\": true," |