Beispiel #1
0
 def testAdd110101010_11111111(self):
     self.assertEqual(
         hw.add('110101010', '11111111'), '1010101001',
         "Failed to properly add 110101010 and 11111111 in base 2.")
Beispiel #2
0
 def testAdd011_100(self):
     self.assertEqual(hw.add('011', '100'), '111',
                      "Failed to properly add 11 and 100 in base 2.")
Beispiel #3
0
 def testAdd1_0(self):
     self.assertEqual(hw.add('1', '1'), '10',
                      "Failed to properly add 1 and 1 in base 2.")
 def testAdd110101010_11111111(self):
     self.assertEqual(hw.add('110101010','11111111'), '1010101001', "Failed to properly add 110101010 and 11111111 in base 2.")
 def testAdd011_100(self):
     self.assertEqual(hw.add('011','100'),'111', "Failed to properly add 11 and 100 in base 2.")
 def testAdd1_0(self):
     self.assertEqual(hw.add('1','1'),'10', "Failed to properly add 1 and 1 in base 2.")