tests/graph_test.cpp
/**
 * Tests the addition of an unweighted undirected edge.
 */
Tests the addition of an unweighted undirected edge.
Tests the addition of an unweighted undirected edge .
TEST(GraphTest, AddUnweightedEdgeToUndirectedGraph) {
    Graph *graph = init_graph(UNWEIGHTED, UNDIRECTED, 2);
    EXPECT_EQ(add_unweighted_edge(graph, 0, 1), GRAPH_SUCCESS);
    EXPECT_EQ(graph->adjacent[0][1], 1);
    EXPECT_EQ(graph->adjacent[1][0], 1);
}
TEST ( GraphTest , AddUnweightedEdgeToUndirectedGraph ) { Graph * graph = init_graph ( UNWEIGHTED , UNDIRECTED , 2 ) ; EXPECT_EQ ( add_unweighted_edge ( graph , 0 , 1 ) , GRAPH_SUCCESS ) ; EXPECT_EQ ( graph -> adjacent [ 0 ] [ 1 ] , 1 ) ; EXPECT_EQ ( graph -> adjacent [ 1 ] [ 0 ] , 1 ) ; }
Tests the addition of an unweighted undirected edge.
Tests the addition of an unweighted undirected edge .