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

Function TestIntFlagValueFromCommand

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

Source from the content-addressed store, hash-verified

910}
911
912func TestIntFlagValueFromCommand(t *testing.T) {
913 fl := &Int64Flag{Name: "myflag"}
914 cmd := &Command{
915 Flags: []Flag{
916 fl,
917 },
918 }
919 require.NoError(t, cmd.Set("myflag", "42"))
920 require.Equal(t, int64(42), cmd.Int64(fl.Name))
921}
922
923var uintFlagTests = []struct {
924 name string

Callers

nothing calls this directly

Calls 2

SetMethod · 0.95
Int64Method · 0.95

Tested by

no test coverage detected