diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-25 16:56:55 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-25 16:56:55 +0200 |
commit | d8da7ae58c8752466b96781c9bfef8d432f6795e (patch) | |
tree | ca5cdf3263a060960eee96a851b0323bf24e0cce /tests | |
parent | e2c99e84fa6e2c99a8af067f6b16cb75a2b79c86 (diff) | |
download | edoors-d8da7ae58c8752466b96781c9bfef8d432f6795e.zip edoors-d8da7ae58c8752466b96781c9bfef8d432f6795e.tar.gz |
tests/main: check eiotas_release_particle with merged particles
Diffstat (limited to 'tests')
-rw-r--r-- | tests/main.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/tests/main.c b/tests/main.c index 7dcc075..d39fdff 100644 --- a/tests/main.c +++ b/tests/main.c @@ -43,7 +43,7 @@ static void input_receive(const Eiotas_Door *door, Eiotas_Particle *particle, Ei int main(int argc, char **argv) { int i; - Eiotas_Particle *p0, *p1, *p2, *p3, *p4; + Eiotas_Particle *p0, *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9, *p10; if(eiotas_init()>0) { return EXIT_FAILURE; @@ -81,18 +81,32 @@ int main(int argc, char **argv) p1 = eiotas_require_particle(din0); p2 = eiotas_require_particle(din0); p3 = eiotas_require_particle(din0); + p4 = eiotas_require_particle(din0); + p5 = eiotas_require_particle(din0); + p6 = eiotas_require_particle(din0); + p7 = eiotas_require_particle(din0); + p8 = eiotas_require_particle(din0); + p9 = eiotas_require_particle(din0); eiotas_release_particle(din0,p0); eiotas_release_particle(din0,p1); - p4 = eiotas_require_particle(din0); - if(p4!=p1) { + p10 = eiotas_require_particle(din0); + if(p10!=p1) { fprintf(stderr,"Particle require fail\n"); } - eiotas_release_particle(din0,p4); + eiotas_release_particle(din0,p10); eiotas_spin_send_particle((Eiotas_Spin*)din0->iota.spin,p2,EINA_FALSE); eiotas_spin_send_particle((Eiotas_Spin*)din0->iota.spin,p3,EINA_TRUE); + eiotas_particle_merge(p4,p5); + eiotas_particle_merge(p4,p6); + eiotas_particle_merge(p5,p7); + eiotas_particle_merge(p5,p8); + eiotas_particle_merge(p5,p9); + + eiotas_release_particle(din0,p4); + eiotas_spin_free(dom0); return eiotas_shutdown(); |