| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "base/i18n/message_formatter.h" | 5 #include "base/i18n/message_formatter.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/string_piece.h" | 9 #include "base/strings/string_piece.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/googletest/include/gtest/gtest.h" |
| 14 #include "third_party/icu/source/common/unicode/unistr.h" | 14 #include "third_party/icu/source/common/unicode/unistr.h" |
| 15 #include "third_party/icu/source/i18n/unicode/datefmt.h" | 15 #include "third_party/icu/source/i18n/unicode/datefmt.h" |
| 16 #include "third_party/icu/source/i18n/unicode/msgfmt.h" | 16 #include "third_party/icu/source/i18n/unicode/msgfmt.h" |
| 17 | 17 |
| 18 typedef testing::Test MessageFormatterTest; | 18 typedef testing::Test MessageFormatterTest; |
| 19 | 19 |
| 20 namespace base { | 20 namespace base { |
| 21 namespace i18n { | 21 namespace i18n { |
| 22 | 22 |
| 23 class MessageFormatterTest : public testing::Test { | 23 class MessageFormatterTest : public testing::Test { |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 EXPECT_EQ("Select files to upload.", result); | 171 EXPECT_EQ("Select files to upload.", result); |
| 172 | 172 |
| 173 // fallback if a parameter is not selectors specified in the message pattern. | 173 // fallback if a parameter is not selectors specified in the message pattern. |
| 174 result = UTF16ToASCII(MessageFormatter::FormatWithNumberedArgs( | 174 result = UTF16ToASCII(MessageFormatter::FormatWithNumberedArgs( |
| 175 pattern, "foobar")); | 175 pattern, "foobar")); |
| 176 EXPECT_EQ("UNUSED", result); | 176 EXPECT_EQ("UNUSED", result); |
| 177 } | 177 } |
| 178 | 178 |
| 179 } // namespace i18n | 179 } // namespace i18n |
| 180 } // namespace base | 180 } // namespace base |
| OLD | NEW |