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

Function TestCommand_Float64

command_test.go:4095–4117  ·  command_test.go::TestCommand_Float64
(t *testing.T)

Source from the content-addressed store, hash-verified

4093}
4094
4095func TestCommand_Float64(t *testing.T) {
4096 pCmd := &Command{
4097 Flags: []Flag{
4098 &FloatFlag{
4099 Name: "myflag",
4100 Value: 17,
4101 },
4102 },
4103 }
4104 cmd := &Command{
4105 Flags: []Flag{
4106 &FloatFlag{
4107 Name: "top-flag",
4108 Value: 18,
4109 },
4110 },
4111 parent: pCmd,
4112 }
4113
4114 r := require.New(t)
4115 r.Equal(float64(17), cmd.Float("myflag"))
4116 r.Equal(float64(18), cmd.Float("top-flag"))
4117}
4118
4119func TestCommand_Duration(t *testing.T) {
4120 pCmd := &Command{

Callers

nothing calls this directly

Calls 1

FloatMethod · 0.95

Tested by

no test coverage detected