14 Commits

Author SHA1 Message Date
Bailey Thompson
e3bc87298f Simplify return values (#114)
Introduce bk_err and bk_bool rather than using int for both of these.
This means that the function definition now specifies whether 0 means
no error, or whether it means false.
2020-08-17 16:55:29 -04:00
Bailey Thompson
48b0751b6c Stub malloc toggle (#69) 2020-08-07 16:57:41 -04:00
Bailey Thompson
e2d596e4bd 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.
2019-05-04 17:59:20 -04:00
Bailey Thompson
bcfa6bb4ce Add priority_queue 2018-01-01 18:06:13 -05:00
Bailey Thompson
d5471f6f9f Add multimap 2017-12-31 22:35:57 -05:00
Bailey Thompson
0ff4917e92 Add map 2017-12-31 17:33:26 -05:00
Bailey Thompson
3daf2deb09 Add multiset 2017-12-31 16:15:01 -05:00
Bailey Thompson
613e73bbcc Add unordered_multimap 2017-12-12 23:50:43 -05:00
Bailey Thompson
76966ca188 Add unordered_multiset 2017-12-12 19:49:31 -05:00
Bailey Thompson
dfa195e89d Add unordered_map 2017-12-12 00:24:25 -05:00
Bailey Thompson
3b043fb4f8 Add unordered_set - still in development 2017-12-10 02:39:55 -05:00
Bailey Thompson
a7d0040615 Add array 2017-12-01 23:03:53 -05:00
Bailey Thompson
0dbf0b1b08 Add set 2017-11-27 22:27:21 -05:00
Bailey Thompson
7bd241f741 Improve formatting
Follow K&R convention.
2017-11-25 23:14:23 -05:00