Add assertion macros that print their values
Having alternative assertion macros in the style of
HPX_ASSERT_EQ(x, 3);
which print the value of x when the assertion fails would be nice to have to make debugging slightly easier/faster.
Sounds like a feature for the assert module sitting in the pipeline ;-)
Sounds like a feature for the assert module sitting in the pipeline ;-)
Indeed!
Hi folks: Can I PR or is the ticket for internal folks?
@tapaswenipathak feel free to work on this. You might want to have a look at what's in the testing module: https://github.com/STEllAR-GROUP/hpx/blob/master/libs/testing/include/hpx/testing.hpp. We should try to avoid duplicating functionality in both modules.
feel free to work on this. You might want to have a look at what's in the testing module: https://github.com/STEllAR-GROUP/hpx/blob/master/libs/testing/include/hpx/testing.hpp. We should try to avoid duplicating functionality in both modules.
We should keep in mind that testing is different from using assertions. If those can share functionalities - fine. I think this is not a requirement, though.
Thanks for the brain dump folks, I didn't read much, I think I can PR that macro out. I will ask if I have any questions, thanks.