Boost logo

Boost :

From: Jens Seidel (jensseidel_at_[hidden])
Date: 2007-11-01 17:00:42


On Thu, Nov 01, 2007 at 05:13:49PM +0000, Gennadiy Rozental wrote:
> Jens Seidel <jensseidel <at> users.sf.net> writes:
> > a few remarks:
> >
> > Example 32
> > (http://www.patmedia.net/~rogeeff/html/utf/testing-tools/custom-
> predicate.html)
> > does not include boost/test/auto_unit_test.hpp which is
> > required for BOOST_AUTO_TEST_CASE.
>
> No it's not. In fact above header is depricated.

Right, I used older headers. Sorry.

> > You should also fix the typo
> > comparizon (use s instead of z).
>
> Some people prefer comparizon. It sounds more cool ;) But I'll fix it.

I know that there are some differences between British and American
English related to s/z. But I still doubt that comparizon is valid.
http://dict.leo.org/ende?lp=ende&p=eL4jU.&search=comparison mentions
comparison is valid for British and American (see "color comparison" entry)!

> > Your example output doesn't display the full message but truncates it.
>
> What do you mean?

Your help page custom-predicate.html contains a link "Show output".
Clicking it I see a window with black background containing the text:

<quote>
Running 1 test case...
test.cpp(28): error in "test_list_comparizon": check compare_list

*** 1 failure detected in test suite "example"
</quote>

It seems that the text is too wide for the default font. In
Iceweasel I see

<quote>
Running 1 test case...
test.cpp(28): error in "test_list_comparizon": check compare_lists( l1, l2 ) failed. Diffe

*** 1 failure detected in test suite "example"
</quote>

Do you see the difference?

> > Adapting your example using templates I get the following error (g++
> > 4.1, 4.2, ...):
>
> What did you do?

I attached a sample program in my last mail. But the problem was indeed
on my side: I tried to compile BOOST_CHECK( compare_lists<1,2>( l1, l2 ) )
but because of the comma I need to use an additional pair of commas.

> > example31.cpp:25:47: error: macro "BOOST_CHECK" passed 2 arguments, but
> takes just 1
> > example31.cpp: In function ‘void test_list_comparizon()’:
> > example31.cpp:25: error: ‘BOOST_CHECK’ was not declared in this scope
>
> This is easily fixed:
>
> BOOST_CHECK(( compare_lists( l1, l2 ) ));

Right :-)

Jens


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