Skip to content

Commit 5b02c3c

Browse files
committed
Fix review
1 parent 511693a commit 5b02c3c

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/platform/tests/TestConnectivityMgr.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ struct TestConnectivityMgr : public ::testing::Test
5252
{
5353
auto err = chip::Platform::MemoryInit();
5454
EXPECT_EQ(err, CHIP_NO_ERROR);
55+
// TODO: Move initialization of the platform manager from Init test to here
5556
}
5657

5758
static void TearDownTestSuite()
@@ -60,6 +61,7 @@ struct TestConnectivityMgr : public ::testing::Test
6061
chip::DeviceLayer::PlatformMgr().Shutdown();
6162
}
6263
};
64+
6365
TEST_F(TestConnectivityMgr, Init)
6466
{
6567
// ConfigurationManager is initialized from PlatformManager indirectly

src/platform/tests/TestDnssd.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ static void HandleResolve(void * context, DnssdService * result, const chip::Spa
119119
}
120120

121121
EXPECT_EQ(result->mTextEntrySize, 1u);
122-
EXPECT_EQ(strcmp(result->mTextEntries[0].mKey, "key"), 0);
123-
EXPECT_EQ(strcmp(reinterpret_cast<const char *>(result->mTextEntries[0].mData), "val"), 0);
122+
EXPECT_STREQ(result->mTextEntries[0].mKey, "key");
123+
EXPECT_STREQ(reinterpret_cast<const char *>(result->mTextEntries[0].mData), "val");
124124

125125
if (ctx->mBrowsedServicesCount == ++ctx->mResolvedServicesCount)
126126
{
@@ -143,7 +143,7 @@ static void HandleBrowse(void * context, DnssdService * services, size_t service
143143
auto * ctx = static_cast<TestDnssd *>(context);
144144

145145
// Make sure that we will not be called again after end-of-input is set
146-
EXPECT_EQ(ctx->mEndOfInput, false);
146+
EXPECT_FALSE(ctx->mEndOfInput);
147147
// Cancelled error is expected when the browse is stopped with
148148
// ChipDnssdStopBrowse(), so we will not assert on it.
149149
EXPECT_TRUE(error == CHIP_NO_ERROR || error == CHIP_ERROR_CANCELLED);

src/platform/tests/TestPlatformMgr.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ TEST_F(TestPlatformMgr, BasicRunEventLoop)
146146

147147
PlatformMgr().ScheduleWork(StopTheLoop);
148148

149-
EXPECT_TRUE(!stopRan);
149+
EXPECT_FALSE(stopRan);
150150
PlatformMgr().RunEventLoop();
151151
EXPECT_TRUE(stopRan);
152152
EXPECT_EQ(stopResult, CHIP_NO_ERROR);
@@ -172,8 +172,8 @@ TEST_F(TestPlatformMgr, RunEventLoopTwoTasks)
172172
PlatformMgr().ScheduleWork(SleepSome);
173173
PlatformMgr().ScheduleWork(StopTheLoop);
174174

175-
EXPECT_TRUE(!stopRan);
176-
EXPECT_TRUE(!sleepRan);
175+
EXPECT_FALSE(stopRan);
176+
EXPECT_FALSE(sleepRan);
177177
PlatformMgr().RunEventLoop();
178178
EXPECT_TRUE(stopRan);
179179
EXPECT_TRUE(sleepRan);

0 commit comments

Comments
 (0)