mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix libtxt unit tests (flutter/engine#6111)
This commit is contained in:
parent
980d18ee57
commit
78deb0828c
@ -1115,11 +1115,11 @@ TEST_F(ParagraphTest, GetWordBoundaryParagraph) {
|
||||
rect = GetCoordinatesForGlyphPosition(*paragraph, 5);
|
||||
GetCanvas()->drawLine(rect.fLeft, rect.fTop, rect.fLeft, rect.fBottom, paint);
|
||||
|
||||
EXPECT_EQ(paragraph->GetWordBoundary(5), txt::Paragraph::Range<size_t>(5, 6));
|
||||
EXPECT_EQ(paragraph->GetWordBoundary(5), txt::Paragraph::Range<size_t>(5, 7));
|
||||
rect = GetCoordinatesForGlyphPosition(*paragraph, 6);
|
||||
GetCanvas()->drawLine(rect.fLeft, rect.fTop, rect.fLeft, rect.fBottom, paint);
|
||||
|
||||
EXPECT_EQ(paragraph->GetWordBoundary(6), txt::Paragraph::Range<size_t>(6, 7));
|
||||
EXPECT_EQ(paragraph->GetWordBoundary(6), txt::Paragraph::Range<size_t>(5, 7));
|
||||
rect = GetCoordinatesForGlyphPosition(*paragraph, 7);
|
||||
GetCanvas()->drawLine(rect.fLeft, rect.fTop, rect.fLeft, rect.fBottom, paint);
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
namespace txt {
|
||||
|
||||
RenderTest::RenderTest()
|
||||
: snapshots_(0), font_collection_(GetTestFontCollection()) {}
|
||||
: snapshots_(0), font_collection_(txt::GetTestFontCollection()) {}
|
||||
|
||||
RenderTest::~RenderTest() = default;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user