Refactor TMTC Stack, improve test framework #655

Merged
mohr merged 150 commits from mueller/refactor-tmtc-stack into development 2022-09-12 14:31:23 +02:00
2 changed files with 12 additions and 2 deletions
Showing only changes of commit 1b5fa2a8fa - Show all commits

View File

@ -146,4 +146,13 @@ TEST_CASE("PUS TM Creator", "[pus-tm-creator]") {
SerializeIF::BUFFER_TOO_SHORT);
}
}
SECTION("No CRC Generation") {
creator.disableCrcCalculation();
REQUIRE(not creator.crcCalculationEnabled());
REQUIRE(creator.serialize(dataPtr, serLen, buf.size()) == HasReturnvaluesIF::RETURN_OK);
REQUIRE(serLen == 22);
REQUIRE(buf[20] == 0x00);
REQUIRE(buf[21] == 0x00);
}
}

View File

@ -38,9 +38,10 @@ TEST_CASE("PUS TM Reader", "[pus-tm-reader]") {
readerPtr->setTimeReader(&timeStamperAndReader);
deleteReader = true;
}
REQUIRE(readerPtr);
REQUIRE(not readerPtr->isNull());
REQUIRE(not *readerPtr);
REQUIRE(readerPtr->isNull());
REQUIRE(readerPtr->parseDataWithCrcCheck() == HasReturnvaluesIF::RETURN_OK);
REQUIRE(not readerPtr->isNull());
REQUIRE(readerPtr->getService() == 17);
REQUIRE(readerPtr->getSubService() == 2);
REQUIRE(readerPtr->getApid() == 0xef);