diff options
Diffstat (limited to '04_exercise/slotmap/slomap_test.c')
-rw-r--r-- | 04_exercise/slotmap/slomap_test.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/04_exercise/slotmap/slomap_test.c b/04_exercise/slotmap/slomap_test.c deleted file mode 100644 index 930bfa8..0000000 --- a/04_exercise/slotmap/slomap_test.c +++ /dev/null @@ -1,19 +0,0 @@ -// -// Created by stefan on 18.06.20. -// -#include <assert.h> -#include <slotmap.h> -#include <stdbool.h> - -bool find1(void const * ptr) { - return * (int const *) ptr == 1; -} -int main() { - smEntry slab [10]; - int data [6] = {0, 1, 2,3,4,5}; - smHeader header = smInit((smEntry *)&slab, 10); - smInsert(&header, &data[1]); - smEntry * entry = smFindEntry(&header, &find1); - assert(*(int *)entry->value == 1); - return 0; -} |