(t *testing.T)
| 331 | } |
| 332 | |
| 333 | func TestTaskToSnapshot_WithDerived(t *testing.T) { |
| 334 | tasks := []*model.Task{ |
| 335 | {ID: "001", Status: model.StatusCompleted, Dependencies: []string{}}, |
| 336 | {ID: "002", Status: model.StatusPending, Dependencies: []string{"001"}}, |
| 337 | } |
| 338 | taskMap := buildTaskMap(tasks) |
| 339 | depthMap := calculateDepthMap(tasks, taskMap) |
| 340 | topoOrder := calculateTopologicalOrder(tasks, taskMap) |
| 341 | criticalPath := calculateCriticalPathTasks(tasks, taskMap) |
| 342 | |
| 343 | snapshot := taskToSnapshot(tasks[1], false, true, depthMap, topoOrder, criticalPath, taskMap) |
| 344 | |
| 345 | if snapshot.IsBlocked == nil { |
| 346 | t.Fatal("expected IsBlocked to be set") |
| 347 | } |
| 348 | if snapshot.DependencyDepth == nil { |
| 349 | t.Fatal("expected DependencyDepth to be set") |
| 350 | } |
| 351 | if snapshot.TopologicalOrder == nil { |
| 352 | t.Fatal("expected TopologicalOrder to be set") |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | // --- Command-level tests --- |
| 357 |
nothing calls this directly
no test coverage detected