MCPcopy Create free account
hub / github.com/sergi/go-diff / TestMassiveRuneDiffConversion

Function TestMassiveRuneDiffConversion

diffmatchpatch/diff_test.go:1497–1508  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1495}
1496
1497func TestMassiveRuneDiffConversion(t *testing.T) {
1498 sNew, err := ioutil.ReadFile("../testdata/fixture.go")
1499 if err != nil {
1500 panic(err)
1501 }
1502
1503 dmp := New()
1504 t1, t2, tt := dmp.DiffLinesToChars("", string(sNew))
1505 diffs := dmp.DiffMain(t1, t2, false)
1506 diffs = dmp.DiffCharsToLines(diffs, tt)
1507 assert.NotEmpty(t, diffs)
1508}
1509
1510func TestDiffPartialLineIndex(t *testing.T) {
1511 dmp := New()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
DiffLinesToCharsMethod · 0.80
DiffMainMethod · 0.80
DiffCharsToLinesMethod · 0.80

Tested by

no test coverage detected