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

Function BenchmarkDiffCommonPrefix

diffmatchpatch/diff_test.go:85–93  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

83}
84
85func BenchmarkDiffCommonPrefix(b *testing.B) {
86 s := "ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖ"
87
88 dmp := New()
89
90 for i := 0; i < b.N; i++ {
91 dmp.DiffCommonPrefix(s, s)
92 }
93}
94
95func TestCommonPrefixLength(t *testing.T) {
96 type TestCase struct {

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
DiffCommonPrefixMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…