chromium/third_party/blink/renderer/platform/text/hyphenation_test.cc

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

#include "third_party/blink/renderer/platform/text/hyphenation.h"

#include "build/build_config.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
#include "third_party/blink/renderer/platform/text/layout_locale.h"

ElementsAre;
ElementsAreArray;

#if defined(USE_MINIKIN_HYPHENATION) && BUILDFLAG(IS_FUCHSIA)
// Fuchsia doesn't include |blink_platform_unittests_data|.
#undef USE_MINIKIN_HYPHENATION
#endif

#if defined(USE_MINIKIN_HYPHENATION)
#include "base/files/file_path.h"
#include "third_party/blink/renderer/platform/text/hyphenation/hyphenation_minikin.h"
#endif

namespace blink {

class NoHyphenation : public Hyphenation {};

class HyphenationTest : public testing::Test {};

TEST_F(HyphenationTest, Get) {}

#if defined(USE_MINIKIN_HYPHENATION)
TEST_F(HyphenationTest, MapLocale) {}
#endif

#if defined(USE_MINIKIN_HYPHENATION) || BUILDFLAG(IS_APPLE)
TEST_F(HyphenationTest, HyphenLocations) {}

#if defined(USE_MINIKIN_HYPHENATION)
TEST_F(HyphenationTest, WordToHyphenate) {}
#endif

TEST_F(HyphenationTest, LeadingSpaces) {}

TEST_F(HyphenationTest, NonLetters) {}

TEST_F(HyphenationTest, English) {}

TEST_F(HyphenationTest, German) {}
#endif

#if defined(USE_MINIKIN_HYPHENATION) || BUILDFLAG(IS_APPLE)
TEST_F(HyphenationTest, CapitalizedWords) {}

// Test the used values of the `hyphenate-limit-chars` property.
// https://w3c.github.io/csswg-drafts/css-text-4/#propdef-hyphenate-limit-chars
TEST_F(HyphenationTest, SetLimits) {}

// Test the limitation with all the 3 public APIs.
TEST_F(HyphenationTest, Limits) {}
#endif  // defined(USE_MINIKIN_HYPHENATION) || BUILDFLAG(IS_APPLE)

}  // namespace blink