test framework: allow to omit text attribute in expected data

to match null in actual data

GitOrigin-RevId: cfed6f6b4162974cb5ef6d725269b5a7b41ea8bd
This commit is contained in:
Anna Kozlova
2021-05-10 11:02:30 +00:00
committed by intellij-monorepo-bot
parent 9d1f5882b9
commit d4a7e73545
@@ -297,9 +297,10 @@ public class ExpectedHighlightingData {
TextAttributes forcedAttributes = null;
if (foregroundColor != null) {
@JdkConstants.FontStyle int ft = Integer.parseInt(fontType);
@JdkConstants.FontStyle int ft = fontType != null ? Integer.parseInt(fontType) : 0;
forcedAttributes = new TextAttributes(
Color.decode(foregroundColor), Color.decode(backgroundColor), Color.decode(effectColor), EffectType.valueOf(effectType), ft);
Color.decode(foregroundColor), backgroundColor != null ? Color.decode(backgroundColor) : null, effectColor != null ? Color.decode(effectColor) : null,
effectType != null ? EffectType.valueOf(effectType) : null, ft);
}
int rangeStart = textOffset.get();