Skip to content

Commit 85e1426

Browse files
committed
Fix unit tests
We have unit tests! They didn't match the spec, but they exist! One for two is still better than 0 for 2.
1 parent 8482015 commit 85e1426

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/app/tests/TestTimedHandler.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void TestTimedHandler::TestFollowingMessageFastEnough(MsgType aMsgType)
139139
EXPECT_EQ(delegate.mError, CHIP_NO_ERROR);
140140

141141
// Send an empty payload, which will error out but not with the
142-
// UNSUPPORTED_ACCESS status we expect if we miss our timeout.
142+
// TIMEOUT status we expect if we miss our timeout.
143143
payload = MessagePacketBuffer::New(0);
144144
ASSERT_FALSE(payload.IsNull());
145145

@@ -151,7 +151,7 @@ void TestTimedHandler::TestFollowingMessageFastEnough(MsgType aMsgType)
151151
mpTestContext->DrainAndServiceIO();
152152
EXPECT_TRUE(delegate.mNewMessageReceived);
153153
EXPECT_TRUE(delegate.mLastMessageWasStatus);
154-
EXPECT_NE(StatusIB(delegate.mError).mStatus, Status::UnsupportedAccess);
154+
EXPECT_NE(StatusIB(delegate.mError).mStatus, Status::Timeout);
155155
}
156156

157157
TEST_F(TestTimedHandler, TestInvokeFastEnough)
@@ -189,7 +189,7 @@ void TestTimedHandler::TestFollowingMessageTooSlow(MsgType aMsgType)
189189
chip::test_utils::SleepMillis(75);
190190

191191
// Send an empty payload, which will error out but not with the
192-
// UNSUPPORTED_ACCESS status we expect if we miss our timeout.
192+
// TIMEOUT status we expect if we miss our timeout.
193193
payload = MessagePacketBuffer::New(0);
194194
EXPECT_FALSE(payload.IsNull());
195195

@@ -201,7 +201,7 @@ void TestTimedHandler::TestFollowingMessageTooSlow(MsgType aMsgType)
201201
mpTestContext->DrainAndServiceIO();
202202
EXPECT_TRUE(delegate.mNewMessageReceived);
203203
EXPECT_TRUE(delegate.mLastMessageWasStatus);
204-
EXPECT_EQ(StatusIB(delegate.mError).mStatus, Status::UnsupportedAccess);
204+
EXPECT_EQ(StatusIB(delegate.mError).mStatus, Status::Timeout);
205205
}
206206

207207
TEST_F(TestTimedHandler, TestInvokeTooSlow)

0 commit comments

Comments
 (0)