MCPcopy Create free account
hub / github.com/JordanCoin/codemap / TestWorkingSet_Remove

Function TestWorkingSet_Remove

watch/workingset_test.go:51–63  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

49}
50
51func TestWorkingSet_Remove(t *testing.T) {
52 ws := NewWorkingSet()
53 ws.Touch("a.go", 1, false, 0)
54 ws.Touch("b.go", 2, false, 0)
55 ws.Remove("a.go")
56
57 if ws.Size() != 1 {
58 t.Errorf("expected 1 file after remove, got %d", ws.Size())
59 }
60 if _, ok := ws.Files["a.go"]; ok {
61 t.Error("a.go should have been removed")
62 }
63}
64
65func TestWorkingSet_ActiveFiles(t *testing.T) {
66 ws := NewWorkingSet()

Callers

nothing calls this directly

Calls 5

TouchMethod · 0.95
RemoveMethod · 0.95
SizeMethod · 0.95
NewWorkingSetFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected