From 68e8728b1ab59ce129f8013f28ae5a195f7a2b91 Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs Date: Fri, 30 Aug 2024 16:43:42 -0400 Subject: [PATCH] Cleanup up comments and useless static cast --- src/app/tests/TestSceneTable.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/tests/TestSceneTable.cpp b/src/app/tests/TestSceneTable.cpp index b087d04381ea14..7f03d5b1698bc7 100644 --- a/src/app/tests/TestSceneTable.cpp +++ b/src/app/tests/TestSceneTable.cpp @@ -1065,7 +1065,8 @@ TEST_F(TestSceneTable, TestHandlerFunctions) MockCCPairs[5].attributeID = MockAttributeId(kEnhancedColorMode); MockCCPairs[5].valueSigned8.SetValue(static_cast(-2)); // will cap to -1 MockCCPairs[6].attributeID = MockAttributeId(kColorLoopActiveId); - MockCCPairs[6].valueSigned16.SetValue(static_cast(0x7FFE)); // will cap to 0x7FFD in int16 + MockCCPairs[6].valueSigned16.SetValue( + static_cast(0x7FFE)); // will cap to 0x7FFD in int16 du to declared maximum in the attribute's mock metadata MockCCPairs[7].attributeID = MockAttributeId(kColorLoopDirectionId); MockCCPairs[7].valueSigned32.SetValue(-1); // will cap to -1 in int24 MockCCPairs[8].attributeID = MockAttributeId(kColorLoopTimeId); @@ -1279,9 +1280,9 @@ TEST_F(TestSceneTable, TestHandlerFunctions) // Verify that the output value is capped to uint40 max value uint64_t uint40Max = static_cast(0x000000FFFFFFFFFF); - EXPECT_EQ(uint40Max, static_cast(extensionFieldValueCapOut.attributeValueList[0].valueUnsigned64.Value())); + EXPECT_EQ(uint40Max, extensionFieldValueCapOut.attributeValueList[0].valueUnsigned64.Value()); - // Verify that the output value is not capped + // Verify that the output value is capped to int40 max value int64_t int40Max = static_cast(0x0000007FFFFFFFFF); EXPECT_EQ(int40Max, extensionFieldValueCapOut.attributeValueList[1].valueSigned64.Value());