From 0dc41e579d300e2cd45f791cf9f09c375fac60b1 Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Wed, 18 Dec 2013 10:55:12 +0200 Subject: [PATCH] android/tester: Check return status for enable() Use check_expected_status helper for test for returned status in enable() HAL call. --- android/android-tester.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/android/android-tester.c b/android/android-tester.c index 5f0669825..2f65bd6be 100644 --- a/android/android-tester.c +++ b/android/android-tester.c @@ -542,7 +542,8 @@ fail: static const struct generic_data bluetooth_enable_success_test = { .expected_hal_callbacks = {ADAPTER_PROPS, ADAPTER_STATE_CHANGED_ON, - ADAPTER_TEST_END} + ADAPTER_TEST_END}, + .expected_adapter_status = BT_STATUS_SUCCESS }; static const struct generic_data bluetooth_enable_done_test = { @@ -783,10 +784,12 @@ static void teardown(const void *test_data) static void test_enable(const void *test_data) { struct test_data *data = tester_get_data(); + bt_status_t adapter_status; init_test_conditions(data); - data->if_bluetooth->enable(); + adapter_status = data->if_bluetooth->enable(); + check_expected_status(adapter_status); } static void test_enable_done(const void *test_data) -- 2.47.3