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
3 // found in the LICENSE file.
5 #include "third_party/libaddressinput/src/cpp/src/util/string_compare.h"
7 #include "base/strings/utf_string_conversions.h"
8 #include "testing/gtest/include/gtest/gtest.h"
12 TEST(ChromeStringCompareTest
, IgnoreDiacritics
) {
13 i18n::addressinput::StringCompare sc
;
14 EXPECT_TRUE(sc
.NaturalEquals("Texas", base::WideToUTF8(L
"T\u00E9xas")));
17 TEST(ChromeStringCompareTest
, IgnoreCapitalization
) {
18 i18n::addressinput::StringCompare sc
;
19 EXPECT_TRUE(sc
.NaturalEquals("Texas", "teXas"));
22 TEST(ChromeStringCompareTest
, DifferentStringAreDifferent
) {
23 i18n::addressinput::StringCompare sc
;
24 EXPECT_FALSE(sc
.NaturalEquals("Texas", "California"));