mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Refactored string wrapper
- to be much more flexible (writes to vector) - fixed a couple of bugs
This commit is contained in:
		| @@ -211,7 +211,7 @@ namespace Catch { | ||||
|                 if( result.hasExpandedExpression() ) { | ||||
|                     stream << "with expansion:\n"; | ||||
|                     TextColour colourGuard( TextColour::ReconstructedExpression ); | ||||
|                     stream << wrapLongStrings( result.getExpandedExpression() ) << "\n"; | ||||
|                     stream << LineWrapper().setIndent(2).wrap( result.getExpandedExpression() ).toString() << "\n"; | ||||
|                 } | ||||
|             } | ||||
|             void printMessage() const { | ||||
| @@ -219,8 +219,9 @@ namespace Catch { | ||||
|                     stream << messageLabel << ":" << "\n"; | ||||
|                 for( std::vector<MessageInfo>::const_iterator it = messages.begin(), itEnd = messages.end(); | ||||
|                         it != itEnd; | ||||
|                         ++it ) { | ||||
|                     stream << wrapLongStrings( it->message ) << "\n"; | ||||
|                         ++it ) {                     | ||||
|                     LineWrapper().setIndent(2).wrap( it->message ).intoStream( stream ); | ||||
|                     stream << "\n"; | ||||
|                 } | ||||
|             } | ||||
|             void printSourceInfo() const { | ||||
| @@ -228,10 +229,6 @@ namespace Catch { | ||||
|                 stream << result.getSourceInfo() << ": "; | ||||
|             } | ||||
|              | ||||
|             static std::string wrapLongStrings( std::string const& _string ){ | ||||
|                 return Catch::wrapLongStrings( _string, CATCH_CONFIG_CONSOLE_WIDTH-1, 2 ); | ||||
|             } | ||||
|              | ||||
|             std::ostream& stream; | ||||
|             AssertionStats const& stats; | ||||
|             AssertionResult const& result; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Phil Nash
					Phil Nash