Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f7217db authored by Chris Manton's avatar Chris Manton
Browse files

unittest: bta:: Use common log msg

Bug: 264590827
Tag: #refactor
Test: gd/cert/run
Change-Id: I4a1e7ee741e0c663173c5e63600a6efd52502511
parent 846078a2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -189,6 +189,7 @@ cc_test {
    test_suites: ["device-tests"],
    srcs: [
        ":TestMockStackBtm",
        ":TestCommonLogMsg",
        ":TestCommonMockFunctions",
        "test/bta_hf_client_test.cc",
        "test/bta_dm_cust_uuid_test.cc",
@@ -327,6 +328,7 @@ cc_test {
        "packages/modules/Bluetooth/system/utils/include",
    ],
    srcs: [
        ":TestCommonLogMsg",
        "test/bta_hf_client_add_record_test.cc",
    ],
    header_libs: ["libbluetooth_headers"],
@@ -933,6 +935,7 @@ cc_test {
    ],
    srcs : [
        ":TestMockMainShim",
        ":TestCommonLogMsg",
        ":TestCommonMainHandler",
        ":TestCommonMockFunctions",
        ":TestMockBtaGatt",
+0 −1
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ static uint16_t gVersion;
// coverage is enabled because the compiler is unable to eliminate the `if`
// checks against appl_trace_level in APPL_TRACE_* macros.
uint8_t appl_trace_level = 0;
void LogMsg(uint32_t trace_set_mask, const char* fmt_str, ...) {}
bool SDP_AddProtocolList(uint32_t handle, uint16_t num_elem,
                         tSDP_PROTOCOL_ELEM* p_elem_list) {
  return false;
+0 −4
Original line number Diff line number Diff line
@@ -34,10 +34,6 @@ const RawAddress bdaddr1({0x11, 0x22, 0x33, 0x44, 0x55, 0x66});
const RawAddress bdaddr2({0x66, 0x55, 0x44, 0x33, 0x22, 0x11});
}  // namespace

// TODO(jpawlowski): there is some weird dependency issue in tests, and the
// tests here fail to compile without this definition.
void LogMsg(uint32_t trace_set_mask, const char* fmt_str, ...) {}

class BtaHfClientTest : public testing::Test {
 protected:
  void SetUp() override {
+0 −1
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@
#include "test/mock/mock_osi_allocator.h"

uint8_t appl_trace_level = 0;
void LogMsg(uint32_t trace_set_mask, const char* fmt_str, ...) {}
uint8_t btif_trace_level = BT_TRACE_LEVEL_DEBUG;

namespace {