Files
u-boot/test/boot/expo_common.h
Simon Glass c4544d59f0 expo: Add a test helper for clicking on objects
Provide a way to click on an object and check that the expected action
resulted. Put it in a common file so it can be used by cedit and expo
tests.

Tidy up the include-order in both cedit and expo.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-15 13:23:13 -06:00

34 lines
788 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Common functions for expo tests
*
* Copyright 2025 Simon Glass <sjg@chromium.org>
*/
#ifndef __expo_common_h
#define __expo_common_h
#include <linux/types.h>
enum expoact_type;
struct expo_action;
struct scene;
struct unit_test_state;
/**
* click_check() - Click on an object and check the resulting action type
*
* Clicks halfway along the object, 5 pixels from the top
*
* @uts: Test state
* @scn: Scene containing the object
* @id: ID of object to click on
* @expect_type: Expected action type
* @act: Returns the action from the click
* Returns: 0 if OK, 1 if assertion failed
*/
int click_check(struct unit_test_state *uts, struct scene *scn, uint id,
enum expoact_type expect_type, struct expo_action *act);
#endif