
[Please do not mail me a copy of your followup]
boost-users@lists.boost.org spake the secret code
Richard wrote:
BOOST_WARN_MESSAGE( res > 1, "sin(45){" << res << "} is <= 1. Hmm.. Strange. " ); }
Thanks! I was doing that earlier, but I was hoping there is a "better" solution.
Yeah, most assertion frameworks have some way to optionally provide a message. Since Boost.Test's assertions are done with macros, there isn't a way to provide an overloaded version that supplies a contextual message. I'm afraid the best you can do is use BOOST_REQUIRE_MESSAGE() or provide your own assertion macros on top of it. -- "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/ Legalize Adulthood! http://legalizeadulthood.wordpress.com