diff options
Diffstat (limited to 'src/profiling/test')
-rw-r--r-- | src/profiling/test/ProfilingMocks.hpp | 24 | ||||
-rw-r--r-- | src/profiling/test/ProfilingTestUtils.cpp | 12 | ||||
-rw-r--r-- | src/profiling/test/SendCounterPacketTests.cpp | 18 | ||||
-rw-r--r-- | src/profiling/test/SendCounterPacketTests.hpp | 2 |
4 files changed, 28 insertions, 28 deletions
diff --git a/src/profiling/test/ProfilingMocks.hpp b/src/profiling/test/ProfilingMocks.hpp index ada55d8dff..2cd44c40a2 100644 --- a/src/profiling/test/ProfilingMocks.hpp +++ b/src/profiling/test/ProfilingMocks.hpp @@ -16,9 +16,9 @@ #include <armnn/Exceptions.hpp> #include <armnn/Optional.hpp> #include <armnn/Conversion.hpp> +#include <armnn/utility/Assert.hpp> #include <armnn/utility/IgnoreUnused.hpp> -#include <boost/assert.hpp> #include <boost/numeric/conversion/cast.hpp> #include <atomic> @@ -449,11 +449,11 @@ public: { // Create the category CategoryPtr category = std::make_unique<Category>(categoryName); - BOOST_ASSERT(category); + ARMNN_ASSERT(category); // Get the raw category pointer const Category* categoryPtr = category.get(); - BOOST_ASSERT(categoryPtr); + ARMNN_ASSERT(categoryPtr); // Register the category m_Categories.insert(std::move(category)); @@ -469,11 +469,11 @@ public: // Create the device DevicePtr device = std::make_unique<Device>(deviceUid, deviceName, cores); - BOOST_ASSERT(device); + ARMNN_ASSERT(device); // Get the raw device pointer const Device* devicePtr = device.get(); - BOOST_ASSERT(devicePtr); + ARMNN_ASSERT(devicePtr); // Register the device m_Devices.insert(std::make_pair(deviceUid, std::move(device))); @@ -490,11 +490,11 @@ public: // Create the counter set CounterSetPtr counterSet = std::make_unique<CounterSet>(counterSetUid, counterSetName, count); - BOOST_ASSERT(counterSet); + ARMNN_ASSERT(counterSet); // Get the raw counter set pointer const CounterSet* counterSetPtr = counterSet.get(); - BOOST_ASSERT(counterSetPtr); + ARMNN_ASSERT(counterSetPtr); // Register the counter set m_CounterSets.insert(std::make_pair(counterSetUid, std::move(counterSet))); @@ -528,7 +528,7 @@ public: // Get the counter UIDs and calculate the max counter UID std::vector<uint16_t> counterUids = GetNextCounterUids(uid, deviceCores); - BOOST_ASSERT(!counterUids.empty()); + ARMNN_ASSERT(!counterUids.empty()); uint16_t maxCounterUid = deviceCores <= 1 ? counterUids.front() : counterUids.back(); // Get the counter units @@ -546,18 +546,18 @@ public: unitsValue, deviceUidValue, counterSetUidValue); - BOOST_ASSERT(counter); + ARMNN_ASSERT(counter); // Get the raw counter pointer const Counter* counterPtr = counter.get(); - BOOST_ASSERT(counterPtr); + ARMNN_ASSERT(counterPtr); // Process multiple counters if necessary for (uint16_t counterUid : counterUids) { // Connect the counter to the parent category Category* parentCategory = const_cast<Category*>(GetCategory(parentCategoryName)); - BOOST_ASSERT(parentCategory); + ARMNN_ASSERT(parentCategory); parentCategory->m_Counters.push_back(counterUid); // Register the counter @@ -584,7 +584,7 @@ public: { auto it = std::find_if(m_Categories.begin(), m_Categories.end(), [&name](const CategoryPtr& category) { - BOOST_ASSERT(category); + ARMNN_ASSERT(category); return category->m_Name == name; }); diff --git a/src/profiling/test/ProfilingTestUtils.cpp b/src/profiling/test/ProfilingTestUtils.cpp index 8de69f14ec..5c63b54b8f 100644 --- a/src/profiling/test/ProfilingTestUtils.cpp +++ b/src/profiling/test/ProfilingTestUtils.cpp @@ -31,7 +31,7 @@ void VerifyTimelineHeaderBinary(const unsigned char* readableData, unsigned int& offset, uint32_t packetDataLength) { - BOOST_ASSERT(readableData); + ARMNN_ASSERT(readableData); // Utils unsigned int uint32_t_size = sizeof(uint32_t); @@ -60,7 +60,7 @@ void VerifyTimelineLabelBinaryPacketData(Optional<ProfilingGuid> guid, const unsigned char* readableData, unsigned int& offset) { - BOOST_ASSERT(readableData); + ARMNN_ASSERT(readableData); // Utils unsigned int uint32_t_size = sizeof(uint32_t); @@ -101,7 +101,7 @@ void VerifyTimelineEventClassBinaryPacketData(ProfilingGuid guid, const unsigned char* readableData, unsigned int& offset) { - BOOST_ASSERT(readableData); + ARMNN_ASSERT(readableData); // Utils unsigned int uint32_t_size = sizeof(uint32_t); @@ -127,7 +127,7 @@ void VerifyTimelineRelationshipBinaryPacketData(ProfilingRelationshipType relati const unsigned char* readableData, unsigned int& offset) { - BOOST_ASSERT(readableData); + ARMNN_ASSERT(readableData); uint32_t relationshipTypeUint = 0; switch (relationshipType) @@ -205,7 +205,7 @@ void VerifyTimelineEntityBinaryPacketData(Optional<ProfilingGuid> guid, const unsigned char* readableData, unsigned int& offset) { - BOOST_ASSERT(readableData); + ARMNN_ASSERT(readableData); // Utils unsigned int uint32_t_size = sizeof(uint32_t); @@ -238,7 +238,7 @@ void VerifyTimelineEventBinaryPacket(Optional<uint64_t> timestamp, const unsigned char* readableData, unsigned int& offset) { - BOOST_ASSERT(readableData); + ARMNN_ASSERT(readableData); // Utils unsigned int uint32_t_size = sizeof(uint32_t); diff --git a/src/profiling/test/SendCounterPacketTests.cpp b/src/profiling/test/SendCounterPacketTests.cpp index 51f049ddc6..a3c237faba 100644 --- a/src/profiling/test/SendCounterPacketTests.cpp +++ b/src/profiling/test/SendCounterPacketTests.cpp @@ -536,7 +536,7 @@ BOOST_AUTO_TEST_CASE(CreateEventRecordTest) counterUnits, deviceUid, counterSetUid); - BOOST_ASSERT(counter); + ARMNN_ASSERT(counter); // Create an event record SendCounterPacket::EventRecord eventRecord; @@ -656,7 +656,7 @@ BOOST_AUTO_TEST_CASE(CreateEventRecordNoUnitsTest) "", deviceUid, counterSetUid); - BOOST_ASSERT(counter); + ARMNN_ASSERT(counter); // Create an event record SendCounterPacket::EventRecord eventRecord; @@ -761,7 +761,7 @@ BOOST_AUTO_TEST_CASE(CreateInvalidEventRecordTest1) counterUnits, deviceUid, counterSetUid); - BOOST_ASSERT(counter); + ARMNN_ASSERT(counter); // Create an event record SendCounterPacket::EventRecord eventRecord; @@ -800,7 +800,7 @@ BOOST_AUTO_TEST_CASE(CreateInvalidEventRecordTest2) counterUnits, deviceUid, counterSetUid); - BOOST_ASSERT(counter); + ARMNN_ASSERT(counter); // Create an event record SendCounterPacket::EventRecord eventRecord; @@ -839,7 +839,7 @@ BOOST_AUTO_TEST_CASE(CreateInvalidEventRecordTest3) counterUnits, deviceUid, counterSetUid); - BOOST_ASSERT(counter); + ARMNN_ASSERT(counter); // Create an event record SendCounterPacket::EventRecord eventRecord; @@ -859,7 +859,7 @@ BOOST_AUTO_TEST_CASE(CreateCategoryRecordTest) // Create a category for testing const std::string categoryName = "some_category"; const CategoryPtr category = std::make_unique<Category>(categoryName); - BOOST_ASSERT(category); + ARMNN_ASSERT(category); category->m_Counters = { 11u, 23u, 5670u }; // Create a collection of counters @@ -903,9 +903,9 @@ BOOST_AUTO_TEST_CASE(CreateCategoryRecordTest) Counter* counter1 = counters.find(11)->second.get(); Counter* counter2 = counters.find(23)->second.get(); Counter* counter3 = counters.find(5670)->second.get(); - BOOST_ASSERT(counter1); - BOOST_ASSERT(counter2); - BOOST_ASSERT(counter3); + ARMNN_ASSERT(counter1); + ARMNN_ASSERT(counter2); + ARMNN_ASSERT(counter3); uint16_t categoryEventCount = boost::numeric_cast<uint16_t>(counters.size()); // Create a category record diff --git a/src/profiling/test/SendCounterPacketTests.hpp b/src/profiling/test/SendCounterPacketTests.hpp index 7a5f7962e6..84c88ad9ae 100644 --- a/src/profiling/test/SendCounterPacketTests.hpp +++ b/src/profiling/test/SendCounterPacketTests.hpp @@ -13,9 +13,9 @@ #include <armnn/Exceptions.hpp> #include <armnn/Optional.hpp> #include <armnn/Conversion.hpp> +#include <armnn/utility/Assert.hpp> #include <armnn/utility/IgnoreUnused.hpp> -#include <boost/assert.hpp> #include <boost/numeric/conversion/cast.hpp> #include <atomic> |