tests: custom_lib: port to the new ztest API
Align with the latest upstream API. Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
parent
c7a42920d8
commit
ede90a457c
|
@ -1,2 +1,3 @@
|
||||||
CONFIG_ZTEST=y
|
CONFIG_ZTEST=y
|
||||||
|
CONFIG_ZTEST_NEW_API=y
|
||||||
CONFIG_CUSTOM_LIB=y
|
CONFIG_CUSTOM_LIB=y
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include <zephyr/ztest.h>
|
#include <zephyr/ztest.h>
|
||||||
#include <custom_lib/custom_lib.h>
|
#include <custom_lib/custom_lib.h>
|
||||||
|
|
||||||
static void test_get_value(void)
|
ZTEST(custom_lib, test_get_value)
|
||||||
{
|
{
|
||||||
/* Verify standard behavior */
|
/* Verify standard behavior */
|
||||||
zassert_equal(custom_lib_get_value(INT_MIN), INT_MIN,
|
zassert_equal(custom_lib_get_value(INT_MIN), INT_MIN,
|
||||||
|
@ -37,11 +37,4 @@ static void test_get_value(void)
|
||||||
"get_value failed input of 0");
|
"get_value failed input of 0");
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_main(void)
|
ZTEST_SUITE(custom_lib, NULL, NULL, NULL, NULL, NULL);
|
||||||
{
|
|
||||||
ztest_test_suite(lib_custom_lib_test,
|
|
||||||
ztest_unit_test(test_get_value)
|
|
||||||
);
|
|
||||||
|
|
||||||
ztest_run_test_suite(lib_custom_lib_test);
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue