MCPcopy
hub / github.com/tdewolff/canvas / TestPathAppend

Function TestPathAppend

path_test.go:51–60  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

49}
50
51func TestPathAppend(t *testing.T) {
52 test.T(t, MustParseSVGPath("M5 0L5 10").Append(nil), MustParseSVGPath("M5 0L5 10"))
53 test.T(t, (&Path{}).Append(MustParseSVGPath("M5 0L5 10")), MustParseSVGPath("M5 0L5 10"))
54
55 p := MustParseSVGPath("M5 0L5 10").Append(MustParseSVGPath("M5 15L10 15"))
56 test.T(t, p, MustParseSVGPath("M5 0L5 10M5 15L10 15"))
57
58 p = MustParseSVGPath("M5 0L5 10").Append(MustParseSVGPath("L10 15M20 15L25 15"))
59 test.T(t, p, MustParseSVGPath("M5 0L5 10M0 0L10 15M20 15L25 15"))
60}
61
62func TestPathJoin(t *testing.T) {
63 var tests = []struct {

Callers

nothing calls this directly

Calls 3

MustParseSVGPathFunction · 0.85
TMethod · 0.80
AppendMethod · 0.45

Tested by

no test coverage detected