some more tests added
This commit is contained in:
parent
e55f74a00e
commit
33823b445c
@ -592,7 +592,7 @@ ReturnValue_t LocalDataPoolManager::handleHousekeepingMessage(
|
|||||||
store_address_t storeId;
|
store_address_t storeId;
|
||||||
gp_id_t globPoolId = HousekeepingMessage::getUpdateSnapshotVariableCommand(message,
|
gp_id_t globPoolId = HousekeepingMessage::getUpdateSnapshotVariableCommand(message,
|
||||||
&storeId);
|
&storeId);
|
||||||
bool clearMessage = true;
|
bool clearMessage = true;
|
||||||
owner->handleChangedPoolVariable(globPoolId, storeId, &clearMessage);
|
owner->handleChangedPoolVariable(globPoolId, storeId, &clearMessage);
|
||||||
if(clearMessage) {
|
if(clearMessage) {
|
||||||
message->clear();
|
message->clear();
|
||||||
|
@ -96,11 +96,11 @@ union gp_id_t {
|
|||||||
return raw == INVALID_GPID;
|
return raw == INVALID_GPID;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator==(const sid_t& other) const {
|
bool operator==(const gp_id_t& other) const {
|
||||||
return raw == other.raw;
|
return raw == other.raw;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator!=(const sid_t& other) const {
|
bool operator!=(const gp_id_t& other) const {
|
||||||
return not (raw == other.raw);
|
return not (raw == other.raw);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -67,7 +67,9 @@ void arrayprinter::printHex(const uint8_t *data, size_t size,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if FSFW_DISABLE_PRINTOUT == 0
|
||||||
printf("[%s]\n", printBuffer);
|
printf("[%s]\n", printBuffer);
|
||||||
|
#endif /* FSFW_DISABLE_PRINTOUT == 0 */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,7 +110,9 @@ void arrayprinter::printDec(const uint8_t *data, size_t size,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if FSFW_DISABLE_PRINTOUT == 0
|
||||||
printf("[%s]\n", printBuffer);
|
printf("[%s]\n", printBuffer);
|
||||||
|
#endif /* FSFW_DISABLE_PRINTOUT == 0 */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -362,7 +362,21 @@ TEST_CASE("LocalPoolManagerTest" , "[LocManTest]") {
|
|||||||
gp_id_t gpidToCheck;
|
gp_id_t gpidToCheck;
|
||||||
CHECK(poolOwner->poolManager.handleHousekeepingMessage(&hkCmd) == retval::CATCH_OK);
|
CHECK(poolOwner->poolManager.handleHousekeepingMessage(&hkCmd) == retval::CATCH_OK);
|
||||||
CHECK(poolOwner->changedVariableCallbackWasCalled(gpidToCheck, storeId) == true);
|
CHECK(poolOwner->changedVariableCallbackWasCalled(gpidToCheck, storeId) == true);
|
||||||
CHECK(gpidToCheck == lpool::testSid);
|
CHECK(gpidToCheck == lpool::uint8VarGpid);
|
||||||
|
|
||||||
|
HousekeepingMessage::setUpdateSnapshotSetCommand(&hkCmd, lpool::testSid,
|
||||||
|
storeId::INVALID_STORE_ADDRESS);
|
||||||
|
CHECK(poolOwner->poolManager.handleHousekeepingMessage(&hkCmd) == retval::CATCH_OK);
|
||||||
|
CHECK(poolOwner->changedDataSetCallbackWasCalled(sidToCheck, storeId) == true);
|
||||||
|
CHECK(sidToCheck == lpool::testSid);
|
||||||
|
|
||||||
|
HousekeepingMessage::setUpdateSnapshotVariableCommand(&hkCmd, lpool::uint8VarGpid,
|
||||||
|
storeId::INVALID_STORE_ADDRESS);
|
||||||
|
CHECK(poolOwner->poolManager.handleHousekeepingMessage(&hkCmd) == retval::CATCH_OK);
|
||||||
|
CHECK(poolOwner->changedVariableCallbackWasCalled(gpidToCheck, storeId) == true);
|
||||||
|
CHECK(gpidToCheck == lpool::uint8VarGpid);
|
||||||
|
|
||||||
|
poolOwner->poolManager.printPoolEntry(lpool::uint8VarId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user