some improvements for test
This commit is contained in:
parent
6c6b552059
commit
8ddd6eb18d
@ -111,13 +111,14 @@ TEST_CASE("CFDP Source Handler", "[cfdp]") {
|
|||||||
SECTION("Transfer empty file") {
|
SECTION("Transfer empty file") {
|
||||||
CHECK(sourceHandler.transactionStart(putRequest, cfg) == OK);
|
CHECK(sourceHandler.transactionStart(putRequest, cfg) == OK);
|
||||||
|
|
||||||
|
size_t expectedFileSize = 0;
|
||||||
SourceHandler::FsmResult& fsmResult = sourceHandler.stateMachine();
|
SourceHandler::FsmResult& fsmResult = sourceHandler.stateMachine();
|
||||||
// Verify metadata PDU was sent.
|
// Verify metadata PDU was sent.
|
||||||
genericMetadataCheck(fsmResult, 0);
|
genericMetadataCheck(fsmResult, expectedFileSize);
|
||||||
|
|
||||||
fsmResult = sourceHandler.stateMachine();
|
fsmResult = sourceHandler.stateMachine();
|
||||||
// Verify EOF PDU was sent. No file data PDU is sent for an empty file.
|
// Verify EOF PDU was sent. No file data PDU is sent for an empty file and the checksum is 0.
|
||||||
genericEofCheck(fsmResult, 0, 0);
|
genericEofCheck(fsmResult, expectedFileSize, 0);
|
||||||
|
|
||||||
CHECK(sourceHandler.getStep() == SourceHandler::TransactionStep::IDLE);
|
CHECK(sourceHandler.getStep() == SourceHandler::TransactionStep::IDLE);
|
||||||
CHECK(sourceHandler.getState() == CfdpState::IDLE);
|
CHECK(sourceHandler.getState() == CfdpState::IDLE);
|
||||||
|
Loading…
Reference in New Issue
Block a user