()
| 17 | } |
| 18 | |
| 19 | public void base() throws Exception { |
| 20 | try (var bitmap = new Bitmap()) { |
| 21 | int id1 = bitmap.getGenerationId(); |
| 22 | assertEquals(true, bitmap.isNull()); |
| 23 | assertEquals(true, bitmap.isEmpty()); |
| 24 | |
| 25 | bitmap.allocPixels(ImageInfo.makeS32(7, 3, ColorAlphaType.OPAQUE)); |
| 26 | assertNotEquals(id1, bitmap.getGenerationId()); |
| 27 | |
| 28 | assertEquals(false, bitmap.isNull()); |
| 29 | assertEquals(false, bitmap.isEmpty()); |
| 30 | |
| 31 | assertEquals(7L * 4, bitmap.getRowBytes()); |
| 32 | assertEquals(4, bitmap.getBytesPerPixel()); |
| 33 | assertEquals(7, bitmap.getRowBytesAsPixels()); |
| 34 | |
| 35 | bitmap.allocPixels(ImageInfo.makeS32(7, 3, ColorAlphaType.OPAQUE), 32); |
| 36 | assertEquals(32L, bitmap.getRowBytes()); |
| 37 | assertEquals(4, bitmap.getBytesPerPixel()); |
| 38 | assertEquals(8, bitmap.getRowBytesAsPixels()); |
| 39 | |
| 40 | bitmap.setImageInfo(ImageInfo.makeS32(7, 3, ColorAlphaType.OPAQUE)); |
| 41 | assertEquals(true, bitmap.isNull()); |
| 42 | assertEquals(false, bitmap.isEmpty()); |
| 43 | assertEquals(false, bitmap.isReadyToDraw()); |
| 44 | bitmap.allocPixels(); |
| 45 | assertEquals(false, bitmap.isNull()); |
| 46 | assertEquals(true, bitmap.isReadyToDraw()); |
| 47 | |
| 48 | bitmap.getGenerationId(); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | public void swap() throws Exception { |
| 53 | try (Bitmap a = new Bitmap(); Bitmap b = new Bitmap()) { |
nothing calls this directly
no test coverage detected