Skip to content

Commit

Permalink
Unused variable issue in UT
Browse files Browse the repository at this point in the history
  • Loading branch information
disa6302 committed Oct 10, 2023
1 parent a803fcc commit 1d7d36d
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions tst/DtlsApiTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,19 @@ TEST_F(DtlsApiTest, createCertificateAndKey_Returns_Success)

TEST_F(DtlsApiTest, dtlsSessionIsInitFinished_Null_Check)
{
PDtlsSession pClient = NULL;
BOOL isDtlsConnected = FALSE;
EXPECT_EQ(STATUS_NULL_ARG, dtlsSessionIsInitFinished(pClient, &isDtlsConnected));
EXPECT_EQ(FALSE, isDtlsConnected);
PDtlsSession pClient = NULL;
BOOL isDtlsConnected = FALSE;
DtlsSessionCallbacks callbacks;
TIMER_QUEUE_HANDLE timerQueueHandle = INVALID_TIMER_QUEUE_HANDLE_VALUE;
EXPECT_EQ(STATUS_SUCCESS, timerQueueCreate(&timerQueueHandle));
EXPECT_EQ(STATUS_NULL_ARG, dtlsSessionIsInitFinished(pClient, &isDtlsConnected));
EXPECT_EQ(FALSE, isDtlsConnected);
EXPECT_EQ(STATUS_SUCCESS, createDtlsSession(&callbacks, timerQueueHandle, 0, FALSE, NULL, &pClient));
EXPECT_EQ(STATUS_NULL_ARG, dtlsSessionIsInitFinished(pClient, NULL));
freeDtlsSession(&pClient);
EXPECT_EQ(NULL, pClient);
timerQueueFree(&timerQueueHandle);

}

TEST_F(DtlsApiTest, dtlsSessionCreated_RefCount)
Expand All @@ -49,7 +58,6 @@ TEST_F(DtlsApiTest, dtlsProcessPacket_Api_Check)
{
DtlsSessionCallbacks callbacks;
PDtlsSession pClient = NULL;
BOOL isDtlsConnected = FALSE;
INT32 length;
TIMER_QUEUE_HANDLE timerQueueHandle = INVALID_TIMER_QUEUE_HANDLE_VALUE;
EXPECT_EQ(STATUS_NULL_ARG, dtlsSessionProcessPacket(pClient, NULL, &length));
Expand Down

0 comments on commit 1d7d36d

Please sign in to comment.