[Please do not mail me a copy of your followup]
Eric Prud'hommeaux
* Richard
[2014-05-27 23:20+0000] Did you really mean to pass in 1 as the number of characters?
Yes, but just because my original attached example had trivial names constructed by crossing the chars in argv[1] and argv[2], e.g. abc 12 -> a1 b1 c1 a2 b2 c2.
In this case the number of characters in the test names are 2 :-)
That makes sense. I wonder why the macros invoke make_test_cast, which then invokes the constructor:
from boost/test/unit_test_suite_impl.hpp:252: inline test_case* make_test_case( callback0<> const& test_func, const_string tc_name ) { return new test_case( ut_detail::normalize_test_case_name( tc_name ), test_func ); } , maybe some mechanical constraints on invoking constructors from macros?
No, it is just so that they can call normalize_test_case_name which strips the leading '&' from any name, so if you did BOOST_TEST_CASE(&fn), the test case name would be 'fn', not '&fn'. -- "The Direct3D Graphics Pipeline" free book http://tinyurl.com/d3d-pipeline The Computer Graphics Museum http://computergraphicsmuseum.org The Terminals Wiki http://terminals.classiccmp.org Legalize Adulthood! (my blog) http://legalizeadulthood.wordpress.com