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/DriverTestHelpers.hpp | |
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/DriverTestHelpers.hpp')
-rw-r--r-- | test/DriverTestHelpers.hpp | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/test/DriverTestHelpers.hpp b/test/DriverTestHelpers.hpp index d37fbf26..36deeab4 100644 --- a/test/DriverTestHelpers.hpp +++ b/test/DriverTestHelpers.hpp @@ -10,10 +10,33 @@ #include "../ArmnnDriver.hpp" #include <iosfwd> -#include <boost/test/unit_test.hpp> - #include <android/hidl/allocator/1.0/IAllocator.h> +// Un-define some of the macros as they clash in 'third-party/doctest/doctest.h' +// and 'system/core/base/include/android-base/logging.h' +// macro redefined error[-Werror,-Wmacro-redefined] +#ifdef CHECK +#undef CHECK +#endif +#ifdef CHECK_EQ +#undef CHECK_EQ +#endif +#ifdef CHECK_NE +#undef CHECK_NE +#endif +#ifdef CHECK_GT +#undef CHECK_GT +#endif +#ifdef CHECK_LT +#undef CHECK_LT +#endif +#ifdef CHECK_GE +#undef CHECK_GE +#endif +#ifdef CHECK_LE +#undef CHECK_LE +#endif + using RequestArgument = V1_0::RequestArgument; using ::android::hidl::allocator::V1_0::IAllocator; @@ -167,7 +190,7 @@ android::sp<IMemory> AddPoolAndGetData(uint32_t size, V1_0::Request& request) android::sp<IAllocator> allocator = IAllocator::getService("ashmem"); allocator->allocate(sizeof(T) * size, [&](bool success, const hidl_memory& mem) { - BOOST_TEST(success); + ARMNN_ASSERT(success); pool = mem; }); |