예제 #1
0
	def testNumerosBasicos(self):
		self.assertEquals(1, program.romanToNumerals("I"))
		self.assertEquals(5, program.romanToNumerals("V"))
		self.assertEquals(10, program.romanToNumerals("X"))
		self.assertEquals(50, program.romanToNumerals("L"))
		self.assertEquals(100, program.romanToNumerals("C"))
		self.assertEquals(500, program.romanToNumerals("D"))
		self.assertEquals(1000, program.romanToNumerals("M"))
예제 #2
0
	def testIVequals4(self):
		self.assertEquals(4, program.romanToNumerals("IV"))
예제 #3
0
	def testXIIequals12(self):
		self.assertEquals(12, program.romanToNumerals("XII"))
예제 #4
0
	def testXIequals11(self):
		self.assertEquals(11, program.romanToNumerals("XI"))
예제 #5
0
	def testXXequals20(self):
		self.assertEquals(20, program.romanToNumerals("XX"))
예제 #6
0
	def testNXequalsN(self):
		self.assertEquals(10, program.romanToNumerals("X"))
		self.assertEquals(20, program.romanToNumerals("XX"))
		self.assertEquals(30, program.romanToNumerals("XXX"))
예제 #7
0
	def testNIequalsN(self):
		self.assertEquals(1, program.romanToNumerals("I"))
		self.assertEquals(2, program.romanToNumerals("II"))
		self.assertEquals(3, program.romanToNumerals("III"))