@@ -44,8 +44,6 @@ int testFuncEdge2(void* args, void *glbl, const void *const edge_vars){
44
44
return j ;
45
45
}
46
46
47
-
48
-
49
47
int main (){
50
48
struct graph * graph = GRAPH_INIT (); //Start with basic setup;
51
49
assert (graph != NULL );
@@ -172,8 +170,8 @@ void test_graph_modify_edge(struct graph* graph){
172
170
assert (v != NULL );
173
171
assert (v2 != NULL );
174
172
175
- struct edge * e = (struct edge * ) find (v -> edge_tree , v2 -> id );
176
- if (e -> glbl ) {free (e -> glbl ); e -> glbl = NULL ;}
173
+ // struct edge* e = (struct edge *) find(v->edge_tree, v2->id);
174
+ // if(e->glbl) {free(e->glbl); e->glbl = NULL;}
177
175
assert (modify_edge (v , v2 , (testFuncEdge2 ), NULL )== 0 );
178
176
assert (modify_edge (v , v2 , testFuncEdge , NULL )== 0 );
179
177
assert (modify_edge (NULL ,v2 , NULL , NULL )< 0 );
@@ -193,8 +191,8 @@ void test_graph_modify_bi_edge(struct graph* graph){
193
191
struct vertex * v2 = (struct vertex * )find (graph -> vertices , ((i + 1 )>=TEST_SIZE ? 0 : i + 1 ));
194
192
assert (v != NULL );
195
193
assert (v2 != NULL );
196
- struct edge * e = (struct edge * ) find (v -> edge_tree , v2 -> id );
197
- if (e -> glbl ) {free (e -> glbl ); e -> glbl = NULL ;}
194
+ // struct edge* e = (struct edge *) find(v->edge_tree, v2->id);
195
+ // if(e->glbl) {free(e->glbl); e->glbl = NULL;}
198
196
assert (modify_bi_edge (v , v2 , (testFuncEdge2 ), NULL )== 0 );
199
197
assert (modify_bi_edge (v , v2 , testFuncEdge , NULL )== 0 );
200
198
assert (modify_bi_edge (NULL ,v2 , NULL , NULL )<=-1 );
@@ -215,8 +213,8 @@ void test_graph_remove_bi_edge(struct graph* graph){
215
213
struct vertex * v2 = (struct vertex * )find (graph -> vertices , ((i + 1 )>=TEST_SIZE ? 0 : i + 1 ));
216
214
assert (v != NULL );
217
215
assert (v2 != NULL );
218
- struct edge * e = (struct edge * ) find (v -> edge_tree , v2 -> id );
219
- if (e -> glbl ) {free (e -> glbl ); e -> glbl = NULL ;}
216
+ // struct edge* e = (struct edge *) find(v->edge_tree, v2->id);
217
+ // if(e->glbl) {free(e->glbl); e->glbl = NULL;}
220
218
assert (remove_bi_edge (v , v2 )== 0 );
221
219
}
222
220
fprintf (stderr , "BI-DIRECTIONAL EDGE REMOVAL FROM GRAPH PASSED\n" );
0 commit comments