(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestShapes(t *testing.T) { |
| 10 | defer setEpsilon(1e-6)() |
| 11 | |
| 12 | test.T(t, Rectangle(0.0, 10.0), &Path{}) |
| 13 | test.T(t, Rectangle(5.0, 10.0), MustParseSVGPath("H5V10H0z")) |
| 14 | test.T(t, RoundedRectangle(0.0, 10.0, 0.0), &Path{}) |
| 15 | test.T(t, RoundedRectangle(5.0, 10.0, 0.0), MustParseSVGPath("H5V10H0z")) |
| 16 | test.T(t, RoundedRectangle(5.0, 10.0, 2.0), MustParseSVGPath("M0 2A2 2 0 0 1 2 0L3 0A2 2 0 0 1 5 2L5 8A2 2 0 0 1 3 10L2 10A2 2 0 0 1 0 8z")) |
| 17 | test.T(t, RoundedRectangle(5.0, 10.0, -2.0), MustParseSVGPath("M0 2A2 2 0 0 0 2 0L3 0A2 2 0 0 0 5 2L5 8A2 2 0 0 0 3 10L2 10A2 2 0 0 0 0 8z")) |
| 18 | test.T(t, BeveledRectangle(0.0, 10.0, 0.0), &Path{}) |
| 19 | test.T(t, BeveledRectangle(5.0, 10.0, 0.0), MustParseSVGPath("H5V10H0z")) |
| 20 | test.T(t, BeveledRectangle(5.0, 10.0, 2.0), MustParseSVGPath("M0 2L2 0L3 0L5 2L5 8L3 10L2 10L0 8z")) |
| 21 | test.T(t, Circle(0.0), &Path{}) |
| 22 | test.T(t, Circle(2.0), MustParseSVGPath("M2 0A2 2 0 0 1 -2 0A2 2 0 0 1 2 0z")) |
| 23 | test.T(t, RegularPolygon(2, 2.0, true), &Path{}) |
| 24 | test.T(t, RegularPolygon(4, 0.0, true), &Path{}) |
| 25 | test.T(t, RegularPolygon(4, 2.0, true), MustParseSVGPath("M0 2L-2 0L0 -2L2 0z")) |
| 26 | test.T(t, RegularPolygon(3, 2.0, true), MustParseSVGPath("M0 2L-1.732051 -1L1.732051 -1z")) |
| 27 | test.T(t, RegularPolygon(3, 2.0, false), MustParseSVGPath("M-1.732051 1L0 -2L1.732051 1z")) |
| 28 | test.T(t, StarPolygon(2, 4.0, 2.0, true), &Path{}) |
| 29 | test.T(t, StarPolygon(4, 4.0, 2.0, true), MustParseSVGPath("M0 4L-1.414214 1.414214L-4 0L-1.414214 -1.414214L0 -4L1.414214 -1.414214L4 0L1.414214 1.414214z")) |
| 30 | test.T(t, StarPolygon(3, 4.0, 2.0, false), MustParseSVGPath("M-3.464102 2L0 -4L3.464102 2z")) |
| 31 | } |
nothing calls this directly
no test coverage detected