From 306443ae815feee6e73a77bb463f1a6111d9e774 Mon Sep 17 00:00:00 2001 From: Evan Fiordeliso Date: Sun, 12 Nov 2023 17:09:33 -0500 Subject: [PATCH] Modify a few test cases to cover a few lines in the float option --- opts/parser_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opts/parser_test.go b/opts/parser_test.go index 036a84e..9690c92 100644 --- a/opts/parser_test.go +++ b/opts/parser_test.go @@ -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)