Esempio n. 1
0
 def test_8(self):
    expected = [8339, 6819]
    actual = addTwoHugeNumbers(
       listToLinkedList([2309]),
       listToLinkedList([8339, 4510])
    ).toList()
    self.assertEqual(actual, expected)
Esempio n. 2
0
 def test_7(self):
    expected = [1, 0, 0, 0, 0, 0, 0]
    actual = addTwoHugeNumbers(
       listToLinkedList([1]),
       listToLinkedList([9999, 9999, 9999, 9999, 9999, 9999])
    ).toList()
    self.assertEqual(actual, expected)
Esempio n. 3
0
 def test_5(self):
    expected = [1234, 123, 0]
    actual = addTwoHugeNumbers(
       listToLinkedList([0]),
       listToLinkedList([1234, 123, 0])
    ).toList()
    self.assertEqual(actual, expected)
Esempio n. 4
0
 def test_2(self):
    expected = [223, 104, 105]
    actual = addTwoHugeNumbers(self.example2['a'], self.example2['b']).toList()
    self.assertEqual(actual, expected)
Esempio n. 5
0
 def test_1(self):
    expected = [9876, 5434, 0]
    actual = addTwoHugeNumbers(self.example1['a'], self.example1['b']).toList()
    self.assertEqual(actual, expected)