File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1111#include < cassert>
1212#include < chrono>
1313#include < cstring>
14+ #include < filesystem>
1415#include < fstream>
1516#include < iostream>
1617#include < limits>
@@ -646,6 +647,17 @@ TEST_F(IOGTest, testGraphToolBinaryReader) {
646647 EXPECT_FALSE (G.isDirected ());
647648}
648649
650+ TEST_F (IOGTest, testGraphToolBinaryEmptyFileCanBeRead) {
651+ Graph graph (0 , false , true );
652+ GraphToolBinaryWriter writer;
653+ std::filesystem::path const path = " output/empty_graph.gt" ;
654+ writer.write (graph, path.c_str ());
655+
656+ GraphToolBinaryReader reader;
657+ Graph graph_read = reader.read (path.c_str ());
658+ EXPECT_EQ (graph.numberOfNodes (), graph_read.numberOfNodes ());
659+ }
660+
649661TEST_F (IOGTest, testGraphToolBinaryWriter) {
650662 Graph G (10 , false , false );
651663 G.addEdge (0 , 1 );
You can’t perform that action at this time.
0 commit comments