summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <quaker66@gmail.com>2014-01-30 14:25:50 +0000
committerDaniel Kolesa <quaker66@gmail.com>2014-01-30 14:25:50 +0000
commit0848603b50828f94f050264fb19c8443c9152d3f (patch)
tree3af32b530031a59a71806f017a81738d59e0ea32
parent30cfe27e8493976c730be6f444ea1ed7c3061ae1 (diff)
luaxpedite test init cleanups
-rw-r--r--tests/image_blend_many_smooth_same_scaled.lua4
-rw-r--r--tests/image_blend_occlude.lua4
-rw-r--r--tests/image_blend_scaled.lua4
-rw-r--r--tests/image_blend_unscaled.lua4
-rw-r--r--tests/image_crossfade.lua4
-rw-r--r--tests/image_data_argb.lua4
-rw-r--r--tests/image_data_ycbcr601pl.lua4
-rw-r--r--tests/image_data_ycbcr601pl_map_solid_rotate.lua4
-rw-r--r--tests/image_data_ycbcr601pl_wide_stride.lua4
-rw-r--r--tests/image_map_3d_1.lua4
-rw-r--r--tests/image_map_3d_2.lua4
-rw-r--r--tests/image_map_3d_flow.lua4
-rw-r--r--tests/image_map_rotate.lua4
-rw-r--r--tests/image_quality_scale.lua4
-rw-r--r--tests/line_blend.lua4
-rw-r--r--tests/poly_blend.lua4
-rw-r--r--tests/proxy_image.lua4
-rw-r--r--tests/proxy_text_fixed.lua4
-rw-r--r--tests/proxy_text_random.lua4
-rw-r--r--tests/rect.lua4
-rw-r--r--tests/text.lua4
-rw-r--r--tests/text_change.lua4
-rw-r--r--tests/textblock_auto_align.lua4
-rw-r--r--tests/textblock_basic.lua4
-rw-r--r--tests/textblock_intl.lua4
-rw-r--r--tests/textblock_text_append.lua4
-rw-r--r--tests/widgets_file_icons.lua4
-rw-r--r--tests/widgets_list.lua4
-rw-r--r--ui.lua62
29 files changed, 89 insertions, 85 deletions
diff --git a/tests/image_blend_many_smooth_same_scaled.lua b/tests/image_blend_many_smooth_same_scaled.lua
index 198c431..fb8aa42 100644
--- a/tests/image_blend_many_smooth_same_scaled.lua
+++ b/tests/image_blend_many_smooth_same_scaled.lua
@@ -5,12 +5,12 @@ local levas = util.get_lib("evas")
5 5
6local sin, cos = math.sin, math.cos 6local sin, cos = math.sin, math.cos
7 7
8return function(queue, ui, variant) 8return function(ui, variant)
9 local itern = 8192 9 local itern = 8192
10 local slow = 5.0 10 local slow = 5.0
11 local o_images = {} 11 local o_images = {}
12 local name = "Image Blend Many Smooth Down Scaled" 12 local name = "Image Blend Many Smooth Down Scaled"
13 queue[#queue + 1] = { "blend.png", name, function() 13 return { "blend.png", name, function()
14 local win_w, win_h = ui.win_w, ui.win_h 14 local win_w, win_h = ui.win_w, ui.win_h
15 local w, h = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]") 15 local w, h = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]")
16 ui.func_set(util.del_objs(o_images), function(t, f) 16 ui.func_set(util.del_objs(o_images), function(t, f)
diff --git a/tests/image_blend_occlude.lua b/tests/image_blend_occlude.lua
index d2dd8a8..c274e17 100644
--- a/tests/image_blend_occlude.lua
+++ b/tests/image_blend_occlude.lua
@@ -41,13 +41,13 @@ local getitern = function(n)
41 return 32 41 return 32
42end 42end
43 43
44return function(queue, ui, variant) 44return function(ui, variant)
45 local itern = getitern(variant) 45 local itern = getitern(variant)
46 local slow = 5.0 46 local slow = 5.0
47 local o_images = {} 47 local o_images = {}
48 local name = variants[variant] 48 local name = variants[variant]
49 local cond = getcond(variant) 49 local cond = getcond(variant)
50 queue[#queue + 1] = { "blend.png", name, function() 50 return { "blend.png", name, function()
51 local win_w, win_h = ui.win_w, ui.win_h 51 local win_w, win_h = ui.win_w, ui.win_h
52 ui.func_set(util.del_objs(o_images), function(t, f) 52 ui.func_set(util.del_objs(o_images), function(t, f)
53 for i = 1, itern do 53 for i = 1, itern do
diff --git a/tests/image_blend_scaled.lua b/tests/image_blend_scaled.lua
index 5501e7f..eb9af47 100644
--- a/tests/image_blend_scaled.lua
+++ b/tests/image_blend_scaled.lua
@@ -28,12 +28,12 @@ local smooth_scale = {
28 0, 0, 1, 1, 0, 0, 1, 1 28 0, 0, 1, 1, 0, 0, 1, 1
29} 29}
30 30
31return function(queue, ui, variant) 31return function(ui, variant)
32 local itern = 128 32 local itern = 128
33 local slow = 5.0 33 local slow = 5.0
34 local o_images = {} 34 local o_images = {}
35 local name = variants[variant] 35 local name = variants[variant]
36 queue[#queue + 1] = { "blend.png", name, function() 36 return { "blend.png", name, function()
37 local win_w, win_h = ui.win_w, ui.win_h 37 local win_w, win_h = ui.win_w, ui.win_h
38 local get_wh = (variant > 4 and variant <= 8) 38 local get_wh = (variant > 4 and variant <= 8)
39 and function(w0, h0, i, f) 39 and function(w0, h0, i, f)
diff --git a/tests/image_blend_unscaled.lua b/tests/image_blend_unscaled.lua
index cc0891d..f6312a3 100644
--- a/tests/image_blend_unscaled.lua
+++ b/tests/image_blend_unscaled.lua
@@ -18,12 +18,12 @@ local sin, cos = math.sin, math.cos
18 18
19local lsh = bit.lshift 19local lsh = bit.lshift
20 20
21return function(queue, ui, variant) 21return function(ui, variant)
22 local itern = 128 22 local itern = 128
23 local slow = 5.0 23 local slow = 5.0
24 local o_images = {} 24 local o_images = {}
25 local name = variants[variant] 25 local name = variants[variant]
26 queue[#queue + 1] = { "blend.png", name, function() 26 return { "blend.png", name, function()
27 local win_w, win_h = ui.win_w, ui.win_h 27 local win_w, win_h = ui.win_w, ui.win_h
28 ui.func_set(util.del_objs(o_images), function(t, f) 28 ui.func_set(util.del_objs(o_images), function(t, f)
29 local w, h = 120, 160 29 local w, h = 120, 160
diff --git a/tests/image_crossfade.lua b/tests/image_crossfade.lua
index ced23e3..5c9e042 100644
--- a/tests/image_crossfade.lua
+++ b/tests/image_crossfade.lua
@@ -4,9 +4,9 @@ local levas = util.get_lib("evas")
4 4
5local band, bor, lsh, rsh = bit.band, bit.bor, bit.lshift, bit.rshift 5local band, bor, lsh, rsh = bit.band, bit.bor, bit.lshift, bit.rshift
6 6
7return function(queue, ui) 7return function(ui)
8 local images = {} 8 local images = {}
9 queue[#queue + 1] = { "blend.png", "Image Crossfade", function() 9 return { "blend.png", "Image Crossfade", function()
10 local win_w, win_h = ui.win_w, ui.win_h 10 local win_w, win_h = ui.win_w, ui.win_h
11 ui.func_set(util.del_objs(images), function(t, f) 11 ui.func_set(util.del_objs(images), function(t, f)
12 local a = band(f, 0x1F) 12 local a = band(f, 0x1F)
diff --git a/tests/image_data_argb.lua b/tests/image_data_argb.lua
index 7c0595c..c42ed78 100644
--- a/tests/image_data_argb.lua
+++ b/tests/image_data_argb.lua
@@ -10,9 +10,9 @@ local names = {
10 "Image Data ARGB", "Image Data ARGB Alpha" 10 "Image Data ARGB", "Image Data ARGB Alpha"
11} 11}
12 12
13return function(queue, ui, variant) 13return function(ui, variant)
14 local image 14 local image
15 queue[#queue + 1] = { "data.png", names[variant], function() 15 return { "data.png", names[variant], function()
16 local win_w, win_h = ui.win_w, ui.win_h 16 local win_w, win_h = ui.win_w, ui.win_h
17 ui.func_set(function() 17 ui.func_set(function()
18 levas.evas_object_del(image) 18 levas.evas_object_del(image)
diff --git a/tests/image_data_ycbcr601pl.lua b/tests/image_data_ycbcr601pl.lua
index 09cedfe..13f176b 100644
--- a/tests/image_data_ycbcr601pl.lua
+++ b/tests/image_data_ycbcr601pl.lua
@@ -14,11 +14,11 @@ ffi.cdef [[
14 void free(void *ptr); 14 void free(void *ptr);
15]] 15]]
16 16
17return function(queue, ui) 17return function(ui)
18 local image 18 local image
19 local name = "Image Data YCbCr 601 Pointer List" 19 local name = "Image Data YCbCr 601 Pointer List"
20 local yp, up, vp 20 local yp, up, vp
21 queue[#queue + 1] = { "data.png", name, function() 21 return { "data.png", name, function()
22 local win_w, win_h = ui.win_w, ui.win_h 22 local win_w, win_h = ui.win_w, ui.win_h
23 ui.func_set(function() 23 ui.func_set(function()
24 levas.evas_object_del(image) 24 levas.evas_object_del(image)
diff --git a/tests/image_data_ycbcr601pl_map_solid_rotate.lua b/tests/image_data_ycbcr601pl_map_solid_rotate.lua
index 32cdda9..4a2d1f3 100644
--- a/tests/image_data_ycbcr601pl_map_solid_rotate.lua
+++ b/tests/image_data_ycbcr601pl_map_solid_rotate.lua
@@ -19,10 +19,10 @@ local names = {
19 "Image Data YCbCr 601 Pointer List Map Nearest Solid Rotate" 19 "Image Data YCbCr 601 Pointer List Map Nearest Solid Rotate"
20} 20}
21 21
22return function(queue, ui, variant) 22return function(ui, variant)
23 local image 23 local image
24 local yp, up, vp 24 local yp, up, vp
25 queue[#queue + 1] = { "data.png", names[variant], function() 25 return { "data.png", names[variant], function()
26 local win_w, win_h = ui.win_w, ui.win_h 26 local win_w, win_h = ui.win_w, ui.win_h
27 local m 27 local m
28 ui.func_set(function() 28 ui.func_set(function()
diff --git a/tests/image_data_ycbcr601pl_wide_stride.lua b/tests/image_data_ycbcr601pl_wide_stride.lua
index 0f1f7b0..bcc5a5b 100644
--- a/tests/image_data_ycbcr601pl_wide_stride.lua
+++ b/tests/image_data_ycbcr601pl_wide_stride.lua
@@ -16,11 +16,11 @@ ffi.cdef [[
16 16
17local band, bnot = bit.band, bit.bnot 17local band, bnot = bit.band, bit.bnot
18 18
19return function(queue, ui) 19return function(ui)
20 local image 20 local image
21 local name = "Image Data YCbCr 601 Pointer List Wide Stride" 21 local name = "Image Data YCbCr 601 Pointer List Wide Stride"
22 local yp, up, vp 22 local yp, up, vp
23 queue[#queue + 1] = { "data.png", name, function() 23 return { "data.png", name, function()
24 local win_w, win_h = ui.win_w, ui.win_h 24 local win_w, win_h = ui.win_w, ui.win_h
25 ui.func_set(function() 25 ui.func_set(function()
26 levas.evas_object_del(image) 26 levas.evas_object_del(image)
diff --git a/tests/image_map_3d_1.lua b/tests/image_map_3d_1.lua
index fab0b4d..2b4fd35 100644
--- a/tests/image_map_3d_1.lua
+++ b/tests/image_map_3d_1.lua
@@ -125,11 +125,11 @@ local smooth = {
125 0, 1, 0, 1 125 0, 1, 0, 1
126} 126}
127 127
128return function(queue, ui, variant) 128return function(ui, variant)
129 local cubes = {} 129 local cubes = {}
130 local sm = smooth[variant] 130 local sm = smooth[variant]
131 local nocw = (variant >= 3) 131 local nocw = (variant >= 3)
132 queue[#queue + 1] = { "3d.png", variants[variant], function() 132 return { "3d.png", variants[variant], function()
133 win_w, win_h = ui.win_w, ui.win_h 133 win_w, win_h = ui.win_w, ui.win_h
134 local m 134 local m
135 ui.func_set(function() 135 ui.func_set(function()
diff --git a/tests/image_map_3d_2.lua b/tests/image_map_3d_2.lua
index 56c041f..c51ceef 100644
--- a/tests/image_map_3d_2.lua
+++ b/tests/image_map_3d_2.lua
@@ -121,9 +121,9 @@ local variants = {
121 "Image Map 3D 5", "Image Map 3D 6" 121 "Image Map 3D 5", "Image Map 3D 6"
122} 122}
123 123
124return function(queue, ui, variant) 124return function(ui, variant)
125 local cube 125 local cube
126 queue[#queue + 1] = { "3d.png", variants[variant], function() 126 return { "3d.png", variants[variant], function()
127 win_w, win_h = ui.win_w, ui.win_h 127 win_w, win_h = ui.win_w, ui.win_h
128 local m 128 local m
129 ui.func_set( function() 129 ui.func_set( function()
diff --git a/tests/image_map_3d_flow.lua b/tests/image_map_3d_flow.lua
index 18dcff6..f9f032c 100644
--- a/tests/image_map_3d_flow.lua
+++ b/tests/image_map_3d_flow.lua
@@ -2,10 +2,10 @@ local ffi = require("ffi")
2local util = require("util") 2local util = require("util")
3local levas = util.get_lib("evas") 3local levas = util.get_lib("evas")
4 4
5return function(queue, ui, variant) 5return function(ui, variant)
6 local itern = 48 6 local itern = 48
7 local o_images, o_reflec = {}, {} 7 local o_images, o_reflec = {}, {}
8 queue[#queue + 1] = { "3d.png", "Image Map 3D Flow", function() 8 return { "3d.png", "Image Map 3D Flow", function()
9 local win_w, win_h = ui.win_w, ui.win_h 9 local win_w, win_h = ui.win_w, ui.win_h
10 local m 10 local m
11 ui.func_set(util.del_objs(o_images, o_reflec), function(t, f) 11 ui.func_set(util.del_objs(o_images, o_reflec), function(t, f)
diff --git a/tests/image_map_rotate.lua b/tests/image_map_rotate.lua
index 4cb0d11..b097ad4 100644
--- a/tests/image_map_rotate.lua
+++ b/tests/image_map_rotate.lua
@@ -28,12 +28,12 @@ local smooth_scale = {
28 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0 28 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0
29} 29}
30 30
31return function(queue, ui, variant) 31return function(ui, variant)
32 local itern = 64 32 local itern = 64
33 local slow = 5.0 33 local slow = 5.0
34 local o_images = {} 34 local o_images = {}
35 local name = variants[variant] 35 local name = variants[variant]
36 queue[#queue + 1] = { "map.png", name, function() 36 return { "map.png", name, function()
37 local win_w, win_h = ui.win_w, ui.win_h 37 local win_w, win_h = ui.win_w, ui.win_h
38 local m 38 local m
39 local mapcolorf 39 local mapcolorf
diff --git a/tests/image_quality_scale.lua b/tests/image_quality_scale.lua
index 40aaa13..1997166 100644
--- a/tests/image_quality_scale.lua
+++ b/tests/image_quality_scale.lua
@@ -2,9 +2,9 @@ local ffi = require("ffi")
2local util = require("util") 2local util = require("util")
3local levas = util.get_lib("evas") 3local levas = util.get_lib("evas")
4 4
5return function(queue, ui) 5return function(ui)
6 local image 6 local image
7 queue[#queue + 1] = { "data.png", "Image Quality Scale", function() 7 return { "data.png", "Image Quality Scale", function()
8 local win_w, win_h = ui.win_w, ui.win_h 8 local win_w, win_h = ui.win_w, ui.win_h
9 ui.func_set(function() 9 ui.func_set(function()
10 levas.evas_object_del(image) 10 levas.evas_object_del(image)
diff --git a/tests/line_blend.lua b/tests/line_blend.lua
index b8c7347..c4dd307 100644
--- a/tests/line_blend.lua
+++ b/tests/line_blend.lua
@@ -28,11 +28,11 @@ local rotate_point = function(ox, oy, r, win_w, win_h)
28 oy[0] = floor(d * sin(angle) + (win_h / 2)) 28 oy[0] = floor(d * sin(angle) + (win_h / 2))
29end 29end
30 30
31return function(queue, ui) 31return function(ui)
32 local itern = 128 32 local itern = 128
33 local slow = 5 33 local slow = 5
34 local o_images = {} 34 local o_images = {}
35 queue[#queue + 1] = { "rect.png", "Line Blend", function() 35 return { "rect.png", "Line Blend", function()
36 local win_w, win_h = ui.win_w, ui.win_h 36 local win_w, win_h = ui.win_w, ui.win_h
37 local ox1, oy1 = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]") 37 local ox1, oy1 = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]")
38 local ox2, oy2 = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]") 38 local ox2, oy2 = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]")
diff --git a/tests/poly_blend.lua b/tests/poly_blend.lua
index 2bfe1b7..eab2c05 100644
--- a/tests/poly_blend.lua
+++ b/tests/poly_blend.lua
@@ -45,11 +45,11 @@ local poly = function(o, tp, x, y)
45 if f then f(o, x, y) end 45 if f then f(o, x, y) end
46end 46end
47 47
48return function(queue, ui) 48return function(ui)
49 local itern = 128 49 local itern = 128
50 local slow = 5 50 local slow = 5
51 local o_images = {} 51 local o_images = {}
52 queue[#queue + 1] = { "rect.png", "Polygon Blend", function() 52 return { "rect.png", "Polygon Blend", function()
53 local win_w, win_h = ui.win_w, ui.win_h 53 local win_w, win_h = ui.win_w, ui.win_h
54 local w, h = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]") 54 local w, h = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]")
55 ui.func_set(util.del_objs(o_images), function(t, f) 55 ui.func_set(util.del_objs(o_images), function(t, f)
diff --git a/tests/proxy_image.lua b/tests/proxy_image.lua
index 04d65d0..f290617 100644
--- a/tests/proxy_image.lua
+++ b/tests/proxy_image.lua
@@ -4,11 +4,11 @@ local levas = util.get_lib("evas")
4 4
5local sin, cos = math.sin, math.cos 5local sin, cos = math.sin, math.cos
6 6
7return function(queue, ui) 7return function(ui)
8 local itern = 128 8 local itern = 128
9 local slow = 5 9 local slow = 5
10 local o_images = {} 10 local o_images = {}
11 queue[#queue + 1] = { "blend.png", "Image Blend Unscaled Proxy", function() 11 return { "blend.png", "Image Blend Unscaled Proxy", function()
12 local win_w, win_h = ui.win_w, ui.win_h 12 local win_w, win_h = ui.win_w, ui.win_h
13 ui.func_set(util.del_objs(o_images), function(t, f) 13 ui.func_set(util.del_objs(o_images), function(t, f)
14 for i = 1, itern do 14 for i = 1, itern do
diff --git a/tests/proxy_text_fixed.lua b/tests/proxy_text_fixed.lua
index 4253f16..b16a407 100644
--- a/tests/proxy_text_fixed.lua
+++ b/tests/proxy_text_fixed.lua
@@ -5,11 +5,11 @@ local levas = util.get_lib("evas")
5 5
6local sin, cos = math.sin, math.cos 6local sin, cos = math.sin, math.cos
7 7
8return function(queue, ui) 8return function(ui)
9 local itern = 128 9 local itern = 128
10 local slow = 5 10 local slow = 5
11 local o_texts = {} 11 local o_texts = {}
12 queue[#queue + 1] = { "text.png", "Proxy Text Fixed", function() 12 return { "text.png", "Proxy Text Fixed", function()
13 local win_w, win_h = ui.win_w, ui.win_h 13 local win_w, win_h = ui.win_w, ui.win_h
14 local w, h = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]") 14 local w, h = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]")
15 ui.func_set(util.del_objs(o_texts), function(t, f) 15 ui.func_set(util.del_objs(o_texts), function(t, f)
diff --git a/tests/proxy_text_random.lua b/tests/proxy_text_random.lua
index 95e49fa..3538c87 100644
--- a/tests/proxy_text_random.lua
+++ b/tests/proxy_text_random.lua
@@ -11,11 +11,11 @@ local strs = {
11 "Family", "Lair", "Monkeys", "Magazine" 11 "Family", "Lair", "Monkeys", "Magazine"
12} 12}
13 13
14return function(queue, ui) 14return function(ui)
15 local itern = 128 15 local itern = 128
16 local slow = 5 16 local slow = 5
17 local o_texts = {} 17 local o_texts = {}
18 queue[#queue + 1] = { "text.png", "Proxy Text Random", function() 18 return { "text.png", "Proxy Text Random", function()
19 local win_w, win_h = ui.win_w, ui.win_h 19 local win_w, win_h = ui.win_w, ui.win_h
20 local w, h = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]") 20 local w, h = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]")
21 ui.func_set(util.del_objs(o_texts), function(t, f) 21 ui.func_set(util.del_objs(o_texts), function(t, f)
diff --git a/tests/rect.lua b/tests/rect.lua
index 3320675..8c4dec8 100644
--- a/tests/rect.lua
+++ b/tests/rect.lua
@@ -12,11 +12,11 @@ local names = {
12 "Rect Blend Power 2 Few", "Rect Solid Few" 12 "Rect Blend Power 2 Few", "Rect Solid Few"
13} 13}
14 14
15return function(queue, ui, variant) 15return function(ui, variant)
16 local itern = (variant > 3) and 3 or 128 16 local itern = (variant > 3) and 3 or 128
17 local slow = 5 17 local slow = 5
18 local o_images = {} 18 local o_images = {}
19 queue[#queue + 1] = { "rect.png", names[variant], function() 19 return { "rect.png", names[variant], function()
20 local win_w, win_h = ui.win_w, ui.win_h 20 local win_w, win_h = ui.win_w, ui.win_h
21 local i1, i2 21 local i1, i2
22 if variant == 4 then 22 if variant == 4 then
diff --git a/tests/text.lua b/tests/text.lua
index 70df006..e3aa01d 100644
--- a/tests/text.lua
+++ b/tests/text.lua
@@ -15,11 +15,11 @@ local strs = {
15 15
16local sin, cos = math.sin, math.cos 16local sin, cos = math.sin, math.cos
17 17
18return function(queue, ui, variant) 18return function(ui, variant)
19 local itern = 128 19 local itern = 128
20 local slow = 5 20 local slow = 5
21 local o_texts = {} 21 local o_texts = {}
22 queue[#queue + 1] = { "text.png", variants[variant], function() 22 return { "text.png", variants[variant], function()
23 local win_w, win_h = ui.win_w, ui.win_h 23 local win_w, win_h = ui.win_w, ui.win_h
24 local w, h = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]") 24 local w, h = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]")
25 ui.func_set(util.del_objs(o_texts), function(t, f) 25 ui.func_set(util.del_objs(o_texts), function(t, f)
diff --git a/tests/text_change.lua b/tests/text_change.lua
index 7ea9592..311a43f 100644
--- a/tests/text_change.lua
+++ b/tests/text_change.lua
@@ -11,11 +11,11 @@ local strs = {
11 11
12local sin, cos = math.sin, math.cos 12local sin, cos = math.sin, math.cos
13 13
14return function(queue, ui) 14return function(ui)
15 local itern = 128 15 local itern = 128
16 local slow = 5 16 local slow = 5
17 local o_texts = {} 17 local o_texts = {}
18 queue[#queue + 1] = { "text.png", "Text Change", function() 18 return { "text.png", "Text Change", function()
19 local win_w, win_h = ui.win_w, ui.win_h 19 local win_w, win_h = ui.win_w, ui.win_h
20 local w, h = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]") 20 local w, h = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]")
21 ui.func_set(util.del_objs(o_texts), function(t, f) 21 ui.func_set(util.del_objs(o_texts), function(t, f)
diff --git a/tests/textblock_auto_align.lua b/tests/textblock_auto_align.lua
index 81b7f5d..2036d44 100644
--- a/tests/textblock_auto_align.lua
+++ b/tests/textblock_auto_align.lua
@@ -5,10 +5,10 @@ local levas = util.get_lib("evas")
5 5
6local sin, abs = math.sin, math.abs 6local sin, abs = math.sin, math.abs
7 7
8return function(queue, ui, variant) 8return function(ui, variant)
9 local text 9 local text
10 local slow = 5 10 local slow = 5
11 queue[#queue + 1] = { "text.png", "Textblock auto align", function() 11 return { "text.png", "Textblock auto align", function()
12 local win_w, win_h = ui.win_w, ui.win_h 12 local win_w, win_h = ui.win_w, ui.win_h
13 local w0, h0 = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]") 13 local w0, h0 = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]")
14 ui.func_set(function() 14 ui.func_set(function()
diff --git a/tests/textblock_basic.lua b/tests/textblock_basic.lua
index 15f69ed..2300276 100644
--- a/tests/textblock_basic.lua
+++ b/tests/textblock_basic.lua
@@ -4,10 +4,10 @@ local levas = util.get_lib("evas")
4 4
5local sin, cos = math.sin, math.cos 5local sin, cos = math.sin, math.cos
6 6
7return function(queue, ui, variant) 7return function(ui, variant)
8 local text 8 local text
9 local slow = 5 9 local slow = 5
10 queue[#queue + 1] = { "text.png", "Textblock Basic", function() 10 return { "text.png", "Textblock Basic", function()
11 local win_w, win_h = ui.win_w, ui.win_h 11 local win_w, win_h = ui.win_w, ui.win_h
12 ui.func_set(function() 12 ui.func_set(function()
13 levas.evas_object_del(text) 13 levas.evas_object_del(text)
diff --git a/tests/textblock_intl.lua b/tests/textblock_intl.lua
index 91b57a7..aee87b1 100644
--- a/tests/textblock_intl.lua
+++ b/tests/textblock_intl.lua
@@ -5,10 +5,10 @@ local levas = util.get_lib("evas")
5 5
6local sin, cos = math.sin, math.cos 6local sin, cos = math.sin, math.cos
7 7
8return function(queue, ui, variant) 8return function(ui, variant)
9 local text 9 local text
10 local slow = 5 10 local slow = 5
11 queue[#queue + 1] = { "text.png", "Textblock Intl", function() 11 return { "text.png", "Textblock Intl", function()
12 local win_w, win_h = ui.win_w, ui.win_h 12 local win_w, win_h = ui.win_w, ui.win_h
13 local w0, h0 = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]") 13 local w0, h0 = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]")
14 ui.func_set(function() 14 ui.func_set(function()
diff --git a/tests/textblock_text_append.lua b/tests/textblock_text_append.lua
index b016773..1274ec2 100644
--- a/tests/textblock_text_append.lua
+++ b/tests/textblock_text_append.lua
@@ -2,10 +2,10 @@ local ffi = require("ffi")
2local util = require("util") 2local util = require("util")
3local levas = util.get_lib("evas") 3local levas = util.get_lib("evas")
4 4
5return function(queue, ui, variant) 5return function(ui, variant)
6 local text 6 local text
7 local slow = 5 7 local slow = 5
8 queue[#queue + 1] = { "text.png", "Textblock text_append", function() 8 return { "text.png", "Textblock text_append", function()
9 local win_w, win_h = ui.win_w, ui.win_h 9 local win_w, win_h = ui.win_w, ui.win_h
10 local cur2 10 local cur2
11 ui.func_set(function() 11 ui.func_set(function()
diff --git a/tests/widgets_file_icons.lua b/tests/widgets_file_icons.lua
index 72d50fe..1a92f92 100644
--- a/tests/widgets_file_icons.lua
+++ b/tests/widgets_file_icons.lua
@@ -29,13 +29,13 @@ local variants = {
29 "Widgets File Icons 3", "Widgets File Icons 4" 29 "Widgets File Icons 3", "Widgets File Icons 4"
30} 30}
31 31
32return function(queue, ui, variant) 32return function(ui, variant)
33 local itern = 512 33 local itern = 512
34 local icon_size = (variant == 6) and 16 or ((variant == 7) 34 local icon_size = (variant == 6) and 16 or ((variant == 7)
35 and 96 or 64) 35 and 96 or 64)
36 local o_images, o_texts = {}, {} 36 local o_images, o_texts = {}, {}
37 local name = variants[variant] 37 local name = variants[variant]
38 queue[#queue + 1] = { "widgets.png", name, function() 38 return { "widgets.png", name, function()
39 local win_w, win_h = ui.win_w, ui.win_h 39 local win_w, win_h = ui.win_w, ui.win_h
40 local tw, th = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]") 40 local tw, th = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]")
41 ui.func_set(util.del_objs(o_images, o_texts), function(t, f) 41 ui.func_set(util.del_objs(o_images, o_texts), function(t, f)
diff --git a/tests/widgets_list.lua b/tests/widgets_list.lua
index 2effd83..63f9c62 100644
--- a/tests/widgets_list.lua
+++ b/tests/widgets_list.lua
@@ -68,14 +68,14 @@ local iconsizes = {
68 64, 64, 32, 32, 64, 64, 32, 32 68 64, 64, 32, 32, 64, 64, 32, 32
69} 69}
70 70
71return function(queue, ui, variant) 71return function(ui, variant)
72 local itern = 512 72 local itern = 512
73 local icon_size = iconsizes[variant] 73 local icon_size = iconsizes[variant]
74 local o_images, o_texts = {}, {} 74 local o_images, o_texts = {}, {}
75 local o_icons 75 local o_icons
76 local name = variants[variant] 76 local name = variants[variant]
77 if variant > 4 then o_icons = {} end 77 if variant > 4 then o_icons = {} end
78 queue[#queue + 1] = { "widgets.png", name, function() 78 return { "widgets.png", name, function()
79 local win_w, win_h = ui.win_w, ui.win_h 79 local win_w, win_h = ui.win_w, ui.win_h
80 local tw, th = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]") 80 local tw, th = ffi_new("Evas_Coord[1]"), ffi_new("Evas_Coord[1]")
81 ui.func_set(util.del_objs(o_images, o_texts, o_icons), function(t, f) 81 ui.func_set(util.del_objs(o_images, o_texts, o_icons), function(t, f)
diff --git a/ui.lua b/ui.lua
index 69dfe53..7ca6e12 100644
--- a/ui.lua
+++ b/ui.lua
@@ -825,74 +825,78 @@ ui_fps_std = function(name, t, f)
825 end 825 end
826end 826end
827 827
828local require = require
829local queue_test = function(name, i)
830 menu_queue[#menu_queue + 1] = require("tests." .. name)(M, i)
831end
832
828for i = 1, 7 do 833for i = 1, 7 do
829 require("tests.widgets_file_icons")(menu_queue, M, i) 834 queue_test("widgets_file_icons", i)
830end 835end
831 836
832for i = 1, 8 do 837for i = 1, 8 do
833 require("tests.widgets_list")(menu_queue, M, i) 838 queue_test("widgets_list", i)
834end 839end
835 840
836for i = 1, 7 do 841for i = 1, 7 do
837 require("tests.image_blend_unscaled")(menu_queue, M, i) 842 queue_test("image_blend_unscaled", i)
838end 843end
839 844
840for i = 1, 12 do 845for i = 1, 12 do
841 require("tests.image_blend_scaled")(menu_queue, M, i) 846 queue_test("image_blend_scaled", i)
842end 847end
843 848
844for i = 1, 12 do 849for i = 1, 12 do
845 require("tests.image_map_rotate")(menu_queue, M, i) 850 queue_test("image_map_rotate", i)
846end 851end
847 852
848for i = 1, 4 do 853for i = 1, 4 do
849 require("tests.image_map_3d_1")(menu_queue, M, i) 854 queue_test("image_map_3d_1", i)
850end 855end
851 856
852for i = 1, 2 do 857for i = 1, 2 do
853 require("tests.image_map_3d_2")(menu_queue, M, i) 858 queue_test("image_map_3d_2", i)
854end 859end
855 860
856require("tests.image_map_3d_flow")(menu_queue, M) 861queue_test("image_map_3d_flow")
857require("tests.image_quality_scale")(menu_queue, M) 862queue_test("image_quality_scale")
858 863
859for i = 1, 2 do 864for i = 1, 2 do
860 require("tests.image_data_argb")(menu_queue, M, i) 865 queue_test("image_data_argb", i)
861end 866end
862 867
863require("tests.image_data_ycbcr601pl")(menu_queue, M) 868queue_test("image_data_ycbcr601pl")
864require("tests.image_data_ycbcr601pl_wide_stride")(menu_queue, M) 869queue_test("image_data_ycbcr601pl_wide_stride")
865 870
866for i = 1, 2 do 871for i = 1, 2 do
867 require("tests.image_data_ycbcr601pl_map_solid_rotate")(menu_queue, 872 queue_test("image_data_ycbcr601pl_map_solid_rotate", i)
868 M, i)
869end 873end
870 874
871require("tests.image_crossfade")(menu_queue, M) 875queue_test("image_crossfade")
872 876
873for i = 1, 3 do 877for i = 1, 3 do
874 require("tests.text")(menu_queue, M, i) 878 queue_test("text", i)
875end 879end
876 880
877require("tests.text_change")(menu_queue, M) 881queue_test("text_change")
878require("tests.textblock_basic")(menu_queue, M) 882queue_test("textblock_basic")
879require("tests.textblock_intl")(menu_queue, M) 883queue_test("textblock_intl")
880require("tests.textblock_auto_align")(menu_queue, M) 884queue_test("textblock_auto_align")
881require("tests.textblock_text_append")(menu_queue, M) 885queue_test("textblock_text_append")
882 886
883for i = 1, 6 do 887for i = 1, 6 do
884 require("tests.rect")(menu_queue, M, i) 888 queue_test("rect", i)
885end 889end
886 890
887for i = 1, 12 do 891for i = 1, 12 do
888 require("tests.image_blend_occlude")(menu_queue, M, i) 892 queue_test("image_blend_occlude", i)
889end 893end
890 894
891require("tests.poly_blend")(menu_queue, M) 895queue_test("poly_blend")
892require("tests.proxy_image")(menu_queue, M) 896queue_test("proxy_image")
893require("tests.proxy_text_fixed")(menu_queue, M) 897queue_test("proxy_text_fixed")
894require("tests.proxy_text_random")(menu_queue, M) 898queue_test("proxy_text_random")
895require("tests.line_blend")(menu_queue, M) 899queue_test("line_blend")
896require("tests.image_blend_many_smooth_same_scaled")(menu_queue, M) 900queue_test("image_blend_many_smooth_same_scaled")
897 901
898return M \ No newline at end of file 902return M \ No newline at end of file