From 78deb0828c0befd37e53749ef4173636b3be0889 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 29 Aug 2018 10:43:17 -0700 Subject: [PATCH] Fix libtxt unit tests (flutter/engine#6111) --- .../src/flutter/third_party/txt/tests/paragraph_unittests.cc | 4 ++-- engine/src/flutter/third_party/txt/tests/render_test.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/src/flutter/third_party/txt/tests/paragraph_unittests.cc b/engine/src/flutter/third_party/txt/tests/paragraph_unittests.cc index 2631f35930..54721f6397 100644 --- a/engine/src/flutter/third_party/txt/tests/paragraph_unittests.cc +++ b/engine/src/flutter/third_party/txt/tests/paragraph_unittests.cc @@ -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(5, 6)); + EXPECT_EQ(paragraph->GetWordBoundary(5), txt::Paragraph::Range(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(6, 7)); + EXPECT_EQ(paragraph->GetWordBoundary(6), txt::Paragraph::Range(5, 7)); rect = GetCoordinatesForGlyphPosition(*paragraph, 7); GetCanvas()->drawLine(rect.fLeft, rect.fTop, rect.fLeft, rect.fBottom, paint); diff --git a/engine/src/flutter/third_party/txt/tests/render_test.cc b/engine/src/flutter/third_party/txt/tests/render_test.cc index c4a78c8dd2..17e4fc43a6 100644 --- a/engine/src/flutter/third_party/txt/tests/render_test.cc +++ b/engine/src/flutter/third_party/txt/tests/render_test.cc @@ -28,7 +28,7 @@ namespace txt { RenderTest::RenderTest() - : snapshots_(0), font_collection_(GetTestFontCollection()) {} + : snapshots_(0), font_collection_(txt::GetTestFontCollection()) {} RenderTest::~RenderTest() = default;