aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/test/InstrumentTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnn/test/InstrumentTests.cpp')
-rw-r--r--src/armnn/test/InstrumentTests.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/armnn/test/InstrumentTests.cpp b/src/armnn/test/InstrumentTests.cpp
index e0d0d94700..447a4c9d58 100644
--- a/src/armnn/test/InstrumentTests.cpp
+++ b/src/armnn/test/InstrumentTests.cpp
@@ -2,7 +2,7 @@
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
-#include <boost/test/unit_test.hpp>
+#include <doctest/doctest.h>
#include "WallClockTimer.hpp"
@@ -11,13 +11,13 @@
using namespace armnn;
-BOOST_AUTO_TEST_SUITE(Instruments)
-
-BOOST_AUTO_TEST_CASE(WallClockTimerInMicroseconds)
+TEST_SUITE("Instruments")
+{
+TEST_CASE("WallClockTimerInMicroseconds")
{
WallClockTimer wallClockTimer;
- BOOST_CHECK_EQUAL(wallClockTimer.GetName(), "WallClockTimer");
+ CHECK((std::string(wallClockTimer.GetName()) == std::string("WallClockTimer")));
// start the timer
wallClockTimer.Start();
@@ -28,17 +28,17 @@ BOOST_AUTO_TEST_CASE(WallClockTimerInMicroseconds)
// stop the timer
wallClockTimer.Stop();
- BOOST_CHECK_EQUAL(wallClockTimer.GetMeasurements().front().m_Name, WallClockTimer::WALL_CLOCK_TIME);
+ CHECK((wallClockTimer.GetMeasurements().front().m_Name == WallClockTimer::WALL_CLOCK_TIME));
// check that WallClockTimer measurement should be >= 10 microseconds
- BOOST_CHECK_GE(wallClockTimer.GetMeasurements().front().m_Value, std::chrono::microseconds(10).count());
+ CHECK_GE(wallClockTimer.GetMeasurements().front().m_Value, std::chrono::microseconds(10).count());
}
-BOOST_AUTO_TEST_CASE(WallClockTimerInNanoseconds)
+TEST_CASE("WallClockTimerInNanoseconds")
{
WallClockTimer wallClockTimer;
- BOOST_CHECK_EQUAL(wallClockTimer.GetName(), "WallClockTimer");
+ CHECK((std::string(wallClockTimer.GetName()) == std::string("WallClockTimer")));
// start the timer
wallClockTimer.Start();
@@ -49,14 +49,14 @@ BOOST_AUTO_TEST_CASE(WallClockTimerInNanoseconds)
// stop the timer
wallClockTimer.Stop();
- BOOST_CHECK_EQUAL(wallClockTimer.GetMeasurements().front().m_Name, WallClockTimer::WALL_CLOCK_TIME);
+ CHECK((wallClockTimer.GetMeasurements().front().m_Name == WallClockTimer::WALL_CLOCK_TIME));
// delta is 0.5 microseconds
const auto delta =
std::chrono::duration_cast<std::chrono::duration<double, std::micro>>(std::chrono::nanoseconds(500));
// check that WallClockTimer measurement should be >= 0.5 microseconds
- BOOST_CHECK_GE(wallClockTimer.GetMeasurements().front().m_Value, delta.count());
+ CHECK_GE(wallClockTimer.GetMeasurements().front().m_Value, delta.count());
}
-BOOST_AUTO_TEST_SUITE_END()
+}