|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Comprehensive unit tests for io_graph.H. More...
#include <gtest/gtest.h>#include <sstream>#include <cstdio>#include <algorithm>#include <filesystem>#include <limits>#include <string>#include <io_graph.H>#include <tpl_graph.H>#include <unistd.h>Go to the source code of this file.
Classes | |
| class | IOGraphTest |
| class | IODigraphTest |
Functions | |
| TEST_F (IOGraphTest, ConstructFromReference) | |
| TEST_F (IOGraphTest, ConstructFromPointer) | |
| TEST_F (IOGraphTest, VerboseMode) | |
| TEST_F (IOGraphTest, SaveAndLoadBinary) | |
| TEST_F (IOGraphTest, BinaryPreservesNodeData) | |
| TEST_F (IOGraphTest, BinaryPreservesArcData) | |
| TEST_F (IOGraphTest, SaveAndLoadText) | |
| TEST_F (IOGraphTest, TextPreservesNodeData) | |
| TEST_F (IOGraphTest, TextModeToStringStream) | |
| TEST_F (IOGraphTest, SaveAndLoadEmptyGraphBinary) | |
| TEST_F (IOGraphTest, SaveAndLoadEmptyGraphText) | |
| TEST_F (IOGraphTest, SaveAndLoadSingleNodeBinary) | |
| TEST_F (IODigraphTest, SaveAndLoadBinary) | |
| TEST_F (IODigraphTest, SaveAndLoadText) | |
| TEST (DftStoreNodeTest, TextMode) | |
| TEST (DftStoreArcTest, TextMode) | |
| TEST (DftLoadNodeTest, TextMode) | |
| TEST (DftLoadArcTest, TextMode) | |
| TEST_F (IOGraphTest, SetLoadNode) | |
| TEST_F (IOGraphTest, SetStoreNode) | |
| TEST_F (IOGraphTest, SetLoadArc) | |
| TEST_F (IOGraphTest, SetStoreArc) | |
| TEST_F (IOGraphTest, LoadFromBadFile) | |
| TEST_F (IOGraphTest, LoadTextFromBadFile) | |
| TEST_F (IOGraphTest, MultipleRoundTripsBinary) | |
| TEST_F (IOGraphTest, MultipleRoundTripsText) | |
| TEST_F (IOGraphTest, LoadRejectsAnArcToANodeThatIsNotThere) | |
| TEST_F (IOGraphTest, LoadInTextModeRejectsAnArcToANodeThatIsNotThere) | |
| TEST_F (IOGraphTest, AFailedLoadLeavesTheGraphAsItWas) | |
| TEST_F (IOGraphTest, ALoadAddsToTheGraph) | |
| TEST_F (IOGraphTest, ALoadDoesNotTrustTheCountOfTheStream) | |
| TEST_F (IOGraphTest, ALoadGrowsBeyondWhatItReserves) | |
| int | main (int argc, char **argv) |
Comprehensive unit tests for io_graph.H.
Definition in file io_graph_test.cc.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 839 of file io_graph_test.cc.
| TEST | ( | DftLoadArcTest | , |
| TextMode | |||
| ) |
Definition at line 542 of file io_graph_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), and Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node().
| TEST | ( | DftLoadNodeTest | , |
| TextMode | |||
| ) |
Definition at line 528 of file io_graph_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node().
| TEST | ( | DftStoreArcTest | , |
| TextMode | |||
| ) |
Definition at line 512 of file io_graph_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), and Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node().
| TEST | ( | DftStoreNodeTest | , |
| TextMode | |||
| ) |
Definition at line 498 of file io_graph_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node().
| TEST_F | ( | IODigraphTest | , |
| SaveAndLoadBinary | |||
| ) |
Definition at line 448 of file io_graph_test.cc.
References Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load(), out, and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::save().
| TEST_F | ( | IODigraphTest | , |
| SaveAndLoadText | |||
| ) |
| TEST_F | ( | IOGraphTest | , |
| AFailedLoadLeavesTheGraphAsItWas | |||
| ) |
Definition at line 749 of file io_graph_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load(), and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load_in_text_mode().
| TEST_F | ( | IOGraphTest | , |
| ALoadAddsToTheGraph | |||
| ) |
Definition at line 767 of file io_graph_test.cc.
References GraphCommon< GT, Node, Arc >::esize(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load(), out, Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::save(), and GraphCommon< GT, Node, Arc >::vsize().
| TEST_F | ( | IOGraphTest | , |
| ALoadDoesNotTrustTheCountOfTheStream | |||
| ) |
Definition at line 783 of file io_graph_test.cc.
References GraphCommon< GT, Node, Arc >::esize(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load_in_text_mode(), out, and GraphCommon< GT, Node, Arc >::vsize().
| TEST_F | ( | IOGraphTest | , |
| ALoadGrowsBeyondWhatItReserves | |||
| ) |
Definition at line 806 of file io_graph_test.cc.
References GraphCommon< GT, Node, Arc >::esize(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::get_first_arc(), GraphCommon< GT, Node, Arc >::get_src_node(), GraphCommon< GT, Node, Arc >::get_tgt_node(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load(), out, GraphCommon< GT, Node, Arc >::vsize(), and w.
| TEST_F | ( | IOGraphTest | , |
| BinaryPreservesArcData | |||
| ) |
Definition at line 229 of file io_graph_test.cc.
References Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load(), out, and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::save().
| TEST_F | ( | IOGraphTest | , |
| BinaryPreservesNodeData | |||
| ) |
Definition at line 207 of file io_graph_test.cc.
References Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load(), out, and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::save().
| TEST_F | ( | IOGraphTest | , |
| ConstructFromPointer | |||
| ) |
Definition at line 158 of file io_graph_test.cc.
References Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::is_verbose().
| TEST_F | ( | IOGraphTest | , |
| ConstructFromReference | |||
| ) |
Definition at line 152 of file io_graph_test.cc.
References Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::is_verbose().
| TEST_F | ( | IOGraphTest | , |
| LoadFromBadFile | |||
| ) |
Definition at line 598 of file io_graph_test.cc.
References Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load().
| TEST_F | ( | IOGraphTest | , |
| LoadInTextModeRejectsAnArcToANodeThatIsNotThere | |||
| ) |
| TEST_F | ( | IOGraphTest | , |
| LoadRejectsAnArcToANodeThatIsNotThere | |||
| ) |
Definition at line 716 of file io_graph_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load().
| TEST_F | ( | IOGraphTest | , |
| LoadTextFromBadFile | |||
| ) |
Definition at line 609 of file io_graph_test.cc.
References Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load_in_text_mode().
| TEST_F | ( | IOGraphTest | , |
| MultipleRoundTripsBinary | |||
| ) |
Definition at line 623 of file io_graph_test.cc.
References GraphCommon< GT, Node, Arc >::get_num_arcs(), GraphCommon< GT, Node, Arc >::get_num_nodes(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load(), out, and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::save().
| TEST_F | ( | IOGraphTest | , |
| MultipleRoundTripsText | |||
| ) |
Definition at line 664 of file io_graph_test.cc.
References GraphCommon< GT, Node, Arc >::get_num_arcs(), GraphCommon< GT, Node, Arc >::get_num_nodes(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load_in_text_mode(), out, and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::save_in_text_mode().
| TEST_F | ( | IOGraphTest | , |
| SaveAndLoadBinary | |||
| ) |
Definition at line 181 of file io_graph_test.cc.
References GraphCommon< GT, Node, Arc >::get_num_arcs(), GraphCommon< GT, Node, Arc >::get_num_nodes(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load(), out, and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::save().
| TEST_F | ( | IOGraphTest | , |
| SaveAndLoadEmptyGraphBinary | |||
| ) |
Definition at line 321 of file io_graph_test.cc.
References GraphCommon< GT, Node, Arc >::get_num_arcs(), GraphCommon< GT, Node, Arc >::get_num_nodes(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load(), out, and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::save().
| TEST_F | ( | IOGraphTest | , |
| SaveAndLoadEmptyGraphText | |||
| ) |
Definition at line 345 of file io_graph_test.cc.
References GraphCommon< GT, Node, Arc >::get_num_arcs(), GraphCommon< GT, Node, Arc >::get_num_nodes(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load_in_text_mode(), out, and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::save_in_text_mode().
| TEST_F | ( | IOGraphTest | , |
| SaveAndLoadSingleNodeBinary | |||
| ) |
Definition at line 373 of file io_graph_test.cc.
References GraphCommon< GT, Node, Arc >::get_num_arcs(), GraphCommon< GT, Node, Arc >::get_num_nodes(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load(), out, and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::save().
| TEST_F | ( | IOGraphTest | , |
| SaveAndLoadText | |||
| ) |
Definition at line 255 of file io_graph_test.cc.
References GraphCommon< GT, Node, Arc >::get_num_arcs(), GraphCommon< GT, Node, Arc >::get_num_nodes(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load_in_text_mode(), out, and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::save_in_text_mode().
| TEST_F | ( | IOGraphTest | , |
| SetLoadArc | |||
| ) |
Definition at line 578 of file io_graph_test.cc.
References Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::set_load_arc().
| TEST_F | ( | IOGraphTest | , |
| SetLoadNode | |||
| ) |
Definition at line 562 of file io_graph_test.cc.
References Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::set_load_node().
| TEST_F | ( | IOGraphTest | , |
| SetStoreArc | |||
| ) |
Definition at line 586 of file io_graph_test.cc.
References Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::set_store_arc().
| TEST_F | ( | IOGraphTest | , |
| SetStoreNode | |||
| ) |
Definition at line 570 of file io_graph_test.cc.
References Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::set_store_node().
| TEST_F | ( | IOGraphTest | , |
| TextModeToStringStream | |||
| ) |
Definition at line 303 of file io_graph_test.cc.
References out, and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::save_in_text_mode().
| TEST_F | ( | IOGraphTest | , |
| TextPreservesNodeData | |||
| ) |
| TEST_F | ( | IOGraphTest | , |
| VerboseMode | |||
| ) |