MCPcopy
hub / github.com/spf13/pflag / TestExplicitFalse

Function TestExplicitFalse

bool_test.go:131–141  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

129}
130
131func TestExplicitFalse(t *testing.T) {
132 var tristate triStateValue
133 f := setUpFlagSet(&tristate)
134 err := f.Parse([]string{"--tristate=false"})
135 if err != nil {
136 t.Fatal("expected no error; got", err)
137 }
138 if tristate != triStateFalse {
139 t.Fatal("expected", triStateFalse, "(triStateFalse) but got", tristate, "instead")
140 }
141}
142
143func TestImplicitFalse(t *testing.T) {
144 var tristate triStateValue

Callers

nothing calls this directly

Calls 2

setUpFlagSetFunction · 0.85
ParseMethod · 0.65

Tested by

no test coverage detected