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

The contract matrix of the filtered iterators and of the basic graph functions: every kind of graph, arc filter and constness that each template supports. More...

#include <cstdio>
#include <fstream>
#include <functional>
#include <iostream>
#include <set>
#include <sstream>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
#include <unistd.h>
#include <gtest/gtest.h>
#include <tpl_graph.H>
#include <tpl_graph_utils.H>
#include <graph-traverse.H>
#include <graph-traverse-generators.H>
#include <io_graph.H>
#include <generate_graph.H>
#include <generate_spanning_tree_picture.H>
#include <generate_df_tree.H>
#include <graph_to_tree.H>
#include <single_graph.H>
#include <warshall.H>
#include <eulerian.H>
#include <hamiltonian.H>
#include "graph_harness.H"
#include "graph_filter_catalog.H"
#include "graph_contract_matrix.H"
Include dependency graph for graph_contract_matrix_core_test.cc:

Go to the source code of this file.

Classes

class  ContractCoreIterators< GT >
 
class  ContractCoreFunctions< GT >
 
class  ContractCoreTraversals< GT >
 
class  ContractCoreDigraphs< GT >
 
class  ContractCoreTrees< GT >
 

Functions

 TYPED_TEST_SUITE (ContractCoreIterators, All_Kinds)
 
 TYPED_TEST (ContractCoreIterators, NodeArcIterator)
 
 TYPED_TEST (ContractCoreIterators, ArcIterator)
 
 TYPED_TEST (ContractCoreIterators, OutAndInIterators)
 
 TYPED_TEST (ContractCoreIterators, BackwardMovesWhereTheListsGoBack)
 The iterators move back only where the iterators of the lists of the graph do: not on List_SGraph and List_SDigraph, whose lists are singly linked, and where the calls must not compile (see sgraph_iterator_prev in graph_contract_compile_check.cmake).
 
 TYPED_TEST_SUITE (ContractCoreFunctions, All_Kinds)
 
 TYPED_TEST (ContractCoreFunctions, ForEachArcAndForallArc)
 
 TYPED_TEST (ContractCoreFunctions, ArcsMapAndFoldlArcs)
 
 TYPED_TEST (ContractCoreFunctions, ArcsAndNodesOfANode)
 
 TYPED_TEST (ContractCoreFunctions, InArcsIndex)
 
 TYPED_TEST (ContractCoreFunctions, FunctionalOperationsOnTheArcsIntoANode)
 
 TYPED_TEST (ContractCoreFunctions, SearchArc)
 
 TYPED_TEST (ContractCoreFunctions, KeptFilter)
 
 TYPED_TEST (ContractCoreFunctions, OperateOnArcs)
 
 TYPED_TEST (ContractCoreFunctions, CopyGraph)
 
 TYPED_TEST_SUITE (ContractCoreTraversals, All_Kinds)
 
 TYPED_TEST (ContractCoreTraversals, GraphTraverse)
 
 TYPED_TEST (ContractCoreTraversals, GraphTraverseGenerator)
 
 TYPED_TEST (ContractCoreTraversals, DepthAndBreadthFirstTraversal)
 
 TYPED_TEST (ContractCoreTraversals, SearchSpanningTreeArcAndTotalCost)
 
 TYPED_TEST (ContractCoreTraversals, IOGraph)
 
 TYPED_TEST (ContractCoreTraversals, Drawings)
 
 TYPED_TEST (ContractCoreTraversals, Warshall)
 
 TYPED_TEST (ContractCoreTraversals, SingleGraph)
 
 TYPED_TEST (ContractCoreTraversals, EulerAndHamilton)
 
 TYPED_TEST_SUITE (ContractCoreDigraphs, Directed_Kinds)
 
 TYPED_TEST (ContractCoreDigraphs, InvertDigraphAndRanks)
 
 TYPED_TEST_SUITE (ContractCoreTrees, Undirected_Kinds)
 
 TYPED_TEST (ContractCoreTrees, DfLowTree)
 
 TYPED_TEST (ContractCoreTrees, GraphToTreeNode)
 

Detailed Description

The contract matrix of the filtered iterators and of the basic graph functions: every kind of graph, arc filter and constness that each template supports.

