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

C::build(items...) builds the container that C{items...} builds, with the insertion rules of C, but forwarding the items: rvalues are moved and any type convertible to the item type is accepted. More...

#include <gtest/gtest.h>
#include <memory>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
#include <ahFunctional.H>
#include <al-domain.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_dynMapOhash.H>
#include <tpl_dynMapTree.H>
#include <tpl_dynSetHash.H>
#include <tpl_dynSetTree.H>
#include <tpl_dynSkipList.H>
#include <tpl_dynTreap.H>
#include <tpl_dynarray_set.H>
#include <tpl_hash.H>
#include <tpl_odhash.H>
#include <tpl_olhash.H>
Include dependency graph for container_build_test.cc:

Go to the source code of this file.

Concepts

concept  @825::Buildable
 
concept  @825::Can_Nappend
 
concept  @825::Can_Ninsert
 

Functions

 TEST (ContainerBuild, ContainersBuildTheirOwnType)
 
 TEST (ContainerBuild, DerivedClassesBuildThemselves)
 
 TEST (ContainerBuild, SequencesKeepTheArgumentOrder)
 
 TEST (ContainerBuild, ArrayBuildOfOneIntegerIsOneItem)
 
 TEST (ContainerBuild, StacksEndWithTheLastItemOnTop)
 
 TEST (ContainerBuild, QueuesEndWithTheFirstItemInFront)
 
 TEST (ContainerBuild, SetsKeepOneItemPerKey)
 
 TEST (ContainerBuild, MapsKeepTheFirstOfTwoEqualKeys)
 
 TEST (ContainerBuild, HeapsKeepEveryItem)
 
 TEST (ContainerBuild, NoItemsBuildsAnEmptyContainer)
 
 TEST (ContainerBuild, MoveOnlyItems)
 
 TEST (ContainerBuild, RvaluesAreMovedAndLvaluesCopiedOnce)
 
 TEST (ContainerBuild, ItemsConvertWithoutNarrowingErrors)
 
 TEST (ContainerBuild, OnlyItemsAreAccepted)
 
 TEST (ContainerBuild, ThrowingItemLeavesNothingBehind)
 
 TEST (ContainerBuild, NappendAndNinsertForwardTheirItems)
 
 TEST (ContainerBuild, NappendKeepsTheArgumentOrderAndNinsertFollowsInsert)
 
 TEST (ContainerBuild, NappendAndNinsertCountTheItemsAdded)
 
 TEST (ContainerBuild, NappendAndNinsertKeepTheItemsAddedBeforeAThrow)
 
 TEST (ContainerBuild, NappendAndNinsertConvertAndMoveTheirItems)
 
 TEST (ContainerBuild, BuildFunctionsForwardTheirItems)
 
 TEST (ContainerBuild, AppendInContainerTreatsEveryArgumentAsAnItem)
 

Detailed Description

C::build(items...) builds the container that C{items...} builds, with the insertion rules of C, but forwarding the items: rvalues are moved and any type convertible to the item type is accepted.

A class derived from a container builds itself, not its base.

Definition in file container_build_test.cc.

Function Documentation

◆ TEST() [1/22]

TEST ( ContainerBuild  ,
AppendInContainerTreatsEveryArgumentAsAnItem   
)

Definition at line 516 of file container_build_test.cc.

References Aleph::append_in_container().

◆ TEST() [2/22]

TEST ( ContainerBuild  ,
ArrayBuildOfOneIntegerIsOneItem   
)

Definition at line 223 of file container_build_test.cc.

References Aleph::Array< T >::create_reserved().

◆ TEST() [3/22]

TEST ( ContainerBuild  ,
BuildFunctionsForwardTheirItems   
)

Definition at line 503 of file container_build_test.cc.

◆ TEST() [4/22]

TEST ( ContainerBuild  ,
ContainersBuildTheirOwnType   
)

◆ TEST() [5/22]

TEST ( ContainerBuild  ,
DerivedClassesBuildThemselves   
)

Definition at line 160 of file container_build_test.cc.

