Permalink
Browse files

fleshed out tests for conversion from roman numerals

  • Loading branch information...
1 parent e2b30f0 commit e0bc032a46ee89f94f9926429e456badf0bdb192 @glyphrider committed Jul 27, 2012
Showing with 14 additions and 2 deletions.
  1. +14 −2 roman.erl
View
16 roman.erl
@@ -50,7 +50,7 @@ roman_twenty_eight_test() -> "XXVIII" = to(28).
roman_forty_test() -> "XL" = to(40).
roman_fifty_test() -> "L" = to(50).
roman_ninety_test() -> "XC" = to(90).
-romman_hundred_test() -> "C" = to(100).
+roman_hundred_test() -> "C" = to(100).
roman_five_hundred_test() -> "D" = to(500).
roman_four_hundred_test() -> "CD" = to(400).
roman_thousand_test() -> "M" = to(1000).
@@ -62,6 +62,18 @@ roman_from_two_test() -> 2 = from("II").
roman_from_three_test() -> 3 = from("III").
roman_from_four_test() -> 4 = from("IV").
roman_from_five_test() -> 5 = from("V").
+roman_from_six_test() -> 6 = from("VI").
roman_from_nine_test() -> 9 = from("IX").
roman_from_ten_test() -> 10 = from("X").
-roman_from_eighteen_test() -> 18 = from("XVIII").
+roman_from_sixteen_test() -> 16 = from("XVI").
+roman_from_nineteen_test() -> 19 = from("XIX").
+roman_from_twenty_eight_test() -> 28 = from("XXVIII").
+roman_from_forty_test() -> 40 = from("XL").
+roman_from_fifty_test() -> 50 = from("L").
+roman_from_ninety_test() -> 90 = from("XC").
+roman_from_hundred_test() -> 100 = from("C").
+roman_from_five_hundred_test() -> 500 = from("D").
+roman_from_four_hundred_test() -> 400 = from("CD").
+roman_from_thousand_test() -> 1000 = from("M").
+roman_from_nine_hundred_test() -> 900 = from("CM").
+roman_from_nineteen_sixty_eight_test() -> 1968 = from("MCMLXVIII").

0 comments on commit e0bc032

Please sign in to comment.