(t *testing.T)
| 43 | } |
| 44 | |
| 45 | func TestTaskTracker_MarkCurrentAs(t *testing.T) { |
| 46 | logger, _ := zap.NewDevelopment() |
| 47 | tracker := NewTaskTracker(logger) |
| 48 | reasoning := `1. Criar arquivo |
| 49 | 2. Rodar teste` |
| 50 | _ = tracker.ParseReasoning(reasoning) |
| 51 | plan := tracker.GetPlan() |
| 52 | if plan == nil { |
| 53 | t.Fatal("Expected plan, got nil") |
| 54 | return |
| 55 | } |
| 56 | tracker.MarkCurrentAs(TaskInProgress, "") |
| 57 | if plan.Tasks[0].Status != TaskInProgress { |
| 58 | t.Error("Expected first task to be in progress") |
| 59 | } |
| 60 | tracker.MarkCurrentAs(TaskCompleted, "") |
| 61 | if plan.Tasks[0].Status != TaskCompleted { |
| 62 | t.Error("Expected first task to be completed") |
| 63 | } |
| 64 | if plan.CurrentTask != 1 { |
| 65 | t.Errorf("Expected current task to be 1, got %d", plan.CurrentTask) |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | func TestTaskTracker_FailureHandling(t *testing.T) { |
| 70 | logger, _ := zap.NewDevelopment() |
nothing calls this directly
no test coverage detected