(diffs []Diff)
| 46 | } |
| 47 | |
| 48 | func diffRebuildTexts(diffs []Diff) []string { |
| 49 | texts := []string{"", ""} |
| 50 | |
| 51 | for _, d := range diffs { |
| 52 | if d.Type != DiffInsert { |
| 53 | texts[0] += d.Text |
| 54 | } |
| 55 | if d.Type != DiffDelete { |
| 56 | texts[1] += d.Text |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | return texts |
| 61 | } |
| 62 | |
| 63 | func TestDiffCommonPrefix(t *testing.T) { |
| 64 | type TestCase struct { |
no outgoing calls
no test coverage detected
searching dependent graphs…