Skip to content

Commit 68e8728

Browse files
Cleanup up comments and useless static cast
1 parent 64dbdd2 commit 68e8728

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/app/tests/TestSceneTable.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,8 @@ TEST_F(TestSceneTable, TestHandlerFunctions)
10651065
MockCCPairs[5].attributeID = MockAttributeId(kEnhancedColorMode);
10661066
MockCCPairs[5].valueSigned8.SetValue(static_cast<int8_t>(-2)); // will cap to -1
10671067
MockCCPairs[6].attributeID = MockAttributeId(kColorLoopActiveId);
1068-
MockCCPairs[6].valueSigned16.SetValue(static_cast<int16_t>(0x7FFE)); // will cap to 0x7FFD in int16
1068+
MockCCPairs[6].valueSigned16.SetValue(
1069+
static_cast<int16_t>(0x7FFE)); // will cap to 0x7FFD in int16 du to declared maximum in the attribute's mock metadata
10691070
MockCCPairs[7].attributeID = MockAttributeId(kColorLoopDirectionId);
10701071
MockCCPairs[7].valueSigned32.SetValue(-1); // will cap to -1 in int24
10711072
MockCCPairs[8].attributeID = MockAttributeId(kColorLoopTimeId);
@@ -1279,9 +1280,9 @@ TEST_F(TestSceneTable, TestHandlerFunctions)
12791280

12801281
// Verify that the output value is capped to uint40 max value
12811282
uint64_t uint40Max = static_cast<uint64_t>(0x000000FFFFFFFFFF);
1282-
EXPECT_EQ(uint40Max, static_cast<uint64_t>(extensionFieldValueCapOut.attributeValueList[0].valueUnsigned64.Value()));
1283+
EXPECT_EQ(uint40Max, extensionFieldValueCapOut.attributeValueList[0].valueUnsigned64.Value());
12831284

1284-
// Verify that the output value is not capped
1285+
// Verify that the output value is capped to int40 max value
12851286
int64_t int40Max = static_cast<int64_t>(0x0000007FFFFFFFFF);
12861287
EXPECT_EQ(int40Max, extensionFieldValueCapOut.attributeValueList[1].valueSigned64.Value());
12871288

0 commit comments

Comments
 (0)