()
| 8 | |
| 9 | public 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 | } |
nothing calls this directly
no test coverage detected