This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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 04/10/17 18:21 +0200, François Dumont wrote:
On 03/10/2017 16:20, Jonathan Wakely wrote:
Doesn't the modified test PASS anyway, even without changing how _M_c
is used?

No it doesn't because the first check for eof capture the 'a' char which is never reseted so after string construction it is still pointing to this char and is not an eof iterator. Without the _M_c assignment the iterator is still "live" and so keeps on reflecting the streambuf state.

Ah yes, I must have not adjusted the test properly when I tried to
check that. Your new test does indeed fail with the old
implementation.

Attached patch committed with:

Thanks.



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