aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/edje/edje_test_edje.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/edje/edje_test_edje.c')
-rw-r--r--src/tests/edje/edje_test_edje.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c
index e9478c7508..5ff8f01bca 100644
--- a/src/tests/edje/edje_test_edje.c
+++ b/src/tests/edje/edje_test_edje.c
@@ -100,10 +100,52 @@ START_TEST(edje_test_simple_layout_geometry)
}
END_TEST
+START_TEST(edje_test_complex_layout)
+{
+ int x, y, w, h;
+ Evas *evas = EDJE_TEST_INIT_EVAS();
+ Evas_Object *obj;
+
+ obj = edje_object_add(evas);
+ fail_unless(edje_object_file_set(obj, test_layout_get("complex_layout.edj"), "test_group"));
+ evas_object_resize(obj, 1000, 1000);
+ edje_object_part_geometry_get(obj, "background", &x, &y, &w, &h);
+
+ fail_if(x != 0 || y != 0);
+ fail_if(w != 1000 || h != 1000);
+
+ /* rel1.relative: 0.0 0.0; rel1.offset: 5 5;
+ * rel2.relative: 0.5 0.5; rel2.offset -2 -2; */
+ edje_object_part_geometry_get(obj, "ul", &x, &y, &w, &h);
+ printf("(%i, %i) (%i, %i)\n", x, y, w, h);
+ fail_if(x != 5 || y != 5);
+ //fail_if(w != 500-5-2 || h != 500-5-2);
+
+ /* rel1.relative: 0.5 0.0; rel1.offset: 2 5;
+ * rel2.relative: 1.0 0.5; rel2.offset -5 -2; */
+ edje_object_part_geometry_get(obj, "ur", &x, &y, &w, &h);
+ printf("(%i, %i) (%i, %i)\n", x, y, w, h);
+ fail_if(x != 500+2 || y != 5);
+ //fail_if(w != 500-5-2 || h != 500-5-2);
+
+ /* rel1.relative: 0.0 0.5; rel1.offset: 5 2;
+ * rel2.relative: 1.0 1.0; rel2.offset -5 -5; */
+ edje_object_part_geometry_get(obj, "l", &x, &y, &w, &h);
+ printf("(%i, %i) (%i, %i)\n", x, y, w, h);
+ fail_if(x != 5 || y != 500+2);
+ //fail_if(w != 1000-5-5 || h != 500-5-2);
+
+
+
+ EDJE_TEST_FREE_EVAS();
+}
+END_TEST
+
void edje_test_edje(TCase *tc)
{
tcase_add_test(tc, edje_test_edje_init);
tcase_add_test(tc,edje_test_load_simple_layout);
tcase_add_test(tc, edje_test_edje_load);
tcase_add_test(tc, edje_test_simple_layout_geometry);
+ tcase_add_test(tc, edje_test_complex_layout);
}