aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/test/ProfilingTests.cpp
diff options
context:
space:
mode:
authorJim Flynn <jim.flynn@arm.com>2019-10-18 13:21:43 +0100
committerJim Flynn <jim.flynn@arm.com>2019-10-18 13:21:43 +0100
commited25e0e8932895686ffb5166966beb88ddcbd410 (patch)
tree51a0cc42a42b69eb997ed77f1bc574b72c863f46 /src/profiling/test/ProfilingTests.cpp
parent397043fa3d900430e9e0f6d328b76898f9613388 (diff)
downloadarmnn-ed25e0e8932895686ffb5166966beb88ddcbd410.tar.gz
IVGCVSW-4005 Add PacketFamilyId to version resolver
Change-Id: Ief9373871438df4e1d353bbc545a3ee4f25c1fb0 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/profiling/test/ProfilingTests.cpp')
-rw-r--r--src/profiling/test/ProfilingTests.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp
index c2550986ab..aba967507e 100644
--- a/src/profiling/test/ProfilingTests.cpp
+++ b/src/profiling/test/ProfilingTests.cpp
@@ -96,6 +96,31 @@ BOOST_AUTO_TEST_CASE(CheckCommandHandlerKeyComparisons)
BOOST_CHECK(vect == expectedVect);
}
+BOOST_AUTO_TEST_CASE(CheckPacketKeyComparisons)
+{
+ PacketKey key0(0,0);
+ PacketKey key1(0,0);
+ PacketKey key2(0,1);
+ PacketKey key3(0,2);
+ PacketKey key4(1,0);
+ PacketKey key5(1,0);
+ PacketKey key6(1,1);
+
+ BOOST_CHECK(!(key0 < key1));
+ BOOST_CHECK(!(key0 > key1));
+ BOOST_CHECK(key0 <= key1);
+ BOOST_CHECK(key0 >= key1);
+ BOOST_CHECK(key0 == key1);
+ BOOST_CHECK(key0 < key2);
+ BOOST_CHECK(key2 < key3);
+ BOOST_CHECK(key3 > key0);
+ BOOST_CHECK(key4 == key5);
+ BOOST_CHECK(key4 > key0);
+ BOOST_CHECK(key5 < key6);
+ BOOST_CHECK(key5 <= key6);
+ BOOST_CHECK(key5 != key6);
+}
+
BOOST_AUTO_TEST_CASE(CheckCommandHandler)
{
PacketVersionResolver packetVersionResolver;
@@ -363,8 +388,9 @@ BOOST_AUTO_TEST_CASE(CheckPacketVersionResolver)
for (unsigned int i = 0u; i < numTests; ++i)
{
+ const uint32_t familyId = distribution(generator);
const uint32_t packetId = distribution(generator);
- Version resolvedVersion = packetVersionResolver.ResolvePacketVersion(packetId);
+ Version resolvedVersion = packetVersionResolver.ResolvePacketVersion(familyId, packetId);
BOOST_TEST(resolvedVersion == expectedVersion);
}