Hi, thank you feedback and sorry by the delay.
I have added some tests:
A good start (though I am not clear what using the macro ILOG2_TEST really buys you. It will be less familiar to Boost users. It isn’t as if it saves you much typing?
I haven’t looked at the coverage of difficult cases but it’s on the right track. Other tests can be added as you (or worse, other people) find bugs (features) ;-)
You might like to indicate what feature is being tested as a comment – unless it’s obvious.
I’d avoid using BOOST_TEST in examples. The policies example isn’t quite the template that users can copy and paste to get them started quickly. (And policies appear to be a bit scary – until you realise that most of time you can just ignore them – until you need a better error message etc. So the example would better show at least two cases – err silently and return -1 or whatever, and err with some informative output. ).
(It took a real whizz like John Maddock to devise and apply policies. My contribution was to complain that you couldn’t do some things that reasonable users would need to!).
I also think it is helpful to include the output from the example as a comment. I think it often fits nicely on the end of the same line as the cout << .... (Saves moving ones eye down to notes at the end (or worse running the example to find out!). Of course if the output is long you will need another line, or it will fit better at the end.
That can be found in the docs:
Looking very smart J
Have fun!
I am having, thank you :)
J
Keep up the good work!
(I hope some people will start to use this collection ‘in anger’ soon?)
PS I noted typos for ‘wich’ in more than one place.
and legth in
Not found a string of consecutive ones with legth at least 20and lots of “it’s” that should be “its”Only use “it’s” if short for “it is” !!
---
Paul A. Bristow
Prizet Farmhouse
Kendal, UK LA8 8AB
+44 1539 561830, mobile +44 7714330204
pbristow@hetp.u-net.com