MCPcopy Create free account
hub / github.com/alecthomas/devtodo2 / TestDelete

Function TestDelete

todo_test.go:43–52  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

41}
42
43func TestDelete(t *testing.T) {
44 tasks := NewTaskList()
45 a := tasks.Create("do A", MEDIUM)
46 b := tasks.Create("do B", MEDIUM)
47 c := tasks.Create("do C", MEDIUM)
48 b.Delete()
49 if tasks.Len() != 2 || tasks.At(0).Equal(a) || tasks.At(1).Equal(c) {
50 t.Fail()
51 }
52}
53
54func TestReparent(t *testing.T) {
55 tasks := NewTaskList()

Callers

nothing calls this directly

Calls 6

NewTaskListFunction · 0.85
CreateMethod · 0.65
DeleteMethod · 0.65
LenMethod · 0.65
EqualMethod · 0.65
AtMethod · 0.65

Tested by

no test coverage detected