chromium/base/i18n/string_search_unittest.cc

// Copyright 2011 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40284755): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include "base/i18n/string_search.h"

#include <stddef.h>

#include <string>
#include <vector>

#include "base/i18n/rtl.h"
#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/icu/source/i18n/unicode/usearch.h"

namespace base {
namespace i18n {

#define EXPECT_MATCH_IGNORE_CASE(find_this, in_this, ex_start, ex_len)

#define EXPECT_MATCH_SENSITIVE(find_this, in_this, ex_start, ex_len)

#define EXPECT_MATCH_IGNORE_CASE_BACKWARDS(find_this, in_this, ex_start,  \
                                           ex_len)

#define EXPECT_MATCH_SENSITIVE_BACKWARDS(find_this, in_this, ex_start, ex_len)

#define EXPECT_MISS_IGNORE_CASE(find_this, in_this)

#define EXPECT_MISS_SENSITIVE(find_this, in_this)

#define EXPECT_MISS_IGNORE_CASE_BACKWARDS(find_this, in_this)

#define EXPECT_MISS_SENSITIVE_BACKWARDS(find_this, in_this)

// Note on setting default locale for testing: The current default locale on
// the Mac trybot is en_US_POSIX, with which primary-level collation strength
// string search is case-sensitive, when normally it should be
// case-insensitive. In other locales (including en_US which English speakers
// in the U.S. use), this search would be case-insensitive as expected.

TEST(StringSearchTest, ASCII) {}

TEST(StringSearchTest, UnicodeLocaleIndependent) {}

TEST(StringSearchTest, UnicodeLocaleDependent) {}

TEST(StringSearchTest, SearchBackwards) {}

TEST(StringSearchTest, FixedPatternMultipleSearch) {}

TEST(StringSearchTest, RepeatingStringSearch) {}

}  // namespace i18n
}  // namespace base