This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make tests less istreambuf_iterator implementation dependent


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]