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

Function TestDiffBisectSplit

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

Source from the content-addressed store, hash-verified

280}
281
282func TestDiffBisectSplit(t *testing.T) {
283 type TestCase struct {
284 Text1 string
285 Text2 string
286 }
287
288 dmp := New()
289
290 for _, tc := range []TestCase{
291 {"STUV\x05WX\x05YZ\x05[", "WĺĻļ\x05YZ\x05ĽľĿŀZ"},
292 } {
293 diffs := dmp.diffBisectSplit([]rune(tc.Text1),
294 []rune(tc.Text2), 7, 6, time.Now().Add(time.Hour))
295
296 for _, d := range diffs {
297 assert.True(t, utf8.ValidString(d.Text))
298 }
299
300 // TODO define the expected outcome
301 }
302}
303
304func TestDiffLinesToChars(t *testing.T) {
305 type TestCase struct {

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
diffBisectSplitMethod · 0.80

Tested by

no test coverage detected