From 149528e88c081e71fc7ec78e0c301eb2e487adfc Mon Sep 17 00:00:00 2001 From: Matteo Martincigh Date: Thu, 5 Sep 2019 12:02:04 +0100 Subject: IVGCVSW-3691 Basic refactoring in view of upcoming work in the profiler Change-Id: Iea4550b864fc2adb04a3a2411a7ead06b1f60ab9 Signed-off-by: Matteo Martincigh --- src/profiling/test/SendCounterPacketTests.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/profiling/test/SendCounterPacketTests.cpp') diff --git a/src/profiling/test/SendCounterPacketTests.cpp b/src/profiling/test/SendCounterPacketTests.cpp index 5309560c88..626a5a6589 100644 --- a/src/profiling/test/SendCounterPacketTests.cpp +++ b/src/profiling/test/SendCounterPacketTests.cpp @@ -68,7 +68,7 @@ public: memcpy(buffer, message.c_str(), static_cast(message.size()) + 1); } - void SendCounterDirectoryPacket(const Category& category, const std::vector& counters) override + void SendCounterDirectoryPacket(const CounterDirectory& counterDirectory) override { std::string message("SendCounterDirectoryPacket"); unsigned int reserved = 0; @@ -114,9 +114,8 @@ BOOST_AUTO_TEST_CASE(MockSendCounterPacketTest) BOOST_TEST(strcmp(buffer, "SendStreamMetaDataPacket") == 0); - Category category; - std::vector counters; - sendCounterPacket.SendCounterDirectoryPacket(category, counters); + CounterDirectory counterDirectory(1, "counter_directory", 0, 0, 0); + sendCounterPacket.SendCounterDirectoryPacket(counterDirectory); BOOST_TEST(strcmp(buffer, "SendCounterDirectoryPacket") == 0); @@ -144,7 +143,7 @@ BOOST_AUTO_TEST_CASE(SendPeriodicCounterSelectionPacketTest) uint32_t capturePeriod = 1000; std::vector selectedCounterIds; BOOST_CHECK_THROW(sendPacket1.SendPeriodicCounterSelectionPacket(capturePeriod, selectedCounterIds), - armnn::RuntimeException); + armnn::profiling::BufferExhaustion); // Packet without any counters MockBuffer mockBuffer2(512); @@ -284,7 +283,7 @@ BOOST_AUTO_TEST_CASE(SendStreamMetaDataPacketTest) // Error no space left in buffer MockBuffer mockBuffer1(10); SendCounterPacket sendPacket1(mockBuffer1); - BOOST_CHECK_THROW(sendPacket1.SendStreamMetaDataPacket(), armnn::RuntimeException); + BOOST_CHECK_THROW(sendPacket1.SendStreamMetaDataPacket(), armnn::profiling::BufferExhaustion); // Full metadata packet -- cgit v1.2.1