From 984816373dbb86ac0da7c7477d50275ba0c8ea40 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 18 Aug 2021 18:20:19 +0200 Subject: [PATCH] some error cases --- .../src/fsfw_tests/unit/globalfunctions/testDleEncoder.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/src/fsfw_tests/unit/globalfunctions/testDleEncoder.cpp b/tests/src/fsfw_tests/unit/globalfunctions/testDleEncoder.cpp index b484e7cb..01ac3568 100644 --- a/tests/src/fsfw_tests/unit/globalfunctions/testDleEncoder.cpp +++ b/tests/src/fsfw_tests/unit/globalfunctions/testDleEncoder.cpp @@ -54,6 +54,13 @@ TEST_CASE("DleEncoder" , "[DleEncoder]") { REQUIRE(buffer[idx] == expected[idx]); } REQUIRE(encodedLen == expected.size()); + + result = dleEncoder.encode(TEST_ARRAY_3.data(), TEST_ARRAY_3.size(), + buffer.data(), 0, &encodedLen); + REQUIRE(result == DleEncoder::STREAM_TOO_SHORT); + result = dleEncoder.encode(TEST_ARRAY_1.data(), TEST_ARRAY_1.size(), + buffer.data(), 4, &encodedLen); + REQUIRE(result == DleEncoder::STREAM_TOO_SHORT); } SECTION("Decoding") {