aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/test/ProfilingTests.cpp
diff options
context:
space:
mode:
authorNikhil Raj <nikhil.raj@arm.com>2019-08-19 10:04:23 +0100
committerNikhil Raj <nikhil.raj@arm.com>2019-08-19 10:04:23 +0100
commitd88e47c3a334447b964649518c088bf32054ed79 (patch)
tree6943c202d85f04778382d7123a6e3c05e49ad1a6 /src/profiling/test/ProfilingTests.cpp
parent94d7915bef33ad59d1bdfa791490268c682c5359 (diff)
downloadarmnn-d88e47c3a334447b964649518c088bf32054ed79.tar.gz
IVGCVSW-3429 Add a utility Version class
Change-Id: Id429f7d9176c775953c1261c5a3e9f1d565927c1 Signed-off-by: Nikhil Raj <nikhil.raj@arm.com>
Diffstat (limited to 'src/profiling/test/ProfilingTests.cpp')
-rw-r--r--src/profiling/test/ProfilingTests.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp
index a8ec0277d2..8a2f2bd88e 100644
--- a/src/profiling/test/ProfilingTests.cpp
+++ b/src/profiling/test/ProfilingTests.cpp
@@ -6,6 +6,7 @@
#include "../CommandHandlerKey.hpp"
#include "../CommandHandlerFunctor.hpp"
#include "../CommandHandlerRegistry.hpp"
+#include "../EncodeVersion.hpp"
#include "../Packet.hpp"
#include <cstdint>
@@ -62,6 +63,36 @@ BOOST_AUTO_TEST_CASE(CheckCommandHandlerKeyComparisons)
BOOST_CHECK(vect == expectedVect);
}
+BOOST_AUTO_TEST_CASE(CheckEncodeVersion)
+{
+ mlutil::Version version1(12);
+
+ BOOST_CHECK(version1.GetMajor() == 0);
+ BOOST_CHECK(version1.GetMinor() == 0);
+ BOOST_CHECK(version1.GetPatch() == 12);
+
+ mlutil::Version version2(4108);
+
+ BOOST_CHECK(version2.GetMajor() == 0);
+ BOOST_CHECK(version2.GetMinor() == 1);
+ BOOST_CHECK(version2.GetPatch() == 12);
+
+ mlutil::Version version3(4198412);
+
+ BOOST_CHECK(version3.GetMajor() == 1);
+ BOOST_CHECK(version3.GetMinor() == 1);
+ BOOST_CHECK(version3.GetPatch() == 12);
+
+ mlutil::Version version4(0);
+
+ BOOST_CHECK(version4.GetMajor() == 0);
+ BOOST_CHECK(version4.GetMinor() == 0);
+ BOOST_CHECK(version4.GetPatch() == 0);
+
+ mlutil::Version version5(1,0,0);
+ BOOST_CHECK(version5.GetEncodedValue() == 4194304);
+}
+
BOOST_AUTO_TEST_CASE(CheckPacketClass)
{
const char* data = "test";