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

Comprehensive tests for Net_Sup_Dem_Graph class. More...

#include <gtest/gtest.h>
#include <tpl_net_sup_dem.H>
#include <tpl_dynDlist.H>
#include <string>
Include dependency graph for net_sup_dem_test.cc:

Go to the source code of this file.

Classes

class  NetSupDemNodeTest
 
class  NetSupDemGraphTest
 
class  AuxNetTest
 
class  FeasibilityTest
 
class  StringNetTest
 

Typedefs

using SimpleNode = Net_Sup_Dem_Node< Empty_Class, int >
 
using SimpleArc = Net_Arc< Empty_Class, int >
 
using SimpleNet = Net_Sup_Dem_Graph< SimpleNode, SimpleArc >
 
using StringNode = Net_Sup_Dem_Node< std::string, double >
 
using StringArc = Net_Arc< std::string, double >
 
using StringNet = Net_Sup_Dem_Graph< StringNode, StringArc >
 

Functions

 TEST_F (NetSupDemNodeTest, DefaultConstructor)
 
 TEST_F (NetSupDemNodeTest, InfoConstructor)
 
 TEST_F (NetSupDemNodeTest, CopyFromPointer)
 
 TEST_F (NetSupDemNodeTest, GetSupplyFlowModifiable)
 
 TEST_F (NetSupDemGraphTest, DefaultConstructor)
 
 TEST_F (NetSupDemGraphTest, InsertNodeWithSupply)
 
 TEST_F (NetSupDemGraphTest, InsertNodeWithDemand)
 
 TEST_F (NetSupDemGraphTest, InsertTransitNode)
 
 TEST_F (NetSupDemGraphTest, CountSupplyNodes)
 
 TEST_F (NetSupDemGraphTest, CountDemandNodes)
 
 TEST_F (NetSupDemGraphTest, TotalSupply)
 
 TEST_F (NetSupDemGraphTest, TotalDemand)
 
 TEST_F (NetSupDemGraphTest, IsBalanced)
 
 TEST_F (NetSupDemGraphTest, IsNotBalanced)
 
 TEST_F (NetSupDemGraphTest, SetSupplyFlow)
 
 TEST_F (NetSupDemGraphTest, SetDemandFlow)
 
 TEST_F (NetSupDemGraphTest, SetSupplyFlowExceedsCapacityThrows)
 
 TEST_F (NetSupDemGraphTest, SetDemandFlowExceedsCapacityThrows)
 
 TEST_F (AuxNetTest, ComputeAuxNet)
 
 TEST_F (AuxNetTest, ComputeAuxNetTwiceThrows)
 
 TEST_F (AuxNetTest, GetAuxNetBeforeCompute)
 
 TEST_F (AuxNetTest, GetAuxNetAfterCompute)
 
 TEST_F (AuxNetTest, FreeAuxNet)
 
 TEST_F (AuxNetTest, FreeAuxNetWithoutComputeThrows)
 
 TEST_F (AuxNetTest, IsFeasibleWithoutAuxNetThrows)
 
 TEST_F (FeasibilityTest, EmptyNetworkIsFeasible)
 
 TEST_F (FeasibilityTest, SupplyOnlyNetwork)
 
 TEST_F (FeasibilityTest, SupplyNotMeetingFlowRequirement)
 
 TEST_F (FeasibilityTest, DemandMet)
 
 TEST_F (FeasibilityTest, DemandNotMet)
 
 TEST_F (FeasibilityTest, MixedSupplyDemandFeasible)
 
 TEST_F (FeasibilityTest, MixedSupplyDemandNotFeasible)
 
 TEST_F (FeasibilityTest, NonFeasibleSupplyNodes)
 
 TEST_F (FeasibilityTest, NonFeasibleDemandNodes)
 
 TEST_F (FeasibilityTest, MultipleMixedNonFeasibleNodes)
 
 TEST_F (NetSupDemGraphTest, SupplyExceedsOutCapacityThrows)
 
 TEST_F (NetSupDemGraphTest, DemandExceedsInCapacityThrows)
 
 TEST_F (NetSupDemGraphTest, OnlySupplyNodes)
 
 TEST_F (NetSupDemGraphTest, OnlyDemandNodes)
 
 TEST_F (NetSupDemGraphTest, OnlyTransitNodes)
 
 TEST_F (NetSupDemGraphTest, ZeroSupplyValue)
 
 TEST_F (StringNetTest, InsertNodeWithStringInfo)
 
 TEST_F (StringNetTest, DoubleFlowValues)
 
 TEST (NetSupDemDestructorTest, DestructorFreesAuxNet)
 
 TEST (IntegrationTest, CompleteWorkflow)
 
