Make tests less istreambuf_iterator implementation dependent
François Dumont
frs.dumont@gmail.com
Thu Sep 28 19:59:00 GMT 2017
On 28/09/2017 14:12, Jonathan Wakely wrote:
> On 27/09/17 22:16 +0200, François Dumont wrote:
>> Hi
>>
>> Â Â Â I just committed attached patch as trivial.
>>
>> Â Â Â Those tests were highly istreambuf_iterator implementation, it is
>> the result of the call to money_get<>::get which is pointing
>> immediately beyond the last character recognized to quote Standard
>> words.
>
> But according to the standard's specification for istreambuf_iterator
> it makes no difference, because both iterators point to the same
> streambuf and share the state.
>
>
Simply adding a:
VERIFY( *ibeg2 == '0' );
before calling money_get<>::get method would have broken the test.
The current istreambuf_iterator implementation capture the current
streambuf state each time it is tested for eof or evaluated. This is why
I considered those tests as fragile.
François
More information about the Libstdc++
mailing list