aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/test/DebugCallbackTest.cpp
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2021-06-10 18:24:34 +0100
committerSadik Armagan <sadik.armagan@arm.com>2021-06-11 10:33:16 +0000
commit1625efc870f1a8b7c6e6382277ddbb245f91a294 (patch)
tree39fbbaa15ed7eb81337b082c2d20b0af68b91c02 /src/armnn/test/DebugCallbackTest.cpp
parent958e0ba61e940a8d11955cf2a10f681c7c47e1fa (diff)
downloadarmnn-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/DebugCallbackTest.cpp')
-rw-r--r--src/armnn/test/DebugCallbackTest.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/armnn/test/DebugCallbackTest.cpp b/src/armnn/test/DebugCallbackTest.cpp
index 2ae228b882..48e2c15a79 100644
--- a/src/armnn/test/DebugCallbackTest.cpp
+++ b/src/armnn/test/DebugCallbackTest.cpp
@@ -9,10 +9,10 @@
#include <armnn/Types.hpp>
#include <Runtime.hpp>
-#include <boost/test/unit_test.hpp>
-
-BOOST_AUTO_TEST_SUITE(DebugCallback)
+#include <doctest/doctest.h>
+TEST_SUITE("DebugCallback")
+{
namespace
{
@@ -39,7 +39,7 @@ INetworkPtr CreateSimpleNetwork()
return net;
}
-BOOST_AUTO_TEST_CASE(RuntimeRegisterDebugCallback)
+TEST_CASE("RuntimeRegisterDebugCallback")
{
INetworkPtr net = CreateSimpleNetwork();
@@ -52,7 +52,7 @@ BOOST_AUTO_TEST_CASE(RuntimeRegisterDebugCallback)
IOptimizedNetworkPtr optNet = Optimize(*net, backends, runtime->GetDeviceSpec(), optimizerOptions);
NetworkId netId;
- BOOST_TEST(runtime->LoadNetwork(netId, std::move(optNet)) == Status::Success);
+ CHECK(runtime->LoadNetwork(netId, std::move(optNet)) == Status::Success);
// Set up callback function
int callCount = 0;
@@ -83,17 +83,17 @@ BOOST_AUTO_TEST_CASE(RuntimeRegisterDebugCallback)
runtime->EnqueueWorkload(netId, inputTensors, outputTensors);
// Check that the callback was called twice
- BOOST_TEST(callCount == 2);
+ CHECK(callCount == 2);
// Check that tensor handles passed to callback have correct shapes
const std::vector<TensorShape> expectedShapes({TensorShape({1, 1, 1, 5}), TensorShape({1, 1, 1, 5})});
- BOOST_TEST(tensorShapes == expectedShapes);
+ CHECK(tensorShapes == expectedShapes);
// Check that slot indexes passed to callback are correct
const std::vector<unsigned int> expectedSlotIndexes({0, 0});
- BOOST_TEST(slotIndexes == expectedSlotIndexes);
+ CHECK(slotIndexes == expectedSlotIndexes);
}
} // anonymous namespace
-BOOST_AUTO_TEST_SUITE_END()
+}