summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-06-01 19:22:50 +0300
committerTom Rini <trini@konsulko.com>2023-07-14 19:54:51 +0300
commitce72c9ec260d18cc127c275daf3ec1d18c230e2a (patch)
treefff5af8ebc7999e26e59f484a68754d6977cc6b3 /test
parentae45d6cf5a564851a9b9d58e05425e4cf1dfe8aa (diff)
downloadu-boot-ce72c9ec260d18cc127c275daf3ec1d18c230e2a.tar.xz
expo: Use flags for objects
We currently have just a 'hide' property for each object. In preparation for adding more properties, convert the struct to use a flags value, instead of individual booleans. This is more extensible. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/boot/expo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/boot/expo.c b/test/boot/expo.c
index 10cb7b246f..5088776f7b 100644
--- a/test/boot/expo.c
+++ b/test/boot/expo.c
@@ -372,7 +372,7 @@ static int expo_object_menu(struct unit_test_state *uts)
ut_asserteq(-4, prev1->obj.dim.x);
ut_asserteq(menu->obj.dim.y + 32, prev1->obj.dim.y);
- ut_asserteq(false, prev1->obj.hide);
+ ut_asserteq(false, prev1->obj.flags & SCENEOF_HIDE);
expo_destroy(exp);
@@ -488,10 +488,10 @@ static int expo_render_image(struct unit_test_state *uts)
/* make sure only the preview for the second item is shown */
obj = scene_obj_find(scn, ITEM1_PREVIEW, SCENEOBJT_NONE);
- ut_asserteq(true, obj->hide);
+ ut_asserteq(true, obj->flags & SCENEOF_HIDE);
obj = scene_obj_find(scn, ITEM2_PREVIEW, SCENEOBJT_NONE);
- ut_asserteq(false, obj->hide);
+ ut_asserteq(false, obj->flags & SCENEOF_HIDE);
/* select it */
ut_assertok(expo_send_key(exp, BKEY_SELECT));