(t *testing.T, doc string)
| 27 | } |
| 28 | |
| 29 | func testDoc(t *testing.T, doc string) string { |
| 30 | routes, err := Parse(doc) |
| 31 | if err != nil { |
| 32 | t.Error(err) |
| 33 | } |
| 34 | |
| 35 | docBack := String(routes...) |
| 36 | if docBack != doc { |
| 37 | pos, _, _ := findDiffPos(docBack, doc) |
| 38 | t.Error("failed to serialize doc", pos) |
| 39 | t.Log(docBack) |
| 40 | t.Log(doc) |
| 41 | } |
| 42 | |
| 43 | return docBack |
| 44 | } |
| 45 | |
| 46 | func TestRouteString(t *testing.T) { |
| 47 | for i, item := range []struct { |
no test coverage detected
searching dependent graphs…