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

Function TestSequenceMatcherRatio

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

Source from the content-addressed store, hash-verified

58}
59
60func TestSequenceMatcherRatio(t *testing.T) {
61 s := NewMatcher(splitChars("abcd"), splitChars("bcde"))
62 assertEqual(t, s.Ratio(), 0.75)
63 assertEqual(t, s.QuickRatio(), 0.75)
64 assertEqual(t, s.RealQuickRatio(), 1.0)
65}
66
67func TestGetOptCodes(t *testing.T) {
68 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