Lines Matching full:checksum
15 #include "pw_kvs/checksum.h"
30 TEST(Checksum, UpdateAndVerify) { in TEST() argument
38 TEST(Checksum, Verify_Failure) { in TEST() argument
44 TEST(Checksum, Verify_InvalidSize) { in TEST() argument
51 TEST(Checksum, Verify_LargerState_ComparesToTruncatedData) { in TEST() argument
61 TEST(Checksum, Reset) { in TEST() argument
72 IgnoreChecksum checksum; in TEST() local
74 EXPECT_EQ(OkStatus(), checksum.Verify({})); in TEST()
78 IgnoreChecksum checksum; in TEST() local
80 EXPECT_EQ(OkStatus(), checksum.Verify(std::as_bytes(std::span(kString)))); in TEST()
84 IgnoreChecksum checksum; in TEST() local
86 checksum.Update(std::as_bytes(std::span(kString))); in TEST()
87 EXPECT_EQ(OkStatus(), checksum.Verify({})); in TEST()
121 PickyChecksum checksum; in TEST() local
124 checksum.Update(kBytes.subspan(0, 1)); in TEST()
125 checksum.Update(kBytes.subspan(1, 9)); in TEST()
128 checksum.Update(kBytes.subspan(10, 11)); in TEST()
131 checksum.Update(kBytes.subspan(21, 11)); in TEST()
134 checksum.Update(kBytes.subspan(32, 66)); in TEST()
137 checksum.Update(kBytes.subspan(98, 0)); in TEST()
140 checksum.Update(kBytes.subspan(98, 2)); in TEST()
142 auto state = checksum.Finish(); in TEST()
146 EXPECT_EQ(OkStatus(), checksum.Verify(kBytes)); in TEST()