()
| 50 | } |
| 51 | |
| 52 | public void swap() throws Exception { |
| 53 | try (Bitmap a = new Bitmap(); Bitmap b = new Bitmap()) { |
| 54 | a.allocN32Pixels(10, 20); |
| 55 | b.allocN32Pixels(5, 6); |
| 56 | int aW = a.getWidth(); |
| 57 | int aH = a.getHeight(); |
| 58 | int bW = b.getWidth(); |
| 59 | int bH = b.getHeight(); |
| 60 | assertNotEquals(aW, bW); |
| 61 | a.swap(b); |
| 62 | // After swap, a should now have original b dimensions and vice versa |
| 63 | assertEquals(bW, a.getWidth()); |
| 64 | assertEquals(bH, a.getHeight()); |
| 65 | assertEquals(aW, b.getWidth()); |
| 66 | assertEquals(aH, b.getHeight()); |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | public void getSurfaceNull() throws Exception { |
| 71 | try (Bitmap a = new Bitmap()) { |
nothing calls this directly
no test coverage detected