Index: base/i18n/message_formatter_unittest.cc |
diff --git a/base/i18n/message_formatter_unittest.cc b/base/i18n/message_formatter_unittest.cc |
index 85e2e171cb11560718338b93414fadc5a91f9620..a6f461370c7ffaef00f5971f63ca09139060f4d4 100644 |
--- a/base/i18n/message_formatter_unittest.cc |
+++ b/base/i18n/message_formatter_unittest.cc |
@@ -4,8 +4,9 @@ |
#include "base/i18n/message_formatter.h" |
+#include <memory> |
+ |
#include "base/i18n/rtl.h" |
-#include "base/memory/scoped_ptr.h" |
#include "base/strings/string_piece.h" |
#include "base/strings/string_util.h" |
#include "base/strings/utf_string_conversions.h" |
@@ -36,8 +37,9 @@ class MessageFormatterTest : public testing::Test { |
namespace { |
-void AppendFormattedDateTime(const scoped_ptr<icu::DateFormat>& df, |
- const Time& now, std::string* result) { |
+void AppendFormattedDateTime(const std::unique_ptr<icu::DateFormat>& df, |
+ const Time& now, |
+ std::string* result) { |
icu::UnicodeString formatted; |
df->format(static_cast<UDate>(now.ToJsTime()), formatted). |
toUTF8String(*result); |
@@ -119,7 +121,8 @@ TEST_F(MessageFormatterTest, PluralNumberedArgsWithDate) { |
base::Time now = base::Time::Now(); |
using icu::DateFormat; |
- scoped_ptr<DateFormat> df(DateFormat::createDateInstance(DateFormat::FULL)); |
+ std::unique_ptr<DateFormat> df( |
+ DateFormat::createDateInstance(DateFormat::FULL)); |
std::string second_sentence = " Today is "; |
AppendFormattedDateTime(df, now, &second_sentence); |
@@ -141,8 +144,10 @@ TEST_F(MessageFormatterTest, DateTimeAndNumber) { |
"The speed of the wind was {3,number,###.#} mph."); |
using icu::DateFormat; |
- scoped_ptr<DateFormat> tf(DateFormat::createTimeInstance(DateFormat::SHORT)); |
- scoped_ptr<DateFormat> df(DateFormat::createDateInstance(DateFormat::MEDIUM)); |
+ std::unique_ptr<DateFormat> tf( |
+ DateFormat::createTimeInstance(DateFormat::SHORT)); |
+ std::unique_ptr<DateFormat> df( |
+ DateFormat::createDateInstance(DateFormat::MEDIUM)); |
base::Time now = base::Time::Now(); |
std::string expected = "At "; |