ztest API Migration: bluetooth/ll_settings
Migrate the unit tests at `bluetooth/ll_settings` to use the new ztest API.
Signed-off-by: Tristan Honscheid <honscheid@google.com>
diff --git a/tests/bluetooth/ll_settings/prj.conf b/tests/bluetooth/ll_settings/prj.conf
index ab13303..eddcfe8 100644
--- a/tests/bluetooth/ll_settings/prj.conf
+++ b/tests/bluetooth/ll_settings/prj.conf
@@ -1,5 +1,6 @@
CONFIG_TEST=y
CONFIG_ZTEST=y
+CONFIG_ZTEST_NEW_API=y
CONFIG_BT=y
CONFIG_BT_CTLR=y
diff --git a/tests/bluetooth/ll_settings/src/main.c b/tests/bluetooth/ll_settings/src/main.c
index 27c6b9c..faf277f 100644
--- a/tests/bluetooth/ll_settings/src/main.c
+++ b/tests/bluetooth/ll_settings/src/main.c
@@ -14,7 +14,9 @@
#include "ll_settings.h"
-void test_company_id(void)
+ZTEST_SUITE(test_ll_settings, NULL, NULL, NULL, NULL, NULL);
+
+ZTEST(test_ll_settings, test_company_id)
{
uint16_t cid;
int err;
@@ -32,7 +34,7 @@
"Company ID does not match");
}
-void test_subversion_number(void)
+ZTEST(test_ll_settings, test_subversion_number)
{
uint16_t svn;
int err;
@@ -49,12 +51,3 @@
zassert_equal(ll_settings_subversion_number(), svn,
"Subversion number does not match");
}
-
-/*test case main entry*/
-void test_main(void)
-{
- ztest_test_suite(test_ll_settings,
- ztest_unit_test(test_company_id),
- ztest_unit_test(test_subversion_number));
- ztest_run_test_suite(test_ll_settings);
-}