tests: ztest: busysim: update to new ztest API

Use new ztest API.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2023-02-19 06:59:51 -05:00 committed by Carles Cufí
commit f548a159d1
2 changed files with 3 additions and 9 deletions

View file

@ -1,3 +1,4 @@
CONFIG_ZTEST=y
CONFIG_TEST_BUSY_SIM=y
CONFIG_ZTEST_THREAD_PRIORITY=1
CONFIG_ZTEST_NEW_API=y

View file

@ -7,7 +7,7 @@
#include <zephyr/ztest.h>
#include <zephyr/busy_sim.h>
static void test_busy_sim(void)
ZTEST(busy_sim, test_busy_sim)
{
uint32_t ms = 1000;
uint32_t delta = 80;
@ -41,11 +41,4 @@ static void test_busy_sim(void)
zassert_true((t > (ms - delta)) && (t < (ms + delta)));
}
void test_main(void)
{
ztest_test_suite(busy_sim_tests,
ztest_unit_test(test_busy_sim)
);
ztest_run_test_suite(busy_sim_tests);
}
ZTEST_SUITE(busy_sim, NULL, NULL, NULL, NULL, NULL);