|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Extractions from a Fibonacci heap when memory runs out. More...
#include <gtest/gtest.h>#include "allocation_failure.H"#include <cstdlib>#include <new>#include <numeric>#include <utility>#include <vector>#include <tpl_fibonacci_heap.H>#include <tpl_graph.H>#include <archeap.H>Go to the source code of this file.
Classes | |
| struct | FibonacciHeapWithoutMemory |
Functions | |
| TEST_F (FibonacciHeapWithoutMemory, AHeapIsBuiltWithoutMemory) | |
| TEST_F (FibonacciHeapWithoutMemory, AnArcHeapKeepsItsHandlesWithoutMemory) | |
| TEST_F (FibonacciHeapWithoutMemory, ExtractAndDeleteAllocateNothing) | |
| TEST_F (FibonacciHeapWithoutMemory, AHeapMovedFromIsAsItWasWithoutMemory) | |
Extractions from a Fibonacci heap when memory runs out.
This program replaces the global operator new, so that a test can make every allocation fail for a while. A heap is built without allocating. extract_min() and delete_node() must allocate nothing, but the room that a new heap, or one that was moved from, lacks; they allocate it before they change the heap, so that without memory the heap is as it was.
Definition in file fibonacci_heap_allocation_test.cc.
| TEST_F | ( | FibonacciHeapWithoutMemory | , |
| AHeapIsBuiltWithoutMemory | |||
| ) |
Definition at line 71 of file fibonacci_heap_allocation_test.cc.
| TEST_F | ( | FibonacciHeapWithoutMemory | , |
| AHeapMovedFromIsAsItWasWithoutMemory | |||
| ) |
Definition at line 197 of file fibonacci_heap_allocation_test.cc.
References Aleph::Fibonacci_Heap< T, Compare >::insert().
| TEST_F | ( | FibonacciHeapWithoutMemory | , |
| AnArcHeapKeepsItsHandlesWithoutMemory | |||
| ) |
Definition at line 116 of file fibonacci_heap_allocation_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), and NODE_COOKIE.
| TEST_F | ( | FibonacciHeapWithoutMemory | , |
| ExtractAndDeleteAllocateNothing | |||
| ) |
Definition at line 161 of file fibonacci_heap_allocation_test.cc.
References k.