From f49e607881145ef06521f521e3b58c52cb3bbe7b Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 27 Jul 2023 15:07:14 +0200 Subject: [PATCH] finally it works --- unittests/cfdp/handler/testReservedMsgParser.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/unittests/cfdp/handler/testReservedMsgParser.cpp b/unittests/cfdp/handler/testReservedMsgParser.cpp index eeb4317e..eb6c1aa9 100644 --- a/unittests/cfdp/handler/testReservedMsgParser.cpp +++ b/unittests/cfdp/handler/testReservedMsgParser.cpp @@ -60,6 +60,12 @@ TEST_CASE("Reserved Message Parser", "[cfdp]") { CHECK(putRequest.getDestId().getWidth() == entityId.getWidth()); size_t sourceNameSize = 0; auto& sourceNameLv = putRequest.getSourceName(); - sourceNameLv.getString(sourceNameSize); + const char* sourceString = sourceNameLv.getString(sourceNameSize); CHECK(sourceNameSize == srcFileName.size()); + CHECK(std::strncmp(sourceString, srcFileName.c_str(), sourceNameSize) == 0); + size_t destNameSize = 0; + auto& destNameLv = putRequest.getDestName(); + const char* destString = destNameLv.getString(destNameSize); + CHECK(destNameSize == destFileName.size()); + CHECK(std::strncmp(destString, destFileName.c_str(), destNameSize) == 0); }