Skip to content

Commit 548396f

Browse files
committed
NULL -> nullptr for unit tests
1 parent 62e3bca commit 548396f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tst/DualStackEndpointsTest.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ TEST_F(DualStackEndpointsTest, customControlPlaneEndpointBasicCase)
1414
STATUS retStatus;
1515
ChannelInfo channelInfo;
1616
MEMSET(&channelInfo, 0, SIZEOF(channelInfo));
17-
PChannelInfo pChannelInfo = NULL;
17+
PChannelInfo pChannelInfo =. nullptr;
1818
CHAR originalCustomControlPlaneUrl[MAX_CONTROL_PLANE_URI_CHAR_LEN] = "https://kinesisvideo.us-west-2.api.aws";
1919
CHAR validatedCustomControlPlaneUrl[MAX_CONTROL_PLANE_URI_CHAR_LEN] = {0};
2020

@@ -28,7 +28,7 @@ TEST_F(DualStackEndpointsTest, customControlPlaneEndpointBasicCase)
2828
channelInfo.pChannelName = "TestChannelName";
2929

3030
EXPECT_EQ(STATUS_SUCCESS, createValidateChannelInfo(&channelInfo, &pChannelInfo));
31-
EXPECT_NE(NULL, pChannelInfo);
31+
EXPECT_NE(nullptr, pChannelInfo);
3232

3333
// Validate the ChannelInfo's Control Plane URL against the originalCustomControlPlaneUrl.
3434
EXPECT_STREQ(pChannelInfo->pControlPlaneUrl, (PCHAR) originalCustomControlPlaneUrl);
@@ -41,7 +41,7 @@ TEST_F(DualStackEndpointsTest, customControlPlaneEndpointEdgeCases)
4141
STATUS retStatus;
4242
ChannelInfo channelInfo;
4343
MEMSET(&channelInfo, 0, SIZEOF(channelInfo));
44-
PChannelInfo pChannelInfo = NULL;
44+
PChannelInfo pChannelInfo = nullptr;
4545

4646
// TODO: Verify why we use MAX_URI_CHAR_LEN instead of MAX_CONTROL_PLANE_URI_CHAR_LEN for the custom URL.
4747
// MAX_URI_CHAR_LEN does not include the null terminator, so add 1.
@@ -74,7 +74,7 @@ TEST_F(DualStackEndpointsTest, customControlPlaneEndpointEdgeCases)
7474
channelInfo.pControlPlaneUrl = (PCHAR) validatedCustomControlPlaneUrl;
7575

7676
EXPECT_EQ(STATUS_SUCCESS, createValidateChannelInfo(&channelInfo, &pChannelInfo));
77-
EXPECT_NE(NULL, pChannelInfo);
77+
EXPECT_NE(nullptr, pChannelInfo);
7878

7979
// Validate the ChannelInfo's Control Plane URL against originalCustomControlPlaneUrl in case createValidateChannelInfo
8080
// modified validatedCustomControlPlaneUrl.
@@ -90,7 +90,7 @@ TEST_F(DualStackEndpointsTest, customControlPlaneEndpointEdgeCases)
9090
channelInfo.pControlPlaneUrl = (PCHAR) validatedCustomControlPlaneUrl;
9191

9292
EXPECT_EQ(STATUS_SUCCESS, createValidateChannelInfo(&channelInfo, &pChannelInfo));
93-
EXPECT_NE(NULL, pChannelInfo);
93+
EXPECT_NE(nullptr, pChannelInfo);
9494

9595
// Validate the ChannelInfo's Control Plane URL should be the default one the SDK generated.
9696
EXPECT_STREQ(pChannelInfo->pControlPlaneUrl, (PCHAR) expectedSdkGeneratedUri);
@@ -99,10 +99,10 @@ TEST_F(DualStackEndpointsTest, customControlPlaneEndpointEdgeCases)
9999

100100
/* NULL URL ARRAY (expect SDK to construct a proper URL) */
101101

102-
channelInfo.pControlPlaneUrl = (PCHAR) NULL;
102+
channelInfo.pControlPlaneUrl = nullptr;
103103

104104
EXPECT_EQ(STATUS_SUCCESS, createValidateChannelInfo(&channelInfo, &pChannelInfo));
105-
EXPECT_NE(NULL, pChannelInfo);
105+
EXPECT_NE(nullptr, pChannelInfo);
106106

107107
EXPECT_STREQ(pChannelInfo->pControlPlaneUrl, (PCHAR) expectedSdkGeneratedUri);
108108
freeChannelInfo(&pChannelInfo);
@@ -114,7 +114,7 @@ TEST_F(DualStackEndpointsTest, customControlPlaneEndpointTooLong)
114114
STATUS retStatus;
115115
ChannelInfo channelInfo;
116116
MEMSET(&channelInfo, 0, SIZEOF(channelInfo));
117-
PChannelInfo pChannelInfo = NULL;
117+
PChannelInfo pChannelInfo = nullptr;
118118

119119

120120
/* Exceed MAX URL ARRAY LENGTH (expect SDK to error out) */

0 commit comments

Comments
 (0)