test/graph_test.h
changeset 1050 d9d1cb759951
parent 1026 699c7eac2c6d
child 1092 dceba191c00d
equal deleted inserted replaced
9:c9806a845753 10:1153156898c3
    50       check(!G.blue(n),"Wrong node set check.");
    50       check(!G.blue(n),"Wrong node set check.");
    51       typename Graph::Node nn = n;
    51       typename Graph::Node nn = n;
    52       check(G.asRedNodeUnsafe(nn) == n,"Wrong node conversion.");
    52       check(G.asRedNodeUnsafe(nn) == n,"Wrong node conversion.");
    53       check(G.asRedNode(nn) == n,"Wrong node conversion.");
    53       check(G.asRedNode(nn) == n,"Wrong node conversion.");
    54       check(G.asBlueNode(nn) == INVALID,"Wrong node conversion.");
    54       check(G.asBlueNode(nn) == INVALID,"Wrong node conversion.");
    55       std::pair<typename Graph::RedNode, typename Graph::BlueNode> rbn =
       
    56         G.asRedBlueNode(nn);
       
    57       check(rbn.first == n,"Wrong node conversion.");
       
    58       check(rbn.second == INVALID,"Wrong node conversion.");
       
    59       ++n;
    55       ++n;
    60     }
    56     }
    61     check(n==INVALID,"Wrong red Node list linking.");
    57     check(n==INVALID,"Wrong red Node list linking.");
    62     check(countRedNodes(G)==cnt,"Wrong red Node number.");
    58     check(countRedNodes(G)==cnt,"Wrong red Node number.");
    63   }
    59   }
    72       check(!G.red(n),"Wrong node set check.");
    68       check(!G.red(n),"Wrong node set check.");
    73       typename Graph::Node nn = n;
    69       typename Graph::Node nn = n;
    74       check(G.asBlueNodeUnsafe(nn) == n,"Wrong node conversion.");
    70       check(G.asBlueNodeUnsafe(nn) == n,"Wrong node conversion.");
    75       check(G.asBlueNode(nn) == n,"Wrong node conversion.");
    71       check(G.asBlueNode(nn) == n,"Wrong node conversion.");
    76       check(G.asRedNode(nn) == INVALID,"Wrong node conversion.");
    72       check(G.asRedNode(nn) == INVALID,"Wrong node conversion.");
    77       std::pair<typename Graph::RedNode, typename Graph::BlueNode> rbn =
       
    78         G.asRedBlueNode(nn);
       
    79       check(rbn.first == INVALID,"Wrong node conversion.");
       
    80       check(rbn.second == n,"Wrong node conversion.");
       
    81       ++n;
    73       ++n;
    82     }
    74     }
    83     check(n==INVALID,"Wrong blue Node list linking.");
    75     check(n==INVALID,"Wrong blue Node list linking.");
    84     check(countBlueNodes(G)==cnt,"Wrong blue Node number.");
    76     check(countBlueNodes(G)==cnt,"Wrong blue Node number.");
    85   }
    77   }