test/graph_utils_test.cc
changeset 1800 d391ea416aa0
parent 1729 06f939455cb1
child 1956 a055123339d5
equal deleted inserted replaced
4:8eee35ffa4d4 5:3e7db6f69ad6
    24    
    24    
    25   InDegMap<Graph> ind(g);
    25   InDegMap<Graph> ind(g);
    26  
    26  
    27   g.addEdge(n1,n2);
    27   g.addEdge(n1,n2);
    28   
    28   
    29   typename Graph::SnapShot snap(g);
    29   typename Graph::Snapshot snap(g);
    30   
    30   
    31   OutDegMap<Graph> outd(g);
    31   OutDegMap<Graph> outd(g);
    32   
    32   
    33   check(ind[n1]==0 && ind[n2]==1, "Wrong InDegMap value.");
    33   check(ind[n1]==0 && ind[n2]==1, "Wrong InDegMap value.");
    34   check(outd[n1]==1 && outd[n2]==0, "Wrong OutDegMap value.");
    34   check(outd[n1]==1 && outd[n2]==0, "Wrong OutDegMap value.");
    70 	check(++con == INVALID, "There is more connecting edge.");
    70 	check(++con == INVALID, "There is more connecting edge.");
    71       }
    71       }
    72     }
    72     }
    73   }
    73   }
    74 
    74 
    75   //check In/OutDegMap (and SnapShot feature)
    75   //check In/OutDegMap (and Snapshot feature)
    76 
    76 
    77   checkSnapDeg<ListGraph>();
    77   checkSnapDeg<ListGraph>();
    78   checkSnapDeg<SmartGraph>();
    78   checkSnapDeg<SmartGraph>();
    79   
    79   
    80   {
    80   {