From 1625efc870f1a8b7c6e6382277ddbb245f91a294 Mon Sep 17 00:00:00 2001 From: Sadik Armagan Date: Thu, 10 Jun 2021 18:24:34 +0100 Subject: IVGCVSW-5963 'Move unit tests to new framework' * Used doctest in ArmNN unit tests Signed-off-by: Sadik Armagan Change-Id: Ia9cf5fc72775878885c5f864abf2c56b3a935f1a --- src/backends/neon/test/NeonRuntimeTests.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/backends/neon/test/NeonRuntimeTests.cpp') diff --git a/src/backends/neon/test/NeonRuntimeTests.cpp b/src/backends/neon/test/NeonRuntimeTests.cpp index 27361dd43d..ee5666d5cd 100644 --- a/src/backends/neon/test/NeonRuntimeTests.cpp +++ b/src/backends/neon/test/NeonRuntimeTests.cpp @@ -10,11 +10,11 @@ #include #include -#include +#include -BOOST_AUTO_TEST_SUITE(NeonRuntime) - -BOOST_AUTO_TEST_CASE(RuntimeValidateCpuAccDeviceSupportLayerNoFallback) +TEST_SUITE("NeonRuntime") +{ +TEST_CASE("RuntimeValidateCpuAccDeviceSupportLayerNoFallback") { // build up the structure of the network armnn::INetworkPtr net(armnn::INetwork::Create()); @@ -30,17 +30,17 @@ BOOST_AUTO_TEST_CASE(RuntimeValidateCpuAccDeviceSupportLayerNoFallback) std::vector backends = { armnn::Compute::CpuAcc }; armnn::IOptimizedNetworkPtr optNet = armnn::Optimize(*net, backends, runtime->GetDeviceSpec()); - BOOST_CHECK(optNet); + CHECK(optNet); // Load it into the runtime. It should success. armnn::NetworkId netId; - BOOST_TEST(runtime->LoadNetwork(netId, std::move(optNet)) == armnn::Status::Success); + CHECK(runtime->LoadNetwork(netId, std::move(optNet)) == armnn::Status::Success); } #ifdef ARMNN_LEAK_CHECKING_ENABLED -BOOST_AUTO_TEST_CASE(RuntimeMemoryLeaksCpuAcc) +TEST_CASE("RuntimeMemoryLeaksCpuAcc") { - BOOST_TEST(ARMNN_LEAK_CHECKER_IS_ACTIVE()); + CHECK(ARMNN_LEAK_CHECKER_IS_ACTIVE()); armnn::IRuntime::CreationOptions options; armnn::RuntimeImpl runtime(options); armnn::RuntimeLoadedNetworksReserve(&runtime); @@ -54,21 +54,21 @@ BOOST_AUTO_TEST_CASE(RuntimeMemoryLeaksCpuAcc) { ARMNN_SCOPED_LEAK_CHECKER("LoadAndUnloadNetworkCpuAcc"); - BOOST_TEST(ARMNN_NO_LEAKS_IN_SCOPE()); + CHECK(ARMNN_NO_LEAKS_IN_SCOPE()); // In the second run we check for all remaining memory // in use after the network was unloaded. If there is any // then it will be treated as a memory leak. CreateAndDropDummyNetwork(backends, runtime); - BOOST_TEST(ARMNN_NO_LEAKS_IN_SCOPE()); - BOOST_TEST(ARMNN_BYTES_LEAKED_IN_SCOPE() == 0); - BOOST_TEST(ARMNN_OBJECTS_LEAKED_IN_SCOPE() == 0); + CHECK(ARMNN_NO_LEAKS_IN_SCOPE()); + CHECK(ARMNN_BYTES_LEAKED_IN_SCOPE() == 0); + CHECK(ARMNN_OBJECTS_LEAKED_IN_SCOPE() == 0); } } #endif -BOOST_AUTO_TEST_CASE(ProfilingPostOptimisationStructureCpuAcc) +TEST_CASE("ProfilingPostOptimisationStructureCpuAcc") { VerifyPostOptimisationStructureTestImpl(armnn::Compute::CpuAcc); } -BOOST_AUTO_TEST_SUITE_END() \ No newline at end of file +} \ No newline at end of file -- cgit v1.2.1