@@ -43,6 +43,8 @@ constexpr uint64_t kClientNodeId13 = 0x100003;
43
43
constexpr uint64_t kClientNodeId21 = 0x200001 ;
44
44
constexpr uint64_t kClientNodeId22 = 0x200002 ;
45
45
46
+ constexpr uint64_t kClientNodeMaxValue = std::numeric_limits<uint64_t >::max();
47
+
46
48
constexpr uint8_t kKeyBuffer0a [] = { 0xff , 0xff , 0xff , 0xff , 0xff , 0xff , 0xff , 0xff , 0xff , 0xff , 0xff , 0xff , 0xff , 0xff , 0xff };
47
49
constexpr uint8_t kKeyBuffer0b [] = { 0xff , 0xff , 0xff , 0xff , 0xff , 0xff , 0xff , 0xff , 0xff ,
48
50
0xff , 0xff , 0xff , 0xff , 0xff , 0xff , 0xff , 0xff };
@@ -98,6 +100,20 @@ TEST(TestICDMonitoringTable, TestEntryAssignationOverload)
98
100
EXPECT_TRUE (entry2.IsKeyEquivalent (ByteSpan (kKeyBuffer1a )));
99
101
}
100
102
103
+ TEST (TestICDMonitoringTable, TestEntryMaximumSize)
104
+ {
105
+ TestPersistentStorageDelegate storage;
106
+ TestSessionKeystoreImpl keystore;
107
+ ICDMonitoringTable table (storage, kTestFabricIndex1 , kMaxTestClients1 , &keystore);
108
+
109
+ ICDMonitoringEntry entry (&keystore);
110
+ entry.checkInNodeID = kClientNodeMaxValue ;
111
+ entry.monitoredSubject = kClientNodeMaxValue ;
112
+ entry.clientType = ClientTypeEnum::kPermanent ;
113
+ EXPECT_EQ (CHIP_NO_ERROR, entry.SetKey (ByteSpan (kKeyBuffer1a )));
114
+ EXPECT_EQ (CHIP_NO_ERROR, table.Set (0 , entry));
115
+ }
116
+
101
117
TEST (TestICDMonitoringTable, TestEntryKeyFunctions)
102
118
{
103
119
TestSessionKeystoreImpl keystore;
0 commit comments