MCPcopy Index your code
hub / github.com/git-bug/git-bug / TestRegisterAndClean

Function TestRegisterAndClean

util/interrupt/cleaner_test.go:38–53  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

36}
37
38func TestRegisterAndClean(t *testing.T) {
39 handlerCreated = true // this prevents goroutine from being started during the tests
40
41 f1 := func() error {
42 return nil
43 }
44 f2 := func() error {
45 return nil
46 }
47
48 RegisterCleaner(f1)
49 RegisterCleaner(f2)
50
51 errl := clean()
52 assert.Len(t, errl, 0)
53}
54
55func TestCancel(t *testing.T) {
56 handlerCreated = true // this prevents goroutine from being started during the tests

Callers

nothing calls this directly

Calls 3

RegisterCleanerFunction · 0.85
cleanFunction · 0.85
LenMethod · 0.45

Tested by

no test coverage detected