Commit cf0166d6fb9235e4dc0fcfa7fc9cfd743a40c98e

Authored by Peter M. Groen
1 parent 37906d07

Added extra topic counter

Showing 1 changed file with 4 additions and 2 deletions
test/TopicLengthTest.cpp
... ... @@ -12,6 +12,8 @@
12 12 using namespace osdev::components::mqtt;
13 13 using namespace osdev::components::log;
14 14  
  15 +static const std::string main_topic = "test/";
  16 +
15 17 /****************************************************************************
16 18 * H E L P E R C L A S S E S
17 19 ****************************************************************************/
... ... @@ -62,8 +64,8 @@ class TopicTester
62 64 for(int nCount = 1; nCount < max_number_of_chars; nCount++)
63 65 {
64 66 std::string subtopic(nCount, 'a');
65   - std::string topic = std::string("topics/" + subtopic);
66   - std::string message(std::to_string(topic.size()));
  67 + std::string topic = std::string(main_topic + subtopic);
  68 + std::string message(std::to_string(topic.size()) + " (" + std::to_string(subtopic.size()) + ")");
67 69  
68 70 m_publisher->publish(topic, message);
69 71 }
... ...