|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Tests for Ah Dry. More...
#include <gtest/gtest.h>#include <limits>#include <numeric>#include <algorithm>#include <map>#include <stdexcept>#include <string>#include <utility>#include <vector>#include <ah-zip.H>#include <ahFunctional.H>#include <ah-string-utils.H>#include <ahSort.H>#include <htlist.H>#include <tpl_arrayHeap.H>#include <tpl_dynArrayHeap.H>#include <tpl_dynBinHeap.H>#include <tpl_dynDlist.H>#include <tpl_dynSetTree.H>#include <tpl_hash.H>#include <tpl_dynSetHash.H>#include <tpl_dynArray.H>#include <tpl_arrayQueue.H>#include <tpl_dynListStack.H>#include <tpl_dynarray_set.H>#include <tpl_random_queue.H>#include <tpl_dynListQueue.H>#include <tpl_arrayStack.H>#include <tpl_interval_tree.H>#include <tpl_dynMat.H>#include <tpl_dynSkipList.H>Go to the source code of this file.
Classes | |
| struct | Container< Ctype > |
| struct | Nothrow_Match |
| Matching criterion that cannot throw. More... | |
| struct | Modifying_Pred |
| Operations that need to modify the item: queries must reject them. More... | |
| struct | Modifying_Act |
| struct | CtorContainer< C > |
Typedefs | |
| typedef Types< DynList< int >, DynDlist< int >, DynArray< int >, HashSet< int, ODhashTable >, HashSet< int, OLhashTable >, DynHashTable< int, LhashTable >, DynHashTable< int, LinearHashTable >, DynSetHash< int >, DynSetTree< int, Treap >, DynSetTree< int, Treap_Rk >, DynSetTree< int, Rand_Tree >, DynSetTree< int, Splay_Tree >, DynSetTree< int, Avl_Tree >, DynSetTree< int, Rb_Tree >, Array< int >, ArrayQueue< int >, ArrayStack< int >, DynListQueue< int >, DynListStack< int >, DynArrayHeap< int >, DynBinHeap< int >, FixedQueue< int >, FixedStack< int > > | Ctypes |
Functions | |
| TYPED_TEST_SUITE_P (Container) | |
| TYPED_TEST_P (Container, traverse) | |
| TYPED_TEST_P (Container, for_each) | |
| TYPED_TEST_P (Container, find_ptr) | |
| TYPED_TEST_P (Container, find_index_nth) | |
| TYPED_TEST_P (Container, find_item) | |
| TYPED_TEST_P (Container, iterator_operations) | |
| TYPED_TEST_P (Container, nappend) | |
| TYPED_TEST_P (Container, nappend_and_ninsert_count_the_items_added) | |
| TYPED_TEST_P (Container, ninsert) | |
| TYPED_TEST_P (Container, all) | |
| TYPED_TEST_P (Container, exists) | |
| TYPED_TEST_P (Container, maps) | |
| TYPED_TEST_P (Container, map_synonyms) | |
| TYPED_TEST_P (Container, foldl) | |
| TYPED_TEST_P (Container, filter_ops) | |
| TYPED_TEST_P (Container, nth_out_of_range) | |
| TYPED_TEST_P (Container, take_with_step) | |
| TYPED_TEST_P (Container, mutable_drop_needs_remove) | |
| TYPED_TEST_P (Container, find_item_noexcept_for_nothrow_items) | |
| TYPED_TEST_P (Container, queries_reject_modifying_operations) | |
| TYPED_TEST_P (Container, each_with_position_and_slice) | |
| TYPED_TEST_P (Container, functional_operations) | |
| TYPED_TEST_P (Container, unchecked_iteration_matches_the_checked_one) | |
| REGISTER_TYPED_TEST_SUITE_P (Container, traverse, for_each, find_ptr, find_index_nth, find_item, iterator_operations, nappend, ninsert, nappend_and_ninsert_count_the_items_added, all, exists, maps, map_synonyms, foldl, filter_ops, nth_out_of_range, take_with_step, mutable_drop_needs_remove, find_item_noexcept_for_nothrow_items, queries_reject_modifying_operations, each_with_position_and_slice, functional_operations, unchecked_iteration_matches_the_checked_one) | |
| INSTANTIATE_TYPED_TEST_SUITE_P (traverses, Container, Ctypes) | |
| TYPED_TEST_SUITE_P (CtorContainer) | |
| TYPED_TEST_P (CtorContainer, ctor) | |
| REGISTER_TYPED_TEST_SUITE_P (CtorContainer, ctor) | |
| INSTANTIATE_TYPED_TEST_SUITE_P (Ctors, CtorContainer, Ctypes) | |
| TEST (EqualSequenceMethod, comparison) | |
| TEST (StdMapCoexistence, map_method_with_std_map) | |
| TEST (LocateFunctions, find_item_propagates_copy_exceptions) | |
| TEST (LocateFunctions, find_item_propagates_default_construction_exceptions) | |
| TEST (FunctionalMethods, maps_deduces_the_item_type) | |
| TEST (FunctionalMethods, foldl_moves_the_accumulator) | |
| TEST (FunctionalMethods, foldl_needs_an_operation) | |
| TEST (FunctionalMethods, tpartition_moves_the_lists) | |
| TEST (FunctionalMethods, projections_with_member_pointers) | |
| TEST (FunctionalMethods, emplace_does_not_cast) | |
| TEST (LocateFunctions, find_item_needs_a_default_constructor_find_opt_does_not) | |
| TEST (IncompleteItemType, nested_type_with_default_member_initializers) | |
| TEST (IncompleteItemType, recursive_type) | |
| TEST (EqualityMethods, sequences_compare_order_and_repetitions) | |
| TEST (EqualityMethods, sorted_containers_count_repetitions) | |
| TEST (EqualityMethods, hash_sets_keep_set_equality) | |
| TEST (EqualityMethods, heaps_and_random_sets_have_no_equality) | |
| TEST (RandomSet, iterator_traverses_the_items) | |
| TEST (ReadOnlyContainers, offer_queries_but_no_modifying_members) | |
| TEST (MapSequencesMethods, members_work) | |
Tests for Ah Dry.
Definition in file ah-dry.cc.
| typedef Types< DynList<int>, DynDlist<int>, DynArray<int>, HashSet<int, ODhashTable>, HashSet<int, OLhashTable>, DynHashTable<int, LhashTable>, DynHashTable<int, LinearHashTable>, DynSetHash<int>, DynSetTree<int, Treap>, DynSetTree<int, Treap_Rk>, DynSetTree<int, Rand_Tree>, DynSetTree<int, Splay_Tree>, DynSetTree<int, Avl_Tree>, DynSetTree<int, Rb_Tree>, Array<int>, ArrayQueue<int>, ArrayStack<int>, DynListQueue<int>, DynListStack<int>, DynArrayHeap<int>, DynBinHeap<int>, FixedQueue<int>, FixedStack<int> > Ctypes |
| INSTANTIATE_TYPED_TEST_SUITE_P | ( | Ctors | , |
| CtorContainer | , | ||
| Ctypes | |||
| ) |
| REGISTER_TYPED_TEST_SUITE_P | ( | Container | , |
| traverse | , | ||
| for_each | , | ||
| find_ptr | , | ||
| find_index_nth | , | ||
| find_item | , | ||
| iterator_operations | , | ||
| nappend | , | ||
| ninsert | , | ||
| nappend_and_ninsert_count_the_items_added | , | ||
| all | , | ||
| exists | , | ||
| maps | , | ||
| map_synonyms | , | ||
| foldl | , | ||
| filter_ops | , | ||
| nth_out_of_range | , | ||
| take_with_step | , | ||
| mutable_drop_needs_remove | , | ||
| find_item_noexcept_for_nothrow_items | , | ||
| queries_reject_modifying_operations | , | ||
| each_with_position_and_slice | , | ||
| functional_operations | , | ||
| unchecked_iteration_matches_the_checked_one | |||
| ) |
| REGISTER_TYPED_TEST_SUITE_P | ( | CtorContainer | , |
| ctor | |||
| ) |
| TEST | ( | EqualityMethods | , |
| hash_sets_keep_set_equality | |||
| ) |
Definition at line 1152 of file ah-dry.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | EqualityMethods | , |
| heaps_and_random_sets_have_no_equality | |||
| ) |
| TEST | ( | EqualityMethods | , |
| sequences_compare_order_and_repetitions | |||
| ) |
Definition at line 1094 of file ah-dry.cc.
References Aleph::DynListQueue< T >::get(), Aleph::ArrayStack< T >::push(), Aleph::DynListStack< T >::push(), Aleph::FixedStack< T >::push(), Aleph::DynListQueue< T >::put(), Aleph::ArrayQueue< T >::put(), and Aleph::FixedQueue< T >::put().
| TEST | ( | EqualityMethods | , |
| sorted_containers_count_repetitions | |||
| ) |
Definition at line 1133 of file ah-dry.cc.
References Aleph::DynIntervalTree< T, Compare >::append(), Aleph::DynSetTree< Key, Tree, Compare >::insert_dup(), and Aleph::DynSetTree< Key, Tree, Compare >::remove().
| TEST | ( | EqualSequenceMethod | , |
| comparison | |||
| ) |
Definition at line 679 of file ah-dry.cc.
References EqualSequenceMethod< Container >::equal_to().
| TEST | ( | FunctionalMethods | , |
| emplace_does_not_cast | |||
| ) |
Definition at line 998 of file ah-dry.cc.
References FunctionalMethods< Container, T >::emplace(), FunctionalMethods< Container, T >::emplace_ins(), Aleph::DynList< T >::get_first(), Aleph::DynList< T >::get_last(), l, FunctionalMethods< Container, T >::nappend(), FunctionalMethods< Container, T >::ninsert(), and Aleph::DynList< T >::size().
| TEST | ( | FunctionalMethods | , |
| foldl_moves_the_accumulator | |||
| ) |
Definition at line 916 of file ah-dry.cc.
References Aleph::DynList< T >::append(), FunctionalMethods< Container, T >::fold(), FunctionalMethods< Container, T >::fold_left(), FunctionalMethods< Container, T >::foldl(), and l.
| TEST | ( | FunctionalMethods | , |
| foldl_needs_an_operation | |||
| ) |
| TEST | ( | FunctionalMethods | , |
| maps_deduces_the_item_type | |||
| ) |
Definition at line 889 of file ah-dry.cc.
References l, FunctionalMethods< Container, T >::map(), FunctionalMethods< Container, T >::map_if(), FunctionalMethods< Container, T >::maps(), FunctionalMethods< Container, T >::maps_if(), and Aleph::to_string().
| TEST | ( | FunctionalMethods | , |
| projections_with_member_pointers | |||
| ) |
Definition at line 984 of file ah-dry.cc.
References FunctionalMethods< Container, T >::all(), FunctionalMethods< Container, T >::count_if(), FunctionalMethods< Container, T >::exists(), FunctionalMethods< Container, T >::filter(), LocateFunctions< Container, Type >::find_index(), LocateFunctions< Container, Type >::find_ptr(), l, FunctionalMethods< Container, T >::maps(), FunctionalMethods< Container, T >::partition(), and Aleph::DynList< T >::size().
| TEST | ( | FunctionalMethods | , |
| tpartition_moves_the_lists | |||
| ) |
Definition at line 963 of file ah-dry.cc.
References Aleph::DynList< T >::append(), l, FunctionalMethods< Container, T >::partition(), Aleph::size(), and FunctionalMethods< Container, T >::tpartition().
| TEST | ( | IncompleteItemType | , |
| nested_type_with_default_member_initializers | |||
| ) |
| TEST | ( | IncompleteItemType | , |
| recursive_type | |||
| ) |
| TEST | ( | LocateFunctions | , |
| find_item_needs_a_default_constructor_find_opt_does_not | |||
| ) |
Definition at line 1017 of file ah-dry.cc.
References Aleph::DynList< T >::append(), LocateFunctions< Container, Type >::find_opt(), and l.
| TEST | ( | LocateFunctions | , |
| find_item_propagates_copy_exceptions | |||
| ) |
| TEST | ( | LocateFunctions | , |
| find_item_propagates_default_construction_exceptions | |||
| ) |
| TEST | ( | MapSequencesMethods | , |
| members_work | |||
| ) |
Definition at line 1254 of file ah-dry.cc.
References OhashCommon< HashTbl, Key >::append(), OhashCommon< HashTbl, Key >::items(), OhashCommon< HashTbl, Key >::keys(), and m.
| TEST | ( | RandomSet | , |
| iterator_traverses_the_items | |||
| ) |
Definition at line 1175 of file ah-dry.cc.
References FunctionalMethods< Container, T >::each(), LocateFunctions< Container, Type >::get_it(), Aleph::Random_Set< T >::put(), Aleph::DynList< T >::size(), Aleph::sum(), and FunctionalMethods< Container, T >::take().
| TEST | ( | ReadOnlyContainers | , |
| offer_queries_but_no_modifying_members | |||
| ) |
Definition at line 1197 of file ah-dry.cc.
References Aleph::ODhashTable< Key, Cmp >::contains(), LocateFunctions< Container, Type >::find_ptr(), m, LocateFunctions< Container, Type >::nth(), Aleph::DynList< T >::size(), and FunctionalMethods< Container, T >::take().
| TEST | ( | StdMapCoexistence | , |
| map_method_with_std_map | |||
| ) |
Definition at line 720 of file ah-dry.cc.
References FunctionalMethods< Container, T >::map(), and FunctionalMethods< Container, T >::map_if().
| TYPED_TEST_P | ( | Container | , |
| all | |||
| ) |
Definition at line 277 of file ah-dry.cc.
References N, Aleph::sort(), tbl, and Aleph::to_dynlist().
| TYPED_TEST_P | ( | Container | , |
| exists | |||
| ) |
Definition at line 292 of file ah-dry.cc.
References FunctionalMethods< Container, T >::all(), l, and N.
| TYPED_TEST_P | ( | Container | , |
| filter_ops | |||
| ) |
Definition at line 338 of file ah-dry.cc.
References FunctionalMethods< Container, T >::drop(), FunctionalMethods< Container, T >::foldl(), Aleph::foldl(), l, l1, l2, N, FunctionalMethods< Container, T >::ptr_filter(), Aleph::sort(), Aleph::sum(), and FunctionalMethods< Container, T >::take().
| TYPED_TEST_P | ( | Container | , |
| find_index_nth | |||
| ) |
| TYPED_TEST_P | ( | Container | , |
| find_item | |||
| ) |
| TYPED_TEST_P | ( | Container | , |
| find_item_noexcept_for_nothrow_items | |||
| ) |
| TYPED_TEST_P | ( | Container | , |
| find_ptr | |||
| ) |
| TYPED_TEST_P | ( | Container | , |
| foldl | |||
| ) |
Definition at line 330 of file ah-dry.cc.
References N, and Aleph::sum().
| TYPED_TEST_P | ( | Container | , |
| for_each | |||
| ) |
Definition at line 105 of file ah-dry.cc.
References Aleph::DynList< T >::append(), FunctionalMethods< Container, T >::for_each(), k, l, N, Aleph::sort(), and Aleph::zip_all().
| TYPED_TEST_P | ( | Container | , |
| functional_operations | |||
| ) |
Definition at line 536 of file ah-dry.cc.
References Aleph::accumulate(), Aleph::count_if(), Aleph::for_each(), Aleph::DynList< T >::insert(), pred, Aleph::prefix(), and Aleph::suffix().
| TYPED_TEST_P | ( | Container | , |
| iterator_operations | |||
| ) |
Definition at line 164 of file ah-dry.cc.
References FunctionalMethods< Container, T >::for_each(), Aleph::DynList< T >::get_first(), LocateFunctions< Container, Type >::get_it(), Aleph::DynList< T >::get_last(), l, l2, Aleph::DynList< T >::size(), FunctionalMethods< Container, T >::to_dynlist(), and Aleph::to_dynlist().
| TYPED_TEST_P | ( | Container | , |
| map_synonyms | |||
| ) |
Definition at line 316 of file ah-dry.cc.
References Aleph::all(), l, FunctionalMethods< Container, T >::map(), FunctionalMethods< Container, T >::map_if(), Aleph::sort(), Aleph::to_dynlist(), and Aleph::zip().
| TYPED_TEST_P | ( | Container | , |
| maps | |||
| ) |
Definition at line 302 of file ah-dry.cc.
References Aleph::all(), l, FunctionalMethods< Container, T >::maps(), FunctionalMethods< Container, T >::maps_if(), Aleph::sort(), Aleph::to_dynlist(), and Aleph::zip().
| TYPED_TEST_P | ( | Container | , |
| nappend_and_ninsert_count_the_items_added | |||
| ) |
| TYPED_TEST_P | ( | Container | , |
| queries_reject_modifying_operations | |||
| ) |
Definition at line 478 of file ah-dry.cc.
References Aleph::traverse().
| TYPED_TEST_P | ( | Container | , |
| take_with_step | |||
| ) |
Definition at line 390 of file ah-dry.cc.
References Aleph::and.
Definition at line 94 of file ah-dry.cc.
References k, l, N, Aleph::sort(), and Aleph::zip_all().
| TYPED_TEST_P | ( | Container | , |
| unchecked_iteration_matches_the_checked_one | |||
| ) |
| TYPED_TEST_P | ( | CtorContainer | , |
| ctor | |||
| ) |
Definition at line 652 of file ah-dry.cc.
References l1, l2, l3, N, Aleph::sort(), and Aleph::to_dynlist().
| TYPED_TEST_SUITE_P | ( | Container | ) |
| TYPED_TEST_SUITE_P | ( | CtorContainer | ) |