X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Faga%2Ftest%2Fcompile_ok.c;fp=ccan%2Faga%2Ftest%2Fcompile_ok.c;h=f830a7695d30be1d44cee2d0283b13dbe60ace52;hb=3b7409ea08a7d1643bc7de31ece63e20b89f319b;hp=0000000000000000000000000000000000000000;hpb=833549edba41e825f66ba17507c908bce8eea425;p=ccan diff --git a/ccan/aga/test/compile_ok.c b/ccan/aga/test/compile_ok.c new file mode 100644 index 00000000..f830a769 --- /dev/null +++ b/ccan/aga/test/compile_ok.c @@ -0,0 +1,39 @@ +#include "config.h" + +#include +#include + +typedef struct edge edge_t; + +#ifndef EDGE1 +#define EDGE1 edge_t +#endif + +#ifndef EDGE2 +#define EDGE2 edge_t +#endif + +#ifndef EDGE3 +#define EDGE3 edge_t +#endif + +#ifndef EDGE4 +#define EDGE4 edge_t +#endif + +int main(void) +{ + struct aga_graph g; + EDGE1 *(*first_edge)(const struct aga_graph *g, + const struct aga_node *n) = NULL; + EDGE2 *(*next_edge)(const struct aga_graph *g, + const struct aga_node *n, + EDGE3 *e) = NULL; + int (*edge_info)(const struct aga_graph *g, const struct aga_node *n, + EDGE4 *e, struct aga_edge_info *ei) = NULL; + + aga_init_graph(&g, first_edge, next_edge, edge_info); + + return 0; +} +