int main (int argc, char **argv)
 

Detailed Description

Comprehensive tests for Net_Sup_Dem_Graph class.

Definition in file net_sup_dem_test.cc.

Typedef Documentation

◆ SimpleArc

using SimpleArc = Net_Arc<Empty_Class, int>

Definition at line 51 of file net_sup_dem_test.cc.

◆ SimpleNet

using SimpleNet = Net_Sup_Dem_Graph<SimpleNode, SimpleArc>

Definition at line 52 of file net_sup_dem_test.cc.

◆ SimpleNode

Definition at line 50 of file net_sup_dem_test.cc.

◆ StringArc

using StringArc = Net_Arc<std::string, double>

Definition at line 56 of file net_sup_dem_test.cc.

◆ StringNet

Definition at line 57 of file net_sup_dem_test.cc.

◆ StringNode

using StringNode = Net_Sup_Dem_Node<std::string, double>

Definition at line 55 of file net_sup_dem_test.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 668 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST() [1/2]

TEST ( IntegrationTest  ,
CompleteWorkflow   
)

Definition at line 616 of file net_sup_dem_test.cc.

References Aleph::HTList::is_empty(), and Aleph::maps().

◆ TEST() [2/2]

TEST ( NetSupDemDestructorTest  ,
DestructorFreesAuxNet   
)

Definition at line 595 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [1/43]

TEST_F ( AuxNetTest  ,
ComputeAuxNet   
)

Definition at line 268 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [2/43]

TEST_F ( AuxNetTest  ,
ComputeAuxNetTwiceThrows   
)

Definition at line 280 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [3/43]

TEST_F ( AuxNetTest  ,
FreeAuxNet   
)

Definition at line 298 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [4/43]

TEST_F ( AuxNetTest  ,
FreeAuxNetWithoutComputeThrows   
)

Definition at line 310 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [5/43]

TEST_F ( AuxNetTest  ,
GetAuxNetAfterCompute   
)

Definition at line 292 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [6/43]

TEST_F ( AuxNetTest  ,
GetAuxNetBeforeCompute   
)

Definition at line 287 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [7/43]

TEST_F ( AuxNetTest  ,
IsFeasibleWithoutAuxNetThrows   
)

Definition at line 315 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [8/43]

TEST_F ( FeasibilityTest  ,
DemandMet   
)

Definition at line 366 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [9/43]

TEST_F ( FeasibilityTest  ,
DemandNotMet   
)

Definition at line 376 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [10/43]

TEST_F ( FeasibilityTest  ,
EmptyNetworkIsFeasible   
)

◆ TEST_F() [11/43]

TEST_F ( FeasibilityTest  ,
MixedSupplyDemandFeasible   
)

Definition at line 386 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [12/43]

TEST_F ( FeasibilityTest  ,
MixedSupplyDemandNotFeasible   
)

Definition at line 402 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [13/43]

TEST_F ( FeasibilityTest  ,
MultipleMixedNonFeasibleNodes   
)

Definition at line 462 of file net_sup_dem_test.cc.

References Aleph::maps(), and Aleph::HTList::size().

◆ TEST_F() [14/43]

