summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-22 12:26:53 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-22 12:26:53 +0200
commita71c1cc93d782e25ee33bf401e3b3537d420d326 (patch)
tree48068ef9a8930ee3e53d13dbe37a40b371571dad /tests
parent7177a697128056e09fee99d7db05ee9bab18f325 (diff)
downloadedoors-a71c1cc93d782e25ee33bf401e3b3537d420d326.zip
edoors-a71c1cc93d782e25ee33bf401e3b3537d420d326.tar.gz
test/main.c: enable particle require, release tests
Diffstat (limited to 'tests')
-rw-r--r--tests/main.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/tests/main.c b/tests/main.c
index 69c3449..3429ca4 100644
--- a/tests/main.c
+++ b/tests/main.c
@@ -36,7 +36,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;
+ Eiotas_Particle *p0, *p1, *p2, *p3, *p4;
if(eiotas_init()>0) {
return EXIT_FAILURE;
@@ -70,15 +70,21 @@ int main(int argc, char **argv)
Eiotas_Door *din0 = eiotas_door_add("input0",&dom0->room,&user_bits);
eiotas_iota_show(&din0->iota); // eiotas_iota_show((Eiotas_Iota*)din0);
- /* p0 = eiotas_iota_require_particle((Eiotas_Iota*)din0); */
- /* p1 = eiotas_iota_require_particle((Eiotas_Iota*)din0); */
- /* p2 = eiotas_iota_require_particle((Eiotas_Iota*)din0); */
- /* p3 = eiotas_iota_require_particle((Eiotas_Iota*)din0); */
+ p0 = eiotas_require_particle(din0);
+ p1 = eiotas_require_particle(din0);
+ p2 = eiotas_require_particle(din0);
+ p3 = eiotas_require_particle(din0);
- /* eiotas_iota_release_particle((Eiotas_Iota*)din0,p0); */
- /* eiotas_iota_release_particle((Eiotas_Iota*)din0,p1); */
- /* eiotas_spin_send_particle(din0->iota.spin,p2,EINA_FALSE); */
- /* eiotas_spin_send_particle(din0->iota.spin,p3,EINA_TRUE); */
+ eiotas_release_particle(din0,p0);
+ eiotas_release_particle(din0,p1);
+ p4 = eiotas_require_particle(din0);
+ if(p4!=p1) {
+ fprintf(stderr,"Particle require fail\n");
+ }
+ eiotas_release_particle(din0,p4);
+
+ /* eiotas_send_particle(din0,p2,EINA_FALSE); */
+ /* eiotas_send_particle(din0,p3,EINA_TRUE); */
eiotas_spin_free(dom0);