test/max_matching_test.cc
changeset 2386 81b47fc5c444
parent 2116 b6a68c15a6a3
child 2391 14a343be7a5a
     1.1 --- a/test/max_matching_test.cc	Fri Mar 02 17:56:22 2007 +0000
     1.2 +++ b/test/max_matching_test.cc	Fri Mar 02 18:04:28 2007 +0000
     1.3 @@ -74,7 +74,7 @@
     1.4    for(NodeIt v(g); v!=INVALID; ++v) {
     1.5      if ( mate[v]!=INVALID ) ++s;
     1.6    }
     1.7 -  int size=(int)s/2;  //size will be used as the size of a maxmatching
     1.8 +  int size=int(s/2);  //size will be used as the size of a maxmatching
     1.9  
    1.10    for(NodeIt v(g); v!=INVALID; ++v) {
    1.11      max_matching.mate(v);
    1.12 @@ -92,7 +92,7 @@
    1.13    for(NodeIt v(g); v!=INVALID; ++v) {
    1.14      if ( mate[v]!=INVALID ) ++s;
    1.15    }
    1.16 -  check ( (int)s/2 == size, "The size does not equal!" );
    1.17 +  check ( int(s/2) == size, "The size does not equal!" );
    1.18  
    1.19    Graph::NodeMap<MaxMatching<Graph>::pos_enum> pos1(g);
    1.20    max_matching.writePos(pos1);
    1.21 @@ -103,7 +103,7 @@
    1.22    for(NodeIt v(g); v!=INVALID; ++v) {
    1.23      if ( mate[v]!=INVALID ) ++s;
    1.24    }
    1.25 -  check ( (int)s/2 == size, "The size does not equal!" ); 
    1.26 +  check ( int(s/2) == size, "The size does not equal!" ); 
    1.27    
    1.28    Graph::NodeMap<MaxMatching<Graph>::pos_enum> pos2(g);
    1.29    max_matching.writePos(pos2);
    1.30 @@ -115,7 +115,7 @@
    1.31    for(NodeIt v(g); v!=INVALID; ++v) {
    1.32      if ( mate[v]!=INVALID ) ++s;
    1.33    }
    1.34 -  check ( (int)s/2 == size, "The size does not equal!" ); 
    1.35 +  check ( int(s/2) == size, "The size does not equal!" ); 
    1.36    
    1.37    Graph::NodeMap<MaxMatching<Graph>::pos_enum> pos(g);
    1.38    max_matching.writePos(pos);
    1.39 @@ -176,7 +176,7 @@
    1.40    for(NodeIt v(g); v!=INVALID; ++v) {
    1.41      if ( pos[v]==max_matching.A ) ++barrier;
    1.42    }
    1.43 -  int expected_size=(int)( countNodes(g)-num_comp+barrier)/2;
    1.44 +  int expected_size=int( countNodes(g)-num_comp+barrier)/2;
    1.45    check ( size==expected_size, "The size of the matching is wrong." );
    1.46    
    1.47    return 0;