You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/03/29 09:04:27 UTC
[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #1035: MINIFI-1354: Memory leaks in nanofi and its unittests
adamdebreceni commented on a change in pull request #1035:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1035#discussion_r603127503
##########
File path: nanofi/tests/CLogAggregatorTests.cpp
##########
@@ -31,18 +31,19 @@
#include "CTestsBase.h"
-void test_lists_equal(token_list * tknlist, const std::vector<std::string>& sv) {
+void test_lists_equal(const token_list * tknlist, const std::vector<std::string>& sv) {
REQUIRE(tknlist != NULL);
if (sv.empty()) {
Review comment:
```suggestion
REQUIRE(tknlist->size == sv.size());
token_node *node = tknlist->head;
for (const auto& s : sv) {
REQUIRE(node);
REQUIRE(strcmp(s.c_str(), node->data) == 0);
node = node->next;
}
REQUIRE(node == nullptr);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org