From 1625efc870f1a8b7c6e6382277ddbb245f91a294 Mon Sep 17 00:00:00 2001 From: Sadik Armagan Date: Thu, 10 Jun 2021 18:24:34 +0100 Subject: IVGCVSW-5963 'Move unit tests to new framework' * Used doctest in ArmNN unit tests Signed-off-by: Sadik Armagan Change-Id: Ia9cf5fc72775878885c5f864abf2c56b3a935f1a --- .../backendsCommon/test/layerTests/LstmTestImpl.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/backends/backendsCommon/test/layerTests/LstmTestImpl.cpp') diff --git a/src/backends/backendsCommon/test/layerTests/LstmTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/LstmTestImpl.cpp index 11003a2e97..035c592738 100644 --- a/src/backends/backendsCommon/test/layerTests/LstmTestImpl.cpp +++ b/src/backends/backendsCommon/test/layerTests/LstmTestImpl.cpp @@ -20,6 +20,7 @@ #include +#include namespace { @@ -45,11 +46,11 @@ void LstmUtilsVectorBatchVectorAddTestImpl( // check shape and compare values auto result = CompareTensors(batchVec, expectedOutput, expectedShape, expectedShape); - BOOST_TEST(result.m_Result, result.m_Message.str()); + CHECK_MESSAGE(result.m_Result, result.m_Message.str()); // check if iterator is back at start position batchVecEncoder->Set(1.0f); - BOOST_TEST(batchVec[0] == 1.0f); + CHECK(batchVec[0] == 1.0f); } template> @@ -72,11 +73,11 @@ void LstmUtilsZeroVectorTestImpl( // check shape and compare values auto result = CompareTensors(input, expectedOutput, expectedShape, expectedShape); - BOOST_TEST(result.m_Result, result.m_Message.str()); + CHECK_MESSAGE(result.m_Result, result.m_Message.str()); // check if iterator is back at start position outputEncoder->Set(1.0f); - BOOST_TEST(input[0] == 1.0f); + CHECK(input[0] == 1.0f); } @@ -100,11 +101,11 @@ void LstmUtilsMeanStddevNormalizationTestImpl( // check shape and compare values auto result = CompareTensors(input, expectedOutput, expectedShape, expectedShape); - BOOST_TEST(result.m_Result, result.m_Message.str()); + CHECK_MESSAGE(result.m_Result, result.m_Message.str()); // check if iterator is back at start position outputEncoder->Set(1.0f); - BOOST_TEST(input[0] == 1.0f); + CHECK(input[0] == 1.0f); } template> @@ -129,11 +130,11 @@ void LstmUtilsVectorBatchVectorCwiseProductTestImpl( // check shape and compare values auto result = CompareTensors(batchVec, expectedOutput, expectedShape, expectedShape); - BOOST_TEST(result.m_Result, result.m_Message.str()); + CHECK_MESSAGE(result.m_Result, result.m_Message.str()); // check if iterator is back at start position batchVecEncoder->Set(1.0f); - BOOST_TEST(batchVec[0] == 1.0f); + CHECK(batchVec[0] == 1.0f); } // Lstm Layer tests: -- cgit v1.2.1