From 498040073694519fa536a9083d5856e131c11ed9 Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Tue, 28 Sep 2021 23:31:57 +0000 Subject: [PATCH] Fix tests and fuzzing --- fuzzing/TopicTree.cpp | 2 +- tests/TopicTree.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fuzzing/TopicTree.cpp b/fuzzing/TopicTree.cpp index d344fffc1..b71114ccf 100644 --- a/fuzzing/TopicTree.cpp +++ b/fuzzing/TopicTree.cpp @@ -11,7 +11,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { /* Create topic tree */ - uWS::TopicTree topicTree([](uWS::Subscriber *s, std::string &message, auto flags) { + uWS::TopicTree topicTree([](uWS::Subscriber *s, std::string &message, auto flags) { /* Depending on what publishing we do below (with or without empty strings), * this assumption can hold true or not. For now it should hold true */ diff --git a/tests/TopicTree.cpp b/tests/TopicTree.cpp index da5e3cadd..0f4dd9251 100644 --- a/tests/TopicTree.cpp +++ b/tests/TopicTree.cpp @@ -13,11 +13,11 @@ void testCorrectness() { std::cout << "TestCorrectness" << std::endl; - uWS::TopicTree *topicTree; + uWS::TopicTree *topicTree; std::map expectedResult; std::map actualResult; - topicTree = new uWS::TopicTree([&topicTree, &actualResult](uWS::Subscriber *s, std::string &message, auto flags) { + topicTree = new uWS::TopicTree([&topicTree, &actualResult](uWS::Subscriber *s, std::string &message, auto flags) { actualResult[s] += message; @@ -88,11 +88,11 @@ void testCorrectness() { void testBugReport() { std::cout << "TestBugReport" << std::endl; - uWS::TopicTree *topicTree; + uWS::TopicTree *topicTree; std::map expectedResult; std::map actualResult; - topicTree = new uWS::TopicTree([&topicTree, &actualResult](uWS::Subscriber *s, std::string &message, auto flags) { + topicTree = new uWS::TopicTree([&topicTree, &actualResult](uWS::Subscriber *s, std::string &message, auto flags) { actualResult[s] += message; @@ -149,11 +149,11 @@ void testBugReport() { void testReorderingv19() { std::cout << "TestReorderingv19" << std::endl; - uWS::TopicTree *topicTree; + uWS::TopicTree *topicTree; std::map expectedResult; std::map actualResult; - topicTree = new uWS::TopicTree([&topicTree, &actualResult](uWS::Subscriber *s, std::string &message, auto flags) { + topicTree = new uWS::TopicTree([&topicTree, &actualResult](uWS::Subscriber *s, std::string &message, auto flags) { actualResult[s] += message;