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