@@ -32,15 +32,15 @@ TEST(TestSimpleSessionResumptionStorage, TestLink)
32
32
sessionStorage.Init (&storage);
33
33
34
34
chip::SimpleSessionResumptionStorage::ResumptionIdStorage resumptionId;
35
- EXPECT_EQ ( chip::Crypto::DRBG_get_bytes (resumptionId.data (), resumptionId.size ()), CHIP_NO_ERROR);
35
+ EXPECT_EQ (chip::Crypto::DRBG_get_bytes (resumptionId.data (), resumptionId.size ()), CHIP_NO_ERROR);
36
36
37
- EXPECT_EQ ( sessionStorage.SaveLink (resumptionId, chip::ScopedNodeId (node1, fabric1)), CHIP_NO_ERROR);
37
+ EXPECT_EQ (sessionStorage.SaveLink (resumptionId, chip::ScopedNodeId (node1, fabric1)), CHIP_NO_ERROR);
38
38
39
39
chip::ScopedNodeId node;
40
- EXPECT_EQ ( sessionStorage.LoadLink (resumptionId, node), CHIP_NO_ERROR);
40
+ EXPECT_EQ (sessionStorage.LoadLink (resumptionId, node), CHIP_NO_ERROR);
41
41
EXPECT_EQ (node, chip::ScopedNodeId (node1, fabric1));
42
42
43
- EXPECT_EQ ( sessionStorage.DeleteLink (resumptionId), CHIP_NO_ERROR);
43
+ EXPECT_EQ (sessionStorage.DeleteLink (resumptionId), CHIP_NO_ERROR);
44
44
45
45
EXPECT_EQ (sessionStorage.LoadLink (resumptionId, node), CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND);
46
46
}
@@ -54,26 +54,27 @@ TEST(TestSimpleSessionResumptionStorage, TestState)
54
54
chip::ScopedNodeId node (node1, fabric1);
55
55
56
56
chip::SimpleSessionResumptionStorage::ResumptionIdStorage resumptionId;
57
- EXPECT_EQ ( chip::Crypto::DRBG_get_bytes (resumptionId.data (), resumptionId.size ()), CHIP_NO_ERROR);
57
+ EXPECT_EQ (chip::Crypto::DRBG_get_bytes (resumptionId.data (), resumptionId.size ()), CHIP_NO_ERROR);
58
58
59
59
chip::Crypto::P256ECDHDerivedSecret sharedSecret;
60
60
sharedSecret.SetLength (sharedSecret.Capacity ());
61
- EXPECT_EQ ( chip::Crypto::DRBG_get_bytes (sharedSecret.Bytes (), sharedSecret.Length ()), CHIP_NO_ERROR);
61
+ EXPECT_EQ (chip::Crypto::DRBG_get_bytes (sharedSecret.Bytes (), sharedSecret.Length ()), CHIP_NO_ERROR);
62
62
63
63
chip::CATValues peerCATs;
64
64
65
- EXPECT_EQ ( sessionStorage.SaveState (node, resumptionId, sharedSecret, peerCATs), CHIP_NO_ERROR);
65
+ EXPECT_EQ (sessionStorage.SaveState (node, resumptionId, sharedSecret, peerCATs), CHIP_NO_ERROR);
66
66
67
67
chip::SimpleSessionResumptionStorage::ResumptionIdStorage resumptionId2;
68
68
chip::Crypto::P256ECDHDerivedSecret sharedSecret2;
69
69
chip::CATValues peerCATs2;
70
- EXPECT_EQ ( sessionStorage.LoadState (node, resumptionId2, sharedSecret2, peerCATs2), CHIP_NO_ERROR);
70
+ EXPECT_EQ (sessionStorage.LoadState (node, resumptionId2, sharedSecret2, peerCATs2), CHIP_NO_ERROR);
71
71
EXPECT_EQ (resumptionId, resumptionId2);
72
72
EXPECT_EQ (memcmp (sharedSecret.Bytes (), sharedSecret2.Bytes (), sharedSecret.Length ()), 0 );
73
73
74
- EXPECT_EQ ( sessionStorage.DeleteState (node), CHIP_NO_ERROR);
74
+ EXPECT_EQ (sessionStorage.DeleteState (node), CHIP_NO_ERROR);
75
75
76
- EXPECT_EQ ( sessionStorage.LoadState (node, resumptionId2, sharedSecret2, peerCATs2), CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND);
76
+ EXPECT_EQ (sessionStorage.LoadState (node, resumptionId2, sharedSecret2, peerCATs2),
77
+ CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND);
77
78
}
78
79
79
80
TEST (TestSimpleSessionResumptionStorage, TestIndex)
@@ -85,14 +86,14 @@ TEST(TestSimpleSessionResumptionStorage, TestIndex)
85
86
chip::ScopedNodeId node (node1, fabric1);
86
87
87
88
chip::DefaultSessionResumptionStorage::SessionIndex index0o;
88
- EXPECT_EQ ( sessionStorage.LoadIndex (index0o), CHIP_NO_ERROR);
89
+ EXPECT_EQ (sessionStorage.LoadIndex (index0o), CHIP_NO_ERROR);
89
90
EXPECT_EQ (index0o.mSize , 0u );
90
91
91
92
chip::DefaultSessionResumptionStorage::SessionIndex index1;
92
93
index1.mSize = 0 ;
93
- EXPECT_EQ ( sessionStorage.SaveIndex (index1), CHIP_NO_ERROR);
94
+ EXPECT_EQ (sessionStorage.SaveIndex (index1), CHIP_NO_ERROR);
94
95
chip::DefaultSessionResumptionStorage::SessionIndex index1o;
95
- EXPECT_EQ ( sessionStorage.LoadIndex (index1o), CHIP_NO_ERROR);
96
+ EXPECT_EQ (sessionStorage.LoadIndex (index1o), CHIP_NO_ERROR);
96
97
EXPECT_EQ (index1o.mSize , 0u );
97
98
98
99
chip::DefaultSessionResumptionStorage::SessionIndex index2;
0 commit comments