Flutter Engine
 
Loading...
Searching...
No Matches
paragraph_builder_skia_tests.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter 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 "gtest/gtest.h"
6
7#include <sstream>
8
10#include "txt/paragraph_style.h"
11
12namespace txt {
13
14class SkiaParagraphBuilderTests : public ::testing::Test {
15 public:
17
18 void SetUp() override {}
19};
20
21TEST_F(SkiaParagraphBuilderTests, ParagraphStrutStyle) {
23 auto collection = std::make_shared<FontCollection>();
24 auto builder = ParagraphBuilderSkia(style, collection, false);
25
26 auto strut_style = builder.TxtToSkia(style).getStrutStyle();
27 ASSERT_FALSE(strut_style.getHalfLeading());
28
29 style.strut_half_leading = true;
30 strut_style = builder.TxtToSkia(style).getStrutStyle();
31 ASSERT_TRUE(strut_style.getHalfLeading());
32}
33} // namespace txt
ParagraphBuilder implementation using Skia's text layout module.
TEST_F(EngineAnimatorTest, AnimatorAcceptsMultipleRenders)