MCPcopy Index your code
hub / github.com/HumbleUI/Skija / execute

Method execute

tests/java/paragraph/TextStyleTest.java:12–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10
11public class TextStyleTest implements Executable {
12 @Override
13 public void execute() throws Exception {
14 assertEquals(new TextStyle(), new TextStyle());
15
16 try (var ts1 = new TextStyle();
17 var ts2 = new TextStyle();)
18 {
19 for (var attr: new TextStyleAttribute[] {
20 TextStyleAttribute.ALL_ATTRIBUTES,
21 TextStyleAttribute.FONT,
22 TextStyleAttribute.FOREGROUND,
23 TextStyleAttribute.BACKGROUND,
24 TextStyleAttribute.SHADOW,
25 TextStyleAttribute.DECORATIONS,
26 TextStyleAttribute.LETTER_SPACING,
27 TextStyleAttribute.WORD_SPACING})
28 {
29 pushStack(attr.toString());
30 assertEquals(true, ts1.equals(attr, ts2));
31 assertEquals(true, ts2.equals(attr, ts1));
32 popStack();
33 }
34 assertEquals(true, ts2.equalsByFonts(ts1));
35 assertEquals(true, ts1.equalsByFonts(ts2));
36 }
37
38 assertEquals(false, new TextStyle().setColor(0xFFcc3300).equals(TextStyleAttribute.ALL_ATTRIBUTES, new TextStyle().setColor(0xFF00cc33)));
39 assertEquals(true, new TextStyle().setColor(0xFFcc3300).equals(TextStyleAttribute.BACKGROUND, new TextStyle().setColor(0xFF00cc33)));
40 }
41}

Callers

nothing calls this directly

Calls 7

assertEqualsMethod · 0.80
pushStackMethod · 0.80
popStackMethod · 0.80
equalsByFontsMethod · 0.80
toStringMethod · 0.65
equalsMethod · 0.45
setColorMethod · 0.45

Tested by

no test coverage detected