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

Side by Side Diff: third_party/libaddressinput/chromium/string_compare_unittest.cc

Issue 403233002: Do not use \u unicode characters directly in libaddressinput unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 unified diff | Download patch
« no previous file with comments | « third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "third_party/libaddressinput/src/cpp/src/util/string_compare.h" 5 #include "third_party/libaddressinput/src/cpp/src/util/string_compare.h"
6 6
7 #include "base/strings/utf_string_conversions.h"
7 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
8 9
9 namespace { 10 namespace {
10 11
11 TEST(ChromeStringCompareTest, IgnoreDiacritics) { 12 TEST(ChromeStringCompareTest, IgnoreDiacritics) {
12 i18n::addressinput::StringCompare sc; 13 i18n::addressinput::StringCompare sc;
13 EXPECT_TRUE(sc.NaturalEquals("Texas", "T\u00E9xas")); 14 EXPECT_TRUE(sc.NaturalEquals("Texas", base::WideToUTF8(L"T\u00E9xas")));
14 } 15 }
15 16
16 TEST(ChromeStringCompareTest, IgnoreCapitalization) { 17 TEST(ChromeStringCompareTest, IgnoreCapitalization) {
17 i18n::addressinput::StringCompare sc; 18 i18n::addressinput::StringCompare sc;
18 EXPECT_TRUE(sc.NaturalEquals("Texas", "teXas")); 19 EXPECT_TRUE(sc.NaturalEquals("Texas", "teXas"));
19 } 20 }
20 21
21 TEST(ChromeStringCompareTest, DifferentStringAreDifferent) { 22 TEST(ChromeStringCompareTest, DifferentStringAreDifferent) {
22 i18n::addressinput::StringCompare sc; 23 i18n::addressinput::StringCompare sc;
23 EXPECT_FALSE(sc.NaturalEquals("Texas", "California")); 24 EXPECT_FALSE(sc.NaturalEquals("Texas", "California"));
24 } 25 }
25 26
26 } // namespace 27 } // namespace
OLDNEW
« no previous file with comments | « third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698