Creates first dummy test for empty table

This commit is contained in:
julien lengrand-lambert
2013-12-05 15:58:18 +01:00
parent c6abd4b2a1
commit ec1dafcaec
2 changed files with 13 additions and 1 deletions

View File

@@ -21,6 +21,9 @@ class TableSorter():
Returns the table array sorted between
indices idx_min and idx_max using the merge sort algorithm
"""
if len(table) < 1:
return None
if idx_max == None:
idx_max = len(table)

View File

@@ -10,4 +10,13 @@ import unittest
class test_table_sorter(unittest.TestCase):
#TODO: Implement
#TODO: Implement
def test_mergeSort(self):
table = [1]
sorter = TableSorter()
self.assertEqual(None, sorter.mergeSort(table))
if __name__ == "__main__":
unittest.main()