|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
A constant container is read-only: its iterator is Const_Iterator, its accessors hand out references to const, and the members that modify the container are not available through it. More...
#include <gtest/gtest.h>#include <ah-iterator.H>#include <ah-zip.H>#include <ahFunctional.H>#include <filter_iterator.H>#include <htlist.H>#include <tpl_array.H>#include <tpl_arrayHeap.H>#include <tpl_arrayQueue.H>#include <tpl_arrayStack.H>#include <tpl_dynArray.H>#include <tpl_dynArrayHeap.H>#include <tpl_dynBinHeap.H>#include <tpl_dynDlist.H>#include <tpl_dynListQueue.H>#include <tpl_dynListStack.H>#include <tpl_dynMapTree.H>#include <tpl_dynSetHash.H>#include <tpl_dynSetTree.H>#include <tpl_dynSkipList.H>#include <tpl_hash.H>#include <tpl_odhash.H>#include <tpl_olhash.H>#include <tpl_memArray.H>#include <tpl_random_queue.H>#include <tpl_small_vector.H>#include <algorithm>#include <iterator>#include <type_traits>#include <utility>Go to the source code of this file.
Functions | |
| TEST (ConstIterator, the_iterators_that_hand_out_modifiable_references_reject_constant_containers) | |
| TEST (ConstIterator, get_it_depends_on_the_constness_of_the_container) | |
| TEST (ConstIterator, is_as_large_as_the_iterator_that_it_wraps) | |
| TEST (ConstIterator, reads_the_container_like_the_iterator) | |
| TEST (ConstIterator, the_stl_const_iterator_is_read_only_and_random_access_on_arrays) | |
| TEST (ConstIterator, a_constant_dynarray_is_read_without_allocating) | |
| TEST (ConstIterator, the_accessors_of_a_constant_container_hand_out_references_to_const) | |
| TEST (ConstIterator, the_leaks_found_from_a_client_no_longer_compile) | |
| TEST (ConstIterator, the_generic_code_reads_constant_containers) | |
Variables | |
| template<class C > | |
| constexpr bool | const_iterator_is_as_large_as_the_iterator |
A constant container is read-only: its iterator is Const_Iterator, its accessors hand out references to const, and the members that modify the container are not available through it.
Definition in file const_iterator_test.cc.
| TEST | ( | ConstIterator | , |
| a_constant_dynarray_is_read_without_allocating | |||
| ) |
Definition at line 278 of file const_iterator_test.cc.
References Aleph::DynArray< T >::exist(), Aleph::DynArray< T >::Iterator::get_curr(), Aleph::DynArray< T >::get_first(), Aleph::DynArray< T >::get_it(), Aleph::DynArray< T >::get_last(), Aleph::DynArray< T >::read(), Aleph::DynArray< T >::set_default_initial_value(), and Aleph::sum().
| TEST | ( | ConstIterator | , |
| get_it_depends_on_the_constness_of_the_container | |||
| ) |
Definition at line 168 of file const_iterator_test.cc.
References Aleph::DynList< T >::get_first(), LocateFunctions< Container, Type >::get_it(), Aleph::iterator_for(), l, and Aleph::sum().
| TEST | ( | ConstIterator | , |
| is_as_large_as_the_iterator_that_it_wraps | |||
| ) |
Definition at line 195 of file const_iterator_test.cc.
| TEST | ( | ConstIterator | , |
| reads_the_container_like_the_iterator | |||
| ) |
Definition at line 213 of file const_iterator_test.cc.
References Aleph::DynList< T >::append(), Aleph::copy(), Aleph::Const_Iterator< It >::end(), Aleph::Const_Iterator< It >::get_curr(), Aleph::Const_Iterator< It >::get_curr_ne(), LocateFunctions< Container, Type >::get_it(), Aleph::Const_Iterator< It >::get_pos(), Aleph::Const_Iterator< It >::has_curr(), Aleph::Const_Iterator< It >::is_in_last(), l, Aleph::Const_Iterator< It >::next(), Aleph::Const_Iterator< It >::prev(), Aleph::Const_Iterator< It >::reset_first(), Aleph::Const_Iterator< It >::reset_last(), and Aleph::Const_Iterator< It >::swap().
| TEST | ( | ConstIterator | , |
| the_accessors_of_a_constant_container_hand_out_references_to_const | |||
| ) |
Definition at line 304 of file const_iterator_test.cc.
References Aleph::find(), OhashCommon< HashTbl, Key >::find(), Aleph::DynList< T >::get_first(), Aleph::DynList< T >::get_last(), OhashCommon< HashTbl, Key >::insert(), l, m, LocateFunctions< Container, Type >::nth(), and Aleph::search().
| TEST | ( | ConstIterator | , |
| the_generic_code_reads_constant_containers | |||
| ) |
Definition at line 386 of file const_iterator_test.cc.
References FunctionalMethods< Container, T >::all(), Aleph::count(), LocateFunctions< Container, Type >::find_ptr(), Aleph::get_pair_it(), Aleph::min_ptr(), LocateFunctions< Container, Type >::nth(), Aleph::size(), Aleph::sum(), y, and Aleph::zip().
| TEST | ( | ConstIterator | , |
| the_iterators_that_hand_out_modifiable_references_reject_constant_containers | |||
| ) |
Definition at line 116 of file const_iterator_test.cc.
References Aleph::get_curr().
| TEST | ( | ConstIterator | , |
| the_leaks_found_from_a_client_no_longer_compile | |||
| ) |
Definition at line 366 of file const_iterator_test.cc.
| TEST | ( | ConstIterator | , |
| the_stl_const_iterator_is_read_only_and_random_access_on_arrays | |||
| ) |
Definition at line 253 of file const_iterator_test.cc.
References Aleph::Array< T >::append(), StlAlephIterator< SetName >::begin(), StlAlephIterator< SetName >::end(), and Aleph::sum().
|
constexpr |
Definition at line 192 of file const_iterator_test.cc.