(t *testing.T)
| 409 | } |
| 410 | |
| 411 | func TestSummaryEmptyPlan(t *testing.T) { |
| 412 | plan := NewExecutionPlan("Empty plan") |
| 413 | summary := plan.Summary() |
| 414 | |
| 415 | if summary.TotalSteps != 0 { |
| 416 | t.Errorf("expected TotalSteps 0, got %d", summary.TotalSteps) |
| 417 | } |
| 418 | |
| 419 | // Division by zero protection - Progress should be 0 or NaN |
| 420 | if summary.Progress != 0 && !isNaN(summary.Progress) { |
| 421 | t.Errorf("expected Progress 0 or NaN for empty plan, got %f", summary.Progress) |
| 422 | } |
| 423 | } |
| 424 | |
| 425 | func isNaN(f float64) bool { |
| 426 | return f != f |
nothing calls this directly
no test coverage detected