ztest API Migration: bluetooth/bluetooth
Migrate the unit tests at `bluetooth/bluetooth` to use the new ztest API.
Signed-off-by: Tristan Honscheid <honscheid@google.com>
diff --git a/tests/bluetooth/bluetooth/prj.conf b/tests/bluetooth/bluetooth/prj.conf
index f43d042..2db2bc2 100644
--- a/tests/bluetooth/bluetooth/prj.conf
+++ b/tests/bluetooth/bluetooth/prj.conf
@@ -4,3 +4,4 @@
CONFIG_BT_DEBUG_LOG=y
CONFIG_UART_INTERRUPT_DRIVEN=n
CONFIG_ZTEST=y
+CONFIG_ZTEST_NEW_API=y
diff --git a/tests/bluetooth/bluetooth/src/bluetooth.c b/tests/bluetooth/bluetooth/src/bluetooth.c
index 5d7c7ac..9099d1f 100644
--- a/tests/bluetooth/bluetooth/src/bluetooth.c
+++ b/tests/bluetooth/bluetooth/src/bluetooth.c
@@ -42,18 +42,12 @@
bt_hci_driver_register(&drv);
}
-void test_bluetooth_entry(void)
+ZTEST_SUITE(test_bluetooth, NULL, NULL, NULL, NULL, NULL);
+
+ZTEST(test_bluetooth, test_bluetooth_entry)
{
driver_init();
zassert_true((bt_enable(NULL) == EXPECTED_ERROR),
"bt_enable failed");
}
-
-/*test case main entry*/
-void test_main(void)
-{
- ztest_test_suite(test_bluetooth,
- ztest_unit_test(test_bluetooth_entry));
- ztest_run_test_suite(test_bluetooth);
-}