Skip to content

Commit 8c79ed2

Browse files
nordic-krchcarlescufi
authored andcommitted
tests: lib: spsc_pbuf: Convert to use new ztest API
Convert test to use new API. Signed-off-by: Krzysztof Chruscinski <[email protected]>
1 parent 715ae32 commit 8c79ed2

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

tests/lib/spsc_pbuf/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
CONFIG_ZTEST=y
2+
CONFIG_ZTEST_NEW_API=y
23
CONFIG_SPSC_PBUF=y

tests/lib/spsc_pbuf/src/main.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414
static uint8_t memory_area[216] __aligned(4);
1515

16-
static void test_spsc_pbuf_ut(void)
16+
ZTEST(test_spsc_pbuf, test_spsc_pbuf_ut)
1717
{
1818
static uint8_t rbuf[198];
1919
static uint8_t message[20] = {'a'};
@@ -99,10 +99,4 @@ static void test_spsc_pbuf_ut(void)
9999
zassert_equal(message[0], 'a', NULL);
100100
}
101101

102-
void test_main(void)
103-
{
104-
ztest_test_suite(spsc_pbuf,
105-
ztest_unit_test(test_spsc_pbuf_ut)
106-
);
107-
ztest_run_test_suite(spsc_pbuf);
108-
}
102+
ZTEST_SUITE(test_spsc_pbuf, NULL, NULL, NULL, NULL, NULL);

0 commit comments

Comments
 (0)