From 5303bfc5fe9aed2a3e84b3d7eaadfecf44cc97f6 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 30 Sep 2024 16:07:35 +0200 Subject: [PATCH] Fix unit tests after arcus change --- tests/arcus/MockSocket.cpp | 5 +++-- tests/arcus/MockSocket.h | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/arcus/MockSocket.cpp b/tests/arcus/MockSocket.cpp index df41690a41..a6860202c4 100644 --- a/tests/arcus/MockSocket.cpp +++ b/tests/arcus/MockSocket.cpp @@ -21,9 +21,10 @@ void MockSocket::reset() { /* Do nothing. */ } -void MockSocket::sendMessage(Arcus::MessagePtr message) +bool MockSocket::sendMessage(Arcus::MessagePtr message) { sent_messages.push_back(message); + return true; } Arcus::MessagePtr MockSocket::takeNextMessage() @@ -45,4 +46,4 @@ Arcus::MessagePtr MockSocket::popMessageFromSendQueue() return result; } -} // namespace cura \ No newline at end of file +} // namespace cura diff --git a/tests/arcus/MockSocket.h b/tests/arcus/MockSocket.h index 272720f216..9bed7467e0 100644 --- a/tests/arcus/MockSocket.h +++ b/tests/arcus/MockSocket.h @@ -4,9 +4,10 @@ #ifndef MOCKSOCKET_H #define MOCKSOCKET_H -#include //Inheriting from this to be able to swap this socket in the tested class. #include //History of sent and received messages. +#include //Inheriting from this to be able to swap this socket in the tested class. + namespace cura { @@ -27,7 +28,7 @@ class MockSocket : public Arcus::Socket void reset() override; // Catch these functions so that we can see whether they are called. - void sendMessage(Arcus::MessagePtr message) override; + bool sendMessage(Arcus::MessagePtr message) override; Arcus::MessagePtr takeNextMessage() override; // Helpers to store send and received messages. @@ -39,4 +40,4 @@ class MockSocket : public Arcus::Socket // NOLINTEND(misc-non-private-member-variables-in-classes) } // namespace cura -#endif // MOCKSOCKET_H \ No newline at end of file +#endif // MOCKSOCKET_H