From 37122f98d486e25e681814ff84cfe036c13a8ab1 Mon Sep 17 00:00:00 2001 From: AYA Date: Mon, 10 Jun 2024 19:12:18 +0200 Subject: [PATCH] integrating comments --- src/app/tests/TestInteractionModelEngine.cpp | 20 ++++++++++---------- src/app/tests/TestTimedHandler.cpp | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/app/tests/TestInteractionModelEngine.cpp b/src/app/tests/TestInteractionModelEngine.cpp index d75a3941e404e5..1e471da68b01af 100644 --- a/src/app/tests/TestInteractionModelEngine.cpp +++ b/src/app/tests/TestInteractionModelEngine.cpp @@ -296,7 +296,7 @@ TEST_F_FROM_FIXTURE(TestInteractionModelEngine, TestSubjectHasActiveSubscription // Create ExchangeContext Messaging::ExchangeContext * exchangeCtx1 = mpTestContext->NewExchangeToBob(nullptr, false); - EXPECT_TRUE(exchangeCtx1); + ASSERT_TRUE(exchangeCtx1); // InteractionModelEngine init EXPECT_EQ(CHIP_NO_ERROR, @@ -341,10 +341,10 @@ TEST_F_FROM_FIXTURE(TestInteractionModelEngine, TestSubjectHasActiveSubscription // Create ExchangeContexts Messaging::ExchangeContext * exchangeCtx1 = mpTestContext->NewExchangeToBob(nullptr, false); - EXPECT_TRUE(exchangeCtx1); + ASSERT_TRUE(exchangeCtx1); Messaging::ExchangeContext * exchangeCtx2 = mpTestContext->NewExchangeToBob(nullptr, false); - EXPECT_TRUE(exchangeCtx1); + ASSERT_TRUE(exchangeCtx1); // InteractionModelEngine init EXPECT_EQ(CHIP_NO_ERROR, @@ -400,10 +400,10 @@ TEST_F_FROM_FIXTURE(TestInteractionModelEngine, TestSubjectHasActiveSubscription // Create ExchangeContexts Messaging::ExchangeContext * exchangeCtx1 = mpTestContext->NewExchangeToBob(nullptr, false); - EXPECT_TRUE(exchangeCtx1); + ASSERT_TRUE(exchangeCtx1); Messaging::ExchangeContext * exchangeCtx2 = mpTestContext->NewExchangeToAlice(nullptr, false); - EXPECT_TRUE(exchangeCtx2); + ASSERT_TRUE(exchangeCtx2); // InteractionModelEngine init EXPECT_EQ(CHIP_NO_ERROR, @@ -476,16 +476,16 @@ TEST_F_FROM_FIXTURE(TestInteractionModelEngine, TestSubjectHasActiveSubscription // Create ExchangeContexts Messaging::ExchangeContext * exchangeCtx11 = mpTestContext->NewExchangeToBob(nullptr, false); - EXPECT_TRUE(exchangeCtx11); + ASSERT_TRUE(exchangeCtx11); Messaging::ExchangeContext * exchangeCtx12 = mpTestContext->NewExchangeToBob(nullptr, false); - EXPECT_TRUE(exchangeCtx12); + ASSERT_TRUE(exchangeCtx12); Messaging::ExchangeContext * exchangeCtx21 = mpTestContext->NewExchangeToAlice(nullptr, false); - EXPECT_TRUE(exchangeCtx21); + ASSERT_TRUE(exchangeCtx21); Messaging::ExchangeContext * exchangeCtx22 = mpTestContext->NewExchangeToAlice(nullptr, false); - EXPECT_TRUE(exchangeCtx22); + ASSERT_TRUE(exchangeCtx22); // InteractionModelEngine init EXPECT_EQ(CHIP_NO_ERROR, @@ -579,7 +579,7 @@ TEST_F_FROM_FIXTURE(TestInteractionModelEngine, TestSubjectHasActiveSubscription // Create ExchangeContexts Messaging::ExchangeContext * exchangeCtx = mpTestContext->NewExchangeToBob(nullptr, false); - EXPECT_TRUE(exchangeCtx); + ASSERT_TRUE(exchangeCtx); // Create readHandler ReadHandler * readHandler = engine->GetReadHandlerPool().CreateObject( diff --git a/src/app/tests/TestTimedHandler.cpp b/src/app/tests/TestTimedHandler.cpp index 73f263367af4b9..19f3a386fca10d 100644 --- a/src/app/tests/TestTimedHandler.cpp +++ b/src/app/tests/TestTimedHandler.cpp @@ -16,16 +16,16 @@ * limitations under the License. */ -#include - #include #include #include #include #include +#include #include #include #include +#include #include #include @@ -193,7 +193,7 @@ void TestTimedHandler::TestFollowingMessageTooSlow(MsgType aMsgType) TestExchangeDelegate delegate; ExchangeContext * exchange = pTestContext->NewExchangeToAlice(&delegate); - EXPECT_NE(exchange, nullptr); + ASSERT_NE(exchange, nullptr); EXPECT_FALSE(delegate.mNewMessageReceived);