TEST_F ( FeasibilityTest  ,
NonFeasibleDemandNodes   
)

◆ TEST_F() [15/43]

TEST_F ( FeasibilityTest  ,
NonFeasibleSupplyNodes   
)

◆ TEST_F() [16/43]

TEST_F ( FeasibilityTest  ,
SupplyNotMeetingFlowRequirement   
)

Definition at line 356 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [17/43]

TEST_F ( FeasibilityTest  ,
SupplyOnlyNetwork   
)

Definition at line 346 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [18/43]

TEST_F ( NetSupDemGraphTest  ,
CountDemandNodes   
)

Definition at line 149 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [19/43]

TEST_F ( NetSupDemGraphTest  ,
CountSupplyNodes   
)

Definition at line 139 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [20/43]

TEST_F ( NetSupDemGraphTest  ,
DefaultConstructor   
)

Definition at line 108 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [21/43]

TEST_F ( NetSupDemGraphTest  ,
DemandExceedsInCapacityThrows   
)

Definition at line 496 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [22/43]

TEST_F ( NetSupDemGraphTest  ,
InsertNodeWithDemand   
)

Definition at line 122 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [23/43]

TEST_F ( NetSupDemGraphTest  ,
InsertNodeWithSupply   
)

Definition at line 115 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [24/43]

TEST_F ( NetSupDemGraphTest  ,
InsertTransitNode   
)

Definition at line 129 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [25/43]

TEST_F ( NetSupDemGraphTest  ,
IsBalanced   
)

Definition at line 177 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [26/43]

TEST_F ( NetSupDemGraphTest  ,
IsNotBalanced   
)

Definition at line 186 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [27/43]

TEST_F ( NetSupDemGraphTest  ,
OnlyDemandNodes   
)

Definition at line 524 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [28/43]

TEST_F ( NetSupDemGraphTest  ,
OnlySupplyNodes   
)

Definition at line 509 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [29/43]

TEST_F ( NetSupDemGraphTest  ,
OnlyTransitNodes   
)

Definition at line 539 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [30/43]

TEST_F ( NetSupDemGraphTest  ,
SetDemandFlow   
)

Definition at line 207 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [31/43]

TEST_F ( NetSupDemGraphTest  ,
SetDemandFlowExceedsCapacityThrows   
)

Definition at line 224 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [32/43]

TEST_F ( NetSupDemGraphTest  ,
SetSupplyFlow   
)

Definition at line 198 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [33/43]

TEST_F ( NetSupDemGraphTest  ,
SetSupplyFlowExceedsCapacityThrows   
)

Definition at line 216 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [34/43]

TEST_F ( NetSupDemGraphTest  ,
SupplyExceedsOutCapacityThrows   
)

Definition at line 487 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [35/43]

TEST_F ( NetSupDemGraphTest  ,
TotalDemand   
)

Definition at line 168 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [36/43]

TEST_F ( NetSupDemGraphTest  ,
TotalSupply   
)

Definition at line 159 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [37/43]

TEST_F ( NetSupDemGraphTest  ,
ZeroSupplyValue   
)

Definition at line 554 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [38/43]

TEST_F ( NetSupDemNodeTest  ,
CopyFromPointer   
)

Definition at line 82 of file net_sup_dem_test.cc.

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

◆ TEST_F() [39/43]

TEST_F ( NetSupDemNodeTest  ,
DefaultConstructor   
)

Definition at line 69 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [40/43]

TEST_F ( NetSupDemNodeTest  ,
GetSupplyFlowModifiable   
)

Definition at line 91 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [41/43]

TEST_F ( NetSupDemNodeTest  ,
InfoConstructor   
)

Definition at line 76 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [42/43]

TEST_F ( StringNetTest  ,
DoubleFlowValues   
)

Definition at line 579 of file net_sup_dem_test.cc.

References Aleph::maps().

◆ TEST_F() [43/43]

TEST_F ( StringNetTest  ,
InsertNodeWithStringInfo   
)