Skip to content
Permalink
Browse files

500 is written as D

  • Loading branch information
michaelbannister committed Jul 10, 2016
1 parent 77b05ee commit 1023ff9ca243a5cceee4b8832c94de4c392567e1
Showing with 3 additions and 1 deletion.
  1. +1 −0 src/main/kotlin/RomanNumerals.kt
  2. +2 −1 src/test/kotlin/DecimalToRomanConverterTest.kt
@@ -27,6 +27,7 @@ fun toDecimalPlaceValues(number: Int): List<PlaceValue> {

private fun Int.toRomanDigit(): String = when(this) {
1000 -> "M"
500 -> "D"
100 -> "C"
50 -> "L"
10 -> "X"
@@ -28,7 +28,8 @@ class DecimalToRomanConverterTest {
arrayOf(11, "XI"),
arrayOf(3012, "MMMXII"), // I didn't expect this to fail, just checking
arrayOf(5, "V"),
arrayOf(50, "L")
arrayOf(50, "L"),
arrayOf(500, "D")
)

@Test

0 comments on commit 1023ff9

Please sign in to comment.
You can’t perform that action at this time.