MCPcopy
hub / github.com/uber-go/zap / run

Method run

flag_test.go:57–66  ·  view source on GitHub ↗
(t testing.TB, set *flag.FlagSet, actual *zapcore.Level)

Source from the content-addressed store, hash-verified

55}
56
57func (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
68func TestLevelFlag(t *testing.T) {
69 tests := []flagTestCase{

Callers 2

runImplicitSetMethod · 0.95
runExplicitSetMethod · 0.95

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected