Merge topic 'meaningless_diff'

82361fc45 Better message on failure for DifferenceOfProducts.
384fea5ce Make sure arguments are placed in correct order.
cddb6f7b6 Do not flush the stream when you're just going to convert it to string.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2474
This commit is contained in:
Nick Thompson 2021-04-14 01:28:50 +00:00 committed by Kitware Robot
commit 4df064f379
2 changed files with 8 additions and 8 deletions

@ -378,8 +378,8 @@ public:
static VTKM_CONT void Assert(const std::string& conditionString,
const std::string& file,
const char* func,
vtkm::Id line,
const char* func,
bool condition)
{
Assert(conditionString, file, line, func, condition, "Test assertion failed");
@ -387,8 +387,8 @@ public:
static VTKM_CONT void Assert(const std::string& conditionString,
const std::string& file,
const char* func,
vtkm::Id line,
const char* func,
const TestEqualResult& result)
{
Assert(conditionString, file, line, func, static_cast<bool>(result), result.GetMergedMessage());
@ -875,8 +875,8 @@ static inline VTKM_CONT void CheckPortal(const PortalType& portal)
if (!test_equal(expectedValue, foundValue))
{
std::stringstream message;
message << "Got unexpected value in array." << std::endl
<< "Expected: " << expectedValue << ", Found: " << foundValue << std::endl;
message << "Got unexpected value in array. Expected: " << expectedValue
<< ", Found: " << foundValue << "\n";
VTKM_TEST_FAIL(message.str().c_str());
}
}

@ -856,10 +856,10 @@ struct ScalarVectorFieldTests : public vtkm::exec::FunctorBase
vtkm::UInt64 dist = vtkm::FloatDistance(expected, computed);
VTKM_MATH_ASSERT(
dist < 2,
"Float distance for difference of products is which exceeds 1.5; this is in violation of a "
"theorem "
"proved by Jeannerod in doi.org/10.1090/S0025-5718-2013-02679-8. Is your build compiled "
"with FMAs enabled?");
"Float distance for difference of products is " + std::to_string(dist) +
" which exceeds 1.5; this is in violation of a theorem "
"proved by Jeannerod in doi.org/10.1090/S0025-5718-2013-02679-8. Is your build compiled "
"with FMAs enabled?");
#endif
}