Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions third_party/txt/src/utils/LinuxUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@
#define FRIEND_TEST_LINUX_ONLY(SUITE, TEST_NAME) \
FRIEND_TEST_LINUX_ONLY_EXPANDED(SUITE, DISABLE_TEST_LINUX(TEST_NAME))
#endif // defined(__linux__)

#define LINUX_ONLY_DISABLED(TEST_NAME) DISABLED_##TEST_NAME

#endif // LINUX_UTILS_H
17 changes: 11 additions & 6 deletions third_party/txt/tests/paragraph_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3973,7 +3973,10 @@ TEST_F(ParagraphTest, DISABLE_ON_WINDOWS(GetRectsForRangeCenterParagraph)) {
ASSERT_TRUE(Snapshot());
}

TEST_F(ParagraphTest, LINUX_ONLY(GetRectsForRangeParagraphNewlineLeftAlign)) {
// 10/19/20 Temporarily disabled tests while being they are being fixed.
// https://github.com/flutter/flutter/issues/68493
TEST_F(ParagraphTest,
LINUX_ONLY_DISABLED(GetRectsForRangeParagraphNewlineLeftAlign)) {
const char* text = "01234\n\nعab\naعلی\n";
auto icu_text = icu::UnicodeString::fromUTF8(text);
std::u16string u16_text(icu_text.getBuffer(),
Expand Down Expand Up @@ -4070,7 +4073,8 @@ TEST_F(ParagraphTest, LINUX_ONLY(GetRectsForRangeParagraphNewlineLeftAlign)) {
ASSERT_TRUE(Snapshot());
}

TEST_F(ParagraphTest, LINUX_ONLY(GetRectsForRangeParagraphNewlineRightAlign)) {
TEST_F(ParagraphTest,
LINUX_ONLY_DISABLED(GetRectsForRangeParagraphNewlineRightAlign)) {
const char* text = "01234\n\nعab\naعلی\n";
auto icu_text = icu::UnicodeString::fromUTF8(text);
std::u16string u16_text(icu_text.getBuffer(),
Expand Down Expand Up @@ -4168,7 +4172,7 @@ TEST_F(ParagraphTest, LINUX_ONLY(GetRectsForRangeParagraphNewlineRightAlign)) {
}

TEST_F(ParagraphTest,
LINUX_ONLY(GetRectsForRangeCenterParagraphNewlineCentered)) {
LINUX_ONLY_DISABLED(GetRectsForRangeCenterParagraphNewlineCentered)) {
const char* text = "01234\n\nعab\naعلی\n";
auto icu_text = icu::UnicodeString::fromUTF8(text);
std::u16string u16_text(icu_text.getBuffer(),
Expand Down Expand Up @@ -4264,8 +4268,9 @@ TEST_F(ParagraphTest,

ASSERT_TRUE(Snapshot());
}

TEST_F(ParagraphTest,
LINUX_ONLY(GetRectsForRangeParagraphNewlineRTLLeftAlign)) {
LINUX_ONLY_DISABLED(GetRectsForRangeParagraphNewlineRTLLeftAlign)) {
const char* text = "01234\n\nعab\naعلی\n";
auto icu_text = icu::UnicodeString::fromUTF8(text);
std::u16string u16_text(icu_text.getBuffer(),
Expand Down Expand Up @@ -4363,7 +4368,7 @@ TEST_F(ParagraphTest,
}

TEST_F(ParagraphTest,
LINUX_ONLY(GetRectsForRangeParagraphNewlineRTLRightAlign)) {
LINUX_ONLY_DISABLED(GetRectsForRangeParagraphNewlineRTLRightAlign)) {
const char* text = "01234\n\nعab\naعلی\n";
auto icu_text = icu::UnicodeString::fromUTF8(text);
std::u16string u16_text(icu_text.getBuffer(),
Expand Down Expand Up @@ -4461,7 +4466,7 @@ TEST_F(ParagraphTest,
}

TEST_F(ParagraphTest,
LINUX_ONLY(GetRectsForRangeCenterParagraphNewlineRTLCentered)) {
LINUX_ONLY_DISABLED(GetRectsForRangeCenterParagraphNewlineRTLCentered)) {
const char* text = "01234\n\nعab\naعلی\n";
auto icu_text = icu::UnicodeString::fromUTF8(text);
std::u16string u16_text(icu_text.getBuffer(),
Expand Down