Boost logo

Boost :

Subject: [boost] [BoostBook] how to automatically test code examples?
From: Hans Dembinski (hans.dembinski_at_[hidden])
Date: 2017-10-16 09:57:06

Hi everyone,

I am using BoostBook to prepare the documentation for the proposed histogram library

I have written a good deal of the documentation already, and it compiles fine with bjam (thanks to Klemens who showed me how).

It says in the BoostBook documentation
"The BoostBook format allows testcases to be generated by weaving together program fragments from example programs in the documentation. This capability is integrated with testsuite generation so that example programs are normal tests in BoostBook."

That's awesome, I would love to use this feature, but the documentation is not explaining how to actually do that. I found the element "testsuite" which probably does what I want. I went on to scan the Boost repository for this BoostBook element, but couldn't find an example to copy from.

Could someone help me out? How do I modify my BoostBook and Jam files to generate tests out of the code examples in the documentation?

Best regards,

Boost list run by bdawes at, gregod at, cpdaniel at, john at