From cf0166d6fb9235e4dc0fcfa7fc9cfd743a40c98e Mon Sep 17 00:00:00 2001 From: Peter M. Groen Date: Fri, 9 Jun 2023 00:52:15 +0200 Subject: [PATCH] Added extra topic counter --- test/TopicLengthTest.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/TopicLengthTest.cpp b/test/TopicLengthTest.cpp index 980a0ab..b36bc78 100644 --- a/test/TopicLengthTest.cpp +++ b/test/TopicLengthTest.cpp @@ -12,6 +12,8 @@ using namespace osdev::components::mqtt; using namespace osdev::components::log; +static const std::string main_topic = "test/"; + /**************************************************************************** * H E L P E R C L A S S E S ****************************************************************************/ @@ -62,8 +64,8 @@ class TopicTester for(int nCount = 1; nCount < max_number_of_chars; nCount++) { std::string subtopic(nCount, 'a'); - std::string topic = std::string("topics/" + subtopic); - std::string message(std::to_string(topic.size())); + std::string topic = std::string(main_topic + subtopic); + std::string message(std::to_string(topic.size()) + " (" + std::to_string(subtopic.size()) + ")"); m_publisher->publish(topic, message); } -- libgit2 0.21.4