Skip to content

Commit

Permalink
tests: Bluetooth: Fix minor issues for bap_base unit tests
Browse files Browse the repository at this point in the history
An unused variable was removed and some callbacks were
corrected.

Signed-off-by: Emil Gydesen <[email protected]>
  • Loading branch information
Thalley authored and nashif committed Sep 11, 2024
1 parent 069619a commit 594bef8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/bluetooth/audio/bap_base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr COMPONENTS unittest HINTS $ENV{ZEPHYR_BASE})

project(bluetooth_codec)
project(bluetooth_bap_base)

add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/audio/bap_base/uut uut)

Expand Down
13 changes: 8 additions & 5 deletions tests/bluetooth/audio/bap_base/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,8 @@ ZTEST_F(bap_base_test_suite, test_base_get_subgroup_codec_id_inval_param_null)

zassert_not_null(base);

ret = bt_bap_base_foreach_subgroup(base, test_base_get_subgroup_codec_id_cb, NULL);
ret = bt_bap_base_foreach_subgroup(
base, test_base_get_subgroup_codec_id_inval_param_null_cb, NULL);
zassert_equal(ret, 0, "Unexpected return value: %d", ret);
}

Expand Down Expand Up @@ -432,7 +433,8 @@ ZTEST_F(bap_base_test_suite, test_base_get_subgroup_codec_data_inval_param_null)

zassert_not_null(base);

ret = bt_bap_base_foreach_subgroup(base, test_base_get_subgroup_codec_data_cb, NULL);
ret = bt_bap_base_foreach_subgroup(
base, test_base_get_subgroup_codec_data_inval_param_null_cb, NULL);
zassert_equal(ret, 0, "Unexpected return value: %d", ret);
}

Expand Down Expand Up @@ -504,7 +506,8 @@ ZTEST_F(bap_base_test_suite, test_base_get_subgroup_codec_meta_inval_param_null)

zassert_not_null(base);

ret = bt_bap_base_foreach_subgroup(base, test_base_get_subgroup_codec_meta_cb, NULL);
ret = bt_bap_base_foreach_subgroup(
base, test_base_get_subgroup_codec_meta_inval_param_null_cb, NULL);
zassert_equal(ret, 0, "Unexpected return value: %d", ret);
}

Expand Down Expand Up @@ -582,7 +585,8 @@ ZTEST_F(bap_base_test_suite, test_base_subgroup_codec_to_codec_cfg_inval_param_n

zassert_not_null(base);

ret = bt_bap_base_foreach_subgroup(base, test_base_subgroup_codec_to_codec_cfg_cb, NULL);
ret = bt_bap_base_foreach_subgroup(
base, test_base_subgroup_codec_to_codec_cfg_inval_param_null_cb, NULL);
zassert_equal(ret, 0, "Unexpected return value: %d", ret);
}

Expand Down Expand Up @@ -649,7 +653,6 @@ test_bt_bap_base_subgroup_get_bis_indexes_cb(const struct bt_bap_base_subgroup *
ZTEST_F(bap_base_test_suite, test_bt_bap_base_subgroup_get_bis_indexes)
{
const struct bt_bap_base *base = bt_bap_base_get_base_from_ad(&fixture->valid_base_ad);
uint32_t bis_indexes;
int ret;

zassert_not_null(base);
Expand Down

0 comments on commit 594bef8

Please sign in to comment.