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

Unified Diff: base/json/json_value_converter_unittest.cc

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/json/json_value_converter.h ('k') | base/json/json_value_serializer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/json_value_converter_unittest.cc
diff --git a/base/json/json_value_converter_unittest.cc b/base/json/json_value_converter_unittest.cc
index 90386107d85ca2a6f90b3292750ba3135996d558..56ade24ac3a0089edc81627da799655fc5b47957 100644
--- a/base/json/json_value_converter_unittest.cc
+++ b/base/json/json_value_converter_unittest.cc
@@ -4,11 +4,11 @@
#include "base/json/json_value_converter.h"
+#include <memory>
#include <string>
#include <vector>
#include "base/json/json_reader.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/strings/string_piece.h"
#include "base/values.h"
@@ -106,7 +106,7 @@ TEST(JSONValueConverterTest, ParseSimpleMessage) {
" \"ints\": [1, 2]"
"}\n";
- scoped_ptr<Value> value = base::JSONReader::Read(normal_data);
+ std::unique_ptr<Value> value = base::JSONReader::Read(normal_data);
SimpleMessage message;
base::JSONValueConverter<SimpleMessage> converter;
EXPECT_TRUE(converter.Convert(*value.get(), &message));
@@ -148,7 +148,7 @@ TEST(JSONValueConverterTest, ParseNestedMessage) {
" }]\n"
"}\n";
- scoped_ptr<Value> value = base::JSONReader::Read(normal_data);
+ std::unique_ptr<Value> value = base::JSONReader::Read(normal_data);
NestedMessage message;
base::JSONValueConverter<NestedMessage> converter;
EXPECT_TRUE(converter.Convert(*value.get(), &message));
@@ -190,7 +190,7 @@ TEST(JSONValueConverterTest, ParseFailures) {
" \"ints\": [1, 2]"
"}\n";
- scoped_ptr<Value> value = base::JSONReader::Read(normal_data);
+ std::unique_ptr<Value> value = base::JSONReader::Read(normal_data);
SimpleMessage message;
base::JSONValueConverter<SimpleMessage> converter;
EXPECT_FALSE(converter.Convert(*value.get(), &message));
@@ -206,7 +206,7 @@ TEST(JSONValueConverterTest, ParseWithMissingFields) {
" \"ints\": [1, 2]"
"}\n";
- scoped_ptr<Value> value = base::JSONReader::Read(normal_data);
+ std::unique_ptr<Value> value = base::JSONReader::Read(normal_data);
SimpleMessage message;
base::JSONValueConverter<SimpleMessage> converter;
// Convert() still succeeds even if the input doesn't have "bar" field.
@@ -229,7 +229,7 @@ TEST(JSONValueConverterTest, EnumParserFails) {
" \"ints\": [1, 2]"
"}\n";
- scoped_ptr<Value> value = base::JSONReader::Read(normal_data);
+ std::unique_ptr<Value> value = base::JSONReader::Read(normal_data);
SimpleMessage message;
base::JSONValueConverter<SimpleMessage> converter;
EXPECT_FALSE(converter.Convert(*value.get(), &message));
@@ -246,7 +246,7 @@ TEST(JSONValueConverterTest, RepeatedValueErrorInTheMiddle) {
" \"ints\": [1, false]"
"}\n";
- scoped_ptr<Value> value = base::JSONReader::Read(normal_data);
+ std::unique_ptr<Value> value = base::JSONReader::Read(normal_data);
SimpleMessage message;
base::JSONValueConverter<SimpleMessage> converter;
EXPECT_FALSE(converter.Convert(*value.get(), &message));
« no previous file with comments | « base/json/json_value_converter.h ('k') | base/json/json_value_serializer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698