Boost logo

Boost :

Subject: Re: [boost] [CMake] what to do now?
From: P F (pfultz2_at_[hidden])
Date: 2016-04-13 21:12:02


> On Apr 13, 2016, at 7:14 PM, Peter Dimov <lists_at_[hidden]> wrote:
>
>
> P F wrote:
>> > Where does Config depend on Core? In limits_test.cpp?
>>
>> Yes, here is a rough list of all the includes outside of config in the tests:
>> $ grep -r "#include <boost/" . | grep -v boost/config | sort -u
> ...
>
> Most of those are Config's, except
>
>> ./cstdint_test.cpp:#include <boost/detail/lightweight_test.hpp>
>> ./cstdint_test2.cpp:#include <boost/detail/lightweight_test.hpp>
>> ./limits_test.cpp:#include <boost/core/lightweight_test.hpp>
>> ./limits_test.cpp:#include <boost/detail/lightweight_main.hpp>
>> ./math_info.cpp:#include <boost/type_traits/alignment_of.hpp>
>
> We haven't been looking at test dependencies, just at the include dependencies - they were enough of a mess but are better now. Source dependencies are a superset of those, and test dependencies are the worst. Source dependencies only matter if you want to build the libraries (which means always, except for binary modular distributions) and test dependencies only matter if you want to run the tests (which means not very often.)

Yes, the test dependencies are less often, and its probably good idea to look at the source dependencies before the test dependencies, but I don’t think we can ignore the test dependencies forever.

>
> Fixing Config's tests to not depend on anything would basically require reimplementing lightweight_test there, which might not be that bad in principle, but that will not matter much for the big picture unless all libraries drop Boost.Test in favor of something that does not depend on anything Boost.

Does lightweight_test depend on something else? If so, lightweight_test could be moved to a separate module. This way Boost.Config would depend on Boost.LightweightTest and Boost.Core would depend on Boost.Config and Boost.LightweightTest.

With C++11, it is fairly easy to write a testing framework with no dependencies. I wrote the library Prove to handle testing:

https://github.com/pfultz2/Prove

Which is just a single header so its easy to copy. Plus, it doesn’t require macros to auto-resgister the tests so it makes it easier to do templated tests or data-driven tests. I don’t know if lightweight_test requires other dependencies because its trying to support pre-C++11. If so, it would be nice if boost provided a lightweight modern C++ testing framework that had no dependencies.

>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk