From ec567ba35dd711546c2602edd1e208b4e1bcb521 Mon Sep 17 00:00:00 2001 From: Branden Colen Date: Thu, 1 Apr 2021 10:56:07 -0500 Subject: [PATCH] upped coverage to 100% --- romannumeral_test.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/romannumeral_test.go b/romannumeral_test.go index d45cf72..f3cbf97 100644 --- a/romannumeral_test.go +++ b/romannumeral_test.go @@ -58,7 +58,15 @@ func TestToInt(t *testing.T) { } _, err := ToInt("IVCMXCIX") if err == nil { - t.Errorf("ToInt(%d) expected an error", 0) + t.Error("ToInt(IVCMXCIX) expected an error") + } + + val, err := ToInt("") + if val != 0 { + t.Errorf("ToInt(\"\") = %d; want 0", val) + } + if err != nil { + t.Errorf("ToInt(\"\") returned an error %s", err.Error()) } }