Refactor tests (#31)

Refactor tests in order for the component or logic that they are testing to be contained into individual sub-tests instead of all tests being contained in one big test for the whole data structure.

Add testing for out-of-memory (OOM) conditions. This makes the source code now 100% covered.

Bug fix! A bug has been identified and fixed in the list data structure in the list_add_last function. This bug would occur when adding an item to the back of the list because the pointers were not being updated properly.

Minor Bug fix! A bug has been identified and fixed in the unordered_set, unordered_map, unordered_multiset, and unordered_multimap data structures in their respective unordered_xxx_put functions. This bug would occur in an out-of-memory condition, which would cause the size of the collection to increase without actually adding the new element to it.
This commit is contained in:
Bailey Thompson
2019-05-04 17:59:20 -04:00
committed by GitHub
parent 10a11dc1aa
commit e2d596e4bd
36 changed files with 3750 additions and 2295 deletions

View File

@@ -38,3 +38,4 @@ Data structures which adapt other containers to enhance functionality.
* stack - adapts a container to provide stack (last-in first-out)
* queue - adapts a container to provide queue (first-in first-out)
* priority_queue - adapts a container to provide priority queue