PUS TM creator tests done

This commit is contained in:
2022-07-22 17:09:44 +02:00
parent f28b9ea61b
commit cecaec6007
10 changed files with 110 additions and 73 deletions

View File

@ -85,10 +85,7 @@ TEST_CASE("PUS TC Creator", "[pus-tc-creator]") {
SECTION("Test with Application Data Serializable") {
auto& params = creator.getPusParams();
auto simpleSer = SimpleSerializable();
creator.setSerializableAppData(&simpleSer);
auto& dataWrapper = creator.getDataWrapper();
REQUIRE(dataWrapper.type == ecss::DataTypes::SERIALIZABLE);
REQUIRE(dataWrapper.dataUnion.serializable == &simpleSer);
creator.setSerializableUserData(&simpleSer);
REQUIRE(creator.getSerializedSize() == 16);
REQUIRE(creator.serialize(&dataPtr, &serLen, buf.size()) == HasReturnvaluesIF::RETURN_OK);
REQUIRE(serLen == 16);