|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
The sorts of lists when memory runs out. More...
#include <gtest/gtest.h>#include "allocation_failure.H"#include <algorithm>#include <functional>#include <random>#include <utility>#include <vector>#include <ahSort.H>#include <tpl_dynDlist.H>#include <tpl_dynList.H>#include <tpl_sort_utils.H>Go to the source code of this file.
Functions | |
| TEST_F (ListSortWithoutMemory, TheSortsInPlaceAllocateNothing) | |
The sorts of lists when memory runs out.
This program replaces the global operator new, so that a test can make every allocation fail for a while. The sorts of a DynList and of a DynDlist that sort in place link their nodes again, and allocate nothing.
Definition in file sort_allocation_test.cc.
| TEST_F | ( | ListSortWithoutMemory | , |
| TheSortsInPlaceAllocateNothing | |||
| ) |
Definition at line 84 of file sort_allocation_test.cc.
References Aleph::DynList< T >::append(), Aleph::DynDlist< T >::append(), FunctionalMethods< Container, T >::for_each(), Aleph::DynList< T >::get_first(), Aleph::in_place_sort(), Aleph::insertion_sort(), Aleph::mergeinsertsort(), Aleph::mergesort(), and Aleph::sort().