MCPcopy Create free account
hub / github.com/HumbleUI/Skija / execute

Method execute

tests/java/PaintTest.java:10–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9public class PaintTest implements Executable {
10 @Override
11 public void execute() throws Exception {
12 assertEquals(new Paint().setColor(0x12345678), new Paint().setColor(0x12345678));
13 assertNotEquals(new Paint().setColor(0x12345678).hashCode(), new Paint().setColor(0x12345678).hashCode());
14 assertNotEquals(new Paint().setColor(0x12345678), new Paint().setColor(0xFF345678));
15 assertNotEquals(new Paint().setColor(0x12345678).hashCode(), new Paint().setColor(0xFF345678).hashCode());
16 assertNotEquals(new Paint(), new Paint().setAntiAlias(false));
17 assertNotEquals(new Paint(), new Paint().setDither(true));
18
19 try (var p = new Paint().setColor(0x12345678);) {
20 assertEquals(false, p == p.makeClone());
21 assertEquals(p, p.makeClone());
22 assertNotEquals(p.hashCode(), p.makeClone().hashCode());
23 }
24
25 try (var p = new Paint();) {
26 assertEquals(false, p.hasNothingToDraw());
27
28 p.setBlendMode(BlendMode.DST);
29 assertEquals(true, p.hasNothingToDraw());
30
31 p.setBlendMode(BlendMode.SRC_OVER);
32 assertEquals(false, p.hasNothingToDraw());
33
34 p.setAlpha(0);
35 assertEquals(true, p.hasNothingToDraw());
36 }
37 }
38}

Callers

nothing calls this directly

Calls 10

assertEqualsMethod · 0.80
assertNotEqualsMethod · 0.80
setAntiAliasMethod · 0.80
setDitherMethod · 0.80
hasNothingToDrawMethod · 0.80
setBlendModeMethod · 0.80
setAlphaMethod · 0.80
setColorMethod · 0.45
hashCodeMethod · 0.45
makeCloneMethod · 0.45

Tested by

no test coverage detected