Example #1
0
    void checkAddEdge(unsigned numOfVertices, Edge toBeAdded, Edges existing, Edges missing)
    {
        g.addEdge(toBeAdded);

        ASSERT_EQ(existing.size(), g.numOfEdges());
        ASSERT_EQ(numOfVertices, g.numOfVertices());
        for (auto elem : existing) ASSERT_TRUE(g.edgeExists(elem));
        for (auto elem : missing) ASSERT_FALSE(g.edgeExists(elem));
    }
Example #2
0
 void checkMatching(unsigned matchingSize, Edges edgesToAdd)
 {
     for (auto edge : edgesToAdd) g.addEdge(edge);
     verifyMatching(g, matchingSize);
 }