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

Function TestDifferStructuredDump

texteditor/difflib/bytes/bytes_test.go:545–555  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

543}
544
545func TestDifferStructuredDump(t *testing.T) {
546 diff := NewDiffer()
547 out := diff.StructuredDump('+',
548 stringsToBytes("foo", "bar", "baz", "quux", "qwerty"),
549 1, 3)
550 expected := []DiffLine{{'+', []byte("bar")},
551 {'+', []byte("baz")}}
552 if !reflect.DeepEqual(out, expected) {
553 t.Fatal("Differ StructuredDump failure:", out)
554 }
555}
556
557func TestDifferDump(t *testing.T) {
558 diff := NewDiffer()

Callers

nothing calls this directly

Calls 3

StructuredDumpMethod · 0.95
stringsToBytesFunction · 0.85
NewDifferFunction · 0.70

Tested by

no test coverage detected