Skip to content
Permalink
Browse files

10 is written as X

  • Loading branch information
michaelbannister committed Jul 3, 2016
1 parent bf3e1cd commit e0aea262d9a4d383f902a364e397dbd740bf21ed
Showing with 7 additions and 2 deletions.
  1. +5 −1 src/main/kotlin/RomanNumerals.kt
  2. +2 −1 src/test/kotlin/DecimalToRomanConverterTest.kt
@@ -1,3 +1,7 @@
fun Int.toRoman(): String {
return "I".repeat(this)
if (this < 10) {
return "I".repeat(this)
} else {
return "X"
}
}
@@ -18,7 +18,8 @@ class DecimalToRomanConverterTest {
private fun parametersForTestIntToRomanConversion() =
arrayOf(
arrayOf(1, "I"),
arrayOf(2, "II")
arrayOf(2, "II"),
arrayOf(10, "X")
)
}

0 comments on commit e0aea26

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