Merge remote-tracking branch 'phil' into include-guard-fixes

Conflicts:
	single_include/catch.hpp
This commit is contained in:
Matt Wozniski
2012-09-26 21:42:44 -04:00
19 changed files with 800 additions and 200 deletions

View File

@@ -95,10 +95,10 @@ namespace Catch {
return getCurrentMutableContext();
}
std::streambuf* createStreamBuf( const std::string& streamName ) {
if( streamName == "stdout" ) return std::cout.rdbuf();
if( streamName == "stderr" ) return std::cerr.rdbuf();
if( streamName == "debug" ) return new StreamBufImpl<OutputDebugWriter>;
Stream createStream( const std::string& streamName ) {
if( streamName == "stdout" ) return Stream( std::cout.rdbuf(), false );
if( streamName == "stderr" ) return Stream( std::cerr.rdbuf(), false );
if( streamName == "debug" ) return Stream( new StreamBufImpl<OutputDebugWriter>, true );
throw std::domain_error( "Unknown stream: " + streamName );
}