OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #include "third_party/libaddressinput/src/cpp/src/util/string_compare.h" |
| 6 |
| 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 |
| 9 namespace { |
| 10 |
| 11 TEST(ChromeStringCompareTest, IgnoreDiacritics) { |
| 12 i18n::addressinput::StringCompare sc; |
| 13 EXPECT_TRUE(sc.NaturalEquals("Texas", "T\u00E9xas")); |
| 14 } |
| 15 |
| 16 TEST(ChromeStringCompareTest, IgnoreCapitalization) { |
| 17 i18n::addressinput::StringCompare sc; |
| 18 EXPECT_TRUE(sc.NaturalEquals("Texas", "teXas")); |
| 19 } |
| 20 |
| 21 TEST(ChromeStringCompareTest, DifferentStringAreDifferent) { |
| 22 i18n::addressinput::StringCompare sc; |
| 23 EXPECT_FALSE(sc.NaturalEquals("Texas", "California")); |
| 24 } |
| 25 |
| 26 } // namespace |
OLD | NEW |