Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 14031c7

Browse files
aballwayRaj Seshasankaran
authored andcommitted
Disable drawing tests using Segoe on ARM (#2566)
Fixes #2564 * Disable drawing tests using Segoe on ARM * CR Feedback
1 parent 517d269 commit 14031c7

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

tests/UnitTests/CoreGraphics.drawing/DrawingTest.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ class UIKitMimicTest : public WhiteBackgroundTest<TComparator> {
118118
#define TEXT_DRAW_TEST(test_case_name, test_name) DRAW_TEST_F(test_case_name, test_name, ::testing::DrawTest<>)
119119
#define TEXT_DRAW_TEST_F(test_case_name, test_name, test_fixture) DRAW_TEST_F(test_case_name, test_name, test_fixture)
120120

121+
#ifdef WINOBJC_DISABLE_TESTS
122+
#define ARM_DISABLED_TEXT_DRAW_TEST_F(test_case_name, test_name, test_fixture) \
123+
DISABLED_DRAW_TEST_F(test_case_name, DISABLED_##test_name, test_fixture)
124+
#else
125+
#define ARM_DISABLED_TEXT_DRAW_TEST_F(test_case_name, test_name, test_fixture) TEXT_DRAW_TEST_F(test_case_name, test_name, test_fixture)
126+
#endif
127+
121128
#define DISABLED_TEXT_DRAW_TEST(test_case_name, test_name) TEXT_DRAW_TEST(test_case_name, DISABLED_##test_name)
122129
#define DISABLED_TEXT_DRAW_TEST_F(test_case_name, test_name, test_fixture) \
123130
TEXT_DRAW_TEST_F(test_case_name, DISABLED_##test_name, test_fixture)

tests/unittests/CoreGraphics.drawing/CTDrawingTests.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,11 +499,14 @@ TEXT_DRAW_TEST_P(Fonts, TestFonts) {
499499
__DrawLoremIpsum(context, path.get(), keys, values);
500500
}
501501

502-
static CFStringRef c_fontNames[] = { CFSTR("Arial"), CFSTR("Times New Roman"), CFSTR("Wingdings"), CFSTR("Segoe UI") };
502+
// Segoe UI is noticeably different on ARM, but we still want to test other fonts so only remove Segoe
503+
static CFStringRef c_fontNames[] = { CFSTR("Arial"), CFSTR("Times New Roman"), CFSTR("Wingdings") };
503504
INSTANTIATE_TEST_CASE_P(TestDrawingTextInFonts, Fonts, ::testing::ValuesIn(c_fontNames));
504505

505506
#ifdef WINOBJC
506-
TEXT_DRAW_TEST_F(CTFontManager, DrawWithCustomFont, WhiteBackgroundTest<>) {
507+
508+
// The fall-through font for WinObjC is Segoe, so we can't run this on ARM
509+
ARM_DISABLED_TEXT_DRAW_TEST_F(CTFontManager, DrawWithCustomFont, WhiteBackgroundTest<>) {
507510
CGContextRef context = GetDrawingContext();
508511
CGRect bounds = GetDrawingBounds();
509512

@@ -550,7 +553,8 @@ TEXT_DRAW_TEST_F(CTFontManager, DrawWithCustomFont, WhiteBackgroundTest<>) {
550553
}
551554
#endif // WINOBJC
552555

553-
TEXT_DRAW_TEST_F(CTFont, DrawGlyphs, WhiteBackgroundTest<>) {
556+
// Segoe UI is noticeably different on ARM so disable this for ARM
557+
ARM_DISABLED_TEXT_DRAW_TEST_F(CTFont, DrawGlyphs, WhiteBackgroundTest<>) {
554558
CGContextRef context = GetDrawingContext();
555559
CGRect bounds = GetDrawingBounds();
556560

tests/unittests/CoreGraphics.drawing/data/reference/TestImage.Fonts.Segoe UI.png

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)