Use test_equal for comparison.
The testing of ArrayHandleGroupVec was just using the == operator to check values. Even though we are not doing any math, optimizers can sometimes make float values slightly different anyway, so test_equal should give the correct comparison.
This commit is contained in:
parent
c89647746a
commit
d47417fd20
@ -457,7 +457,7 @@ private:
|
||||
{
|
||||
const ComponentType expectedValue =
|
||||
TestValue(totalIndex, ComponentType());
|
||||
VTKM_TEST_ASSERT(result[componentIndex] == expectedValue,
|
||||
VTKM_TEST_ASSERT(test_equal(result[componentIndex], expectedValue),
|
||||
"Result array got wrong value.");
|
||||
totalIndex++;
|
||||
}
|
||||
@ -510,7 +510,7 @@ private:
|
||||
{
|
||||
const ComponentType result =
|
||||
resultArray.GetPortalConstControl().Get(totalIndex);
|
||||
VTKM_TEST_ASSERT(result == expectedValue[componentIndex],
|
||||
VTKM_TEST_ASSERT(test_equal(result, expectedValue[componentIndex]),
|
||||
"Result array got wrong value.");
|
||||
totalIndex++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user