From: Paul A. Bristow (boost_at_[hidden])
Date: 2003-10-14 15:07:16
Thanks but because what I want to pass is effectively a PROGRAM string
"<< hex << showpoint << showbase << MySpecialManips ..."
AND I need a special ostream initialiser "setDefaults(oss)"
#define CHECK(manips, result)\
oss << manips;\
conlcude I must use a macro :-( Nasty but effective.
But your to_string looks most useful generally. Perhaps if I convert the
setDefaults to a manipulator and write
oss << setdefaults << manips
Does this look feasible with your to_string?
BOOST_CHECK_EQUAL(setDefaults << hex << showpoint << showbase <<
MySpecialManips, "expected string");
Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB UK
+44 1539 561830 Mobile +44 7714 33 02 04
| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]]On Behalf Of John Torjo
| Sent: Tuesday, October 14, 2003 10:21 AM
| To: Boost mailing list
| Subject: Re: [boost] Boost Test tools to test manipulators
| I might have understood this all wrong, but maybe this will help you:
| You can write what you wish, and as many manipulators as you wish.
| And at the end, it's automatically converted to string.
| Please email me if you want the source code.