示例#1
0
 def testNormalCase(self):
     test_input = [1, 2, 3, 4, 5, 6, 7, 8]
     result = mod.four_sum(test_input, 20)
     self.assertEqual(sorted(result), [2, 3, 7, 8])
示例#2
0
 def testAllDuplicates(self):
     test_input = [2, 2, 2, 2, 2]
     result = mod.four_sum(test_input, 8)
     self.assertIsNone(result)
示例#3
0
 def testAllDuplicates(self):
     test_input = [2, 2, 2, 2, 2]
     result = mod.four_sum(test_input, 8)
     self.assertIsNone(result)
示例#4
0
 def testNormalCase(self):
     test_input = [1, 2, 3, 4, 5, 6, 7, 8]
     result = mod.four_sum(test_input, 20)
     self.assertEqual(sorted(result), [2, 3, 7, 8])