From c2728f95086c54aa842e4c1dae8f3b5c290a72fa Mon Sep 17 00:00:00 2001 From: Matteo Martincigh Date: Mon, 7 Oct 2019 12:35:21 +0100 Subject: IVGCVSW-3937 Refactor and improve the CommandHandleRegistry class * Added simplified RegisterFunctor method * Code refactoring * Updated the unit tests accordingly Signed-off-by: Matteo Martincigh Change-Id: Iee941d898facd9c1ab5366e87c611c99a0468830 --- src/profiling/test/ProfilingTests.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/profiling/test') diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp index ba1e6cfa5a..91568d111d 100644 --- a/src/profiling/test/ProfilingTests.cpp +++ b/src/profiling/test/ProfilingTests.cpp @@ -154,7 +154,7 @@ BOOST_AUTO_TEST_CASE(CheckCommandHandler) ConnectionAcknowledgedCommandHandler connectionAcknowledgedCommandHandler(1, 4194304, profilingStateMachine); CommandHandlerRegistry commandHandlerRegistry; - commandHandlerRegistry.RegisterFunctor(&connectionAcknowledgedCommandHandler, 1, 4194304); + commandHandlerRegistry.RegisterFunctor(&connectionAcknowledgedCommandHandler); profilingStateMachine.TransitionToState(ProfilingState::NotConnected); profilingStateMachine.TransitionToState(ProfilingState::WaitingForAck); @@ -388,9 +388,9 @@ BOOST_AUTO_TEST_CASE(CheckCommandHandlerRegistry) CommandHandlerRegistry registry; // Register multiple different derived classes - registry.RegisterFunctor(&testFunctorA, testFunctorA.GetPacketId(), testFunctorA.GetVersion()); - registry.RegisterFunctor(&testFunctorB, testFunctorB.GetPacketId(), testFunctorB.GetVersion()); - registry.RegisterFunctor(&testFunctorC, testFunctorC.GetPacketId(), testFunctorC.GetVersion()); + registry.RegisterFunctor(&testFunctorA); + registry.RegisterFunctor(&testFunctorB); + registry.RegisterFunctor(&testFunctorC); std::unique_ptr packetDataA; std::unique_ptr packetDataB; -- cgit v1.2.1