forked from catchorg/Catch2
Some minor tidy-up/ style alignment of recent toString merges
This commit is contained in:
@@ -31,43 +31,37 @@ namespace Catch {
|
||||
}
|
||||
|
||||
// Call the overload
|
||||
TEST_CASE( "toString( has_toString )", "[toString]" )
|
||||
{
|
||||
TEST_CASE( "toString( has_toString )", "[toString]" ) {
|
||||
has_toString item;
|
||||
REQUIRE( Catch::toString( item ) == "toString( has_toString )" );
|
||||
}
|
||||
|
||||
// Call the overload
|
||||
TEST_CASE( "toString( has_maker )", "[toString]" )
|
||||
{
|
||||
TEST_CASE( "toString( has_maker )", "[toString]" ) {
|
||||
has_maker item;
|
||||
REQUIRE( Catch::toString( item ) == "StringMaker<has_maker>" );
|
||||
}
|
||||
|
||||
// Call the overload
|
||||
TEST_CASE( "toString( has_maker_and_toString )", "[toString]" )
|
||||
{
|
||||
TEST_CASE( "toString( has_maker_and_toString )", "[toString]" ) {
|
||||
has_maker_and_toString item;
|
||||
REQUIRE( Catch::toString( item ) == "toString( has_maker_and_toString )" );
|
||||
}
|
||||
|
||||
// Vectors...
|
||||
TEST_CASE( "toString( vectors<has_toString )", "[toString]" )
|
||||
{
|
||||
TEST_CASE( "toString( vectors<has_toString )", "[toString]" ) {
|
||||
std::vector<has_toString> v(1);
|
||||
// This invokes template<T> toString which actually gives us '{ ? }'
|
||||
REQUIRE( Catch::toString( v ) == "{ {?} }" );
|
||||
}
|
||||
|
||||
TEST_CASE( "toString( vectors<has_maker )", "[toString]" )
|
||||
{
|
||||
TEST_CASE( "toString( vectors<has_maker )", "[toString]" ) {
|
||||
std::vector<has_maker> v(1);
|
||||
REQUIRE( Catch::toString( v ) == "{ StringMaker<has_maker> }" );
|
||||
}
|
||||
|
||||
|
||||
TEST_CASE( "toString( vectors<has_maker_and_toString )", "[toString]" )
|
||||
{
|
||||
TEST_CASE( "toString( vectors<has_maker_and_toString )", "[toString]" ) {
|
||||
std::vector<has_maker_and_toString> v(1);
|
||||
// Note: This invokes the template<T> toString -> StringMaker
|
||||
REQUIRE( Catch::toString( v ) == "{ StringMaker<has_maker_and_toString> }" );
|
||||
|
||||
Reference in New Issue
Block a user