Skip to content

Commit 231706e

Browse files
test
1 parent 9a73544 commit 231706e

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

tests/unit/test_tcat.cpp

+10-9
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,9 @@ extern "C" {
7676
class TestBleSecure
7777
{
7878
public:
79-
static void HandleBleSecureConnect(otInstance *aInstance, bool aConnected, bool aBleConnectionOpen, void *aContext)
80-
{
81-
OT_UNUSED_VARIABLE(aInstance);
82-
83-
static_cast<TestBleSecure *>(aContext)->HandleBleSecureConnect(aConnected, aBleConnectionOpen);
84-
}
79+
otHandleBleSecureConnect HandleBleSecureConnect;
8580

86-
void HandleBleSecureConnect(bool aConnected, bool BleConnectionOpen)
81+
void HandleBleSecureConnect2(bool aConnected, bool BleConnectionOpen)
8782
{
8883
mIsConnected = aConnected;
8984
mIsBleConnectionOpen = BleConnectionOpen;
@@ -97,6 +92,12 @@ class TestBleSecure
9792
bool mIsBleConnectionOpen = false;
9893
};
9994

95+
void HandleBleSecureConnect(otInstance *aInstance, bool aConnected, bool aBleConnectionOpen, void *aContext)
96+
{
97+
OT_UNUSED_VARIABLE(aInstance);
98+
99+
static_cast<TestBleSecure *>(aContext)->HandleBleSecureConnect2(aConnected, aBleConnectionOpen);
100+
}
100101

101102
void TestTcat(void)
102103
{
@@ -120,8 +121,8 @@ void TestTcat(void)
120121

121122
// Validate BLE secure and Tcat start APIs
122123
VerifyOrQuit(otBleSecureTcatStart(instance, &mVendorInfo, nullptr) == kErrorInvalidState);
123-
SuccessOrQuit(otBleSecureStart(instance, &ble.HandleBleSecureConnect, nullptr, true, &ble));
124-
VerifyOrQuit(otBleSecureStart(instance, &ble.HandleBleSecureConnect, nullptr, true, nullptr) == kErrorAlready);
124+
SuccessOrQuit(otBleSecureStart(instance, ble.HandleBleSecureConnect, nullptr, true, &ble));
125+
VerifyOrQuit(otBleSecureStart(instance, ble.HandleBleSecureConnect, nullptr, true, nullptr) == kErrorAlready);
125126
SuccessOrQuit(otBleSecureTcatStart(instance, &mVendorInfo, nullptr));
126127

127128
// Validate connection callbacks when platform informs that peer has connected/disconnected

0 commit comments

Comments
 (0)