[Patch] New tests for filebuf::close()

Paolo Carlini pcarlini@unitus.it
Mon May 19 18:27:00 GMT 2003


Benjamin Kosnik wrote:

>>Tested x86-linux. Ok with you, Benjamin?
>>
>Looks good, thanks!
>
Committed.

I'm thinking of preparing also more "cute" tests directly
checking that after close() any I/O attempt leads to
uflow/underflow/overflow.

It's easy with the trick already present in 9404 and 9701
(due to Pétur), e.g.:

class Derived_filebuf : public std::filebuf
{
public:
  int_type overflow(int_type c)
  {
    over_called = true;
    return std::filebuf::overflow(c);
  }
};

Shall I proceed?

Paolo.



More information about the Libstdc++ mailing list