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

Function TestFloat64FlagValueFromCommand

flag_test.go:1522–1531  ·  flag_test.go::TestFloat64FlagValueFromCommand
(t *testing.T)

Source from the content-addressed store, hash-verified

1520}
1521
1522func TestFloat64FlagValueFromCommand(t *testing.T) {
1523 fl := &FloatFlag{Name: "myflag"}
1524 cmd := &Command{
1525 Flags: []Flag{
1526 fl,
1527 },
1528 }
1529 require.NoError(t, cmd.Set("myflag", "1.23"))
1530 require.Equal(t, 1.23, cmd.Float(fl.Name))
1531}
1532
1533var float64SliceFlagTests = []struct {
1534 name string

Callers

nothing calls this directly

Calls 2

SetMethod · 0.95
FloatMethod · 0.95

Tested by

no test coverage detected