--- Analysis function tests (pure, no I/O) ---
(t *testing.T)
| 111 | // --- Analysis function tests (pure, no I/O) --- |
| 112 | |
| 113 | func TestBuildTaskMap(t *testing.T) { |
| 114 | tasks := []*model.Task{ |
| 115 | {ID: "001", Title: "A"}, |
| 116 | {ID: "002", Title: "B"}, |
| 117 | } |
| 118 | |
| 119 | taskMap := buildTaskMap(tasks) |
| 120 | |
| 121 | if len(taskMap) != 2 { |
| 122 | t.Fatalf("expected 2 entries, got %d", len(taskMap)) |
| 123 | } |
| 124 | if taskMap["001"].Title != "A" { |
| 125 | t.Errorf("taskMap[001].Title = %q, want %q", taskMap["001"].Title, "A") |
| 126 | } |
| 127 | if taskMap["002"].Title != "B" { |
| 128 | t.Errorf("taskMap[002].Title = %q, want %q", taskMap["002"].Title, "B") |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | func TestIsTaskBlocked(t *testing.T) { |
| 133 | tasks := []*model.Task{ |
nothing calls this directly
no test coverage detected