tests: lib: spsc_pbuf: Convert to use new ztest API

Convert test to use new API.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2022-05-18 15:20:40 +02:00 committed by Carles Cufí
parent 715ae32501
commit 8c79ed2610
2 changed files with 3 additions and 8 deletions

View file

@ -1,2 +1,3 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_SPSC_PBUF=y

View file

@ -13,7 +13,7 @@
*/
static uint8_t memory_area[216] __aligned(4);
static void test_spsc_pbuf_ut(void)
ZTEST(test_spsc_pbuf, test_spsc_pbuf_ut)
{
static uint8_t rbuf[198];
static uint8_t message[20] = {'a'};
@ -99,10 +99,4 @@ static void test_spsc_pbuf_ut(void)
zassert_equal(message[0], 'a', NULL);
}
void test_main(void)
{
ztest_test_suite(spsc_pbuf,
ztest_unit_test(test_spsc_pbuf_ut)
);
ztest_run_test_suite(spsc_pbuf);
}
ZTEST_SUITE(test_spsc_pbuf, NULL, NULL, NULL, NULL, NULL);