aga_finish(&s2g.sg.g);
}
+static void test_negacycle(void)
+{
+ struct negacycle_graph ng;
+
+ negacycle_graph_init(&ng);
+
+ ok1(aga_bellman_ford_start(&ng.sg.g, &ng.sg.nodes[1]) == 0);
+ aga_bellman_ford_complete(&ng.sg.g);
+ ok1(aga_error(&ng.sg.g) == AGA_ERR_NEGATIVE_COST);
+ aga_finish(&ng.sg.g);
+}
+
int main(void)
{
plan_tests(5 + 15
+ FULL_LEN * (1 + FULL_LEN * 4)
+ CHAIN_LEN * (1 + CHAIN_LEN * 2)
- + 10 + 32 + 7 + 7);
+ + 10 + 32 + 7 + 7 + 2);
test_trivial();
test_parallel();
test_traversal1();
test_shortcut1();
test_shortcut2();
+ test_negacycle();
return exit_status();
}