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

Function TestSequenceMatcherRatio

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

Source from the content-addressed store, hash-verified

41}
42
43func TestSequenceMatcherRatio(t *testing.T) {
44 s := NewMatcher(splitChars("abcd"), splitChars("bcde"))
45 assertEqual(t, s.Ratio(), 0.75)
46 assertEqual(t, s.QuickRatio(), 0.75)
47 assertEqual(t, s.RealQuickRatio(), 1.0)
48}
49
50func TestGetOptCodes(t *testing.T) {
51 a := "qabxcd"

Callers

nothing calls this directly

Calls 6

NewMatcherFunction · 0.70
splitCharsFunction · 0.70
assertEqualFunction · 0.70
RatioMethod · 0.45
QuickRatioMethod · 0.45
RealQuickRatioMethod · 0.45

Tested by

no test coverage detected