tests: drivers: dac: move the dac loopback test to new ztest API
Migrate the testsuite tests/drivers/dac/dac_loopback to the new ztest API. Signed-off-by: Enjia Mai <enjia.mai@intel.com>
This commit is contained in:
parent
40e44a4b3e
commit
4b90e788f6
3 changed files with 4 additions and 25 deletions
|
@ -1,4 +1,5 @@
|
|||
CONFIG_ZTEST=y
|
||||
CONFIG_ZTEST_NEW_API=y
|
||||
|
||||
CONFIG_DAC=y
|
||||
CONFIG_ADC=y
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Libre Solar Technologies GmbH
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup t_driver_dac
|
||||
* @{
|
||||
* @defgroup t_dac_loopback test_dac_loopback
|
||||
* @}
|
||||
*/
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/ztest.h>
|
||||
|
||||
extern void test_dac_loopback(void);
|
||||
|
||||
void test_main(void)
|
||||
{
|
||||
ztest_test_suite(dac_loopback_test,
|
||||
ztest_unit_test(test_dac_loopback));
|
||||
ztest_run_test_suite(dac_loopback_test);
|
||||
}
|
|
@ -234,7 +234,9 @@ static int test_task_loopback(void)
|
|||
return TC_PASS;
|
||||
}
|
||||
|
||||
void test_dac_loopback(void)
|
||||
ZTEST(dac_loopback, test_dac_loopback)
|
||||
{
|
||||
zassert_true(test_task_loopback() == TC_PASS, NULL);
|
||||
}
|
||||
|
||||
ZTEST_SUITE(dac_loopback, NULL, NULL, NULL, NULL, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue