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

Function TestDifferDump

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

Source from the content-addressed store, hash-verified

555}
556
557func TestDifferDump(t *testing.T) {
558 diff := NewDiffer()
559 out := diff.Dump(PLUS,
560 stringsToBytes("foo", "bar", "baz", "quux", "qwerty"),
561 1, 3)
562 out2 := bytesToStrings(out...)
563 if reflect.DeepEqual(out2, []string{"+ bar", "+ baz"}) != true {
564 t.Fatal("Differ Dump() failure:", out2)
565 }
566}
567
568func TestDifferPlainReplace(t *testing.T) {
569 diff := NewDiffer()

Callers

nothing calls this directly

Calls 4

DumpMethod · 0.95
stringsToBytesFunction · 0.85
bytesToStringsFunction · 0.85
NewDifferFunction · 0.70

Tested by

no test coverage detected