summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-10-20 14:05:05 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-10-20 14:05:05 +0900
commit04c553525086fd212c8a27e38c135a27cba42ba0 (patch)
tree8d75df94054717f71e3fb2cbe553afee5dbf14ea
parent75a149a06bca62af5ceb3fca602372d548fcbdcb (diff)
downloadelementary-04c553525086fd212c8a27e38c135a27cba42ba0.tar.gz
elm test - make automated test betetr by auto-exiting after 50 bounces
-rw-r--r--src/bin/test_genlist.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/test_genlist.c b/src/bin/test_genlist.c
index cf77362e6..2d6d6ce0b 100644
--- a/src/bin/test_genlist.c
+++ b/src/bin/test_genlist.c
@@ -304,11 +304,14 @@ _bounce_cb(void *data)
{
Bounce *bounce = data;
bounce->state++;
- if (bounce->state > 1) bounce->state = 0;
- if (bounce->state == 1)
+ if (bounce->state & 0x1)
elm_genlist_item_bring_in(bounce->it2, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);
else
elm_genlist_item_bring_in(bounce->it1, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);
+ if (bounce->state > 50)
+ {
+ if (getenv("ELM_TEST_AUTOBOUNCE")) elm_exit();
+ }
return EINA_TRUE;
}