mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-19 10:35:42 +00:00
Fix UnitTestError
The previous changes were incorrect and did not fix the problem.
This commit is contained in:
parent
5c13198407
commit
5ca9a4bd5e
@ -47,14 +47,14 @@ void ValidateError(const vtkm::cont::Error& error)
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string assert_msg = "StackTrace did not recurse: (" + std::to_string(count) + " <= 5)";
|
||||
|
||||
#if defined(NDEBUG)
|
||||
VTKM_TEST_ASSERT(count > 5, assert_msg);
|
||||
#else
|
||||
// The compiler can optimize out the recursive function and any other functions in release
|
||||
// mode, but the backtrace should contain atleast one entry
|
||||
// The compiler can optimize out the recursion and other function calls in release
|
||||
// mode, but the backtrace should contain atleast one entry.
|
||||
std::string assert_msg = "No entries in the stack frame\n" + stackTrace;
|
||||
VTKM_TEST_ASSERT(count >= 1, assert_msg);
|
||||
#else
|
||||
std::string assert_msg = "Expected more entries in the stack frame\n" + stackTrace;
|
||||
VTKM_TEST_ASSERT(count > 5, assert_msg);
|
||||
#endif
|
||||
}
|
||||
VTKM_TEST_ASSERT(test_equal(message, error.GetMessage()), "Message was incorrect");
|
||||
|
Loading…
Reference in New Issue
Block a user