aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Eilers <jan.eilers@arm.com>2021-09-28 15:11:28 +0100
committerColm Donelan <colm.donelan@arm.com>2021-10-12 14:46:23 +0000
commit13d2e0d39f6d8c923f5b92984ce52ee6e14f5436 (patch)
treeb71f219ee2f853c149bd554f8983d9566de0d61e /src
parent26f64fe7ba9204529c360a1950ac9e58dd507ae0 (diff)
downloadarmnn-13d2e0d39f6d8c923f5b92984ce52ee6e14f5436.tar.gz
Github 581 - Upgrade doctest
* Upgrade doctest to version 2.4.6 to allow Arm NN to build with glibc 2.34 Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Iff2ef286ba5ad0e0ec0f54f510253a2ec4b464d3
Diffstat (limited to 'src')
-rw-r--r--src/armnn/test/TestLayerVisitor.cpp8
-rw-r--r--src/armnnSerializer/test/SerializerTestUtils.cpp12
-rw-r--r--src/backends/backendsCommon/test/DynamicBackendTests.hpp4
-rw-r--r--src/backends/backendsCommon/test/JsonPrinterTestImpl.cpp4
4 files changed, 14 insertions, 14 deletions
diff --git a/src/armnn/test/TestLayerVisitor.cpp b/src/armnn/test/TestLayerVisitor.cpp
index d5f705f0da..25ad5884c8 100644
--- a/src/armnn/test/TestLayerVisitor.cpp
+++ b/src/armnn/test/TestLayerVisitor.cpp
@@ -75,11 +75,11 @@ void TestLayerVisitor::CheckConstTensorPtrs(const std::string& name,
{
if (expected == nullptr)
{
- CHECK_MESSAGE(actual == nullptr, name + " actual should have been a nullptr");
+ CHECK_MESSAGE(actual == nullptr, (name + " actual should have been a nullptr"));
}
else
{
- CHECK_MESSAGE(actual != nullptr, name + " actual should have been set");
+ CHECK_MESSAGE(actual != nullptr, (name + " actual should have been set"));
if (actual != nullptr)
{
CheckConstTensors(*expected, *actual);
@@ -93,11 +93,11 @@ void TestLayerVisitor::CheckConstTensorPtrs(const std::string& name,
{
if (expected == nullptr)
{
- CHECK_MESSAGE(actual == nullptr, name + " actual should have been a nullptr");
+ CHECK_MESSAGE(actual == nullptr, (name + " actual should have been a nullptr"));
}
else
{
- CHECK_MESSAGE(actual != nullptr, name + " actual should have been set");
+ CHECK_MESSAGE(actual != nullptr, (name + " actual should have been set"));
if (actual != nullptr)
{
CheckConstTensors(*expected, *actual);
diff --git a/src/armnnSerializer/test/SerializerTestUtils.cpp b/src/armnnSerializer/test/SerializerTestUtils.cpp
index caa11573c5..d0a8e2d5ec 100644
--- a/src/armnnSerializer/test/SerializerTestUtils.cpp
+++ b/src/armnnSerializer/test/SerializerTestUtils.cpp
@@ -75,24 +75,24 @@ void LayerVerifierBase::VerifyConstTensors(const std::string& tensorName,
{
if (expectedPtr == nullptr)
{
- CHECK_MESSAGE(actualPtr == nullptr, tensorName + " should not exist");
+ CHECK_MESSAGE(actualPtr == nullptr, (tensorName + " should not exist"));
}
else
{
- CHECK_MESSAGE(actualPtr != nullptr, tensorName + " should have been set");
+ CHECK_MESSAGE(actualPtr != nullptr, (tensorName + " should have been set"));
if (actualPtr != nullptr)
{
const armnn::TensorInfo& expectedInfo = expectedPtr->GetInfo();
const armnn::TensorInfo& actualInfo = actualPtr->GetInfo();
CHECK_MESSAGE(expectedInfo.GetShape() == actualInfo.GetShape(),
- tensorName + " shapes don't match");
+ (tensorName + " shapes don't match"));
CHECK_MESSAGE(
GetDataTypeName(expectedInfo.GetDataType()) == GetDataTypeName(actualInfo.GetDataType()),
- tensorName + " data types don't match");
+ (tensorName + " data types don't match"));
CHECK_MESSAGE(expectedPtr->GetNumBytes() == actualPtr->GetNumBytes(),
- tensorName + " (GetNumBytes) data sizes do not match");
+ (tensorName + " (GetNumBytes) data sizes do not match"));
if (expectedPtr->GetNumBytes() == actualPtr->GetNumBytes())
{
//check the data is identical
@@ -107,7 +107,7 @@ void LayerVerifierBase::VerifyConstTensors(const std::string& tensorName,
break;
}
}
- CHECK_MESSAGE(same, tensorName + " data does not match");
+ CHECK_MESSAGE(same, (tensorName + " data does not match"));
}
}
}
diff --git a/src/backends/backendsCommon/test/DynamicBackendTests.hpp b/src/backends/backendsCommon/test/DynamicBackendTests.hpp
index f49c36e5b1..046ee3a488 100644
--- a/src/backends/backendsCommon/test/DynamicBackendTests.hpp
+++ b/src/backends/backendsCommon/test/DynamicBackendTests.hpp
@@ -146,7 +146,7 @@ std::string GetBasePath(const std::string& basePath)
// This is the base path from the build where the test libraries were built.
path sharedObjectPath = programLocation.append(basePath);
REQUIRE_MESSAGE(exists(sharedObjectPath),
- "Base path for shared objects does not exist: " + sharedObjectPath.string());
+ ("Base path for shared objects does not exist: " + sharedObjectPath.string()));
return sharedObjectPath.string();
}
@@ -385,7 +385,7 @@ void CreateValidDynamicBackendObjectTestImpl()
// We expect this path to exists so we can load a valid dynamic backend.
CHECK_MESSAGE(fs::exists(testSubDirectory),
- "Base path for shared objects does not exist: " + testSubDirectory);
+ ("Base path for shared objects does not exist: " + testSubDirectory));
std::string sharedObjectFilePath = GetTestFilePath(testSubDirectory, g_TestValidTestDynamicBackendFileName);
diff --git a/src/backends/backendsCommon/test/JsonPrinterTestImpl.cpp b/src/backends/backendsCommon/test/JsonPrinterTestImpl.cpp
index c4c9f7f31c..a1128cfcb9 100644
--- a/src/backends/backendsCommon/test/JsonPrinterTestImpl.cpp
+++ b/src/backends/backendsCommon/test/JsonPrinterTestImpl.cpp
@@ -68,7 +68,7 @@ std::vector<double> ExtractMeasurements(const std::string& exp)
}
catch (std::invalid_argument const&)
{
- FAIL("Could not convert measurements to double: " + numberString);
+ FAIL(("Could not convert measurements to double: " + numberString));
}
numberString.clear();
@@ -83,7 +83,7 @@ std::vector<double> ExtractMeasurements(const std::string& exp)
}
catch (std::invalid_argument const&)
{
- FAIL("Could not convert measurements to double: " + numberString);
+ FAIL(("Could not convert measurements to double: " + numberString));
}
numberString.clear();
}