mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-18 10:55:39 +02:00
SelfTest checks for out_of_range exception coming from Tbc::Text
This commit is contained in:
@@ -300,7 +300,13 @@ TEST_CASE( "Long strings can be wrapped", "[wrap]" ) {
|
|||||||
== "one two three\n four\n five\n six" );
|
== "one two three\n four\n five\n six" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SECTION( "Wrapping near tab doesn't extract substrings from invalid positions", "" ) {
|
||||||
|
|
||||||
|
CHECK_NOTHROW( Text( "one\ttwo", TextAttributes().setWidth( 2 ) ).toString() );
|
||||||
|
CHECK_NOTHROW( Text( "one\ttwo", TextAttributes().setWidth( 3 ) ).toString() );
|
||||||
|
CHECK_NOTHROW( Text( "one\ttwo", TextAttributes().setWidth( 4 ) ).toString() );
|
||||||
|
CHECK_NOTHROW( Text( "one\ttwo", TextAttributes().setWidth( 5 ) ).toString() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
using namespace Catch;
|
using namespace Catch;
|
||||||
|
Reference in New Issue
Block a user