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

Tests for Tpl Spanning Tree. More...

#include <gtest/gtest.h>
#include <tpl_spanning_tree.H>
#include <tpl_graph.H>
#include <tpl_sgraph.H>
#include <tpl_agraph.H>
Include dependency graph for tpl_spanning_tree_test.cc:

Go to the source code of this file.

Classes

class  DFSSpanningTreeTest
 
class  BFSSpanningTreeTest
 
class  SpanningTreeAllGraphs< GraphType >
 
class  SpanningTreeUndirectedGraphs< GraphType >
 

Typedefs

using ListGraph = List_Graph< Graph_Node< int >, Graph_Arc< int > >
 
using ListDigraph = List_Digraph< Graph_Node< int >, Graph_Arc< int > >
 
using SparseGraph = List_SGraph< Graph_Snode< int >, Graph_Sarc< int > >
 
using SparseDigraph = List_SDigraph< Graph_Snode< int >, Graph_Sarc< int > >
 
using ArrayGraph = Array_Graph< Graph_Anode< int >, Graph_Aarc< int > >
 
using ArrayDigraph = Array_Digraph< Graph_Anode< int >, Graph_Aarc< int > >
 
using GraphTypes = ::testing::Types< ListGraph, ListDigraph, SparseGraph, SparseDigraph, ArrayGraph, ArrayDigraph >
 
using UndirectedGraphTypes = ::testing::Types< ListGraph, SparseGraph, ArrayGraph >
 

Functions

 TEST_F (DFSSpanningTreeTest, SingleNode)
 
 TEST_F (DFSSpanningTreeTest, TwoNodesConnected)
 
 TEST_F (DFSSpanningTreeTest, TriangleGraph)
 
 TEST_F (DFSSpanningTreeTest, LinearChain)
 
 TEST_F (DFSSpanningTreeTest, CompleteGraph)
 
 TEST_F (DFSSpanningTreeTest, FromSpecificNode)
 
 TEST_F (DFSSpanningTreeTest, EmptyGraphThrows)
 
 TEST_F (DFSSpanningTreeTest, NullptrNodeThrows)
 
 TEST_F (DFSSpanningTreeTest, NodeMapping)
 
 TEST_F (BFSSpanningTreeTest, SingleNode)
 
 TEST_F (BFSSpanningTreeTest, TwoNodesConnected)
 
 TEST_F (BFSSpanningTreeTest, TriangleGraph)
 
 TEST_F (BFSSpanningTreeTest, CompleteGraph)
 
 TEST_F (BFSSpanningTreeTest, FromSpecificNode)
 
 TEST_F (BFSSpanningTreeTest, EmptyGraphThrows)
 
 TEST_F (BFSSpanningTreeTest, NullptrNodeThrows)
 
 TEST_F (BFSSpanningTreeTest, NodeMapping)
 
 TEST_F (DFSSpanningTreeTest, LargeGraph)
 
 TEST_F (BFSSpanningTreeTest, LargeGraph)
 
 TYPED_TEST_SUITE (SpanningTreeAllGraphs, GraphTypes)
 
 TYPED_TEST_SUITE (SpanningTreeUndirectedGraphs, UndirectedGraphTypes)
 
 TYPED_TEST (SpanningTreeAllGraphs, DFSSingleNode)
 
 TYPED_TEST (SpanningTreeAllGraphs, DFSTriangle)
 
 TYPED_TEST (SpanningTreeAllGraphs, DFSEmptyGraphThrows)
 
 TYPED_TEST (SpanningTreeAllGraphs, DFSNullptrThrows)
 
 TYPED_TEST (SpanningTreeAllGraphs, BFSSingleNode)
 
 TYPED_TEST (SpanningTreeAllGraphs, BFSTriangle)
 
 TYPED_TEST (SpanningTreeAllGraphs, BFSEmptyGraphThrows)
 
 TYPED_TEST (SpanningTreeAllGraphs, BFSNullptrThrows)
 
 TYPED_TEST (SpanningTreeUndirectedGraphs, DFSLongerChain)
 
 TYPED_TEST (SpanningTreeUndirectedGraphs, BFSLongerChain)
 
int main (int argc, char **argv)
 

Detailed Description

Tests for Tpl Spanning Tree.

Definition in file tpl_spanning_tree_test.cc.

Typedef Documentation

◆ ArrayDigraph

Definition at line 72 of file tpl_spanning_tree_test.cc.

◆ ArrayGraph

Definition at line 71 of file tpl_spanning_tree_test.cc.

◆ GraphTypes

Definition at line 425 of file tpl_spanning_tree_test.cc.

◆ ListDigraph

Definition at line 64 of file tpl_spanning_tree_test.cc.

◆ ListGraph

using ListGraph = List_Graph<Graph_Node<int>, Graph_Arc<int> >

Definition at line 63 of file tpl_spanning_tree_test.cc.

◆ SparseDigraph

Definition at line 68 of file tpl_spanning_tree_test.cc.

◆ SparseGraph

Definition at line 67 of file tpl_spanning_tree_test.cc.

◆ UndirectedGraphTypes

using UndirectedGraphTypes = ::testing::Types< ListGraph, SparseGraph, ArrayGraph >

Definition at line 445 of file tpl_spanning_tree_test.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 626 of file tpl_spanning_tree_test.cc.

References Aleph::maps().

◆ TEST_F() [1/19]

TEST_F ( BFSSpanningTreeTest  ,
CompleteGraph   
)

Definition at line 288 of file tpl_spanning_tree_test.cc.

