diff options
author | Wyatt Hepler <hepler@google.com> | 2020-01-31 15:51:50 -0800 |
---|---|---|
committer | CQ Bot Account <commit-bot@chromium.org> | 2020-02-04 01:22:49 +0000 |
commit | ec4b9351ded3dfdeb3e525e4e72e33b8eb453ef1 (patch) | |
tree | 36967030c4e58c40ce95df10b039b2ec64b3cc96 /pw_kvs/key_value_store_test.cc | |
parent | da95edae34a3d53384aa71ff5751f43ee9b544ee (diff) | |
download | pigweed-ec4b9351ded3dfdeb3e525e4e72e33b8eb453ef1.tar.gz |
pw_kvs: Implement CRC16 checksum for KVS
- Create CRC16 implementation of pw::kvs::ChecksumAlgorithm.
- Add tests for the ChecksumAlgorithm class.
Change-Id: I3d7268e49c4eec06d61e113602ce24c05a3b0fa0
Diffstat (limited to 'pw_kvs/key_value_store_test.cc')
-rw-r--r-- | pw_kvs/key_value_store_test.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pw_kvs/key_value_store_test.cc b/pw_kvs/key_value_store_test.cc index b839d2ee6..e9baf249a 100644 --- a/pw_kvs/key_value_store_test.cc +++ b/pw_kvs/key_value_store_test.cc @@ -31,6 +31,7 @@ #include "gtest/gtest.h" #include "pw_checksum/ccitt_crc16.h" +#include "pw_kvs/crc16_checksum.h" #include "pw_kvs/flash_memory.h" #include "pw_kvs_private/format.h" #include "pw_kvs_private/macros.h" @@ -143,8 +144,8 @@ FlashPartition large_test_partition(&large_test_flash, FlashPartition& test_partition = FlashExternalTestPartition(); #endif // USE_MEMORY_BUFFER -// TODO: Need a checksum implementation (e.g. CRC16) to use for tests. -constexpr EntryHeaderFormat format{.magic = 0xBAD'C0D3, .checksum = nullptr}; +ChecksumCrc16 checksum; +constexpr EntryHeaderFormat format{.magic = 0xBAD'C0D3, .checksum = &checksum}; KeyValueStore kvs(&test_partition, format); |