ztest API Migration: bluetooth/at

Migrate the unit tests at `bluetooth/at` to use the new ztest API.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
This commit is contained in:
Tristan Honscheid 2021-11-11 13:49:31 -07:00 committed by Carles Cufí
commit 7e7855d669
2 changed files with 3 additions and 10 deletions

View file

@ -3,4 +3,5 @@ CONFIG_BT_BREDR=y
CONFIG_BT_HFP_HF=y
CONFIG_NET_BUF=y
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_SERIAL=y

View file

@ -43,8 +43,9 @@ int at_resp(struct at_client *hf_at, struct net_buf *buf)
return 0;
}
ZTEST_SUITE(at_tests, NULL, NULL, NULL, NULL, NULL);
static void test_at(void)
ZTEST(at_tests, test_at)
{
struct net_buf *buf;
int len;
@ -65,12 +66,3 @@ static void test_at(void)
zassert_equal(at_parse_input(&at, buf), 0, "Parsing failed");
}
void test_main(void)
{
ztest_test_suite(at_tests,
ztest_unit_test(test_at)
);
ztest_run_test_suite(at_tests);
}