|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tests for Aleph::FlatSet (tpl_flat_set.H). More...
#include <random>#include <set>#include <stdexcept>#include <string>#include <vector>#include <gtest/gtest.h>#include <tpl_flat_set.H>Go to the source code of this file.
Functions | |
| TEST (FlatSet, EmptySetBasics) | |
| TEST (FlatSet, InsertKeepsSortedOrderAndRejectsDuplicates) | |
| TEST (FlatSet, InitializerListDropsDuplicates) | |
| TEST (FlatSet, RangeConstructor) | |
| TEST (FlatSet, LookupBoundsAndEqualRange) | |
| TEST (FlatSet, EraseByKeyAndIterator) | |
| TEST (FlatSet, MinMaxAndCheckedAccess) | |
| TEST (FlatSet, AlephConventionsEmptyClearTraverse) | |
| TEST (FlatSet, CopyMoveAndEquality) | |
| TEST (FlatSet, CustomComparatorDescendingOrder) | |
| TEST (FlatSet, ReserveAndCapacity) | |
| TEST (FlatSet, DataIsSortedContiguousStorage) | |
| TEST (FlatSet, SwapExchangesContents) | |
| TEST (FlatSet, RandomizedParityWithStdSet) | |
Tests for Aleph::FlatSet (tpl_flat_set.H).
Covers construction (empty, range, initializer list with duplicates), lookup (find/contains/bounds), mutation (insert/emplace/erase), iteration order, Aleph conventions (is_empty/empty/traverse) and a randomized parity check against std::set as the reference implementation.
Definition in file flat_set_test.cc.
| TEST | ( | FlatSet | , |
| AlephConventionsEmptyClearTraverse | |||
| ) |
| TEST | ( | FlatSet | , |
| CopyMoveAndEquality | |||
| ) |
Definition at line 182 of file flat_set_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::copy().
| TEST | ( | FlatSet | , |
| CustomComparatorDescendingOrder | |||
| ) |
Definition at line 203 of file flat_set_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::FlatSet< Key, Compare >::contains(), Aleph::FlatSet< Key, Compare >::insert(), and Aleph::FlatSet< Key, Compare >::nth().
| TEST | ( | FlatSet | , |
| DataIsSortedContiguousStorage | |||
| ) |
Definition at line 225 of file flat_set_test.cc.
References Aleph::FlatSet< Key, Compare >::begin(), Aleph::blossom_maximum_cardinality_matching(), Aleph::FlatSet< Key, Compare >::data(), Aleph::FlatSet< Key, Compare >::end(), and Aleph::FlatSet< Key, Compare >::size().
| TEST | ( | FlatSet | , |
| EmptySetBasics | |||
| ) |
Definition at line 52 of file flat_set_test.cc.
References Aleph::FlatSet< Key, Compare >::begin(), Aleph::blossom_maximum_cardinality_matching(), Aleph::FlatSet< Key, Compare >::contains(), Aleph::FlatSet< Key, Compare >::count(), Aleph::FlatSet< Key, Compare >::end(), Aleph::FlatSet< Key, Compare >::find(), Aleph::FlatSet< Key, Compare >::is_empty(), and Aleph::FlatSet< Key, Compare >::size().
| TEST | ( | FlatSet | , |
| EraseByKeyAndIterator | |||
| ) |
Definition at line 122 of file flat_set_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::FlatSet< Key, Compare >::contains(), Aleph::FlatSet< Key, Compare >::end(), Aleph::FlatSet< Key, Compare >::erase(), Aleph::FlatSet< Key, Compare >::find(), and Aleph::FlatSet< Key, Compare >::size().
| TEST | ( | FlatSet | , |
| InitializerListDropsDuplicates | |||
| ) |
Definition at line 83 of file flat_set_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::FlatSet< Key, Compare >::nth(), and Aleph::FlatSet< Key, Compare >::size().
| TEST | ( | FlatSet | , |
| InsertKeepsSortedOrderAndRejectsDuplicates | |||
| ) |
| TEST | ( | FlatSet | , |
| LookupBoundsAndEqualRange | |||
| ) |
| TEST | ( | FlatSet | , |
| MinMaxAndCheckedAccess | |||
| ) |
Definition at line 141 of file flat_set_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::FlatSet< Key, Compare >::get_first(), Aleph::FlatSet< Key, Compare >::get_last(), Aleph::FlatSet< Key, Compare >::max(), Aleph::FlatSet< Key, Compare >::min(), and Aleph::FlatSet< Key, Compare >::nth().
| TEST | ( | FlatSet | , |
| RandomizedParityWithStdSet | |||
| ) |
Definition at line 249 of file flat_set_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::FlatSet< Key, Compare >::contains(), Aleph::FlatSet< Key, Compare >::erase(), Aleph::FlatSet< Key, Compare >::insert(), k, Aleph::FlatSet< Key, Compare >::nth(), rng, and Aleph::FlatSet< Key, Compare >::size().
| TEST | ( | FlatSet | , |
| RangeConstructor | |||
| ) |
| TEST | ( | FlatSet | , |
| ReserveAndCapacity | |||
| ) |
| TEST | ( | FlatSet | , |
| SwapExchangesContents | |||
| ) |
Definition at line 236 of file flat_set_test.cc.
References Aleph::and, Aleph::blossom_maximum_cardinality_matching(), Aleph::FlatSet< Key, Compare >::contains(), Aleph::FlatSet< Key, Compare >::size(), and Aleph::FlatSet< Key, Compare >::swap().