Beispiel #1
0
 def testAddB1_1(self):
     self.assertEqual(hw.addB('1', '1'), '10',
                      "Failed to properly add 1 and 1 without conversion.")
Beispiel #2
0
 def testAddB110101010_11111111(self):
     self.assertEqual(
         hw.addB('110101010', '11111111'), '1010101001',
         "Failed to properly add 110101010 and 11111111 without conversion."
     )
Beispiel #3
0
 def testAddB11_100(self):
     self.assertEqual(
         hw.addB('11', '100'), '111',
         "Failed to properly add 11 and 100 in base 2 without conversion.")
 def testAddB1_1(self):
     self.assertEqual(hw.addB('1','1'),'10', "Failed to properly add 1 and 1 without conversion.")
 def testAddB110101010_11111111(self):
     self.assertEqual(hw.addB('110101010','11111111'),'1010101001', "Failed to properly add 110101010 and 11111111 without conversion.")
 def testAddB11_100(self):
     self.assertEqual(hw.addB('11','100'),'111', "Failed to properly add 11 and 100 in base 2 without conversion.")