Modify a few test cases to cover a few lines in the float option

This commit is contained in:
Evan Fiordeliso 2023-11-12 17:09:33 -05:00
parent 753c179edb
commit 306443ae81
1 changed files with 3 additions and 3 deletions

View File

@ -313,9 +313,9 @@ func TestParseShortOptionWithEqualBadValue(t *testing.T) {
}
func TestParseLongOptionMissingValue(t *testing.T) {
opt := opts.Int("fruit", "f", 0, "")
opt := opts.Float("fruit-price", "f", 0, "")
set := opts.Set{opt}
args := []string{"--fruit"}
args := []string{"--fruit-price"}
parser := opts.NewParser(args, set, false)
_, err := parser.Parse()
if err == nil {
@ -324,7 +324,7 @@ func TestParseLongOptionMissingValue(t *testing.T) {
}
func TestParseShortOptionMissingValue(t *testing.T) {
opt := opts.Int("fruit", "f", 0, "")
opt := opts.Float("fruit-price", "f", 0, "")
set := opts.Set{opt}
args := []string{"-f"}
parser := opts.NewParser(args, set, false)