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

Unified Diff: base/i18n/char_iterator_unittest.cc

Issue 6355005: base/i18n: Add namespace i18n to CharIterator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: brett review Created 9 years, 11 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/i18n/char_iterator.cc ('k') | chrome/browser/chromeos/login/wizard_accessibility_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/char_iterator_unittest.cc
diff --git a/base/i18n/char_iterator_unittest.cc b/base/i18n/char_iterator_unittest.cc
index 4fe7ebb5d0325f601f786acec4031681ba15febd..6d1294eeda4ff9d6a7c5bc8360115c773559bf03 100644
--- a/base/i18n/char_iterator_unittest.cc
+++ b/base/i18n/char_iterator_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,16 +7,19 @@
#include "base/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
+namespace base {
+namespace i18n {
+
TEST(CharIteratorsTest, TestUTF8) {
std::string empty("");
- base::UTF8CharIterator empty_iter(&empty);
+ UTF8CharIterator empty_iter(&empty);
ASSERT_TRUE(empty_iter.end());
ASSERT_EQ(0, empty_iter.array_pos());
ASSERT_EQ(0, empty_iter.char_pos());
ASSERT_FALSE(empty_iter.Advance());
std::string str("s\303\273r"); // [u with circumflex]
- base::UTF8CharIterator iter(&str);
+ UTF8CharIterator iter(&str);
ASSERT_FALSE(iter.end());
ASSERT_EQ(0, iter.array_pos());
ASSERT_EQ(0, iter.char_pos());
@@ -47,7 +50,7 @@ TEST(CharIteratorsTest, TestUTF8) {
TEST(CharIteratorsTest, TestUTF16) {
string16 empty = UTF8ToUTF16("");
- base::UTF16CharIterator empty_iter(&empty);
+ UTF16CharIterator empty_iter(&empty);
ASSERT_TRUE(empty_iter.end());
ASSERT_EQ(0, empty_iter.array_pos());
ASSERT_EQ(0, empty_iter.char_pos());
@@ -59,7 +62,7 @@ TEST(CharIteratorsTest, TestUTF16) {
// math double-struck A - 4 bytes in UTF8, 2 codewords in UTF16
// z
string16 str = UTF8ToUTF16("x\303\273\360\235\224\270z");
- base::UTF16CharIterator iter(&str);
+ UTF16CharIterator iter(&str);
ASSERT_FALSE(iter.end());
ASSERT_EQ(0, iter.array_pos());
ASSERT_EQ(0, iter.char_pos());
@@ -93,3 +96,6 @@ TEST(CharIteratorsTest, TestUTF16) {
ASSERT_FALSE(iter.Advance());
}
+
+} // namespace i18n
+} // namespace base
« no previous file with comments | « base/i18n/char_iterator.cc ('k') | chrome/browser/chromeos/login/wizard_accessibility_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698