diff options
author | Sadik Armagan <sadik.armagan@arm.com> | 2021-05-26 15:40:53 +0100 |
---|---|---|
committer | Sadik Armagan <sadik.armagan@arm.com> | 2021-06-09 14:50:34 +0000 |
commit | 9150bff63a690caa743c471943afe509ebed1044 (patch) | |
tree | f98047d0a3a0e6cf06a4f34e0270a3cc7e3ee8bd /test/1.0/FullyConnectedReshape.cpp | |
parent | 07648f41d8b1fe9f532fa9c7e8e96a8e3651e59d (diff) | |
download | android-nn-driver-9150bff63a690caa743c471943afe509ebed1044.tar.gz |
IVGCVSW-4618 'Transition Units Test Suites'
* Used doctest in android-nn-driver unit tests.
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: I9b5d4dfd77d53c7ebee7f8c43628a1d6ff74d1a3
Diffstat (limited to 'test/1.0/FullyConnectedReshape.cpp')
-rw-r--r-- | test/1.0/FullyConnectedReshape.cpp | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/test/1.0/FullyConnectedReshape.cpp b/test/1.0/FullyConnectedReshape.cpp index 72c90ca5..4585c95b 100644 --- a/test/1.0/FullyConnectedReshape.cpp +++ b/test/1.0/FullyConnectedReshape.cpp @@ -6,37 +6,31 @@ #include "../DriverTestHelpers.hpp" #include "../../1.0/FullyConnected.hpp" -#include <boost/test/unit_test.hpp> +#include <doctest/doctest.h> -BOOST_AUTO_TEST_SUITE(FullyConnectedReshapeTests) - -BOOST_AUTO_TEST_CASE(TestFlattenFullyConnectedInput) +TEST_SUITE("FullyConnectedReshapeTests") +{ +TEST_CASE("TestFlattenFullyConnectedInput") { using armnn::TensorShape; // Pass through 2d input - BOOST_TEST(FlattenFullyConnectedInput(TensorShape({2,2048}), TensorShape({512, 2048})) == - TensorShape({2, 2048})); + CHECK(FlattenFullyConnectedInput(TensorShape({2,2048}), TensorShape({512, 2048})) == TensorShape({2, 2048})); // Trivial flattening of batched channels - BOOST_TEST(FlattenFullyConnectedInput(TensorShape({97,1,1,2048}), TensorShape({512, 2048})) == - TensorShape({97, 2048})); + CHECK(FlattenFullyConnectedInput(TensorShape({97,1,1,2048}), TensorShape({512, 2048})) == TensorShape({97, 2048})); // Flatten single batch of rows - BOOST_TEST(FlattenFullyConnectedInput(TensorShape({1,97,1,2048}), TensorShape({512, 2048})) == - TensorShape({97, 2048})); + CHECK(FlattenFullyConnectedInput(TensorShape({1,97,1,2048}), TensorShape({512, 2048})) == TensorShape({97, 2048})); // Flatten single batch of columns - BOOST_TEST(FlattenFullyConnectedInput(TensorShape({1,1,97,2048}), TensorShape({512, 2048})) == - TensorShape({97, 2048})); + CHECK(FlattenFullyConnectedInput(TensorShape({1,1,97,2048}), TensorShape({512, 2048})) == TensorShape({97, 2048})); // Move batches into input dimension - BOOST_TEST(FlattenFullyConnectedInput(TensorShape({50,1,1,10}), TensorShape({512, 20})) == - TensorShape({25, 20})); + CHECK(FlattenFullyConnectedInput(TensorShape({50,1,1,10}), TensorShape({512, 20})) == TensorShape({25, 20})); // Flatten single batch of 3D data (e.g. convolution output) - BOOST_TEST(FlattenFullyConnectedInput(TensorShape({1,16,16,10}), TensorShape({512, 2560})) == - TensorShape({1, 2560})); + CHECK(FlattenFullyConnectedInput(TensorShape({1,16,16,10}), TensorShape({512, 2560})) == TensorShape({1, 2560})); } -BOOST_AUTO_TEST_SUITE_END() +} |