vtk-m/vtkm/testing
Kenneth Moreland 899b93ec2c Allow variable arguments to VTKM_TEST_ASSERT
The VTKM_TEST_ASSERT macro is a very useful tool for performing checks
in tests. However, it is rather annoying to have to always specify a
message for the assert. Often the failure is self evident from the
condition (which is already printed out), and specifying a message is
both repetative and annoying.

Also, it is often equally annoying to print out additional information
in the case of an assertion failure. In that case, you have to either
attach a debugger or add a printf, see the problem, and remove the
printf.

This change solves both of these problems. VTKM_TEST_ASSERT now takes a
condition and a variable number of message arguments. If no message
arguments are given, then a default message (along with the condition)
are output. If multiple message arguments are given, they are appended
together in the result. The messages do not have to be strings. Any
object that can be sent to a stream will be printed correctly. This
allows you to print out the values that caused the issue.
2018-10-08 09:17:56 -06:00
..
CMakeLists.txt Add vtkm/Geometry.h and test it. 2018-06-20 11:58:14 -04:00
OptionParser.h Change function signatures to use 'using' aliases. 2018-05-25 17:18:41 -04:00
Testing.h Allow variable arguments to VTKM_TEST_ASSERT 2018-10-08 09:17:56 -06:00
TestingGeometry.h Add vtkm/Geometry.h and test it. 2018-06-20 11:58:14 -04:00
TestingMath.h Add float version operations for vtkm::Math Pi() 2018-05-21 10:58:15 -04:00
UnitTestBinaryOperators.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestBinaryPredicates.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestBounds.cxx vtkm prefers 'using' over typedef. 2018-02-23 10:47:20 -05:00
UnitTestCellShape.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestExceptions.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestHash.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestListTag.cxx Add ListTagAppend and ListTagAppendUnique 2018-06-21 15:59:31 -04:00
UnitTestMath.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestMatrix.cxx Rename vtkm::dot() to vtkm::Dot(). 2018-05-17 08:51:01 -04:00
UnitTestNewtonsMethod.cxx vtkm prefers 'using' over typedef. 2018-02-23 10:47:20 -05:00
UnitTestNoAssert.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestPair.cxx Ensure that Pair and Vec are trivial classes. 2017-10-18 14:58:35 -04:00
UnitTestRange.cxx Fix including empty range 2018-02-19 10:13:07 -07:00
UnitTestTesting.cxx Allow variable arguments to VTKM_TEST_ASSERT 2018-10-08 09:17:56 -06:00
UnitTestTransform3D.cxx vtkm prefers 'using' over typedef. 2018-02-23 10:47:20 -05:00
UnitTestTypeListTag.cxx vtkm prefers 'using' over typedef. 2018-02-23 10:47:20 -05:00
UnitTestTypes.cxx constexpr construction for Vec classes 2018-06-20 14:15:29 -04:00
UnitTestTypeTraits.cxx vtkm prefers 'using' over typedef. 2018-02-23 10:47:20 -05:00
UnitTestUnaryPredicates.cxx Update copyright for Sandia 2017-09-20 15:33:44 -06:00
UnitTestVecAxisAlignedPointCoordinates.cxx vtkm prefers 'using' over typedef. 2018-02-23 10:47:20 -05:00
UnitTestVecFromPortal.cxx Switch over from static const to static constexpr where possible. 2018-03-10 11:39:58 -05:00
UnitTestVecFromPortalPermute.cxx Switch over from static const to static constexpr where possible. 2018-03-10 11:39:58 -05:00
UnitTestVectorAnalysis.cxx Add vtkm/Geometry.h and test it. 2018-06-20 11:58:14 -04:00
UnitTestVecTraits.cxx Switch over from static const to static constexpr where possible. 2018-03-10 11:39:58 -05:00
UnitTestVecVariable.cxx Switch over from static const to static constexpr where possible. 2018-03-10 11:39:58 -05:00
VecTraitsTests.h Rename vtkm::dot() to vtkm::Dot(). 2018-05-17 08:51:01 -04:00