Boost logo

Boost Users :

Subject: Re: [Boost-users] [test] output_test_stream undocumented behaviour
From: Gennaidy Rozental (rogeeff_at_[hidden])
Date: 2008-09-19 14:39:25


M. Siebeneicher <trashing <at> gmx.net> writes:

>
> Hi boost-users,
>
> I've mentioned that after calling output_test_stream.is_empty()
> the stream will be cleared. If you
> subsequently want to compare the stream with
> output_test_stream.is_equal(...) this doesn't work,
> because the stream is empty.
>
> Is this a bug or a feature? I couldn't find a description of
> the behavior in the documentation.

This is feature.

All output_test_stream validation methods by default flush the
stream afterward so that you can keep print/compare loop without
caring about clearing the stream content. If you want to perform
several checks with the same buffer, specify parameter
flush_stream=false. This parameter is supported on all comparison
methods.

I'll update documentation to make it clear.

Gennadiy


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