From e2d611e4502fb5dce8b8a398ccfc8d7ef29da96b Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Thu, 14 Oct 2021 12:35:58 +0100 Subject: IVGCVSW-6428 Remove asserts * Changed asserts to check for errors and return appropriate values or throw exceptions * Changed unit tests to use Doctest's long macro names as the short macro names clashed with Android's Logging macros * Removed unused #includes * Clarified ambiguous #includes Signed-off-by: Mike Kelly Change-Id: Ice92a37590df727fd581d3be5ff2716665f26a13 --- test/1.3/QosTests.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'test/1.3/QosTests.cpp') diff --git a/test/1.3/QosTests.cpp b/test/1.3/QosTests.cpp index 3b064052..cd8ac33c 100644 --- a/test/1.3/QosTests.cpp +++ b/test/1.3/QosTests.cpp @@ -4,15 +4,10 @@ // #include "../DriverTestHelpers.hpp" -#include "../TestTensor.hpp" -#include "../1.3/HalPolicy.hpp" +#include <1.3/HalPolicy.hpp> -#include - -#include - -TEST_SUITE("QosTests") +DOCTEST_TEST_SUITE("QosTests") { using ArmnnDriver = armnn_driver::ArmnnDriver; using DriverOptions = armnn_driver::DriverOptions; @@ -38,7 +33,7 @@ void ExecuteModel(const armnn_driver::hal_1_3::HalPolicy::Model& model, } } -TEST_CASE("ConcurrentExecuteWithQosPriority") +DOCTEST_TEST_CASE("ConcurrentExecuteWithQosPriority") { ALOGI("ConcurrentExecuteWithQOSPriority: entry"); @@ -94,7 +89,7 @@ TEST_CASE("ConcurrentExecuteWithQosPriority") preparedModelsSize++; } - CHECK(maxRequests == preparedModelsSize); + DOCTEST_CHECK(maxRequests == preparedModelsSize); // construct the request data V1_0::DataLocation inloc = {}; @@ -154,7 +149,7 @@ TEST_CASE("ConcurrentExecuteWithQosPriority") ALOGI("ConcurrentExecuteWithQOSPriority: waiting for callbacks"); for (size_t i = 0; i < maxRequests; ++i) { - ARMNN_ASSERT(cb[i]); + DOCTEST_CHECK(cb[i]); cb[i]->wait(); } @@ -164,15 +159,15 @@ TEST_CASE("ConcurrentExecuteWithQosPriority") { if (i < 15) { - CHECK(outdata[i][0] == 152); + DOCTEST_CHECK(outdata[i][0] == 152); } else if (i < 30) { - CHECK(outdata[i][0] == 141); + DOCTEST_CHECK(outdata[i][0] == 141); } else { - CHECK(outdata[i][0] == 159); + DOCTEST_CHECK(outdata[i][0] == 159); } } -- cgit v1.2.1