Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-02-01 13:49:40


> >> BTW, why would you need to do this unusual kind of multiple restoring
in the
> >> first place?
> >
> > I want to save state of cout (or any other current log/report stream for
that
> > matter) at the start of test case/framework run and restore it after
each
> > assertion?
>
> What's wrong with wrapping each trial in a block?

I do not want to waste time on save every time. I already do this for
restore. I guess it's not that big deal. What I want ot do though it reset
stream from within Boost.Test code. I guess I will have to keep
shared_ptr<saver> m_state_saver in my log and do m_state_saver.reset( new
saver ) every time. This is kinda wastfull though: 1 extra memory allocation
and unnneded constructor call.

Gennadiy


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk