Skip to content
Why GitHub?
Features
→
Code review
Project management
Integrations
Actions
Packages
Security
Team management
Hosting
Customer stories
→
Security
→
Enterprise
Explore
Explore GitHub
→
Learn & contribute
Topics
Collections
Trending
Learning Lab
Open source guides
Connect with others
Events
Community forum
GitHub Education
Marketplace
Pricing
Plans
→
Compare plans
Contact Sales
Nonprofit
→
Education
→
In this repository
All GitHub
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub
↵
Jump to
↵
In this repository
All GitHub
↵
Jump to
↵
Sign in
Sign up
Watch
1
Star
0
Fork
1
michaelbannister
/
tdd-template
forked from
properdom/tddWorkshop
Code
Pull requests
0
Projects
0
Security
Insights
Permalink
Browse files
500 is written as D
Loading branch information
michaelbannister
committed
Jul 10, 2016
1 parent
77b05ee
commit
1023ff9ca243a5cceee4b8832c94de4c392567e1
Unified
Split
Showing
2 changed files
with
3 additions
and
1 deletion
.
+1
−0
src/main/kotlin/RomanNumerals.kt
+2
−1
src/test/kotlin/DecimalToRomanConverterTest.kt
1
src/main/kotlin/RomanNumerals.kt
Show comments
View file
Edit file
Delete file
@@ -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
"
3
src/test/kotlin/DecimalToRomanConverterTest.kt
Show comments
View file
Edit file
Delete file
@@ -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
Toggle all file notes
0 comments on commit
1023ff9
Please
sign in
to comment.
You can’t perform that action at this time.
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
0 comments on commit
1023ff9