aboutsummaryrefslogtreecommitdiff
path: root/src/test/kotlin/moe/nea/ledger/NumberUtilKtTest.kt
blob: 4068a4265d2735e917bde56d68671aafc36bc45c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package moe.nea.ledger

import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test

class NumberUtilKtTest {
	@Test
	fun parseRomanNumberTest() {
		assertEquals(4, parseRomanNumber("IV"))
		assertEquals(1, parseRomanNumber("I"))
		assertEquals(14, parseRomanNumber("XIV"))
		assertEquals(3, parseRomanNumber("III"))
		assertEquals(8, parseRomanNumber("IIX"))
		assertEquals(500, parseRomanNumber("DM"))
		assertEquals(2024, parseRomanNumber("MMXXIV"))
	}
}