From d8da7ae58c8752466b96781c9bfef8d432f6795e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 25 May 2012 16:56:55 +0200 Subject: tests/main: check eiotas_release_particle with merged particles --- tests/main.c | 22 ++++++++++++++++++---- 1 file 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(); -- cgit v1.1-2-g2b99