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.0/FullyConnectedReshape.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.0/FullyConnectedReshape.cpp')
-rw-r--r-- | test/1.0/FullyConnectedReshape.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/test/1.0/FullyConnectedReshape.cpp b/test/1.0/FullyConnectedReshape.cpp index 4585c95b..e481f2d2 100644 --- a/test/1.0/FullyConnectedReshape.cpp +++ b/test/1.0/FullyConnectedReshape.cpp @@ -1,36 +1,39 @@ // -// Copyright © 2017 Arm Ltd. All rights reserved. +// Copyright © 2017 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // #include "../DriverTestHelpers.hpp" -#include "../../1.0/FullyConnected.hpp" -#include <doctest/doctest.h> - -TEST_SUITE("FullyConnectedReshapeTests") +DOCTEST_TEST_SUITE("FullyConnectedReshapeTests") { -TEST_CASE("TestFlattenFullyConnectedInput") +DOCTEST_TEST_CASE("TestFlattenFullyConnectedInput") { using armnn::TensorShape; // Pass through 2d input - CHECK(FlattenFullyConnectedInput(TensorShape({2,2048}), TensorShape({512, 2048})) == TensorShape({2, 2048})); + DOCTEST_CHECK(FlattenFullyConnectedInput(TensorShape({2,2048}), + TensorShape({512, 2048})) == TensorShape({2, 2048})); // Trivial flattening of batched channels - CHECK(FlattenFullyConnectedInput(TensorShape({97,1,1,2048}), TensorShape({512, 2048})) == TensorShape({97, 2048})); + DOCTEST_CHECK(FlattenFullyConnectedInput(TensorShape({97,1,1,2048}), + TensorShape({512, 2048})) == TensorShape({97, 2048})); // Flatten single batch of rows - CHECK(FlattenFullyConnectedInput(TensorShape({1,97,1,2048}), TensorShape({512, 2048})) == TensorShape({97, 2048})); + DOCTEST_CHECK(FlattenFullyConnectedInput(TensorShape({1,97,1,2048}), + TensorShape({512, 2048})) == TensorShape({97, 2048})); // Flatten single batch of columns - CHECK(FlattenFullyConnectedInput(TensorShape({1,1,97,2048}), TensorShape({512, 2048})) == TensorShape({97, 2048})); + DOCTEST_CHECK(FlattenFullyConnectedInput(TensorShape({1,1,97,2048}), + TensorShape({512, 2048})) == TensorShape({97, 2048})); // Move batches into input dimension - CHECK(FlattenFullyConnectedInput(TensorShape({50,1,1,10}), TensorShape({512, 20})) == TensorShape({25, 20})); + DOCTEST_CHECK(FlattenFullyConnectedInput(TensorShape({50,1,1,10}), + TensorShape({512, 20})) == TensorShape({25, 20})); // Flatten single batch of 3D data (e.g. convolution output) - CHECK(FlattenFullyConnectedInput(TensorShape({1,16,16,10}), TensorShape({512, 2560})) == TensorShape({1, 2560})); + DOCTEST_CHECK(FlattenFullyConnectedInput(TensorShape({1,16,16,10}), + TensorShape({512, 2560})) == TensorShape({1, 2560})); } } |