diff options
author | Simon Glass <sjg@chromium.org> | 2025-05-02 08:46:36 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2025-05-30 09:49:32 +0100 |
commit | 5ea2b533ed037b8f6f89c33f13dcf6188ba9162d (patch) | |
tree | 27693101cd790dd29d9d2613f7ec5cce9816e200 /test | |
parent | e3c3f83cb6ce85ef541359fa46fd802e1b53494b (diff) |
expo: Line up all menu objects
At present labels are lined up vertically. Do the same with keys and
descriptions, since it looks nicer.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/boot/expo.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/boot/expo.c b/test/boot/expo.c index 2a430d3d482..70db33d48b1 100644 --- a/test/boot/expo.c +++ b/test/boot/expo.c @@ -576,6 +576,36 @@ static int expo_render_image(struct unit_test_state *uts) ut_asserteq(50 + 29, obj->bbox.x1); ut_asserteq(454 + 18, obj->bbox.y1); + /* same for the key */ + obj = scene_obj_find(scn, ITEM1_KEY, SCENEOBJT_NONE); + ut_assertnonnull(obj); + ut_asserteq(280, obj->bbox.x0); + ut_asserteq(436, obj->bbox.y0); + ut_asserteq(280 + 9, obj->bbox.x1); + ut_asserteq(436 + 18, obj->bbox.y1); + + obj = scene_obj_find(scn, ITEM2_KEY, SCENEOBJT_NONE); + ut_assertnonnull(obj); + ut_asserteq(280, obj->bbox.x0); + ut_asserteq(454, obj->bbox.y0); + ut_asserteq(280 + 9, obj->bbox.x1); + ut_asserteq(454 + 18, obj->bbox.y1); + + /* and the description */ + obj = scene_obj_find(scn, ITEM1_DESC, SCENEOBJT_NONE); + ut_assertnonnull(obj); + ut_asserteq(330, obj->bbox.x0); + ut_asserteq(436, obj->bbox.y0); + ut_asserteq(330 + 89, obj->bbox.x1); + ut_asserteq(436 + 18, obj->bbox.y1); + + obj = scene_obj_find(scn, ITEM2_DESC, SCENEOBJT_NONE); + ut_assertnonnull(obj); + ut_asserteq(330, obj->bbox.x0); + ut_asserteq(454, obj->bbox.y0); + ut_asserteq(330 + 89, obj->bbox.x1); + ut_asserteq(454 + 18, obj->bbox.y1); + /* check dimensions of menu */ obj = scene_obj_find(scn, OBJ_MENU, SCENEOBJT_NONE); ut_assertnonnull(obj); |