Loading system/btif/Android.bp +3 −2 Original line number Diff line number Diff line Loading @@ -578,7 +578,6 @@ cc_test { ":TestCommonCoreInterface", ":TestCommonMainHandler", ":TestCommonMockFunctions", ":TestFakeOsi", ":TestMockAndroidHardware", ":TestMockBtaAg", ":TestMockBtaAr", Loading @@ -601,7 +600,6 @@ cc_test { ":TestMockBtaVc", ":TestMockBtcore", ":TestMockBtu", ":TestMockCommon", ":TestMockFrameworks", ":TestMockHci", ":TestMockMainShim", Loading Loading @@ -636,6 +634,7 @@ cc_test { "libbluetooth_crypto_toolbox", "libbluetooth_gd", "libbt-audio-hal-interface", "libbt-common", "libbt-platform-protos-lite", "libbt-sbc-decoder", "libbt-sbc-encoder", Loading @@ -651,6 +650,8 @@ cc_test { "libcom.android.sysprop.bluetooth.wrapped", "libevent", "libgmock", "libosi", "libprotobuf-cpp-lite", "libstatslog_bt", ], cflags: [ Loading system/btif/test/btif_hh_test.cc +2 −20 Original line number Diff line number Diff line Loading @@ -153,27 +153,9 @@ bthh_callbacks_t bthh_callbacks = { class BtifHhWithMockTest : public ::testing::Test { protected: void SetUp() override { reset_mock_function_count_map(); test::mock::osi_allocator::osi_malloc.body = [](size_t size) { return malloc(size); }; test::mock::osi_allocator::osi_calloc.body = [](size_t size) { return calloc(1UL, size); }; test::mock::osi_allocator::osi_free.body = [](void* ptr) { free(ptr); }; test::mock::osi_allocator::osi_free_and_reset.body = [](void** ptr) { free(*ptr); *ptr = nullptr; }; } void SetUp() override { reset_mock_function_count_map(); } void TearDown() override { test::mock::osi_allocator::osi_malloc = {}; test::mock::osi_allocator::osi_calloc = {}; test::mock::osi_allocator::osi_free = {}; test::mock::osi_allocator::osi_free_and_reset = {}; } void TearDown() override {} }; class BtifHhWithHalCallbacksTest : public BtifHhWithMockTest { Loading Loading
system/btif/Android.bp +3 −2 Original line number Diff line number Diff line Loading @@ -578,7 +578,6 @@ cc_test { ":TestCommonCoreInterface", ":TestCommonMainHandler", ":TestCommonMockFunctions", ":TestFakeOsi", ":TestMockAndroidHardware", ":TestMockBtaAg", ":TestMockBtaAr", Loading @@ -601,7 +600,6 @@ cc_test { ":TestMockBtaVc", ":TestMockBtcore", ":TestMockBtu", ":TestMockCommon", ":TestMockFrameworks", ":TestMockHci", ":TestMockMainShim", Loading Loading @@ -636,6 +634,7 @@ cc_test { "libbluetooth_crypto_toolbox", "libbluetooth_gd", "libbt-audio-hal-interface", "libbt-common", "libbt-platform-protos-lite", "libbt-sbc-decoder", "libbt-sbc-encoder", Loading @@ -651,6 +650,8 @@ cc_test { "libcom.android.sysprop.bluetooth.wrapped", "libevent", "libgmock", "libosi", "libprotobuf-cpp-lite", "libstatslog_bt", ], cflags: [ Loading
system/btif/test/btif_hh_test.cc +2 −20 Original line number Diff line number Diff line Loading @@ -153,27 +153,9 @@ bthh_callbacks_t bthh_callbacks = { class BtifHhWithMockTest : public ::testing::Test { protected: void SetUp() override { reset_mock_function_count_map(); test::mock::osi_allocator::osi_malloc.body = [](size_t size) { return malloc(size); }; test::mock::osi_allocator::osi_calloc.body = [](size_t size) { return calloc(1UL, size); }; test::mock::osi_allocator::osi_free.body = [](void* ptr) { free(ptr); }; test::mock::osi_allocator::osi_free_and_reset.body = [](void** ptr) { free(*ptr); *ptr = nullptr; }; } void SetUp() override { reset_mock_function_count_map(); } void TearDown() override { test::mock::osi_allocator::osi_malloc = {}; test::mock::osi_allocator::osi_calloc = {}; test::mock::osi_allocator::osi_free = {}; test::mock::osi_allocator::osi_free_and_reset = {}; } void TearDown() override {} }; class BtifHhWithHalCallbacksTest : public BtifHhWithMockTest { Loading