update pet to version 0.11.6
[ppn.git] / tests / arguments.cc
blob9f57652fb1cdb487e73fe176fb62c0d1fb4ed895
1 #include <assert.h>
2 #include "testlib.h"
4 using pdg::PDG;
6 int main(int argc, char *argv[])
8 isl_ctx *ctx = isl_ctx_alloc();
9 PDG *pdg = get_pdg(ctx, "testarg");
11 assert(pdg->nodes.size() == 2);
12 assert(pdg->nodes[0]->statement->accesses.size() == 2);
13 assert(pdg->nodes[0]->statement->accesses[0]->type == pdg::access::read);
14 assert(pdg->nodes[0]->statement->accesses[1]->type == pdg::access::write);
15 assert(pdg->nodes[1]->statement->accesses.size() == 2);
16 assert(pdg->nodes[1]->statement->accesses[0]->type == pdg::access::read);
17 assert(pdg->nodes[1]->statement->accesses[1]->type == pdg::access::write);
19 pdg->free();
20 delete pdg;
21 isl_ctx_free(ctx);
23 return 0;