some error cases

This commit is contained in:
Robin Müller 2021-08-18 18:20:19 +02:00
parent 57b13731e0
commit 984816373d
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -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") {