()
| 143 | } |
| 144 | |
| 145 | public void checks() { |
| 146 | try (Path p = new Path().lineTo(40, 40).lineTo(40, 0).lineTo(0, 40).lineTo(0, 0).closePath()) { |
| 147 | assertEquals(false, p.isEmpty()); |
| 148 | p.reset(); |
| 149 | assertEquals(true, p.isEmpty()); |
| 150 | } |
| 151 | |
| 152 | try (Path p = new Path().lineTo(40, 40).lineTo(40, 0).lineTo(0, 40).lineTo(0, 0).closePath()) { |
| 153 | assertEquals(false, p.isEmpty()); |
| 154 | p.rewind(); |
| 155 | assertEquals(true, p.isEmpty()); |
| 156 | } |
| 157 | |
| 158 | try (Path p = new Path().lineTo(40, 40).lineTo(40, 0).lineTo(0, 40).lineTo(0, 0)) { |
| 159 | assertEquals(false, p.isLastContourClosed()); |
| 160 | p.closePath(); |
| 161 | assertEquals(true, p.isLastContourClosed()); |
| 162 | p.moveTo(100, 100).lineTo(140, 140).lineTo(140, 100).lineTo(100, 140); |
| 163 | assertEquals(false, p.isLastContourClosed()); |
| 164 | p.closePath(); |
| 165 | assertEquals(true, p.isLastContourClosed()); |
| 166 | } |
| 167 | |
| 168 | try (Path p = new Path().lineTo(40, 40).lineTo(40, 0).lineTo(0, 40).lineTo(0, 0)) { |
| 169 | assertEquals(true, p.isFinite()); |
| 170 | } |
| 171 | |
| 172 | try (Path p = new Path().lineTo(40, 40).lineTo(Float.POSITIVE_INFINITY, 0).lineTo(0, 40).lineTo(0, 0).closePath()) { |
| 173 | assertEquals(false, p.isFinite()); |
| 174 | } |
| 175 | |
| 176 | try (Path p = new Path().lineTo(40, 40).lineTo(40, 0).lineTo(0, 40).lineTo(0, 0)) { |
| 177 | assertEquals(false, p.isVolatile()); |
| 178 | p.setVolatile(true); |
| 179 | assertEquals(true, p.isVolatile()); |
| 180 | p.setVolatile(false); |
| 181 | assertEquals(false, p.isVolatile()); |
| 182 | } |
| 183 | |
| 184 | try (Path p = new Path().lineTo(40, 40).lineTo(40, 0).lineTo(0, 40).lineTo(0, 0).closePath()) { |
| 185 | assertEquals(null, p.getAsLine()); |
| 186 | } |
| 187 | |
| 188 | try (Path p = new Path().moveTo(20, 20).lineTo(40, 40)) { |
| 189 | assertArrayEquals(new Point[] { new Point(20, 20), new Point(40, 40) }, p.getAsLine()); |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | public void storage() { |
| 194 | Path subpath = new Path().lineTo(40, 40).lineTo(40, 0).lineTo(0, 40).lineTo(0, 0).closePath(); |
nothing calls this directly
no test coverage detected