continue fixing tests

This commit is contained in:
2024-11-07 13:18:47 +01:00
parent 8ef93705eb
commit 639b210666
14 changed files with 90 additions and 67 deletions

View File

@ -31,10 +31,25 @@ SharedPool *TestPoolOwner::getOptionalSharedPool() { return &sharedPool; }
ReturnValue_t TestPoolOwner::serializeHkDataset(structure_id_t structureId, uint8_t *buf,
size_t maxSize) {
return returnvalue::OK;
size_t dummy = 0;
if (structureId == testSid0) {
return set0.serialize(buf, dummy, maxSize, SerializeIF::Endianness::NETWORK);
}
if (structureId == testSid1) {
return set1.serialize(buf, dummy, maxSize, SerializeIF::Endianness::NETWORK);
}
if (structureId == testSid2) {
return set2.serialize(buf, dummy, maxSize, SerializeIF::Endianness::NETWORK);
}
return returnvalue::FAILED;
}
ReturnValue_t TestPoolOwner::specifyHkDatasets(std::vector<hk::SetSpecification> &setList) {
// For the first set, we explicitely associate a set with an ID ourselves.
setList.emplace_back(testSid0, set0.getSerializedSize(), 50);
// For the other sets, we can use getter functions of the same structure.
setList.emplace_back(set1.getStructureId(), set1.getSerializedSize(), 50);
setList.emplace_back(set2.getStructureId(), set2.getSerializedSize(), 50);
return returnvalue::OK;
}