The ArcFilter concept of ah-graph-concepts.H only asks a filter to be a predicate on an arc, and a member of a template that no test calls is never compiled. So each test calls once every public entry point of a template of tpl_graph.H, graph-traverse.H, graph-traverse-generators.H, tpl_graph_utils.H, io_graph.H, generate_graph.H, generate_spanning_tree_picture.H, generate_df_tree.H, graph_to_tree.H, single_graph.H, warshall.H, eulerian.H and hamiltonian.H, on a small graph of each kind that the template supports, with each filter of graph_filter_catalog.H and with Dft_Show_Arc, on a graph and on a const graph where the template takes a const one, and checks, where it is cheap, that the arc that the filters hide does not show up.

A combination that should compile and does not is left out with if constexpr, under the name of its check in graph_contract_compile_check.cmake, which expects it to fail to compile until it is fixed. An answer that is wrong at run time because of a known defect is counted, and the test expects it to stay wrong, so that the fix has to remove the mark.

Definition in file graph_contract_matrix_core_test.cc.

Function Documentation

◆ TYPED_TEST() [1/25]

◆ TYPED_TEST() [2/25]

◆ TYPED_TEST() [3/25]

◆ TYPED_TEST() [4/25]

◆ TYPED_TEST() [5/25]

◆ TYPED_TEST() [6/25]

◆ TYPED_TEST() [7/25]

◆ TYPED_TEST() [8/25]

◆ TYPED_TEST() [9/25]

◆ TYPED_TEST() [10/25]

◆ TYPED_TEST() [11/25]

◆ TYPED_TEST() [12/25]

TYPED_TEST ( ContractCoreIterators  ,
BackwardMovesWhereTheListsGoBack   
)

The iterators move back only where the iterators of the lists of the graph do: not on List_SGraph and List_SDigraph, whose lists are singly linked, and where the calls must not compile (see sgraph_iterator_prev in graph_contract_compile_check.cmake).

The iterator of In_Arcs_Index moves back on every kind.

Definition at line 547 of file graph_contract_matrix_core_test.cc.

References graph_harness::Built< GT >::g, Aleph::In_Arcs_Index< GT, SA >::get_it(), graph_harness::Built< GT >::nodes, out, Aleph::Filter_Iterator< Container, It, Show_Item >::prev(), Aleph::Filter_Iterator< Container, It, Show_Item >::prev_ne(), and Aleph::Filter_Iterator< Container, It, Show_Item >::reset_last().

◆ TYPED_TEST() [13/25]

◆ TYPED_TEST() [14/25]

◆ TYPED_TEST() [15/25]

TYPED_TEST ( ContractCoreTraversals  ,
DepthAndBreadthFirstTraversal   
)

◆ TYPED_TEST() [16/25]

◆ TYPED_TEST() [17/25]

◆ TYPED_TEST() [18/25]

◆ TYPED_TEST() [19/25]

◆ TYPED_TEST() [20/25]

TYPED_TEST ( ContractCoreTraversals  ,
IOGraph   
)

◆ TYPED_TEST() [21/25]

◆ TYPED_TEST() [22/25]

TYPED_TEST ( ContractCoreTraversals  ,
SingleGraph   
)

◆ TYPED_TEST() [23/25]

◆ TYPED_TEST() [24/25]

◆ TYPED_TEST() [25/25]

◆ TYPED_TEST_SUITE() [1/5]

TYPED_TEST_SUITE ( ContractCoreDigraphs  ,
Directed_Kinds   
)

◆ TYPED_TEST_SUITE() [2/5]

TYPED_TEST_SUITE ( ContractCoreFunctions  ,
All_Kinds   
)

◆ TYPED_TEST_SUITE() [3/5]

TYPED_TEST_SUITE ( ContractCoreIterators  ,
All_Kinds   
)

◆ TYPED_TEST_SUITE() [4/5]

TYPED_TEST_SUITE ( ContractCoreTraversals  ,
All_Kinds   
)

◆ TYPED_TEST_SUITE() [5/5]

TYPED_TEST_SUITE ( ContractCoreTrees  ,
Undirected_Kinds   
)