diff --git a/tests/lib/custom_lib/prj.conf b/tests/lib/custom_lib/prj.conf index f70c400..b0d275a 100644 --- a/tests/lib/custom_lib/prj.conf +++ b/tests/lib/custom_lib/prj.conf @@ -1,2 +1,3 @@ CONFIG_ZTEST=y +CONFIG_ZTEST_NEW_API=y CONFIG_CUSTOM_LIB=y diff --git a/tests/lib/custom_lib/src/main.c b/tests/lib/custom_lib/src/main.c index 25477e2..6b3a4b9 100644 --- a/tests/lib/custom_lib/src/main.c +++ b/tests/lib/custom_lib/src/main.c @@ -15,7 +15,7 @@ #include #include -static void test_get_value(void) +ZTEST(custom_lib, test_get_value) { /* Verify standard behavior */ 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"); } -void test_main(void) -{ - ztest_test_suite(lib_custom_lib_test, - ztest_unit_test(test_get_value) - ); - - ztest_run_test_suite(lib_custom_lib_test); -} +ZTEST_SUITE(custom_lib, NULL, NULL, NULL, NULL, NULL);