(t testing.TB, set *flag.FlagSet, actual *zapcore.Level)
| 55 | } |
| 56 | |
| 57 | func (tc flagTestCase) run(t testing.TB, set *flag.FlagSet, actual *zapcore.Level) { |
| 58 | err := set.Parse(tc.args) |
| 59 | if tc.wantErr { |
| 60 | assert.Error(t, err, "Parse(%v) should fail.", tc.args) |
| 61 | return |
| 62 | } |
| 63 | if assert.NoError(t, err, "Parse(%v) should succeed.", tc.args) { |
| 64 | assert.Equal(t, tc.wantLevel, *actual, "Level mismatch.") |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | func TestLevelFlag(t *testing.T) { |
| 69 | tests := []flagTestCase{ |
no test coverage detected