def testAdd3(self): c = Calc() a = -9 b = -10 s = -19 sum = c.Add(a, b) self.assertEqual(s, sum)
def testAdd1(self): c = Calc() a = 9 b = -10 s = -1 sum = c.Add(a, b) self.assertEqual(s, sum)
def testAdd2(self): c = Calc() a = -9 b = 10 s = 1 sum = c.Add(a, b) self.assertEqual(s, sum)
def testIncre(self): c = Calc() a = 9 b = 10 s =-1 sum = c.Incre(a,b) self.assertEqual(s,sum)
def testIncre2(self): c = Calc() a = -9 b = -10 s =1 sum = c.Incre(a,b) self.assertEqual(s,sum)
def testDivide(self): c = Calc() a = 10 b = 2 s = 5 sum = c.Divide(a,b) self.assertEqual(s,sum)
def testMutiply(self): c = Calc() a = 5 b = 6 s = 30 sum = c.Multiply(a, b) self.assertEqual(s, sum)
def testAdd(self): c = Calc() #测试数据 a = 9 b = 10 s = 19 #期望结果 sum = c.Add(9, 10) #实际结果 self.assertEqual(s, sum)