References Aleph::AlDomain< T >::build(), Aleph::DynArray_Set< T, Equal >::build(), Aleph::MapOpenHash< Key, Data, Cmp, HashTable >::build(), Aleph::DynMapTree< Key, Data, Tree, Compare >::build(), Aleph::DynMapBinTree< Key, Type, Compare >::build(), Aleph::DynMapAvlTree< Key, Type, Compare >::build(), Aleph::DynMapRbTree< Key, Type, Compare >::build(), Aleph::DynMapRandTree< Key, Type, Compare >::build(), Aleph::DynMapTreap< Key, Type, Compare >::build(), Aleph::DynMapTreapRk< Key, Type, Compare >::build(), Aleph::DynMapSplayTree< Key, Type, Compare >::build(), Aleph::DynSetLhash< Key, Cmp >::build(), Aleph::DynSetLinHash< Key, Cmp >::build(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::build(), Aleph::DynSetBinTree< Key, Compare >::build(), Aleph::DynSetAvlTree< Key, Compare >::build(), Aleph::DynSetSplayTree< Key, Compare >::build(), Aleph::DynSetSplayRkTree< Key, Compare >::build(), Aleph::DynSetRandTree< Key, Compare >::build(), Aleph::DynSetTreap< Key, Compare >::build(), Aleph::DynSetTreapRk< Key, Compare >::build(), Aleph::DynSetAvlRkTree< Key, Compare >::build(), Aleph::DynSetRbTree< Key, Compare >::build(), Aleph::DynSetTdRbTree< Key, Compare >::build(), Aleph::DynSetRbRkTree< Key, Compare >::build(), Aleph::DynSetTdRbRkTree< Key, Compare >::build(), Aleph::DynSetHtdRbTree< Key, Compare >::build(), Aleph::DynSetHtdRbRkTree< Key, Compare >::build(), Aleph::DynTreapTree< Key, Type, Compare >::build(), Aleph::HashSet< Key, HashSetTable, Cmp >::build(), and Aleph::HashMap< Key, Data, HashMapTable, Cmp >::build().

◆ TEST() [6/22]

TEST ( ContainerBuild  ,
HeapsKeepEveryItem   
)

Definition at line 313 of file container_build_test.cc.

◆ TEST() [7/22]

TEST ( ContainerBuild  ,
ItemsConvertWithoutNarrowingErrors   
)

Definition at line 367 of file container_build_test.cc.

◆ TEST() [8/22]

TEST ( ContainerBuild  ,
MapsKeepTheFirstOfTwoEqualKeys   
)

◆ TEST() [9/22]

TEST ( ContainerBuild  ,
MoveOnlyItems   
)

Definition at line 339 of file container_build_test.cc.

◆ TEST() [10/22]

TEST ( ContainerBuild  ,
NappendAndNinsertConvertAndMoveTheirItems   
)

◆ TEST() [11/22]

◆ TEST() [12/22]

◆ TEST() [13/22]

TEST ( ContainerBuild  ,
NappendAndNinsertKeepTheItemsAddedBeforeAThrow   
)

◆ TEST() [14/22]

TEST ( ContainerBuild  ,
NappendKeepsTheArgumentOrderAndNinsertFollowsInsert   
)

◆ TEST() [15/22]

TEST ( ContainerBuild  ,
NoItemsBuildsAnEmptyContainer   
)

Definition at line 328 of file container_build_test.cc.

◆ TEST() [16/22]

TEST ( ContainerBuild  ,
OnlyItemsAreAccepted   
)

Definition at line 376 of file container_build_test.cc.

◆ TEST() [17/22]

TEST ( ContainerBuild  ,
QueuesEndWithTheFirstItemInFront   
)

Definition at line 251 of file container_build_test.cc.

◆ TEST() [18/22]

TEST ( ContainerBuild  ,
RvaluesAreMovedAndLvaluesCopiedOnce   
)

Definition at line 355 of file container_build_test.cc.

◆ TEST() [19/22]

TEST ( ContainerBuild  ,
SequencesKeepTheArgumentOrder   
)

Definition at line 211 of file container_build_test.cc.

◆ TEST() [20/22]

TEST ( ContainerBuild  ,
SetsKeepOneItemPerKey   
)

Definition at line 269 of file container_build_test.cc.

References Aleph::size().

◆ TEST() [21/22]

TEST ( ContainerBuild  ,
StacksEndWithTheLastItemOnTop   
)

Definition at line 234 of file container_build_test.cc.

◆ TEST() [22/22]

TEST ( ContainerBuild  ,
ThrowingItemLeavesNothingBehind   
)

Definition at line 388 of file container_build_test.cc.