mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-11-24 09:20:04 +00:00
commit
a9a98c6f2d
@ -153,6 +153,7 @@ public:
|
||||
connectCb.OnDisconnected = OnDisconnected;
|
||||
connectCb.OnDataReceived = OnDataReceived;
|
||||
|
||||
LooperInit();
|
||||
SoftbusConfigInit();
|
||||
|
||||
NiceMock<ConnectionBleManagerInterfaceMock> bleMock;
|
||||
@ -161,7 +162,10 @@ public:
|
||||
g_bleInterface = ConnInitBle(&connectCb);
|
||||
ASSERT_NE(g_bleInterface, NULL);
|
||||
}
|
||||
void TearDown() override {};
|
||||
void TearDown() override
|
||||
{
|
||||
LooperDeinit();
|
||||
}
|
||||
};
|
||||
|
||||
void ConnectionBleManagerTest::TearDownTestCase()
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <securec.h>
|
||||
|
||||
#include "common_list.h"
|
||||
#include "message_handler.h"
|
||||
#include "conn_log.h"
|
||||
#include "softbus_conn_interface.h"
|
||||
#include "softbus_conn_manager.h"
|
||||
@ -88,12 +89,15 @@ public:
|
||||
|
||||
void ConnectionBleSwitchTest::SetUpTestCase(void)
|
||||
{
|
||||
LooperInit();
|
||||
SoftbusConfigInit();
|
||||
ConnServerInit();
|
||||
}
|
||||
|
||||
void ConnectionBleSwitchTest::TearDownTestCase(void)
|
||||
{}
|
||||
{
|
||||
LooperDeinit();
|
||||
}
|
||||
|
||||
void ConnectionBleSwitchTest::SetUp(void)
|
||||
{}
|
||||
|
@ -44,17 +44,23 @@ void DataReceivedCB(unsigned int connectionId, ConnModule moduleId, int64_t seq,
|
||||
class ConnectionBleTest : public testing::Test {
|
||||
public:
|
||||
static void SetUpTestCase();
|
||||
static void TearDownTestCase() {}
|
||||
static void TearDownTestCase();
|
||||
void SetUp() override {}
|
||||
void TearDown() override {}
|
||||
};
|
||||
|
||||
void ConnectionBleTest::SetUpTestCase()
|
||||
{
|
||||
LooperInit();
|
||||
SoftbusConfigInit();
|
||||
ConnServerInit();
|
||||
}
|
||||
|
||||
void ConnectionBleTest::TearDownTestCase()
|
||||
{
|
||||
LooperDeinit();
|
||||
}
|
||||
|
||||
/*
|
||||
* @tc.name: TransTest001
|
||||
* @tc.desc: Test ConnBlePackCtlMessage.
|
||||
|
@ -66,18 +66,24 @@ namespace OHOS {
|
||||
class ConnectionBleTransTest : public testing::Test {
|
||||
public:
|
||||
static void SetUpTestCase();
|
||||
static void TearDownTestCase() {}
|
||||
static void TearDownTestCase();
|
||||
void SetUp() override {}
|
||||
void TearDown() override {}
|
||||
};
|
||||
|
||||
void ConnectionBleTransTest::SetUpTestCase()
|
||||
{
|
||||
LooperInit();
|
||||
g_transEventListener.onPostBytesFinished = OnPostBytesFinished;
|
||||
int32_t ret = ConnBleInitTransModule(&g_transEventListener);
|
||||
EXPECT_EQ(SOFTBUS_OK, ret);
|
||||
}
|
||||
|
||||
void ConnectionBleTransTest::TearDownTestCase()
|
||||
{
|
||||
LooperDeinit();
|
||||
}
|
||||
|
||||
/*
|
||||
* @tc.name: TransRecv
|
||||
* @tc.desc: Test ConnCocTransRecv.
|
||||
|
@ -137,9 +137,15 @@ public:
|
||||
void TearDown();
|
||||
};
|
||||
|
||||
void ConnectionBrConnectionTest::SetUpTestCase(void){ }
|
||||
void ConnectionBrConnectionTest::SetUpTestCase(void)
|
||||
{
|
||||
LooperInit();
|
||||
}
|
||||
|
||||
void ConnectionBrConnectionTest::TearDownTestCase(void) { }
|
||||
void ConnectionBrConnectionTest::TearDownTestCase(void)
|
||||
{
|
||||
LooperDeinit();
|
||||
}
|
||||
|
||||
void ConnectionBrConnectionTest::SetUp(void) { }
|
||||
|
||||
@ -160,6 +166,7 @@ ConnectFuncInterface *g_connectFuncInterface = NULL;
|
||||
|
||||
ConnectFuncInterface *ConnInit(void)
|
||||
{
|
||||
LooperInit();
|
||||
ConnectCallback callback = {
|
||||
.OnConnected = OnConnected,
|
||||
.OnDisconnected = OnDisconnected,
|
||||
|
@ -190,11 +190,15 @@ public:
|
||||
|
||||
void ConnectionBrConnectionTest::SetUpTestCase(void)
|
||||
{
|
||||
LooperInit();
|
||||
SoftbusConfigInit();
|
||||
ConnServerInit();
|
||||
}
|
||||
|
||||
void ConnectionBrConnectionTest::TearDownTestCase(void) { }
|
||||
void ConnectionBrConnectionTest::TearDownTestCase(void)
|
||||
{
|
||||
LooperDeinit();
|
||||
}
|
||||
|
||||
void ConnectionBrConnectionTest::SetUp(void) { }
|
||||
|
||||
|
@ -101,12 +101,15 @@ public:
|
||||
|
||||
void ConnectionBrTest::SetUpTestCase(void)
|
||||
{
|
||||
LooperInit();
|
||||
SoftbusConfigInit();
|
||||
ConnServerInit();
|
||||
}
|
||||
|
||||
void ConnectionBrTest::TearDownTestCase(void)
|
||||
{}
|
||||
{
|
||||
LooperDeinit();
|
||||
}
|
||||
|
||||
void ConnectionBrTest::SetUp(void)
|
||||
{}
|
||||
|
Loading…
Reference in New Issue
Block a user