diff options
Diffstat (limited to 'src/profiling/test/SendTimelinePacketTests.cpp')
-rw-r--r-- | src/profiling/test/SendTimelinePacketTests.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/profiling/test/SendTimelinePacketTests.cpp b/src/profiling/test/SendTimelinePacketTests.cpp index 6f90106cbe..4045d263fa 100644 --- a/src/profiling/test/SendTimelinePacketTests.cpp +++ b/src/profiling/test/SendTimelinePacketTests.cpp @@ -6,6 +6,7 @@ #include "SendCounterPacketTests.hpp" #include <BufferManager.hpp> +#include <ProfilingService.hpp> #include <ProfilingUtils.hpp> #include <SendTimelinePacket.hpp> #include <TimelinePacketWriterFactory.hpp> @@ -384,4 +385,22 @@ BOOST_AUTO_TEST_CASE(SendTimelinePacketTests3) armnn::RuntimeException); } +BOOST_AUTO_TEST_CASE(GetGuidsFromProfilingService) +{ + armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + options.m_EnableProfiling = true; + ProfilingService& profilingService = ProfilingService::Instance(); + profilingService.ResetExternalProfilingOptions(options, true); + ProfilingStaticGuid staticGuid = profilingService.GenerateStaticId("dummy"); + // TODO when actual value gets generated verify its correctness + ProfilingStaticGuid expectedStaticValue(0); + BOOST_CHECK(staticGuid == expectedStaticValue); + ProfilingDynamicGuid dynamicGuid = profilingService.NextGuid(); + // TODO when actual value gets generated verify its correctness by verifying + // it is in the correct range i.e. > x and that if NextGuid is invoked + // again it is equal to the previous + 1 + ProfilingDynamicGuid expectedDynamicValue(0); + BOOST_CHECK(dynamicGuid == expectedDynamicValue); +} + BOOST_AUTO_TEST_SUITE_END() |