feat(datastore): add getter for uint16_t

This commit is contained in:
fallenoak 2023-02-06 22:56:31 -06:00
parent c1c685bdca
commit 1113e846da
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
3 changed files with 29 additions and 0 deletions

View file

@ -21,6 +21,18 @@ TEST_CASE("CDataStore::Get", "[datastore]") {
REQUIRE(readVal == writeVal);
}
SECTION("gets uint16_t") {
uint16_t writeVal = 0x1234;
uint16_t readVal = -1;
CDataStore msg;
msg.Put(writeVal);
msg.Finalize();
msg.Get(readVal);
REQUIRE(readVal == writeVal);
}
SECTION("gets uint32_t") {
uint32_t writeVal = 0x12345678;
uint32_t readVal = 0x12345678;