tests: drivers: kscan: move to new ztest API
Move drivers kscan tests to use new ztest API Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
This commit is contained in:
parent
aee3a2189b
commit
d366334568
|
@ -1,3 +1,3 @@
|
|||
CONFIG_KSCAN=y
|
||||
CONFIG_ZTEST=y
|
||||
|
||||
CONFIG_ZTEST_NEW_API=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_KSCAN=y
|
||||
CONFIG_TEST_USERSPACE=y
|
||||
CONFIG_ZTEST=y
|
||||
CONFIG_ZTEST_NEW_API=y
|
||||
|
|
|
@ -7,13 +7,4 @@
|
|||
|
||||
#include <zephyr/ztest.h>
|
||||
|
||||
void test_init_callback(void);
|
||||
void test_control_callback(void);
|
||||
|
||||
void test_main(void)
|
||||
{
|
||||
ztest_test_suite(kscan_basic_test,
|
||||
ztest_unit_test(test_init_callback),
|
||||
ztest_unit_test(test_control_callback));
|
||||
ztest_run_test_suite(kscan_basic_test);
|
||||
}
|
||||
ZTEST_SUITE(kscan_basic, NULL, NULL, NULL, NULL, NULL);
|
||||
|
|
|
@ -80,7 +80,7 @@ static int test_disable_enable_callback(void)
|
|||
return TC_PASS;
|
||||
}
|
||||
|
||||
void test_init_callback(void)
|
||||
ZTEST(kscan_basic, test_init_callback)
|
||||
{
|
||||
/* Configure kscan matrix with an appropriate callback */
|
||||
zassert_true(test_kb_callback() == TC_PASS);
|
||||
|
@ -90,7 +90,7 @@ void test_init_callback(void)
|
|||
zassert_true(test_null_callback() == TC_PASS);
|
||||
}
|
||||
|
||||
void test_control_callback(void)
|
||||
ZTEST(kscan_basic, test_control_callback)
|
||||
{
|
||||
/* Disable/enable notifications to user */
|
||||
zassert_true(test_disable_enable_callback() == TC_PASS);
|
||||
|
|
Loading…
Reference in a new issue