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

Function TestWithAsciiOnDelete

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

Source from the content-addressed store, hash-verified

238}
239
240func TestWithAsciiOnDelete(t *testing.T) {
241 sm := NewMatcher(splitChars(rep("a", 40)+"c"+rep("b", 40)),
242 splitChars(rep("a", 40)+rep("b", 40)))
243 assertAlmostEqual(t, sm.Ratio(), 0.994, 3)
244 assertEqual(t, sm.GetOpCodes(),
245 []OpCode{{'e', 0, 40, 0, 40}, {'d', 40, 41, 40, 40}, {'e', 41, 81, 40, 80}})
246}
247
248func TestWithAsciiBJunk(t *testing.T) {
249 isJunk := func(s string) bool {

Callers

nothing calls this directly

Calls 7

NewMatcherFunction · 0.70
splitCharsFunction · 0.70
repFunction · 0.70
assertAlmostEqualFunction · 0.70
assertEqualFunction · 0.70
RatioMethod · 0.45
GetOpCodesMethod · 0.45

Tested by

no test coverage detected