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/armnn/test/ProfilingEventTest.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/armnn/test/ProfilingEventTest.cpp')
-rw-r--r-- | src/armnn/test/ProfilingEventTest.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/armnn/test/ProfilingEventTest.cpp b/src/armnn/test/ProfilingEventTest.cpp index 0add8365e9..1e3d1eac7f 100644 --- a/src/armnn/test/ProfilingEventTest.cpp +++ b/src/armnn/test/ProfilingEventTest.cpp @@ -3,7 +3,7 @@ // SPDX-License-Identifier: MIT // -#include <boost/test/unit_test.hpp> +#include <doctest/doctest.h> #include "ProfilingEvent.hpp" #include "Profiling.hpp" @@ -12,9 +12,9 @@ using namespace armnn; -BOOST_AUTO_TEST_SUITE(ProfilingEvent) - -BOOST_AUTO_TEST_CASE(ProfilingEventTest) +TEST_SUITE("ProfilingEvent") +{ +TEST_CASE("ProfilingEventTest") { // Get a reference to the profiler manager. armnn::ProfilerManager& profileManager = armnn::ProfilerManager::GetInstance(); @@ -29,7 +29,7 @@ BOOST_AUTO_TEST_CASE(ProfilingEventTest) BackendId(), std::move(insts1)); - BOOST_CHECK_EQUAL(testEvent.GetName(), "EventName"); + CHECK_EQ(testEvent.GetName(), "EventName"); // start the timer - outer testEvent.Start(); @@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE(ProfilingEventTest) // stop the timer - outer testEvent.Stop(); - BOOST_CHECK_GE(testEvent.GetMeasurements().front().m_Value, 10.0); + CHECK_GE(testEvent.GetMeasurements().front().m_Value, 10.0); // create a sub event with CpuAcc BackendId cpuAccBackendId(Compute::CpuAcc); @@ -52,12 +52,12 @@ BOOST_AUTO_TEST_CASE(ProfilingEventTest) cpuAccBackendId, std::move(insts2)); - BOOST_CHECK_EQUAL(&testEvent, testEvent2.GetParentEvent()); - BOOST_CHECK_EQUAL(profileManager.GetProfiler(), testEvent2.GetProfiler()); - BOOST_CHECK(cpuAccBackendId == testEvent2.GetBackendId()); + CHECK_EQ(&testEvent, testEvent2.GetParentEvent()); + CHECK_EQ(profileManager.GetProfiler(), testEvent2.GetProfiler()); + CHECK(cpuAccBackendId == testEvent2.GetBackendId()); } -BOOST_AUTO_TEST_CASE(ProfilingEventTestOnGpuAcc) +TEST_CASE("ProfilingEventTestOnGpuAcc") { // Get a reference to the profiler manager. armnn::ProfilerManager& profileManager = armnn::ProfilerManager::GetInstance(); @@ -72,7 +72,7 @@ BOOST_AUTO_TEST_CASE(ProfilingEventTestOnGpuAcc) BackendId(), std::move(insts1)); - BOOST_CHECK_EQUAL(testEvent.GetName(), "GPUEvent"); + CHECK_EQ(testEvent.GetName(), "GPUEvent"); // start the timer - outer testEvent.Start(); @@ -83,7 +83,7 @@ BOOST_AUTO_TEST_CASE(ProfilingEventTestOnGpuAcc) // stop the timer - outer testEvent.Stop(); - BOOST_CHECK_GE(testEvent.GetMeasurements().front().m_Value, 10.0); + CHECK_GE(testEvent.GetMeasurements().front().m_Value, 10.0); // create a sub event BackendId gpuAccBackendId(Compute::GpuAcc); @@ -95,9 +95,9 @@ BOOST_AUTO_TEST_CASE(ProfilingEventTestOnGpuAcc) gpuAccBackendId, std::move(insts2)); - BOOST_CHECK_EQUAL(&testEvent, testEvent2.GetParentEvent()); - BOOST_CHECK_EQUAL(profileManager.GetProfiler(), testEvent2.GetProfiler()); - BOOST_CHECK(gpuAccBackendId == testEvent2.GetBackendId()); + CHECK_EQ(&testEvent, testEvent2.GetParentEvent()); + CHECK_EQ(profileManager.GetProfiler(), testEvent2.GetProfiler()); + CHECK(gpuAccBackendId == testEvent2.GetBackendId()); } -BOOST_AUTO_TEST_SUITE_END() +} |