
1 Feb
2005
1 Feb
'05
6:49 p.m.
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