Skip to content

Commit be8fd57

Browse files
committed
Expect statement checks if lock result matches "no locking" value.
1 parent 6069ea1 commit be8fd57

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/platform/tests/TestPlatformMgr.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -205,20 +205,18 @@ TEST_F(TestPlatformMgr, RunEventLoopStopBeforeSleep)
205205
PlatformMgr().Shutdown();
206206
}
207207

208-
#if !CHIP_SYSTEM_CONFIG_NO_LOCKING
209208
TEST_F(TestPlatformMgr, TryLockChipStack)
210209
{
211210
EXPECT_EQ(PlatformMgr().InitChipStack(), CHIP_NO_ERROR);
212211

213212
bool locked = PlatformMgr().TryLockChipStack();
214-
EXPECT_TRUE(locked);
213+
EXPECT_EQ(locked, !CHIP_SYSTEM_CONFIG_NO_LOCKING);
215214

216215
if (locked)
217216
PlatformMgr().UnlockChipStack();
218217

219218
PlatformMgr().Shutdown();
220219
}
221-
#endif
222220

223221
static int sEventRecieved = 0;
224222

0 commit comments

Comments
 (0)