(t *testing.T)
| 20 | } |
| 21 | |
| 22 | func TestNewErrorCollector(t *testing.T) { |
| 23 | tests := []struct { |
| 24 | name string |
| 25 | failFast bool |
| 26 | }{ |
| 27 | { |
| 28 | name: "fail-fast enabled", |
| 29 | failFast: true, |
| 30 | }, |
| 31 | { |
| 32 | name: "fail-fast disabled", |
| 33 | failFast: false, |
| 34 | }, |
| 35 | } |
| 36 | |
| 37 | for _, tt := range tests { |
| 38 | t.Run(tt.name, func(t *testing.T) { |
| 39 | collector := NewErrorCollector(tt.failFast) |
| 40 | require.NotNil(t, collector, "Collector should be created") |
| 41 | assert.Equal(t, tt.failFast, collector.failFast, "Fail-fast setting should match") |
| 42 | assert.Equal(t, 0, collector.Count(), "New collector should have no errors") |
| 43 | assert.Equal(t, 0, collector.Count(), "New collector should have zero count") |
| 44 | }) |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func TestErrorCollectorAdd_FailFast(t *testing.T) { |
| 49 | collector := NewErrorCollector(true) |
nothing calls this directly
no test coverage detected