upped coverage to 100%

This commit is contained in:
Branden Colen
2021-04-01 10:56:07 -05:00
parent b897677022
commit ec567ba35d
+9 -1
View File
@@ -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())
}
}