Skip to content

Commit 60e5064

Browse files
author
Matthew Stern
committed
fixing tests
1 parent 4801324 commit 60e5064

File tree

5 files changed

+8
-18
lines changed

5 files changed

+8
-18
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,7 @@ topologicsharp/*.cs
4848
topologicsharp/*.c
4949
topologicsharp/_topologicsharp.so
5050
*.dll
51+
!.SRCINFO
52+
!PKGBUILD
5153

5254

testing/graph_vertex_edge_test.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ int testFuncEdge2(void* args, void *glbl, const void *const edge_vars){
4444
return j;
4545
}
4646

47-
48-
4947
int main(){
5048
struct graph* graph = GRAPH_INIT(); //Start with basic setup;
5149
assert(graph!=NULL);
@@ -172,8 +170,8 @@ void test_graph_modify_edge(struct graph* graph){
172170
assert(v!=NULL);
173171
assert(v2!=NULL);
174172

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;}
177175
assert(modify_edge(v, v2, (testFuncEdge2), NULL)==0);
178176
assert(modify_edge(v, v2, testFuncEdge, NULL)==0);
179177
assert(modify_edge(NULL,v2, NULL, NULL)<0);
@@ -193,8 +191,8 @@ void test_graph_modify_bi_edge(struct graph* graph){
193191
struct vertex* v2 = (struct vertex*)find(graph->vertices, ((i+1)>=TEST_SIZE ? 0 : i+1));
194192
assert(v!=NULL);
195193
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;}
198196
assert(modify_bi_edge(v, v2, (testFuncEdge2), NULL)==0);
199197
assert(modify_bi_edge(v, v2, testFuncEdge, NULL)==0);
200198
assert(modify_bi_edge(NULL,v2, NULL, NULL)<=-1);
@@ -215,8 +213,8 @@ void test_graph_remove_bi_edge(struct graph* graph){
215213
struct vertex* v2 = (struct vertex*)find(graph->vertices, ((i+1)>=TEST_SIZE ? 0 : i+1));
216214
assert(v!=NULL);
217215
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;}
220218
assert(remove_bi_edge(v, v2)==0);
221219
}
222220
fprintf(stderr, "BI-DIRECTIONAL EDGE REMOVAL FROM GRAPH PASSED\n");

testing/self_edge.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ void vertexFunction(struct graph *graph, struct vertex_result* args, void* glbl,
2525
//return res;
2626
}
2727

28-
2928
int main(){
30-
3129
struct graph* graph;
3230

3331
fprintf(stderr, "SELF EDGE/LOOP TEST BEGIN\n\n");
@@ -36,8 +34,6 @@ int main(){
3634
runTest(graph);
3735
cleanup(graph);
3836

39-
40-
4137
return 0;
4238
}
4339

@@ -53,10 +49,8 @@ void init(struct graph **graph)
5349
{
5450
*graph = graph_init(100, START_STOP, 100, VERTICES | EDGES | FUNCTIONS | GLOBALS, NONE, CONTINUE);
5551
assert(*graph != NULL);
56-
5752
}
5853

59-
6054
void setupSelfEdge(struct graph* graph){
6155
int i = 0;
6256

@@ -104,8 +98,6 @@ void setupSelfEdge(struct graph* graph){
10498

10599

106100
void runTest(struct graph* graph){
107-
assert(graph!=NULL);
108-
109101
assert(graph != NULL);
110102

111103
struct vertex_result **vertex_args = malloc(sizeof(struct vertex_result *) * ONE);

testing/switch_context_test.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ void vertexFunction(struct graph *graph, struct vertex_result* args, void* glbl,
3232
//return res;
3333
struct request *request = create_request(GENERIC, NULL, request_nil);
3434
submit_request(graph, request);
35-
3635
}
3736

3837
int main()
@@ -93,7 +92,6 @@ void init(struct graph **graph)
9392
assert(*graph != NULL);
9493

9594
//Setting up graphs and whatnot
96-
//
9795
int i = 0;
9896
for (i = 0; i < MAXIMUM; i++)
9997
{

testing/vgcore.20924

7.58 MB
Binary file not shown.

0 commit comments

Comments
 (0)