[test] output_test_stream undocumented behaviour
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 behaviour in the documentation. greetz, Manuel -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
M. Siebeneicher
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
participants (2)
-
Gennaidy Rozental
-
M. Siebeneicher