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