MCPcopy
hub / github.com/urfave/cli / TestUint64FlagValueFromCommand

Function TestUint64FlagValueFromCommand

flag_test.go:992–1001  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

990}
991
992func TestUint64FlagValueFromCommand(t *testing.T) {
993 f := &Uint64Flag{Name: "myflag"}
994 cmd := &Command{
995 Flags: []Flag{
996 f,
997 },
998 }
999 require.NoError(t, cmd.Set("myflag", "42"))
1000 require.Equal(t, uint64(42), cmd.Uint64(f.Name))
1001}
1002
1003var durationFlagTests = []struct {
1004 name string

Callers

nothing calls this directly

Calls 2

SetMethod · 0.95
Uint64Method · 0.95

Tested by

no test coverage detected