Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ah-dry.cc File Reference

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>
Include dependency graph for ah-dry.cc:

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)
 

Detailed Description

Tests for Ah Dry.

Definition in file ah-dry.cc.

Typedef Documentation

◆ Ctypes

Definition at line 625 of file ah-dry.cc.

Function Documentation

◆ INSTANTIATE_TYPED_TEST_SUITE_P() [1/2]

INSTANTIATE_TYPED_TEST_SUITE_P ( Ctors  ,
CtorContainer  ,
Ctypes   
)

◆ INSTANTIATE_TYPED_TEST_SUITE_P() [2/2]

INSTANTIATE_TYPED_TEST_SUITE_P ( traverses  ,
Container  ,
Ctypes   
)

◆ REGISTER_TYPED_TEST_SUITE_P() [1/2]

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() [2/2]

REGISTER_TYPED_TEST_SUITE_P ( CtorContainer  ,
ctor   
)

◆ TEST() [1/20]

TEST ( EqualityMethods  ,
hash_sets_keep_set_equality   
)

◆ TEST() [2/20]

TEST ( EqualityMethods  ,
heaps_and_random_sets_have_no_equality   
)

Definition at line 1164 of file ah-dry.cc.

◆ TEST() [3/20]

◆ TEST() [4/20]

TEST ( EqualityMethods  ,
sorted_containers_count_repetitions   
)

◆ TEST() [5/20]

TEST ( EqualSequenceMethod  ,
comparison   
)

Definition at line 679 of file ah-dry.cc.

References EqualSequenceMethod< Container >::equal_to().

◆ TEST() [6/20]

◆ TEST() [7/20]

◆ TEST() [8/20]

TEST ( FunctionalMethods  ,
foldl_needs_an_operation   
)

Definition at line 955 of file ah-dry.cc.

◆ TEST() [9/20]

◆ TEST() [10/20]

◆ TEST() [11/20]

◆ TEST() [12/20]

TEST ( IncompleteItemType  ,
nested_type_with_default_member_initializers   
)

Definition at line 1063 of file ah-dry.cc.

◆ TEST() [13/20]

TEST ( IncompleteItemType  ,
recursive_type   
)

Definition at line 1078 of file ah-dry.cc.

References r.

◆ TEST() [14/20]

TEST ( LocateFunctions  ,
find_item_needs_a_default_constructor_find_opt_does_not   
)

◆ TEST() [15/20]

TEST ( LocateFunctions  ,
find_item_propagates_copy_exceptions   
)

Definition at line 820 of file ah-dry.cc.

◆ TEST() [16/20]

TEST ( LocateFunctions  ,
find_item_propagates_default_construction_exceptions   
)

Definition at line 827 of file ah-dry.cc.

◆ TEST() [17/20]

◆ TEST() [18/20]

◆ TEST() [19/20]

◆ TEST() [20/20]

TEST ( StdMapCoexistence  ,
map_method_with_std_map   
)

◆ TYPED_TEST_P() [1/24]

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() [2/24]

TYPED_TEST_P ( Container  ,
each_with_position_and_slice   
)

Definition at line 504 of file ah-dry.cc.

◆ TYPED_TEST_P() [3/24]

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() [4/24]

◆ TYPED_TEST_P() [5/24]

TYPED_TEST_P ( Container  ,
find_index_nth   
)

Definition at line 131 of file ah-dry.cc.

References k, and N.

◆ TYPED_TEST_P() [6/24]

TYPED_TEST_P ( Container  ,
find_item   
)

Definition at line 147 of file ah-dry.cc.

References k, and N.

◆ TYPED_TEST_P() [7/24]

TYPED_TEST_P ( Container  ,
find_item_noexcept_for_nothrow_items   
)

Definition at line 451 of file ah-dry.cc.

◆ TYPED_TEST_P() [8/24]

TYPED_TEST_P ( Container  ,
find_ptr   
)

Definition at line 116 of file ah-dry.cc.

References k, and N.

◆ TYPED_TEST_P() [9/24]

TYPED_TEST_P ( Container  ,
foldl   
)

Definition at line 330 of file ah-dry.cc.

References N, and Aleph::sum().

◆ TYPED_TEST_P() [10/24]

TYPED_TEST_P ( Container  ,
for_each   
)

◆ TYPED_TEST_P() [11/24]

TYPED_TEST_P ( Container  ,
functional_operations   
)

◆ TYPED_TEST_P() [12/24]

◆ TYPED_TEST_P() [13/24]

◆ TYPED_TEST_P() [14/24]

◆ TYPED_TEST_P() [15/24]

TYPED_TEST_P ( Container  ,
mutable_drop_needs_remove   
)

Definition at line 420 of file ah-dry.cc.

◆ TYPED_TEST_P() [16/24]

TYPED_TEST_P ( Container  ,
nappend   
)

Definition at line 198 of file ah-dry.cc.

References N.

◆ TYPED_TEST_P() [17/24]

TYPED_TEST_P ( Container  ,
nappend_and_ninsert_count_the_items_added   
)

Definition at line 225 of file ah-dry.cc.

References N.

◆ TYPED_TEST_P() [18/24]

TYPED_TEST_P ( Container  ,
ninsert   
)

Definition at line 250 of file ah-dry.cc.

References N.

◆ TYPED_TEST_P() [19/24]

TYPED_TEST_P ( Container  ,
nth_out_of_range   
)

Definition at line 375 of file ah-dry.cc.

◆ TYPED_TEST_P() [20/24]

TYPED_TEST_P ( Container  ,
queries_reject_modifying_operations   
)

Definition at line 478 of file ah-dry.cc.

References Aleph::traverse().

◆ TYPED_TEST_P() [21/24]

TYPED_TEST_P ( Container  ,
take_with_step   
)

Definition at line 390 of file ah-dry.cc.

References Aleph::and.

◆ TYPED_TEST_P() [22/24]

TYPED_TEST_P ( Container  ,
traverse   
)

Definition at line 94 of file ah-dry.cc.

References k, l, N, Aleph::sort(), and Aleph::zip_all().

◆ TYPED_TEST_P() [23/24]

TYPED_TEST_P ( Container  ,
unchecked_iteration_matches_the_checked_one   
)

Definition at line 585 of file ah-dry.cc.

◆ TYPED_TEST_P() [24/24]

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() [1/2]

TYPED_TEST_SUITE_P ( Container  )

◆ TYPED_TEST_SUITE_P() [2/2]

TYPED_TEST_SUITE_P ( CtorContainer  )