diff options
Diffstat (limited to 'src')
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(); } |