From 32ec2d9a30100f4eaa0337d96fc3bf8d55e54599 Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Fri, 27 Aug 2021 12:28:46 +0200 Subject: [PATCH] [editor painting test] less strict bold font check GitOrigin-RevId: f66d0bd874837e13f7486e10a7de73f9e3ffb1db --- .../com/intellij/openapi/editor/EditorPaintingTestCase.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/editor/EditorPaintingTestCase.java b/platform/platform-tests/testSrc/com/intellij/openapi/editor/EditorPaintingTestCase.java index 844fb02095e3..0825c6719966 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/editor/EditorPaintingTestCase.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/editor/EditorPaintingTestCase.java @@ -1,4 +1,4 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.openapi.editor; import com.intellij.openapi.application.ex.PathManagerEx; @@ -17,6 +17,7 @@ import com.intellij.openapi.editor.markup.HighlighterTargetArea; import com.intellij.openapi.editor.markup.RangeHighlighter; import com.intellij.openapi.editor.markup.TextAttributes; import com.intellij.openapi.util.io.FileUtil; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.psi.tree.IElementType; import com.intellij.rt.execution.junit.FileComparisonFailure; import com.intellij.testFramework.EditorTestUtil; @@ -316,7 +317,7 @@ public abstract class EditorPaintingTestCase extends AbstractEditorTest { } private void drawChar(char c, int x, int y) { - (getFont().getFontName().contains("Bold") ? myBoldFont : myPlainFont).draw(myDelegate, c, x, y); + (StringUtil.containsIgnoreCase(getFont().getFontName(), "bold") ? myBoldFont : myPlainFont).draw(myDelegate, c, x, y); } }