mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 03:43:28 +01:00
Fixed tests with string literal on lhs
This commit is contained in:
parent
b5fabcb26b
commit
1adebefb50
@ -15,7 +15,7 @@
|
||||
Next:
|
||||
|
||||
Later:
|
||||
Finish command line parser (list as xml, specify FP tolerance)
|
||||
Finish command line parser (list as xml)
|
||||
Tags?
|
||||
Finish macros, listed here, later (just CHECK_NOFAIL now)
|
||||
*/
|
||||
|
@ -546,6 +546,17 @@ public:
|
||||
return expr;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
Expression<const char*> operator->*
|
||||
(
|
||||
const char* operand
|
||||
)
|
||||
{
|
||||
Expression<const char*> expr( m_result, operand );
|
||||
|
||||
return expr;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template<typename T>
|
||||
PtrExpression<T> operator->*
|
||||
|
@ -43,6 +43,7 @@ TEST_CASE( "./succeeding/conditions/equality",
|
||||
REQUIRE( data.float_nine_point_one == Approx( 9.1f ) );
|
||||
REQUIRE( data.double_pi == Approx( 3.1415926535 ) );
|
||||
REQUIRE( data.str_hello == "hello" );
|
||||
REQUIRE( "hello" == data.str_hello );
|
||||
REQUIRE( data.str_hello.size() == 5 );
|
||||
|
||||
double x = 1.1 + 0.1 + 0.1;
|
||||
|
@ -47,7 +47,7 @@ TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results"
|
||||
"Number of 'succeeding' tests is fixed" )
|
||||
{
|
||||
runner.runMatching( "./succeeding/*" );
|
||||
CHECK( runner.getSuccessCount() == 248 );
|
||||
CHECK( runner.getSuccessCount() == 249 );
|
||||
CHECK( runner.getFailureCount() == 0 );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user