References Aleph::DynArray< T >::append(), Aleph::maps(), N, nodes, and root().

◆ TEST_F() [2/19]

TEST_F ( BFSSpanningTreeTest  ,
EmptyGraphThrows   
)

Definition at line 323 of file tpl_spanning_tree_test.cc.

References Aleph::maps().

◆ TEST_F() [3/19]

TEST_F ( BFSSpanningTreeTest  ,
FromSpecificNode   
)

Definition at line 308 of file tpl_spanning_tree_test.cc.

References Aleph::maps().

◆ TEST_F() [4/19]

TEST_F ( BFSSpanningTreeTest  ,
LargeGraph   
)

Definition at line 391 of file tpl_spanning_tree_test.cc.

References Aleph::DynArray< T >::append(), Aleph::maps(), N, nodes, and root().

◆ TEST_F() [5/19]

TEST_F ( BFSSpanningTreeTest  ,
NodeMapping   
)

Definition at line 339 of file tpl_spanning_tree_test.cc.

References Aleph::maps().

◆ TEST_F() [6/19]

TEST_F ( BFSSpanningTreeTest  ,
NullptrNodeThrows   
)

Definition at line 330 of file tpl_spanning_tree_test.cc.

References Aleph::maps().

◆ TEST_F() [7/19]

TEST_F ( BFSSpanningTreeTest  ,
SingleNode   
)

Definition at line 245 of file tpl_spanning_tree_test.cc.

References Aleph::maps(), and root().

◆ TEST_F() [8/19]

TEST_F ( BFSSpanningTreeTest  ,
TriangleGraph   
)

Definition at line 271 of file tpl_spanning_tree_test.cc.

References Aleph::maps(), and root().

◆ TEST_F() [9/19]

TEST_F ( BFSSpanningTreeTest  ,
TwoNodesConnected   
)

Definition at line 257 of file tpl_spanning_tree_test.cc.

References Aleph::maps(), and root().

◆ TEST_F() [10/19]

TEST_F ( DFSSpanningTreeTest  ,
CompleteGraph   
)

Definition at line 162 of file tpl_spanning_tree_test.cc.

References Aleph::DynArray< T >::append(), Aleph::maps(), N, nodes, and root().

◆ TEST_F() [11/19]

TEST_F ( DFSSpanningTreeTest  ,
EmptyGraphThrows   
)

Definition at line 199 of file tpl_spanning_tree_test.cc.

References Aleph::maps().

◆ TEST_F() [12/19]

TEST_F ( DFSSpanningTreeTest  ,
FromSpecificNode   
)

Definition at line 183 of file tpl_spanning_tree_test.cc.

References Aleph::maps().

◆ TEST_F() [13/19]

TEST_F ( DFSSpanningTreeTest  ,
LargeGraph   
)

Definition at line 367 of file tpl_spanning_tree_test.cc.

References Aleph::DynArray< T >::append(), Aleph::maps(), N, nodes, and root().

◆ TEST_F() [14/19]

TEST_F ( DFSSpanningTreeTest  ,
LinearChain   
)

Definition at line 141 of file tpl_spanning_tree_test.cc.

References Aleph::maps(), and root().

◆ TEST_F() [15/19]

TEST_F ( DFSSpanningTreeTest  ,
NodeMapping   
)

Definition at line 215 of file tpl_spanning_tree_test.cc.

References Aleph::maps().

◆ TEST_F() [16/19]

TEST_F ( DFSSpanningTreeTest  ,
NullptrNodeThrows   
)

Definition at line 206 of file tpl_spanning_tree_test.cc.

References Aleph::maps().

◆ TEST_F() [17/19]

TEST_F ( DFSSpanningTreeTest  ,
SingleNode   
)

◆ TEST_F() [18/19]

TEST_F ( DFSSpanningTreeTest  ,
TriangleGraph   
)

Definition at line 124 of file tpl_spanning_tree_test.cc.

References Aleph::maps(), and root().

◆ TEST_F() [19/19]

TEST_F ( DFSSpanningTreeTest  ,
TwoNodesConnected   
)

Definition at line 110 of file tpl_spanning_tree_test.cc.

References Aleph::maps(), and root().

◆ TYPED_TEST() [1/10]

TYPED_TEST ( SpanningTreeAllGraphs  ,
BFSEmptyGraphThrows   
)

Definition at line 551 of file tpl_spanning_tree_test.cc.

References Aleph::maps().

◆ TYPED_TEST() [2/10]

TYPED_TEST ( SpanningTreeAllGraphs  ,
BFSNullptrThrows   
)

◆ TYPED_TEST() [3/10]

◆ TYPED_TEST() [4/10]

◆ TYPED_TEST() [5/10]

TYPED_TEST ( SpanningTreeAllGraphs  ,
DFSEmptyGraphThrows   
)

Definition at line 490 of file tpl_spanning_tree_test.cc.

References Aleph::maps().

◆ TYPED_TEST() [6/10]

TYPED_TEST ( SpanningTreeAllGraphs  ,
DFSNullptrThrows   
)

◆ TYPED_TEST() [7/10]

◆ TYPED_TEST() [8/10]

◆ TYPED_TEST() [9/10]

◆ TYPED_TEST() [10/10]

◆ TYPED_TEST_SUITE() [1/2]

TYPED_TEST_SUITE ( SpanningTreeAllGraphs  ,
GraphTypes   
)

◆ TYPED_TEST_SUITE() [2/2]

TYPED_TEST_SUITE ( SpanningTreeUndirectedGraphs  ,
UndirectedGraphTypes   
)