diff options
author | Sadik Armagan <sadik.armagan@arm.com> | 2021-06-10 18:24:34 +0100 |
---|---|---|
committer | Sadik Armagan <sadik.armagan@arm.com> | 2021-06-11 10:33:16 +0000 |
commit | 1625efc870f1a8b7c6e6382277ddbb245f91a294 (patch) | |
tree | 39fbbaa15ed7eb81337b082c2d20b0af68b91c02 /src/backends/cl/test/OpenClTimerTest.cpp | |
parent | 958e0ba61e940a8d11955cf2a10f681c7c47e1fa (diff) | |
download | armnn-1625efc870f1a8b7c6e6382277ddbb245f91a294.tar.gz |
IVGCVSW-5963 'Move unit tests to new framework'
* Used doctest in ArmNN unit tests
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: Ia9cf5fc72775878885c5f864abf2c56b3a935f1a
Diffstat (limited to 'src/backends/cl/test/OpenClTimerTest.cpp')
-rw-r--r-- | src/backends/cl/test/OpenClTimerTest.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/backends/cl/test/OpenClTimerTest.cpp b/src/backends/cl/test/OpenClTimerTest.cpp index 7c8e27710b..0da1db73b8 100644 --- a/src/backends/cl/test/OpenClTimerTest.cpp +++ b/src/backends/cl/test/OpenClTimerTest.cpp @@ -21,7 +21,7 @@ #include <arm_compute/runtime/CL/CLScheduler.h> -#include <boost/test/unit_test.hpp> +#include <doctest/doctest.h> #include <iostream> @@ -38,11 +38,10 @@ struct OpenClFixture ClContextControl m_ClContextControl; }; -BOOST_FIXTURE_TEST_SUITE(OpenClTimerBatchNorm, OpenClFixture) -using FactoryType = ClWorkloadFactory; - -BOOST_AUTO_TEST_CASE(OpenClTimerBatchNorm) +TEST_CASE_FIXTURE(OpenClFixture, "OpenClTimerBatchNorm") { +//using FactoryType = ClWorkloadFactory; + auto memoryManager = ClWorkloadFactoryHelper::GetMemoryManager(); ClWorkloadFactory workloadFactory = ClWorkloadFactoryHelper::GetFactory(memoryManager); @@ -109,7 +108,7 @@ BOOST_AUTO_TEST_CASE(OpenClTimerBatchNorm) OpenClTimer openClTimer; - BOOST_CHECK_EQUAL(openClTimer.GetName(), "OpenClKernelTimer"); + CHECK_EQ(openClTimer.GetName(), "OpenClKernelTimer"); //Start the timer openClTimer.Start(); @@ -120,15 +119,13 @@ BOOST_AUTO_TEST_CASE(OpenClTimerBatchNorm) //Stop the timer openClTimer.Stop(); - BOOST_CHECK_EQUAL(openClTimer.GetMeasurements().size(), 1); + CHECK_EQ(openClTimer.GetMeasurements().size(), 1); - BOOST_CHECK_EQUAL(openClTimer.GetMeasurements().front().m_Name, + CHECK_EQ(openClTimer.GetMeasurements().front().m_Name, "OpenClKernelTimer/0: batchnormalization_layer_nchw GWS[1,3,2]"); - BOOST_CHECK(openClTimer.GetMeasurements().front().m_Value > 0); + CHECK(openClTimer.GetMeasurements().front().m_Value > 0); } -BOOST_AUTO_TEST_SUITE_END() - #endif //aarch64 or x86_64 |