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: [Patch] New tests for filebuf::close()


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.


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