kuuko pushed a commit to branch master.

commit 669bdcf46e73c8930528b6a060c8776d53749ee3
Author: Kai Huuhko <[email protected]>
Date:   Wed Mar 27 19:27:48 2013 +0000

    Add an assertion to genlist iteration test and make the genlist homogeneous.
---
 examples/elementary/test_genlist.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/examples/elementary/test_genlist.py 
b/examples/elementary/test_genlist.py
index bb31d8c..88a20d0 100644
--- a/examples/elementary/test_genlist.py
+++ b/examples/elementary/test_genlist.py
@@ -455,6 +455,7 @@ def genlist5_clicked(obj, item=None):
     bg.show()
 
     gl = Genlist(win)
+    gl.homogeneous = True
     win.resize_object_add(gl)
     gl.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
     gl.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
@@ -472,13 +473,14 @@ def genlist5_clicked(obj, item=None):
         GenlistItem(itc_i, None, 0, None, i).append_to(gl)
     t2 = time.time()
 
-    j = gl.first_item
+    it = gl.first_item
     t3 = time.time()
-    while j:
-        d = j.data
-        j = j.next
+    while it:
+        d = it.data
+        it = it.next
     t4 = time.time()
 
+    assert(d == 9999)
     print("Time to add {0} items:".format(item_count))
     print(t2-t1)
     print("Time to iterate item data over {0} items:".format(item_count))

-- 

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d

Reply via email to