12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385 |
- Filters: ~[!nonportable]~[!benchmark]~[approvals]
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- <exe-name> is a <version> host application.
- Run with -? for options
- Randomness seeded to: 1
- -------------------------------------------------------------------------------
- #1455 - INFO and WARN can start with a linebreak
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: warning:
- This warning message starts with a linebreak
- This would not be caught previously
- Nor would this
- -------------------------------------------------------------------------------
- #1514: stderr/stdout is not captured in tests aborted by an exception
- -------------------------------------------------------------------------------
- Tricky.tests.cpp:<line number>
- ...............................................................................
- Tricky.tests.cpp:<line number>: FAILED:
- explicitly with message:
- 1514
- -------------------------------------------------------------------------------
- #748 - captures with unexpected exceptions
- outside assertions
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- due to unexpected exception with messages:
- answer := 42
- expected exception
- -------------------------------------------------------------------------------
- #748 - captures with unexpected exceptions
- inside REQUIRE_NOTHROW
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- REQUIRE_NOTHROW( thisThrows() )
- due to unexpected exception with messages:
- answer := 42
- expected exception
- -------------------------------------------------------------------------------
- #835 -- errno should not be touched by Catch
- -------------------------------------------------------------------------------
- Misc.tests.cpp:<line number>
- ...............................................................................
- Misc.tests.cpp:<line number>: FAILED:
- CHECK( f() == 0 )
- with expansion:
- 1 == 0
- -------------------------------------------------------------------------------
- 'Not' checks that should fail
- -------------------------------------------------------------------------------
- Condition.tests.cpp:<line number>
- ...............................................................................
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( false != false )
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( true != true )
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( !true )
- with expansion:
- false
- Condition.tests.cpp:<line number>: FAILED:
- CHECK_FALSE( true )
- with expansion:
- !true
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( !trueValue )
- with expansion:
- false
- Condition.tests.cpp:<line number>: FAILED:
- CHECK_FALSE( trueValue )
- with expansion:
- !true
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( !(1 == 1) )
- with expansion:
- false
- Condition.tests.cpp:<line number>: FAILED:
- CHECK_FALSE( 1 == 1 )
- -------------------------------------------------------------------------------
- A METHOD_AS_TEST_CASE based test run that fails
- -------------------------------------------------------------------------------
- Class.tests.cpp:<line number>
- ...............................................................................
- Class.tests.cpp:<line number>: FAILED:
- REQUIRE( s == "world" )
- with expansion:
- "hello" == "world"
- -------------------------------------------------------------------------------
- A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo
- <float>
- -------------------------------------------------------------------------------
- Class.tests.cpp:<line number>
- ...............................................................................
- Class.tests.cpp:<line number>: FAILED:
- REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )
- with expansion:
- 0 == 1
- -------------------------------------------------------------------------------
- A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo
- <int>
- -------------------------------------------------------------------------------
- Class.tests.cpp:<line number>
- ...............................................................................
- Class.tests.cpp:<line number>: FAILED:
- REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )
- with expansion:
- 0 == 1
- -------------------------------------------------------------------------------
- A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector
- <float>
- -------------------------------------------------------------------------------
- Class.tests.cpp:<line number>
- ...............................................................................
- Class.tests.cpp:<line number>: FAILED:
- REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )
- with expansion:
- 0 == 1
- -------------------------------------------------------------------------------
- A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector
- <int>
- -------------------------------------------------------------------------------
- Class.tests.cpp:<line number>
- ...............................................................................
- Class.tests.cpp:<line number>: FAILED:
- REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )
- with expansion:
- 0 == 1
- -------------------------------------------------------------------------------
- A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails -
- Template_Foo_2<float, 6>
- -------------------------------------------------------------------------------
- Class.tests.cpp:<line number>
- ...............................................................................
- Class.tests.cpp:<line number>: FAILED:
- REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )
- with expansion:
- 6 < 2
- -------------------------------------------------------------------------------
- A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails -
- Template_Foo_2<int, 2>
- -------------------------------------------------------------------------------
- Class.tests.cpp:<line number>
- ...............................................................................
- Class.tests.cpp:<line number>: FAILED:
- REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )
- with expansion:
- 2 < 2
- -------------------------------------------------------------------------------
- A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array
- <float, 6>
- -------------------------------------------------------------------------------
- Class.tests.cpp:<line number>
- ...............................................................................
- Class.tests.cpp:<line number>: FAILED:
- REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )
- with expansion:
- 6 < 2
- -------------------------------------------------------------------------------
- A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array
- <int, 2>
- -------------------------------------------------------------------------------
- Class.tests.cpp:<line number>
- ...............................................................................
- Class.tests.cpp:<line number>: FAILED:
- REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )
- with expansion:
- 2 < 2
- -------------------------------------------------------------------------------
- A TEMPLATE_TEST_CASE_METHOD based test run that fails - double
- -------------------------------------------------------------------------------
- Class.tests.cpp:<line number>
- ...............................................................................
- Class.tests.cpp:<line number>: FAILED:
- REQUIRE( Template_Fixture<TestType>::m_a == 2 )
- with expansion:
- 1.0 == 2
- -------------------------------------------------------------------------------
- A TEMPLATE_TEST_CASE_METHOD based test run that fails - float
- -------------------------------------------------------------------------------
- Class.tests.cpp:<line number>
- ...............................................................................
- Class.tests.cpp:<line number>: FAILED:
- REQUIRE( Template_Fixture<TestType>::m_a == 2 )
- with expansion:
- 1.0f == 2
- -------------------------------------------------------------------------------
- A TEMPLATE_TEST_CASE_METHOD based test run that fails - int
- -------------------------------------------------------------------------------
- Class.tests.cpp:<line number>
- ...............................................................................
- Class.tests.cpp:<line number>: FAILED:
- REQUIRE( Template_Fixture<TestType>::m_a == 2 )
- with expansion:
- 1 == 2
- -------------------------------------------------------------------------------
- A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1
- -------------------------------------------------------------------------------
- Class.tests.cpp:<line number>
- ...............................................................................
- Class.tests.cpp:<line number>: FAILED:
- REQUIRE( Nttp_Fixture<V>::value == 0 )
- with expansion:
- 1 == 0
- -------------------------------------------------------------------------------
- A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3
- -------------------------------------------------------------------------------
- Class.tests.cpp:<line number>
- ...............................................................................
- Class.tests.cpp:<line number>: FAILED:
- REQUIRE( Nttp_Fixture<V>::value == 0 )
- with expansion:
- 3 == 0
- -------------------------------------------------------------------------------
- A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6
- -------------------------------------------------------------------------------
- Class.tests.cpp:<line number>
- ...............................................................................
- Class.tests.cpp:<line number>: FAILED:
- REQUIRE( Nttp_Fixture<V>::value == 0 )
- with expansion:
- 6 == 0
- -------------------------------------------------------------------------------
- A TEST_CASE_METHOD based test run that fails
- -------------------------------------------------------------------------------
- Class.tests.cpp:<line number>
- ...............................................................................
- Class.tests.cpp:<line number>: FAILED:
- REQUIRE( m_a == 2 )
- with expansion:
- 1 == 2
- -------------------------------------------------------------------------------
- A couple of nested sections followed by a failure
- -------------------------------------------------------------------------------
- Misc.tests.cpp:<line number>
- ...............................................................................
- Misc.tests.cpp:<line number>: FAILED:
- explicitly with message:
- to infinity and beyond
- -------------------------------------------------------------------------------
- A failing expression with a non streamable type is still captured
- -------------------------------------------------------------------------------
- Tricky.tests.cpp:<line number>
- ...............................................................................
- Tricky.tests.cpp:<line number>: FAILED:
- CHECK( &o1 == &o2 )
- with expansion:
- 0x<hex digits> == 0x<hex digits>
- Tricky.tests.cpp:<line number>: FAILED:
- CHECK( o1 == o2 )
- with expansion:
- {?} == {?}
- -------------------------------------------------------------------------------
- An unchecked exception reports the line of the last assertion
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- {Unknown expression after the reported line}
- due to unexpected exception with message:
- unexpected exception
- -------------------------------------------------------------------------------
- Contains string matcher
- -------------------------------------------------------------------------------
- Matchers.tests.cpp:<line number>
- ...............................................................................
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( testStringForMatching(), Contains("not there", Catch::CaseSensitive::No) )
- with expansion:
- "this string contains 'abc' as a substring" contains: "not there" (case
- insensitive)
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( testStringForMatching(), Contains("STRING") )
- with expansion:
- "this string contains 'abc' as a substring" contains: "STRING"
- -------------------------------------------------------------------------------
- Custom exceptions can be translated when testing for nothrow
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- REQUIRE_NOTHROW( throwCustom() )
- due to unexpected exception with message:
- custom exception - not std
- -------------------------------------------------------------------------------
- Custom exceptions can be translated when testing for throwing as something else
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- REQUIRE_THROWS_AS( throwCustom(), std::exception )
- due to unexpected exception with message:
- custom exception - not std
- -------------------------------------------------------------------------------
- Custom std-exceptions can be custom translated
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- due to unexpected exception with message:
- custom std exception
- -------------------------------------------------------------------------------
- EndsWith string matcher
- -------------------------------------------------------------------------------
- Matchers.tests.cpp:<line number>
- ...............................................................................
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( testStringForMatching(), EndsWith("Substring") )
- with expansion:
- "this string contains 'abc' as a substring" ends with: "Substring"
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( testStringForMatching(), EndsWith("this", Catch::CaseSensitive::No) )
- with expansion:
- "this string contains 'abc' as a substring" ends with: "this" (case
- insensitive)
- -------------------------------------------------------------------------------
- Equality checks that should fail
- -------------------------------------------------------------------------------
- Condition.tests.cpp:<line number>
- ...............................................................................
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.int_seven == 6 )
- with expansion:
- 7 == 6
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.int_seven == 8 )
- with expansion:
- 7 == 8
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.int_seven == 0 )
- with expansion:
- 7 == 0
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.float_nine_point_one == Approx( 9.11f ) )
- with expansion:
- 9.1f == Approx( 9.1099996567 )
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.float_nine_point_one == Approx( 9.0f ) )
- with expansion:
- 9.1f == Approx( 9.0 )
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.float_nine_point_one == Approx( 1 ) )
- with expansion:
- 9.1f == Approx( 1.0 )
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.float_nine_point_one == Approx( 0 ) )
- with expansion:
- 9.1f == Approx( 0.0 )
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.double_pi == Approx( 3.1415 ) )
- with expansion:
- 3.1415926535 == Approx( 3.1415 )
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.str_hello == "goodbye" )
- with expansion:
- "hello" == "goodbye"
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.str_hello == "hell" )
- with expansion:
- "hello" == "hell"
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.str_hello == "hello1" )
- with expansion:
- "hello" == "hello1"
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.str_hello.size() == 6 )
- with expansion:
- 5 == 6
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( x == Approx( 1.301 ) )
- with expansion:
- 1.3 == Approx( 1.301 )
- -------------------------------------------------------------------------------
- Equals string matcher
- -------------------------------------------------------------------------------
- Matchers.tests.cpp:<line number>
- ...............................................................................
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( testStringForMatching(), Equals("this string contains 'ABC' as a substring") )
- with expansion:
- "this string contains 'abc' as a substring" equals: "this string contains
- 'ABC' as a substring"
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( testStringForMatching(), Equals("something else", Catch::CaseSensitive::No) )
- with expansion:
- "this string contains 'abc' as a substring" equals: "something else" (case
- insensitive)
- -------------------------------------------------------------------------------
- Exception matchers that fail
- No exception
- -------------------------------------------------------------------------------
- Matchers.tests.cpp:<line number>
- ...............................................................................
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{1} )
- because no exception was thrown where one was expected:
- Matchers.tests.cpp:<line number>: FAILED:
- REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{1} )
- because no exception was thrown where one was expected:
- -------------------------------------------------------------------------------
- Exception matchers that fail
- Type mismatch
- -------------------------------------------------------------------------------
- Matchers.tests.cpp:<line number>
- ...............................................................................
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THROWS_MATCHES( throwsAsInt(1), SpecialException, ExceptionMatcher{1} )
- due to unexpected exception with message:
- Unknown exception
- Matchers.tests.cpp:<line number>: FAILED:
- REQUIRE_THROWS_MATCHES( throwsAsInt(1), SpecialException, ExceptionMatcher{1} )
- due to unexpected exception with message:
- Unknown exception
- -------------------------------------------------------------------------------
- Exception matchers that fail
- Contents are wrong
- -------------------------------------------------------------------------------
- Matchers.tests.cpp:<line number>
- ...............................................................................
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THROWS_MATCHES( throwsSpecialException(3), SpecialException, ExceptionMatcher{1} )
- with expansion:
- SpecialException::what special exception has value of 1
- Matchers.tests.cpp:<line number>: FAILED:
- REQUIRE_THROWS_MATCHES( throwsSpecialException(4), SpecialException, ExceptionMatcher{1} )
- with expansion:
- SpecialException::what special exception has value of 1
- -------------------------------------------------------------------------------
- Expected exceptions that don't throw or unexpected exceptions fail the test
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- CHECK_THROWS_AS( thisThrows(), std::string )
- due to unexpected exception with message:
- expected exception
- Exception.tests.cpp:<line number>: FAILED:
- CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error )
- because no exception was thrown where one was expected:
- Exception.tests.cpp:<line number>: FAILED:
- CHECK_NOTHROW( thisThrows() )
- due to unexpected exception with message:
- expected exception
- -------------------------------------------------------------------------------
- FAIL aborts the test
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: FAILED:
- explicitly with message:
- This is a failure
- -------------------------------------------------------------------------------
- FAIL does not require an argument
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: FAILED:
- -------------------------------------------------------------------------------
- FAIL_CHECK does not abort the test
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: FAILED:
- explicitly with message:
- This is a failure
- Message.tests.cpp:<line number>: warning:
- This message appears in the output
- -------------------------------------------------------------------------------
- INFO and WARN do not abort tests
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: warning:
- this is a warning
- -------------------------------------------------------------------------------
- INFO gets logged on failure
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: FAILED:
- REQUIRE( a == 1 )
- with expansion:
- 2 == 1
- with messages:
- this message should be logged
- so should this
- -------------------------------------------------------------------------------
- INFO gets logged on failure, even if captured before successful assertions
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: FAILED:
- CHECK( a == 1 )
- with expansion:
- 2 == 1
- with messages:
- this message may be logged later
- this message should be logged
- Message.tests.cpp:<line number>: FAILED:
- CHECK( a == 0 )
- with expansion:
- 2 == 0
- with messages:
- this message may be logged later
- this message should be logged
- and this, but later
- -------------------------------------------------------------------------------
- INFO is reset for each loop
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: FAILED:
- REQUIRE( i < 10 )
- with expansion:
- 10 < 10
- with messages:
- current counter 10
- i := 10
- -------------------------------------------------------------------------------
- Inequality checks that should fail
- -------------------------------------------------------------------------------
- Condition.tests.cpp:<line number>
- ...............................................................................
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.int_seven != 7 )
- with expansion:
- 7 != 7
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.float_nine_point_one != Approx( 9.1f ) )
- with expansion:
- 9.1f != Approx( 9.1000003815 )
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.double_pi != Approx( 3.1415926535 ) )
- with expansion:
- 3.1415926535 != Approx( 3.1415926535 )
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.str_hello != "hello" )
- with expansion:
- "hello" != "hello"
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.str_hello.size() != 5 )
- with expansion:
- 5 != 5
- -------------------------------------------------------------------------------
- Matchers can be composed with both && and || - failing
- -------------------------------------------------------------------------------
- Matchers.tests.cpp:<line number>
- ...............................................................................
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( testStringForMatching(), (Contains("string") || Contains("different")) && Contains("random") )
- with expansion:
- "this string contains 'abc' as a substring" ( ( contains: "string" or
- contains: "different" ) and contains: "random" )
- -------------------------------------------------------------------------------
- Matchers can be negated (Not) with the ! operator - failing
- -------------------------------------------------------------------------------
- Matchers.tests.cpp:<line number>
- ...............................................................................
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( testStringForMatching(), !Contains("substring") )
- with expansion:
- "this string contains 'abc' as a substring" not contains: "substring"
- -------------------------------------------------------------------------------
- Mismatching exception messages failing the test
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- REQUIRE_THROWS_WITH( thisThrows(), "should fail" )
- with expansion:
- "expected exception" equals: "should fail"
- -------------------------------------------------------------------------------
- Nice descriptive name
- -------------------------------------------------------------------------------
- Misc.tests.cpp:<line number>
- ...............................................................................
- Misc.tests.cpp:<line number>: warning:
- This one ran
- -------------------------------------------------------------------------------
- Non-std exceptions can be translated
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- due to unexpected exception with message:
- custom exception
- -------------------------------------------------------------------------------
- Ordering comparison checks that should fail
- -------------------------------------------------------------------------------
- Condition.tests.cpp:<line number>
- ...............................................................................
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.int_seven > 7 )
- with expansion:
- 7 > 7
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.int_seven < 7 )
- with expansion:
- 7 < 7
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.int_seven > 8 )
- with expansion:
- 7 > 8
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.int_seven < 6 )
- with expansion:
- 7 < 6
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.int_seven < 0 )
- with expansion:
- 7 < 0
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.int_seven < -1 )
- with expansion:
- 7 < -1
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.int_seven >= 8 )
- with expansion:
- 7 >= 8
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.int_seven <= 6 )
- with expansion:
- 7 <= 6
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.float_nine_point_one < 9 )
- with expansion:
- 9.1f < 9
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.float_nine_point_one > 10 )
- with expansion:
- 9.1f > 10
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.float_nine_point_one > 9.2 )
- with expansion:
- 9.1f > 9.2
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.str_hello > "hello" )
- with expansion:
- "hello" > "hello"
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.str_hello < "hello" )
- with expansion:
- "hello" < "hello"
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.str_hello > "hellp" )
- with expansion:
- "hello" > "hellp"
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.str_hello > "z" )
- with expansion:
- "hello" > "z"
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.str_hello < "hellm" )
- with expansion:
- "hello" < "hellm"
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.str_hello < "a" )
- with expansion:
- "hello" < "a"
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.str_hello >= "z" )
- with expansion:
- "hello" >= "z"
- Condition.tests.cpp:<line number>: FAILED:
- CHECK( data.str_hello <= "a" )
- with expansion:
- "hello" <= "a"
- -------------------------------------------------------------------------------
- Output from all sections is reported
- one
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: FAILED:
- explicitly with message:
- Message from section one
- -------------------------------------------------------------------------------
- Output from all sections is reported
- two
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: FAILED:
- explicitly with message:
- Message from section two
- -------------------------------------------------------------------------------
- Reconstruction should be based on stringification: #914
- -------------------------------------------------------------------------------
- Decomposition.tests.cpp:<line number>
- ...............................................................................
- Decomposition.tests.cpp:<line number>: FAILED:
- CHECK( truthy(false) )
- with expansion:
- Hey, its truthy!
- -------------------------------------------------------------------------------
- Regex string matcher
- -------------------------------------------------------------------------------
- Matchers.tests.cpp:<line number>
- ...............................................................................
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( testStringForMatching(), Matches("this STRING contains 'abc' as a substring") )
- with expansion:
- "this string contains 'abc' as a substring" matches "this STRING contains
- 'abc' as a substring" case sensitively
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( testStringForMatching(), Matches("contains 'abc' as a substring") )
- with expansion:
- "this string contains 'abc' as a substring" matches "contains 'abc' as a
- substring" case sensitively
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( testStringForMatching(), Matches("this string contains 'abc' as a") )
- with expansion:
- "this string contains 'abc' as a substring" matches "this string contains
- 'abc' as a" case sensitively
- A string sent directly to stdout
- A string sent directly to stderr
- A string sent to stderr via clog
- Message from section one
- Message from section two
- -------------------------------------------------------------------------------
- StartsWith string matcher
- -------------------------------------------------------------------------------
- Matchers.tests.cpp:<line number>
- ...............................................................................
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( testStringForMatching(), StartsWith("This String") )
- with expansion:
- "this string contains 'abc' as a substring" starts with: "This String"
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( testStringForMatching(), StartsWith("string", Catch::CaseSensitive::No) )
- with expansion:
- "this string contains 'abc' as a substring" starts with: "string" (case
- insensitive)
- -------------------------------------------------------------------------------
- Tabs and newlines show in output
- -------------------------------------------------------------------------------
- Misc.tests.cpp:<line number>
- ...............................................................................
- Misc.tests.cpp:<line number>: FAILED:
- CHECK( s1 == s2 )
- with expansion:
- "if ($b == 10) {
- $a = 20;
- }"
- ==
- "if ($b == 10) {
- $a = 20;
- }
- "
- -------------------------------------------------------------------------------
- Thrown string literals are translated
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- due to unexpected exception with message:
- For some reason someone is throwing a string literal!
- -------------------------------------------------------------------------------
- Unexpected exceptions can be translated
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- due to unexpected exception with message:
- 3.14
- -------------------------------------------------------------------------------
- Vector Approx matcher -- failing
- Empty and non empty vectors are not approx equal
- -------------------------------------------------------------------------------
- Matchers.tests.cpp:<line number>
- ...............................................................................
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( empty, Approx(t1) )
- with expansion:
- { } is approx: { 1.0, 2.0 }
- -------------------------------------------------------------------------------
- Vector Approx matcher -- failing
- Just different vectors
- -------------------------------------------------------------------------------
- Matchers.tests.cpp:<line number>
- ...............................................................................
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( v1, Approx(v2) )
- with expansion:
- { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 }
- -------------------------------------------------------------------------------
- Vector matchers that fail
- Contains (element)
- -------------------------------------------------------------------------------
- Matchers.tests.cpp:<line number>
- ...............................................................................
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( v, VectorContains(-1) )
- with expansion:
- { 1, 2, 3 } Contains: -1
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( empty, VectorContains(1) )
- with expansion:
- { } Contains: 1
- -------------------------------------------------------------------------------
- Vector matchers that fail
- Contains (vector)
- -------------------------------------------------------------------------------
- Matchers.tests.cpp:<line number>
- ...............................................................................
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( empty, Contains(v) )
- with expansion:
- { } Contains: { 1, 2, 3 }
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( v, Contains(v2) )
- with expansion:
- { 1, 2, 3 } Contains: { 1, 2, 4 }
- -------------------------------------------------------------------------------
- Vector matchers that fail
- Equals
- -------------------------------------------------------------------------------
- Matchers.tests.cpp:<line number>
- ...............................................................................
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( v, Equals(v2) )
- with expansion:
- { 1, 2, 3 } Equals: { 1, 2 }
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( v2, Equals(v) )
- with expansion:
- { 1, 2 } Equals: { 1, 2, 3 }
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( empty, Equals(v) )
- with expansion:
- { } Equals: { 1, 2, 3 }
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( v, Equals(empty) )
- with expansion:
- { 1, 2, 3 } Equals: { }
- -------------------------------------------------------------------------------
- Vector matchers that fail
- UnorderedEquals
- -------------------------------------------------------------------------------
- Matchers.tests.cpp:<line number>
- ...............................................................................
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( v, UnorderedEquals(empty) )
- with expansion:
- { 1, 2, 3 } UnorderedEquals: { }
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( empty, UnorderedEquals(v) )
- with expansion:
- { } UnorderedEquals: { 1, 2, 3 }
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( permuted, UnorderedEquals(v) )
- with expansion:
- { 1, 3 } UnorderedEquals: { 1, 2, 3 }
- Matchers.tests.cpp:<line number>: FAILED:
- CHECK_THAT( permuted, UnorderedEquals(v) )
- with expansion:
- { 3, 1 } UnorderedEquals: { 1, 2, 3 }
- -------------------------------------------------------------------------------
- When unchecked exceptions are thrown directly they are always failures
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- due to unexpected exception with message:
- unexpected exception
- -------------------------------------------------------------------------------
- When unchecked exceptions are thrown during a CHECK the test should continue
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- CHECK( thisThrows() == 0 )
- due to unexpected exception with message:
- expected exception
- -------------------------------------------------------------------------------
- When unchecked exceptions are thrown during a REQUIRE the test should abort
- fail
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- REQUIRE( thisThrows() == 0 )
- due to unexpected exception with message:
- expected exception
- -------------------------------------------------------------------------------
- When unchecked exceptions are thrown from functions they are always failures
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- CHECK( thisThrows() == 0 )
- due to unexpected exception with message:
- expected exception
- -------------------------------------------------------------------------------
- When unchecked exceptions are thrown from sections they are always failures
- section name
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- due to unexpected exception with message:
- unexpected exception
- -------------------------------------------------------------------------------
- Where the LHS is not a simple value
- -------------------------------------------------------------------------------
- Tricky.tests.cpp:<line number>
- ...............................................................................
- Tricky.tests.cpp:<line number>: warning:
- Uncomment the code in this test to check that it gives a sensible compiler
- error
- -------------------------------------------------------------------------------
- Where there is more to the expression after the RHS
- -------------------------------------------------------------------------------
- Tricky.tests.cpp:<line number>
- ...............................................................................
- Tricky.tests.cpp:<line number>: warning:
- Uncomment the code in this test to check that it gives a sensible compiler
- error
- -------------------------------------------------------------------------------
- checkedElse, failing
- -------------------------------------------------------------------------------
- Misc.tests.cpp:<line number>
- ...............................................................................
- Misc.tests.cpp:<line number>: FAILED:
- CHECKED_ELSE( flag )
- with expansion:
- false
- Misc.tests.cpp:<line number>: FAILED:
- REQUIRE( testCheckedElse( false ) )
- with expansion:
- false
- -------------------------------------------------------------------------------
- checkedIf, failing
- -------------------------------------------------------------------------------
- Misc.tests.cpp:<line number>
- ...............................................................................
- Misc.tests.cpp:<line number>: FAILED:
- CHECKED_IF( flag )
- with expansion:
- false
- Misc.tests.cpp:<line number>: FAILED:
- REQUIRE( testCheckedIf( false ) )
- with expansion:
- false
- loose text artifact
- -------------------------------------------------------------------------------
- just failure
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: FAILED:
- explicitly with message:
- Previous info should not be seen
- -------------------------------------------------------------------------------
- just failure after unscoped info
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: FAILED:
- explicitly with message:
- previous unscoped info SHOULD not be seen
- -------------------------------------------------------------------------------
- looped SECTION tests
- b is currently: 0
- -------------------------------------------------------------------------------
- Misc.tests.cpp:<line number>
- ...............................................................................
- Misc.tests.cpp:<line number>: FAILED:
- CHECK( b > a )
- with expansion:
- 0 > 1
- -------------------------------------------------------------------------------
- looped SECTION tests
- b is currently: 1
- -------------------------------------------------------------------------------
- Misc.tests.cpp:<line number>
- ...............................................................................
- Misc.tests.cpp:<line number>: FAILED:
- CHECK( b > a )
- with expansion:
- 1 > 1
- -------------------------------------------------------------------------------
- looped tests
- -------------------------------------------------------------------------------
- Misc.tests.cpp:<line number>
- ...............................................................................
- Misc.tests.cpp:<line number>: FAILED:
- CHECK( ( fib[i] % 2 ) == 0 )
- with expansion:
- 1 == 0
- with message:
- Testing if fib[0] (1) is even
- Misc.tests.cpp:<line number>: FAILED:
- CHECK( ( fib[i] % 2 ) == 0 )
- with expansion:
- 1 == 0
- with message:
- Testing if fib[1] (1) is even
- Misc.tests.cpp:<line number>: FAILED:
- CHECK( ( fib[i] % 2 ) == 0 )
- with expansion:
- 1 == 0
- with message:
- Testing if fib[3] (3) is even
- Misc.tests.cpp:<line number>: FAILED:
- CHECK( ( fib[i] % 2 ) == 0 )
- with expansion:
- 1 == 0
- with message:
- Testing if fib[4] (5) is even
- Misc.tests.cpp:<line number>: FAILED:
- CHECK( ( fib[i] % 2 ) == 0 )
- with expansion:
- 1 == 0
- with message:
- Testing if fib[6] (13) is even
- Misc.tests.cpp:<line number>: FAILED:
- CHECK( ( fib[i] % 2 ) == 0 )
- with expansion:
- 1 == 0
- with message:
- Testing if fib[7] (21) is even
- -------------------------------------------------------------------------------
- mix info, unscoped info and warning
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: warning:
- and warn may mix
- Message.tests.cpp:<line number>: warning:
- they are not cleared after warnings
- -------------------------------------------------------------------------------
- more nested SECTION tests
- doesn't equal
- equal
- -------------------------------------------------------------------------------
- Misc.tests.cpp:<line number>
- ...............................................................................
- Misc.tests.cpp:<line number>: FAILED:
- REQUIRE( a == b )
- with expansion:
- 1 == 2
- -------------------------------------------------------------------------------
- not prints unscoped info from previous failures
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: FAILED:
- REQUIRE( false )
- with message:
- this SHOULD be seen
- -------------------------------------------------------------------------------
- prints unscoped info on failure
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: FAILED:
- REQUIRE( false )
- with messages:
- this SHOULD be seen
- this SHOULD also be seen
- -------------------------------------------------------------------------------
- prints unscoped info only for the first assertion
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: FAILED:
- CHECK( false )
- with message:
- this SHOULD be seen only ONCE
- -------------------------------------------------------------------------------
- send a single char to INFO
- -------------------------------------------------------------------------------
- Misc.tests.cpp:<line number>
- ...............................................................................
- Misc.tests.cpp:<line number>: FAILED:
- REQUIRE( false )
- with message:
- 3
- -------------------------------------------------------------------------------
- sends information to INFO
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: FAILED:
- REQUIRE( false )
- with messages:
- hi
- i := 7
- -------------------------------------------------------------------------------
- stacks unscoped info in loops
- -------------------------------------------------------------------------------
- Message.tests.cpp:<line number>
- ...............................................................................
- Message.tests.cpp:<line number>: FAILED:
- CHECK( false )
- with messages:
- Count 1 to 3...
- 1
- 2
- 3
- Message.tests.cpp:<line number>: FAILED:
- CHECK( false )
- with messages:
- Count 4 to 6...
- 4
- 5
- 6
- -------------------------------------------------------------------------------
- string literals of different sizes can be compared
- -------------------------------------------------------------------------------
- Tricky.tests.cpp:<line number>
- ...............................................................................
- Tricky.tests.cpp:<line number>: FAILED:
- REQUIRE( std::string( "first" ) == "second" )
- with expansion:
- "first" == "second"
- -------------------------------------------------------------------------------
- thrown std::strings are translated
- -------------------------------------------------------------------------------
- Exception.tests.cpp:<line number>
- ...............................................................................
- Exception.tests.cpp:<line number>: FAILED:
- due to unexpected exception with message:
- Why would you throw a std::string?
- ===============================================================================
- test cases: 322 | 248 passed | 70 failed | 4 failed as expected
- assertions: 1759 | 1607 passed | 131 failed | 21 failed as expected
|