(t *testing.T)
| 845 | } |
| 846 | |
| 847 | func TestPathToPDF(t *testing.T) { |
| 848 | var tts = []struct { |
| 849 | p string |
| 850 | pdf string |
| 851 | }{ |
| 852 | {"", ""}, |
| 853 | {"L10 0Q15 10 20 0M20 10C20 20 30 20 30 10z", "0 0 m 10 0 l 13.333333 6.6666667 16.666667 6.6666667 20 0 c 20 10 m 20 20 30 20 30 10 c h"}, |
| 854 | {"L10 0M20 0L30 0", "0 0 m 10 0 l 20 0 m 30 0 l"}, |
| 855 | } |
| 856 | for _, tt := range tts { |
| 857 | t.Run(tt.p, func(t *testing.T) { |
| 858 | test.T(t, MustParseSVGPath(tt.p).ToPDF(), tt.pdf) |
| 859 | }) |
| 860 | } |
| 861 | } |
| 862 | |
| 863 | func plotPathLengthParametrization(filename string, N int, speed, length func(float64) float64, tmin, tmax float64) { |
| 864 | Tc, totalLength := invSpeedPolynomialChebyshevApprox(N, gaussLegendre7, speed, tmin, tmax) |
nothing calls this directly
no test coverage detected