mirror of
https://github.com/rwinkhart/convertroman.git
synced 2026-10-27 04:29:57 -04:00
upped coverage to 100%
This commit is contained in:
1 parent
b897677022
commit
ec567ba35d
1 file changed
+9
-1
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user