diff options
author | Mike Kelly <mike.kelly@arm.com> | 2021-10-14 12:35:58 +0100 |
---|---|---|
committer | Mike Kelly <mike.kelly@arm.com> | 2021-10-14 12:35:58 +0100 |
commit | e2d611e4502fb5dce8b8a398ccfc8d7ef29da96b (patch) | |
tree | 79d9178420924d57ed0ab23db46ff57159279886 /test/1.3/QosTests.cpp | |
parent | 4bd8f7c96e01e081276c376fe5c34018e7b70d17 (diff) | |
download | android-nn-driver-e2d611e4502fb5dce8b8a398ccfc8d7ef29da96b.tar.gz |
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 <mike.kelly@arm.com>
Change-Id: Ice92a37590df727fd581d3be5ff2716665f26a13
Diffstat (limited to 'test/1.3/QosTests.cpp')
-rw-r--r-- | test/1.3/QosTests.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
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 <armnn/utility/IgnoreUnused.hpp> - -#include <doctest/doctest.h> - -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); } } |