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

Insertions and removals in graphs when memory runs out. More...

#include <gtest/gtest.h>
#include "allocation_failure.H"
#include <algorithm>
#include <new>
#include <vector>
#include <tpl_agraph.H>
#include <tpl_cut_nodes.H>
#include <tpl_graph.H>
#include <tpl_graph_utils.H>
#include <tpl_net.H>
#include <tpl_sgraph.H>
Include dependency graph for graph_allocation_failure_test.cc:

Go to the source code of this file.

Functions

 TYPED_TEST_SUITE (GraphWithoutMemory, Graph_Kinds)
 
 TYPED_TEST (GraphWithoutMemory, InsertArcLeavesTheGraphAsItWas)
 
 TYPED_TEST (GraphWithoutMemory, RemoveNodeLeavesTheGraphAsItWasOrRemovesIt)
 
 TEST_F (NetWithoutMemory, ArcsGoOnlyIfTheSetsOfSourcesAndSinksTakeTheirEnds)
 
 TEST_F (NetWithoutMemory, ClearGraphThrowsAndLeavesTheNetworkRight)
 
 TYPED_TEST (GraphWithoutMemory, CopyAssignmentLeavesTheGraphAsItWas)
 
 TYPED_TEST (GraphWithoutMemory, InsertNodeLeavesTheGraphAsItWas)
 
 TYPED_TEST_SUITE (CopiesWithoutMemory, Undirected_Kinds)
 
 TYPED_TEST (CopiesWithoutMemory, EachNodeIsDeletedOnce)
 

Detailed Description

Insertions and removals in graphs when memory runs out.

This program replaces the global operator new, so that a test can make one allocation fail. If insert_arc(), remove_node() or, in a network, remove_arc() or disconnect_arc() throws std::bad_alloc, the graph must be as it was: no node may keep an arc that the graph freed.

Definition in file graph_allocation_failure_test.cc.

Function Documentation

◆ TEST_F() [1/2]

◆ TEST_F() [2/2]

◆ TYPED_TEST() [1/5]

◆ TYPED_TEST() [2/5]

◆ TYPED_TEST() [3/5]

TYPED_TEST ( GraphWithoutMemory  ,
InsertArcLeavesTheGraphAsItWas   
)

◆ TYPED_TEST() [4/5]

TYPED_TEST ( GraphWithoutMemory  ,
InsertNodeLeavesTheGraphAsItWas   
)

◆ TYPED_TEST() [5/5]

◆ TYPED_TEST_SUITE() [1/2]

TYPED_TEST_SUITE ( CopiesWithoutMemory  ,
Undirected_Kinds   
)

◆ TYPED_TEST_SUITE() [2/2]

TYPED_TEST_SUITE ( GraphWithoutMemory  ,
Graph_Kinds   
)