
[Maybe I just messed up my XCode #include directories and/or order, or maybe my CVS is fried.... (After writing the post--) please ignore the first sentence and excuse any anger instead.] I've been trying out the auto-test items in Boost.Test, re-doing them when the recent changes were uploaded to CVS. I decided to template-ize a test case I had, going from BOOST_AUTO_TEST_CASE to BOOST_AUTO_TEST_CASE_TEMPLATE with a MPL list of the types I wanted. The complier spit out 10 errors. (I think that's a lot, but for some posters here that's a little.) After using the preprocessor to copy & paste the expansion of BOOST_AUTO_TEST_CASE_TEMPLATE directly into my test file, I narrowed down the errors to two actual problems: 1. The compiler never heard of boost::type 2. And it never heard of boost::unit_test::ut_detail:: template_test_case_gen These can be found in the <boost/type.hpp> (after 10 minutes of searching) and <boost/test/test_case_template.hpp> (after 30 minutes of searching) headers, respectively. Directly #including them in my test file got my testing to work. The simple solution is to make sure to _directly_ include the headers for the items you need to compile.... [Does some checking of the auto-test examples.] The example for BOOST_AUTO_TEST_CASE_TEMPLATE shows that <boost/test/test_case_template.hpp> needs to be manually #included. This is similar to me having to #include <boost/test/floating_point_comparison.hpp> in order to make BOOST_CHECK_CLOSE work. (Is it just me, or does anyone else find the need to manually add #includes to avoid "missing-item" compiler errors within the main testing headers _extremely_ annoying?! I figure that it saves compiling time if the specialized macro is never used, and therefore the auxiliary types aren't needed, but is it worth it?) Well, it seems that I can only complain about the main problem only for <boost/type.hpp>. It seems like the author counted on that header being indirectly #included, and that hope evaporated whenever some other author purged that header (and boost::type) from his/her library. So please directly #include <boost/type.hpp> in <boost/test/unit_test_suite.hpp>. (And if possible, end the "batteries not #included" scenario for the other testing macros & headers.) -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com