#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/wtf/text/case_map.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/wtf/text/text_offset_map.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
ElementsAreArray;
namespace WTF {
namespace {
String To8BitOrNull(const String& source) { … }
}
static struct CaseMapTestData { … } case_map_test_data[] = …;
std::ostream& operator<<(std::ostream& os, const CaseMapTestData& data) { … }
class CaseMapTest : public testing::Test,
public testing::WithParamInterface<CaseMapTestData> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(CaseMapTest, ToLowerWithoutOffset) { … }
TEST_P(CaseMapTest, ToUpperWithoutOffset) { … }
TEST_P(CaseMapTest, ToLower) { … }
TEST_P(CaseMapTest, ToUpper) { … }
TEST_P(CaseMapTest, ToLower8Bit) { … }
TEST_P(CaseMapTest, ToUpper8Bit) { … }
struct CaseFoldingTestData { … };
const char* g_turkic_input = …;
const char* g_greek_input = …;
const char* g_lithuanian_input = …;
const char* g_turkic_locales[] = …;
const char* g_non_turkic_locales[] = …;
const char* g_greek_locales[] = …;
const char* g_non_greek_locales[] = …;
const char* g_lithuanian_locales[] = …;
const char* g_non_lithuanian_locales[] = …;
TEST(CaseMapTest, ToUpperLocale) { … }
TEST(CaseMapTest, ToLowerLocale) { … }
}