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

Function TestWithAsciiOnDelete

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

Source from the content-addressed store, hash-verified

276}
277
278func TestWithAsciiOnDelete(t *testing.T) {
279 sm := NewMatcher(splitChars(rep("a", 40)+"c"+rep("b", 40)),
280 splitChars(rep("a", 40)+rep("b", 40)))
281 assertAlmostEqual(t, sm.Ratio(), 0.994, 3)
282 assertEqual(t, sm.GetOpCodes(),
283 []OpCode{{'e', 0, 40, 0, 40}, {'d', 40, 41, 40, 40}, {'e', 41, 81, 40, 80}})
284}
285
286func TestWithAsciiBJunk(t *testing.T) {
287 isJunk := func(s []byte) 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