Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost::Test Samples?
From: Richard (legalize+jeeves_at_[hidden])
Date: 2011-08-08 18:15:42


[Please do not mail me a copy of your followup]

boost-users_at_[hidden] spake the secret code
<CAH8yC8k6fFe06=RT5pgy2NH9OoUah6vmLPo=V1V19dUru_EbMg_at_[hidden]> thusly:

>It would be incredibly helpful if the project offered a few real life
>sample of things such as a program (with a `main`), a static archive,
>and a DSO (or DLL).

This all boils down to understanding how things are packaged in C++,
which isn't really the point of the blog post. The blog post was to
teach you how to start writing unit tests with Boost.Test. My target
audience is primarily Windows developers, so I wanted to demonstrate
good setup practices for that audience.

>I've heard a lot of great things about Boost, and I am glad it has
>worked for some folks. But after a couple of days on and off with
>Boost::Test, I'm beginning to wonder if its a good choice for our C++
>project.

At a former employer, we spent quite a bit of time evaluating
different unit testing frameworks for C++, including a homebrew unit
test framework. Boost.Test is as featureful as the rest of them, is
widely available and widely used.

>The Boost::Test library lacks clear and concise documentation (the
>online documentation is fractured, lack clarity, is hard to follow,
>and has broken links).

I found the documentation difficult to use as a programming guide. It
serves well as a reference for advanced users. I know from personal
experience that if you are an advanced user of something, it is hard
to write documentation for it that is accessible to new users. It can
be done, but its hard.

>The library is clearly abusing macros in a C++
>library (where are the predicates, functors, and other things I expect
>to see from a C++ library?

I would say that it is using macros, not abusing them. There is a
considerable amount of boiler plate in fixtures, assertions and so-on
and that boiler plate is most readily provided by a macro. Do you
really want to be typing __FILE__ and __LINE__ on every assertion?
There isn't any alternative to macros to supply this automatically.

-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
 <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>
      Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net