Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / third_party / libaddressinput / chromium / string_compare_unittest.cc
bloba10e55ad727dc476b702905e6c3e3fd6aa8836d5
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"
10 namespace {
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"));
27 } // namespace