MCPcopy Create free account
hub / github.com/cogentcore/core / TestDifferStructuredDump

Function TestDifferStructuredDump

texteditor/difflib/difflib_test.go:494–503  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

492}
493
494func TestDifferStructuredDump(t *testing.T) {
495 diff := NewDiffer()
496 out := diff.StructuredDump('+',
497 []string{"foo", "bar", "baz", "quux", "qwerty"},
498 1, 3)
499 expected := []DiffLine{{'+', "bar"}, {'+', "baz"}}
500 if !reflect.DeepEqual(out, expected) {
501 t.Fatal("Differ StructuredDump failure:", out)
502 }
503}
504
505func TestDifferDump(t *testing.T) {
506 diff := NewDiffer()

Callers

nothing calls this directly

Calls 2

StructuredDumpMethod · 0.95
NewDifferFunction · 0.70

Tested by

no test coverage detected