Skip to content

Commit

Permalink
Add colony test cases
Browse files Browse the repository at this point in the history
- colony basics (simple insertion/erasure/iterator testing)
- insert and erase
- range erase
- sort
- insertion methods
- perfect forwarding
- emplace
- group size and capacity
- splice

Delete `group_size_sum()` from colony as it is only needed for debugging
  • Loading branch information
ifreund committed Jun 13, 2019
1 parent e10c5f3 commit 62d8cc6
Show file tree
Hide file tree
Showing 2 changed files with 1,186 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/colony.h
Original file line number Diff line number Diff line change
Expand Up @@ -2204,20 +2204,6 @@ class colony : private element_allocator_type
return total_number_of_elements;
}

#ifdef COLONY_TEST_DEBUG // used for debugging during internal testing only:
inline size_type group_size_sum() const {
group_pointer_type current = begin_iterator.group_pointer;
size_type temp = 0;

while( current != NULL ) {
temp += current->number_of_elements;
current = current->next_group;
}

return temp;
}
#endif

inline size_type max_size() const noexcept {
return std::allocator_traits<element_allocator_type>::max_size( *this );
}
Expand Down
Loading

0 comments on commit 62d8cc6

Please sign in to comment.