tap.sw.approved.txt 247 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605
  1. # rng-seed: 1
  2. # # A test name that starts with a #
  3. ok {test-number} - with 1 message: 'yay'
  4. # #1027: Bitfields can be captured
  5. ok {test-number} - y.v == 0 for: 0 == 0
  6. # #1027: Bitfields can be captured
  7. ok {test-number} - 0 == y.v for: 0 == 0
  8. # #1147
  9. ok {test-number} - t1 == t2 for: {?} == {?}
  10. # #1147
  11. ok {test-number} - t1 != t2 for: {?} != {?}
  12. # #1147
  13. ok {test-number} - t1 < t2 for: {?} < {?}
  14. # #1147
  15. ok {test-number} - t1 > t2 for: {?} > {?}
  16. # #1147
  17. ok {test-number} - t1 <= t2 for: {?} <= {?}
  18. # #1147
  19. ok {test-number} - t1 >= t2 for: {?} >= {?}
  20. # #1175 - Hidden Test
  21. ok {test-number} -
  22. # #1238
  23. ok {test-number} - std::memcmp(uarr, "123", sizeof(uarr)) == 0 for: 0 == 0 with 2 messages: 'uarr := "123"' and 'sarr := "456"'
  24. # #1238
  25. ok {test-number} - std::memcmp(sarr, "456", sizeof(sarr)) == 0 for: 0 == 0 with 2 messages: 'uarr := "123"' and 'sarr := "456"'
  26. # #1245
  27. ok {test-number} -
  28. # #1319: Sections can have description (even if it is not saved
  29. ok {test-number} -
  30. # #1403
  31. ok {test-number} - h1 == h2 for: [1403 helper] == [1403 helper]
  32. # #1455 - INFO and WARN can start with a linebreak
  33. warning {test-number} - '
  34. This info message starts with a linebreak' with 1 message: '
  35. This warning message starts with a linebreak'
  36. This would not be caught previously
  37. Nor would this
  38. # #1514: stderr/stdout is not captured in tests aborted by an exception
  39. not ok {test-number} - explicitly with 1 message: '1514'
  40. # #1548
  41. ok {test-number} - std::is_same<TypeList<int>, TypeList<int>>::value for: true
  42. # #1905 -- test spec parser properly clears internal state between compound tests
  43. ok {test-number} - spec.matches(*fakeTestCase("spec . char")) for: true
  44. # #1905 -- test spec parser properly clears internal state between compound tests
  45. ok {test-number} - spec.matches(*fakeTestCase("spec , char")) for: true
  46. # #1905 -- test spec parser properly clears internal state between compound tests
  47. ok {test-number} - !(spec.matches(*fakeTestCase(R"(spec \, char)"))) for: !false
  48. # #1912 -- test spec parser handles escaping
  49. ok {test-number} - spec.matches(*fakeTestCase(R"(spec {a} char)")) for: true
  50. # #1912 -- test spec parser handles escaping
  51. ok {test-number} - spec.matches(*fakeTestCase(R"(spec [a] char)")) for: true
  52. # #1912 -- test spec parser handles escaping
  53. ok {test-number} - !(spec.matches(*fakeTestCase("differs but has similar tag", "[a]"))) for: !false
  54. # #1912 -- test spec parser handles escaping
  55. ok {test-number} - spec.matches(*fakeTestCase(R"(spec \ char)")) for: true
  56. # #1913 - GENERATE inside a for loop should not keep recreating the generator
  57. ok {test-number} - counter < 7 for: 3 < 7
  58. # #1913 - GENERATE inside a for loop should not keep recreating the generator
  59. ok {test-number} - counter < 7 for: 6 < 7
  60. # #1913 - GENERATEs can share a line
  61. ok {test-number} - i != j for: 1 != 3
  62. # #1913 - GENERATEs can share a line
  63. ok {test-number} - i != j for: 1 != 4
  64. # #1913 - GENERATEs can share a line
  65. ok {test-number} - i != j for: 2 != 3
  66. # #1913 - GENERATEs can share a line
  67. ok {test-number} - i != j for: 2 != 4
  68. # #1938 - GENERATE after a section
  69. ok {test-number} - with 1 message: 'A'
  70. # #1938 - GENERATE after a section
  71. ok {test-number} - m for: 1
  72. # #1938 - GENERATE after a section
  73. ok {test-number} - m for: 2
  74. # #1938 - GENERATE after a section
  75. ok {test-number} - m for: 3
  76. # #1938 - Section followed by flat generate
  77. ok {test-number} - 1
  78. # #1938 - Section followed by flat generate
  79. ok {test-number} - m for: 2
  80. # #1938 - Section followed by flat generate
  81. ok {test-number} - m for: 3
  82. # #1938 - flat generate
  83. ok {test-number} - m for: 1
  84. # #1938 - flat generate
  85. ok {test-number} - m for: 2
  86. # #1938 - flat generate
  87. ok {test-number} - m for: 3
  88. # #1938 - mixed sections and generates
  89. ok {test-number} - with 1 message: 'A'
  90. # #1938 - mixed sections and generates
  91. ok {test-number} - with 3 messages: 'i := 1' and 'j := 3' and 'k := 5'
  92. # #1938 - mixed sections and generates
  93. ok {test-number} - with 1 message: 'B'
  94. # #1938 - mixed sections and generates
  95. ok {test-number} - with 3 messages: 'i := 1' and 'j := 3' and 'k := 6'
  96. # #1938 - mixed sections and generates
  97. ok {test-number} - with 1 message: 'B'
  98. # #1938 - mixed sections and generates
  99. ok {test-number} - with 3 messages: 'i := 1' and 'j := 4' and 'k := 5'
  100. # #1938 - mixed sections and generates
  101. ok {test-number} - with 3 messages: 'i := 1' and 'j := 4' and 'k := 6'
  102. # #1938 - mixed sections and generates
  103. ok {test-number} - with 1 message: 'A'
  104. # #1938 - mixed sections and generates
  105. ok {test-number} - with 3 messages: 'i := 2' and 'j := 3' and 'k := 5'
  106. # #1938 - mixed sections and generates
  107. ok {test-number} - with 1 message: 'B'
  108. # #1938 - mixed sections and generates
  109. ok {test-number} - with 3 messages: 'i := 2' and 'j := 3' and 'k := 6'
  110. # #1938 - mixed sections and generates
  111. ok {test-number} - with 1 message: 'B'
  112. # #1938 - mixed sections and generates
  113. ok {test-number} - with 3 messages: 'i := 2' and 'j := 4' and 'k := 5'
  114. # #1938 - mixed sections and generates
  115. ok {test-number} - with 3 messages: 'i := 2' and 'j := 4' and 'k := 6'
  116. # #1938 - nested generate
  117. ok {test-number} - m for: 1
  118. # #1938 - nested generate
  119. ok {test-number} - n for: 1
  120. # #1938 - nested generate
  121. ok {test-number} - m for: 1
  122. # #1938 - nested generate
  123. ok {test-number} - n for: 2
  124. # #1938 - nested generate
  125. ok {test-number} - m for: 1
  126. # #1938 - nested generate
  127. ok {test-number} - n for: 3
  128. # #1938 - nested generate
  129. ok {test-number} - m for: 2
  130. # #1938 - nested generate
  131. ok {test-number} - n for: 1
  132. # #1938 - nested generate
  133. ok {test-number} - m for: 2
  134. # #1938 - nested generate
  135. ok {test-number} - n for: 2
  136. # #1938 - nested generate
  137. ok {test-number} - m for: 2
  138. # #1938 - nested generate
  139. ok {test-number} - n for: 3
  140. # #1938 - nested generate
  141. ok {test-number} - m for: 3
  142. # #1938 - nested generate
  143. ok {test-number} - n for: 1
  144. # #1938 - nested generate
  145. ok {test-number} - m for: 3
  146. # #1938 - nested generate
  147. ok {test-number} - n for: 2
  148. # #1938 - nested generate
  149. ok {test-number} - m for: 3
  150. # #1938 - nested generate
  151. ok {test-number} - n for: 3
  152. # #1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0
  153. ok {test-number} -
  154. # #1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0
  155. ok {test-number} -
  156. # #1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0
  157. ok {test-number} -
  158. # #2152 - ULP checks between differently signed values were wrong - double
  159. ok {test-number} - smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) for: 0.0 is within 2 ULPs of -4.9406564584124654e-324 ([-1.4821969375237396e-323, 4.9406564584124654e-324])
  160. # #2152 - ULP checks between differently signed values were wrong - double
  161. ok {test-number} - smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0.0 not is within 1 ULPs of -4.9406564584124654e-324 ([-9.8813129168249309e-324, -0.0000000000000000e+00])
  162. # #2152 - ULP checks between differently signed values were wrong - float
  163. ok {test-number} - smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) for: 0.0f is within 2 ULPs of -1.40129846e-45f ([-4.20389539e-45, 1.40129846e-45])
  164. # #2152 - ULP checks between differently signed values were wrong - float
  165. ok {test-number} - smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0.0f not is within 1 ULPs of -1.40129846e-45f ([-2.80259693e-45, -0.00000000e+00])
  166. # #748 - captures with unexpected exceptions
  167. not ok {test-number} - unexpected exception with message: 'answer := 42' with 1 message: 'expected exception'
  168. # #748 - captures with unexpected exceptions
  169. not ok {test-number} - unexpected exception with message: 'answer := 42'; expression was: thisThrows() with 1 message: 'expected exception'
  170. # #748 - captures with unexpected exceptions
  171. ok {test-number} - thisThrows() with 1 message: 'answer := 42'
  172. # #809
  173. ok {test-number} - 42 == f for: 42 == {?}
  174. # #833
  175. ok {test-number} - a == t for: 3 == 3
  176. # #833
  177. ok {test-number} - a == t for: 3 == 3
  178. # #833
  179. ok {test-number} - throws_int(true)
  180. # #833
  181. ok {test-number} - throws_int(true), int
  182. # #833
  183. ok {test-number} - throws_int(false)
  184. # #833
  185. ok {test-number} - "aaa", Catch::Matchers::EndsWith("aaa") for: "aaa" ends with: "aaa"
  186. # #833
  187. ok {test-number} - templated_tests<int>(3) for: true
  188. # #835 -- errno should not be touched by Catch2
  189. not ok {test-number} - f() == 0 for: 1 == 0
  190. # #835 -- errno should not be touched by Catch2
  191. ok {test-number} - errno_after == 1 for: 1 == 1
  192. # #872
  193. ok {test-number} - x == 4 for: {?} == 4 with 1 message: 'dummy := 0'
  194. # #961 -- Dynamically created sections should all be reported
  195. ok {test-number} - with 1 message: 'Everything is OK'
  196. # #961 -- Dynamically created sections should all be reported
  197. ok {test-number} - with 1 message: 'Everything is OK'
  198. # #961 -- Dynamically created sections should all be reported
  199. ok {test-number} - with 1 message: 'Everything is OK'
  200. # #961 -- Dynamically created sections should all be reported
  201. ok {test-number} - with 1 message: 'Everything is OK'
  202. # #961 -- Dynamically created sections should all be reported
  203. ok {test-number} - with 1 message: 'Everything is OK'
  204. # 'Not' checks that should fail
  205. not ok {test-number} - false != false
  206. # 'Not' checks that should fail
  207. not ok {test-number} - true != true
  208. # 'Not' checks that should fail
  209. not ok {test-number} - !true for: false
  210. # 'Not' checks that should fail
  211. not ok {test-number} - !(true) for: !true
  212. # 'Not' checks that should fail
  213. not ok {test-number} - !trueValue for: false
  214. # 'Not' checks that should fail
  215. not ok {test-number} - !(trueValue) for: !true
  216. # 'Not' checks that should fail
  217. not ok {test-number} - !(1 == 1) for: false
  218. # 'Not' checks that should fail
  219. not ok {test-number} - !(1 == 1)
  220. # 'Not' checks that should succeed
  221. ok {test-number} - false == false
  222. # 'Not' checks that should succeed
  223. ok {test-number} - true == true
  224. # 'Not' checks that should succeed
  225. ok {test-number} - !false for: true
  226. # 'Not' checks that should succeed
  227. ok {test-number} - !(false) for: !false
  228. # 'Not' checks that should succeed
  229. ok {test-number} - !falseValue for: true
  230. # 'Not' checks that should succeed
  231. ok {test-number} - !(falseValue) for: !false
  232. # 'Not' checks that should succeed
  233. ok {test-number} - !(1 == 2) for: true
  234. # 'Not' checks that should succeed
  235. ok {test-number} - !(1 == 2)
  236. # (unimplemented) static bools can be evaluated
  237. ok {test-number} - is_true<true>::value == true for: true == true
  238. # (unimplemented) static bools can be evaluated
  239. ok {test-number} - true == is_true<true>::value for: true == true
  240. # (unimplemented) static bools can be evaluated
  241. ok {test-number} - is_true<false>::value == false for: false == false
  242. # (unimplemented) static bools can be evaluated
  243. ok {test-number} - false == is_true<false>::value for: false == false
  244. # (unimplemented) static bools can be evaluated
  245. ok {test-number} - !is_true<false>::value for: true
  246. # (unimplemented) static bools can be evaluated
  247. ok {test-number} - !!is_true<true>::value for: true
  248. # (unimplemented) static bools can be evaluated
  249. ok {test-number} - is_true<true>::value for: true
  250. # (unimplemented) static bools can be evaluated
  251. ok {test-number} - !(is_true<false>::value) for: !false
  252. # 3x3x3 ints
  253. ok {test-number} - x < y for: 1 < 4
  254. # 3x3x3 ints
  255. ok {test-number} - y < z for: 4 < 7
  256. # 3x3x3 ints
  257. ok {test-number} - x < z for: 1 < 7
  258. # 3x3x3 ints
  259. ok {test-number} - x < y for: 1 < 4
  260. # 3x3x3 ints
  261. ok {test-number} - y < z for: 4 < 8
  262. # 3x3x3 ints
  263. ok {test-number} - x < z for: 1 < 8
  264. # 3x3x3 ints
  265. ok {test-number} - x < y for: 1 < 4
  266. # 3x3x3 ints
  267. ok {test-number} - y < z for: 4 < 9
  268. # 3x3x3 ints
  269. ok {test-number} - x < z for: 1 < 9
  270. # 3x3x3 ints
  271. ok {test-number} - x < y for: 1 < 5
  272. # 3x3x3 ints
  273. ok {test-number} - y < z for: 5 < 7
  274. # 3x3x3 ints
  275. ok {test-number} - x < z for: 1 < 7
  276. # 3x3x3 ints
  277. ok {test-number} - x < y for: 1 < 5
  278. # 3x3x3 ints
  279. ok {test-number} - y < z for: 5 < 8
  280. # 3x3x3 ints
  281. ok {test-number} - x < z for: 1 < 8
  282. # 3x3x3 ints
  283. ok {test-number} - x < y for: 1 < 5
  284. # 3x3x3 ints
  285. ok {test-number} - y < z for: 5 < 9
  286. # 3x3x3 ints
  287. ok {test-number} - x < z for: 1 < 9
  288. # 3x3x3 ints
  289. ok {test-number} - x < y for: 1 < 6
  290. # 3x3x3 ints
  291. ok {test-number} - y < z for: 6 < 7
  292. # 3x3x3 ints
  293. ok {test-number} - x < z for: 1 < 7
  294. # 3x3x3 ints
  295. ok {test-number} - x < y for: 1 < 6
  296. # 3x3x3 ints
  297. ok {test-number} - y < z for: 6 < 8
  298. # 3x3x3 ints
  299. ok {test-number} - x < z for: 1 < 8
  300. # 3x3x3 ints
  301. ok {test-number} - x < y for: 1 < 6
  302. # 3x3x3 ints
  303. ok {test-number} - y < z for: 6 < 9
  304. # 3x3x3 ints
  305. ok {test-number} - x < z for: 1 < 9
  306. # 3x3x3 ints
  307. ok {test-number} - x < y for: 2 < 4
  308. # 3x3x3 ints
  309. ok {test-number} - y < z for: 4 < 7
  310. # 3x3x3 ints
  311. ok {test-number} - x < z for: 2 < 7
  312. # 3x3x3 ints
  313. ok {test-number} - x < y for: 2 < 4
  314. # 3x3x3 ints
  315. ok {test-number} - y < z for: 4 < 8
  316. # 3x3x3 ints
  317. ok {test-number} - x < z for: 2 < 8
  318. # 3x3x3 ints
  319. ok {test-number} - x < y for: 2 < 4
  320. # 3x3x3 ints
  321. ok {test-number} - y < z for: 4 < 9
  322. # 3x3x3 ints
  323. ok {test-number} - x < z for: 2 < 9
  324. # 3x3x3 ints
  325. ok {test-number} - x < y for: 2 < 5
  326. # 3x3x3 ints
  327. ok {test-number} - y < z for: 5 < 7
  328. # 3x3x3 ints
  329. ok {test-number} - x < z for: 2 < 7
  330. # 3x3x3 ints
  331. ok {test-number} - x < y for: 2 < 5
  332. # 3x3x3 ints
  333. ok {test-number} - y < z for: 5 < 8
  334. # 3x3x3 ints
  335. ok {test-number} - x < z for: 2 < 8
  336. # 3x3x3 ints
  337. ok {test-number} - x < y for: 2 < 5
  338. # 3x3x3 ints
  339. ok {test-number} - y < z for: 5 < 9
  340. # 3x3x3 ints
  341. ok {test-number} - x < z for: 2 < 9
  342. # 3x3x3 ints
  343. ok {test-number} - x < y for: 2 < 6
  344. # 3x3x3 ints
  345. ok {test-number} - y < z for: 6 < 7
  346. # 3x3x3 ints
  347. ok {test-number} - x < z for: 2 < 7
  348. # 3x3x3 ints
  349. ok {test-number} - x < y for: 2 < 6
  350. # 3x3x3 ints
  351. ok {test-number} - y < z for: 6 < 8
  352. # 3x3x3 ints
  353. ok {test-number} - x < z for: 2 < 8
  354. # 3x3x3 ints
  355. ok {test-number} - x < y for: 2 < 6
  356. # 3x3x3 ints
  357. ok {test-number} - y < z for: 6 < 9
  358. # 3x3x3 ints
  359. ok {test-number} - x < z for: 2 < 9
  360. # 3x3x3 ints
  361. ok {test-number} - x < y for: 3 < 4
  362. # 3x3x3 ints
  363. ok {test-number} - y < z for: 4 < 7
  364. # 3x3x3 ints
  365. ok {test-number} - x < z for: 3 < 7
  366. # 3x3x3 ints
  367. ok {test-number} - x < y for: 3 < 4
  368. # 3x3x3 ints
  369. ok {test-number} - y < z for: 4 < 8
  370. # 3x3x3 ints
  371. ok {test-number} - x < z for: 3 < 8
  372. # 3x3x3 ints
  373. ok {test-number} - x < y for: 3 < 4
  374. # 3x3x3 ints
  375. ok {test-number} - y < z for: 4 < 9
  376. # 3x3x3 ints
  377. ok {test-number} - x < z for: 3 < 9
  378. # 3x3x3 ints
  379. ok {test-number} - x < y for: 3 < 5
  380. # 3x3x3 ints
  381. ok {test-number} - y < z for: 5 < 7
  382. # 3x3x3 ints
  383. ok {test-number} - x < z for: 3 < 7
  384. # 3x3x3 ints
  385. ok {test-number} - x < y for: 3 < 5
  386. # 3x3x3 ints
  387. ok {test-number} - y < z for: 5 < 8
  388. # 3x3x3 ints
  389. ok {test-number} - x < z for: 3 < 8
  390. # 3x3x3 ints
  391. ok {test-number} - x < y for: 3 < 5
  392. # 3x3x3 ints
  393. ok {test-number} - y < z for: 5 < 9
  394. # 3x3x3 ints
  395. ok {test-number} - x < z for: 3 < 9
  396. # 3x3x3 ints
  397. ok {test-number} - x < y for: 3 < 6
  398. # 3x3x3 ints
  399. ok {test-number} - y < z for: 6 < 7
  400. # 3x3x3 ints
  401. ok {test-number} - x < z for: 3 < 7
  402. # 3x3x3 ints
  403. ok {test-number} - x < y for: 3 < 6
  404. # 3x3x3 ints
  405. ok {test-number} - y < z for: 6 < 8
  406. # 3x3x3 ints
  407. ok {test-number} - x < z for: 3 < 8
  408. # 3x3x3 ints
  409. ok {test-number} - x < y for: 3 < 6
  410. # 3x3x3 ints
  411. ok {test-number} - y < z for: 6 < 9
  412. # 3x3x3 ints
  413. ok {test-number} - x < z for: 3 < 9
  414. # A METHOD_AS_TEST_CASE based test run that fails
  415. not ok {test-number} - s == "world" for: "hello" == "world"
  416. # A METHOD_AS_TEST_CASE based test run that succeeds
  417. ok {test-number} - s == "hello" for: "hello" == "hello"
  418. # A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<float>
  419. not ok {test-number} - Template_Fixture_2<TestType>::m_a.size() == 1 for: 0 == 1
  420. # A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<int>
  421. not ok {test-number} - Template_Fixture_2<TestType>::m_a.size() == 1 for: 0 == 1
  422. # A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<float>
  423. not ok {test-number} - Template_Fixture_2<TestType>::m_a.size() == 1 for: 0 == 1
  424. # A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<int>
  425. not ok {test-number} - Template_Fixture_2<TestType>::m_a.size() == 1 for: 0 == 1
  426. # A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo<float>
  427. ok {test-number} - Template_Fixture_2<TestType>::m_a.size() == 0 for: 0 == 0
  428. # A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo<int>
  429. ok {test-number} - Template_Fixture_2<TestType>::m_a.size() == 0 for: 0 == 0
  430. # A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector<float>
  431. ok {test-number} - Template_Fixture_2<TestType>::m_a.size() == 0 for: 0 == 0
  432. # A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector<int>
  433. ok {test-number} - Template_Fixture_2<TestType>::m_a.size() == 0 for: 0 == 0
  434. # A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<float, 6>
  435. not ok {test-number} - Template_Fixture_2<TestType>{}.m_a.size() < 2 for: 6 < 2
  436. # A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<int, 2>
  437. not ok {test-number} - Template_Fixture_2<TestType>{}.m_a.size() < 2 for: 2 < 2
  438. # A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<float, 6>
  439. not ok {test-number} - Template_Fixture_2<TestType>{}.m_a.size() < 2 for: 6 < 2
  440. # A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<int, 2>
  441. not ok {test-number} - Template_Fixture_2<TestType>{}.m_a.size() < 2 for: 2 < 2
  442. # A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2<float,6>
  443. ok {test-number} - Template_Fixture_2<TestType>{}.m_a.size() >= 2 for: 6 >= 2
  444. # A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2<int,2>
  445. ok {test-number} - Template_Fixture_2<TestType>{}.m_a.size() >= 2 for: 2 >= 2
  446. # A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array<float,6>
  447. ok {test-number} - Template_Fixture_2<TestType>{}.m_a.size() >= 2 for: 6 >= 2
  448. # A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array<int,2>
  449. ok {test-number} - Template_Fixture_2<TestType>{}.m_a.size() >= 2 for: 2 >= 2
  450. # A TEMPLATE_TEST_CASE_METHOD based test run that fails - double
  451. not ok {test-number} - Template_Fixture<TestType>::m_a == 2 for: 1.0 == 2
  452. # A TEMPLATE_TEST_CASE_METHOD based test run that fails - float
  453. not ok {test-number} - Template_Fixture<TestType>::m_a == 2 for: 1.0f == 2
  454. # A TEMPLATE_TEST_CASE_METHOD based test run that fails - int
  455. not ok {test-number} - Template_Fixture<TestType>::m_a == 2 for: 1 == 2
  456. # A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double
  457. ok {test-number} - Template_Fixture<TestType>::m_a == 1 for: 1.0 == 1
  458. # A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - float
  459. ok {test-number} - Template_Fixture<TestType>::m_a == 1 for: 1.0f == 1
  460. # A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int
  461. ok {test-number} - Template_Fixture<TestType>::m_a == 1 for: 1 == 1
  462. # A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1
  463. not ok {test-number} - Nttp_Fixture<V>::value == 0 for: 1 == 0
  464. # A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3
  465. not ok {test-number} - Nttp_Fixture<V>::value == 0 for: 3 == 0
  466. # A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6
  467. not ok {test-number} - Nttp_Fixture<V>::value == 0 for: 6 == 0
  468. # A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1
  469. ok {test-number} - Nttp_Fixture<V>::value > 0 for: 1 > 0
  470. # A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3
  471. ok {test-number} - Nttp_Fixture<V>::value > 0 for: 3 > 0
  472. # A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6
  473. ok {test-number} - Nttp_Fixture<V>::value > 0 for: 6 > 0
  474. # A TEST_CASE_METHOD based test run that fails
  475. not ok {test-number} - m_a == 2 for: 1 == 2
  476. # A TEST_CASE_METHOD based test run that succeeds
  477. ok {test-number} - m_a == 1 for: 1 == 1
  478. # A Template product test case - Foo<float>
  479. ok {test-number} - x.size() == 0 for: 0 == 0
  480. # A Template product test case - Foo<int>
  481. ok {test-number} - x.size() == 0 for: 0 == 0
  482. # A Template product test case - std::vector<float>
  483. ok {test-number} - x.size() == 0 for: 0 == 0
  484. # A Template product test case - std::vector<int>
  485. ok {test-number} - x.size() == 0 for: 0 == 0
  486. # A Template product test case with array signature - Bar<float, 42>
  487. ok {test-number} - x.size() > 0 for: 42 > 0
  488. # A Template product test case with array signature - Bar<int, 9>
  489. ok {test-number} - x.size() > 0 for: 9 > 0
  490. # A Template product test case with array signature - std::array<float, 42>
  491. ok {test-number} - x.size() > 0 for: 42 > 0
  492. # A Template product test case with array signature - std::array<int, 9>
  493. ok {test-number} - x.size() > 0 for: 9 > 0
  494. # A comparison that uses literals instead of the normal constructor
  495. ok {test-number} - d == 1.23_a for: 1.23 == Approx( 1.23 )
  496. # A comparison that uses literals instead of the normal constructor
  497. ok {test-number} - d != 1.22_a for: 1.23 != Approx( 1.22 )
  498. # A comparison that uses literals instead of the normal constructor
  499. ok {test-number} - -d == -1.23_a for: -1.23 == Approx( -1.23 )
  500. # A comparison that uses literals instead of the normal constructor
  501. ok {test-number} - d == 1.2_a .epsilon(.1) for: 1.23 == Approx( 1.2 )
  502. # A comparison that uses literals instead of the normal constructor
  503. ok {test-number} - d != 1.2_a .epsilon(.001) for: 1.23 != Approx( 1.2 )
  504. # A comparison that uses literals instead of the normal constructor
  505. ok {test-number} - d == 1_a .epsilon(.3) for: 1.23 == Approx( 1.0 )
  506. # A couple of nested sections followed by a failure
  507. ok {test-number} - with 1 message: 'that's not flying - that's failing in style'
  508. # A couple of nested sections followed by a failure
  509. not ok {test-number} - explicitly with 1 message: 'to infinity and beyond'
  510. # A failing expression with a non streamable type is still captured
  511. not ok {test-number} - &o1 == &o2 for: 0x<hex digits> == 0x<hex digits>
  512. # A failing expression with a non streamable type is still captured
  513. not ok {test-number} - o1 == o2 for: {?} == {?}
  514. # Absolute margin
  515. ok {test-number} - 104.0 != Approx(100.0) for: 104.0 != Approx( 100.0 )
  516. # Absolute margin
  517. ok {test-number} - 104.0 == Approx(100.0).margin(5) for: 104.0 == Approx( 100.0 )
  518. # Absolute margin
  519. ok {test-number} - 104.0 == Approx(100.0).margin(4) for: 104.0 == Approx( 100.0 )
  520. # Absolute margin
  521. ok {test-number} - 104.0 != Approx(100.0).margin(3) for: 104.0 != Approx( 100.0 )
  522. # Absolute margin
  523. ok {test-number} - 100.3 != Approx(100.0) for: 100.3 != Approx( 100.0 )
  524. # Absolute margin
  525. ok {test-number} - 100.3 == Approx(100.0).margin(0.5) for: 100.3 == Approx( 100.0 )
  526. # An expression with side-effects should only be evaluated once
  527. ok {test-number} - i++ == 7 for: 7 == 7
  528. # An expression with side-effects should only be evaluated once
  529. ok {test-number} - i++ == 8 for: 8 == 8
  530. # An unchecked exception reports the line of the last assertion
  531. ok {test-number} - 1 == 1
  532. # An unchecked exception reports the line of the last assertion
  533. not ok {test-number} - unexpected exception with message: 'unexpected exception'; expression was: {Unknown expression after the reported line}
  534. # Anonymous test case 1
  535. ok {test-number} - with 1 message: 'anonymous test case'
  536. # Approx setters validate their arguments
  537. ok {test-number} - Approx(0).margin(0)
  538. # Approx setters validate their arguments
  539. ok {test-number} - Approx(0).margin(1234656)
  540. # Approx setters validate their arguments
  541. ok {test-number} - Approx(0).margin(-2), std::domain_error
  542. # Approx setters validate their arguments
  543. ok {test-number} - Approx(0).epsilon(0)
  544. # Approx setters validate their arguments
  545. ok {test-number} - Approx(0).epsilon(1)
  546. # Approx setters validate their arguments
  547. ok {test-number} - Approx(0).epsilon(-0.001), std::domain_error
  548. # Approx setters validate their arguments
  549. ok {test-number} - Approx(0).epsilon(1.0001), std::domain_error
  550. # Approx with exactly-representable margin
  551. ok {test-number} - 0.25f == Approx(0.0f).margin(0.25f) for: 0.25f == Approx( 0.0 )
  552. # Approx with exactly-representable margin
  553. ok {test-number} - 0.0f == Approx(0.25f).margin(0.25f) for: 0.0f == Approx( 0.25 )
  554. # Approx with exactly-representable margin
  555. ok {test-number} - 0.5f == Approx(0.25f).margin(0.25f) for: 0.5f == Approx( 0.25 )
  556. # Approx with exactly-representable margin
  557. ok {test-number} - 245.0f == Approx(245.25f).margin(0.25f) for: 245.0f == Approx( 245.25 )
  558. # Approx with exactly-representable margin
  559. ok {test-number} - 245.5f == Approx(245.25f).margin(0.25f) for: 245.5f == Approx( 245.25 )
  560. # Approximate PI
  561. ok {test-number} - divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) for: 3.1428571429 == Approx( 3.141 )
  562. # Approximate PI
  563. ok {test-number} - divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) for: 3.1428571429 != Approx( 3.141 )
  564. # Approximate comparisons with different epsilons
  565. ok {test-number} - d != Approx( 1.231 ) for: 1.23 != Approx( 1.231 )
  566. # Approximate comparisons with different epsilons
  567. ok {test-number} - d == Approx( 1.231 ).epsilon( 0.1 ) for: 1.23 == Approx( 1.231 )
  568. # Approximate comparisons with floats
  569. ok {test-number} - 1.23f == Approx( 1.23f ) for: 1.23f == Approx( 1.2300000191 )
  570. # Approximate comparisons with floats
  571. ok {test-number} - 0.0f == Approx( 0.0f ) for: 0.0f == Approx( 0.0 )
  572. # Approximate comparisons with ints
  573. ok {test-number} - 1 == Approx( 1 ) for: 1 == Approx( 1.0 )
  574. # Approximate comparisons with ints
  575. ok {test-number} - 0 == Approx( 0 ) for: 0 == Approx( 0.0 )
  576. # Approximate comparisons with mixed numeric types
  577. ok {test-number} - 1.0f == Approx( 1 ) for: 1.0f == Approx( 1.0 )
  578. # Approximate comparisons with mixed numeric types
  579. ok {test-number} - 0 == Approx( dZero) for: 0 == Approx( 0.0 )
  580. # Approximate comparisons with mixed numeric types
  581. ok {test-number} - 0 == Approx( dSmall ).margin( 0.001 ) for: 0 == Approx( 0.00001 )
  582. # Approximate comparisons with mixed numeric types
  583. ok {test-number} - 1.234f == Approx( dMedium ) for: 1.234f == Approx( 1.234 )
  584. # Approximate comparisons with mixed numeric types
  585. ok {test-number} - dMedium == Approx( 1.234f ) for: 1.234 == Approx( 1.2339999676 )
  586. # Arbitrary predicate matcher
  587. ok {test-number} - 1, Predicate<int>( alwaysTrue, "always true" ) for: 1 matches predicate: "always true"
  588. # Arbitrary predicate matcher
  589. ok {test-number} - 1, !Predicate<int>( alwaysFalse, "always false" ) for: 1 not matches predicate: "always false"
  590. # Arbitrary predicate matcher
  591. ok {test-number} - "Hello olleH", Predicate<std::string>( []( std::string const& str ) -> bool { return str.front() == str.back(); }, "First and last character should be equal" ) for: "Hello olleH" matches predicate: "First and last character should be equal"
  592. # Arbitrary predicate matcher
  593. ok {test-number} - "This wouldn't pass", !Predicate<std::string>( []( std::string const& str ) -> bool { return str.front() == str.back(); } ) for: "This wouldn't pass" not matches undescribed predicate
  594. # Assertion macros support bit operators and bool conversions
  595. ok {test-number} - lhs | rhs for: Val: 1 | Val: 2
  596. # Assertion macros support bit operators and bool conversions
  597. ok {test-number} - !(lhs & rhs) for: !(Val: 1 & Val: 2)
  598. # Assertion macros support bit operators and bool conversions
  599. ok {test-number} - HasBitOperators{ 1 } & HasBitOperators{ 1 } for: Val: 1 & Val: 1
  600. # Assertion macros support bit operators and bool conversions
  601. ok {test-number} - lhs ^ rhs for: Val: 1 ^ Val: 2
  602. # Assertion macros support bit operators and bool conversions
  603. ok {test-number} - !(lhs ^ lhs) for: !(Val: 1 ^ Val: 1)
  604. # Assertions then sections
  605. ok {test-number} - true
  606. # Assertions then sections
  607. ok {test-number} - true
  608. # Assertions then sections
  609. ok {test-number} - true
  610. # Assertions then sections
  611. ok {test-number} - true
  612. # Assertions then sections
  613. ok {test-number} - true
  614. # Assertions then sections
  615. ok {test-number} - true
  616. # Basic use of the Contains range matcher
  617. ok {test-number} - a, Contains(1) for: { 1, 2, 3 } contains element 1
  618. # Basic use of the Contains range matcher
  619. ok {test-number} - b, Contains(1) for: { 0, 1, 2 } contains element 1
  620. # Basic use of the Contains range matcher
  621. ok {test-number} - c, !Contains(1) for: { 4, 5, 6 } not contains element 1
  622. # Basic use of the Contains range matcher
  623. ok {test-number} - a, Contains(0, close_enough) for: { 1, 2, 3 } contains element 0
  624. # Basic use of the Contains range matcher
  625. ok {test-number} - b, Contains(0, close_enough) for: { 0, 1, 2 } contains element 0
  626. # Basic use of the Contains range matcher
  627. ok {test-number} - c, !Contains(0, close_enough) for: { 4, 5, 6 } not contains element 0
  628. # Basic use of the Contains range matcher
  629. ok {test-number} - a, Contains(4, [](auto&& lhs, size_t sz) { return lhs.size() == sz; }) for: { "abc", "abcd", "abcde" } contains element 4
  630. # Basic use of the Contains range matcher
  631. ok {test-number} - in, Contains(1) for: { 1, 2, 3, 4, 5 } contains element 1
  632. # Basic use of the Contains range matcher
  633. ok {test-number} - in, !Contains(8) for: { 1, 2, 3, 4, 5 } not contains element 8
  634. # Basic use of the Contains range matcher
  635. ok {test-number} - in, Contains(MoveOnlyTestElement{ 2 }) for: { 1, 2, 3 } contains element 2
  636. # Basic use of the Contains range matcher
  637. ok {test-number} - in, !Contains(MoveOnlyTestElement{ 9 }) for: { 1, 2, 3 } not contains element 9
  638. # Basic use of the Contains range matcher
  639. ok {test-number} - in, Contains(Catch::Matchers::WithinAbs(0.5, 0.5)) for: { 1.0, 2.0, 3.0, 0.0 } contains element matching is within 0.5 of 0.5
  640. # Basic use of the Empty range matcher
  641. ok {test-number} - empty_array, IsEmpty() for: { } is empty
  642. # Basic use of the Empty range matcher
  643. ok {test-number} - non_empty_array, !IsEmpty() for: { 0.0 } not is empty
  644. # Basic use of the Empty range matcher
  645. ok {test-number} - empty_vec, IsEmpty() for: { } is empty
  646. # Basic use of the Empty range matcher
  647. ok {test-number} - non_empty_vec, !IsEmpty() for: { 'a', 'b', 'c' } not is empty
  648. # Basic use of the Empty range matcher
  649. ok {test-number} - inner_lists_are_empty, !IsEmpty() for: { { } } not is empty
  650. # Basic use of the Empty range matcher
  651. ok {test-number} - inner_lists_are_empty.front(), IsEmpty() for: { } is empty
  652. # Basic use of the Empty range matcher
  653. ok {test-number} - has_empty{}, !IsEmpty() for: {?} not is empty
  654. # Basic use of the Empty range matcher
  655. ok {test-number} - unrelated::ADL_empty{}, IsEmpty() for: {?} is empty
  656. # CAPTURE can deal with complex expressions
  657. ok {test-number} - with 7 messages: 'a := 1' and 'b := 2' and 'c := 3' and 'a + b := 3' and 'a+b := 3' and 'c > b := true' and 'a == 1 := true'
  658. # CAPTURE can deal with complex expressions involving commas
  659. ok {test-number} - with 7 messages: 'std::vector<int>{1, 2, 3}[0, 1, 2] := 3' and 'std::vector<int>{1, 2, 3}[(0, 1)] := 2' and 'std::vector<int>{1, 2, 3}[0] := 1' and '(helper_1436<int, int>{12, -12}) := { 12, -12 }' and '(helper_1436<int, int>(-12, 12)) := { -12, 12 }' and '(1, 2) := 2' and '(2, 3) := 3'
  660. # CAPTURE parses string and character constants
  661. ok {test-number} - with 11 messages: '("comma, in string", "escaped, \", ") := "escaped, ", "' and '"single quote in string,'," := "single quote in string,',"' and '"some escapes, \\,\\\\" := "some escapes, \,\\"' and '"some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[<"' and ''"' := '"'' and ''\'' := '''' and '',' := ','' and ''}' := '}'' and '')' := ')'' and ''(' := '('' and ''{' := '{''
  662. # Capture and info messages
  663. ok {test-number} - true with 1 message: 'i := 2'
  664. # Capture and info messages
  665. ok {test-number} - true with 1 message: '3'
  666. # CaseInsensitiveEqualsTo is case insensitive
  667. ok {test-number} - eq( "", "" ) for: true
  668. # CaseInsensitiveEqualsTo is case insensitive
  669. ok {test-number} - !(eq( "", "a" )) for: !false
  670. # CaseInsensitiveEqualsTo is case insensitive
  671. ok {test-number} - eq( "a", "a" ) for: true
  672. # CaseInsensitiveEqualsTo is case insensitive
  673. ok {test-number} - eq( "a", "A" ) for: true
  674. # CaseInsensitiveEqualsTo is case insensitive
  675. ok {test-number} - eq( "A", "a" ) for: true
  676. # CaseInsensitiveEqualsTo is case insensitive
  677. ok {test-number} - eq( "A", "A" ) for: true
  678. # CaseInsensitiveEqualsTo is case insensitive
  679. ok {test-number} - !(eq( "a", "b" )) for: !false
  680. # CaseInsensitiveEqualsTo is case insensitive
  681. ok {test-number} - !(eq( "a", "B" )) for: !false
  682. # CaseInsensitiveLess is case insensitive
  683. ok {test-number} - lt( "", "a" ) for: true
  684. # CaseInsensitiveLess is case insensitive
  685. ok {test-number} - !(lt( "a", "a" )) for: !false
  686. # CaseInsensitiveLess is case insensitive
  687. ok {test-number} - !(lt( "", "" )) for: !false
  688. # CaseInsensitiveLess is case insensitive
  689. ok {test-number} - lt( "a", "b" ) for: true
  690. # CaseInsensitiveLess is case insensitive
  691. ok {test-number} - lt( "a", "B" ) for: true
  692. # CaseInsensitiveLess is case insensitive
  693. ok {test-number} - lt( "A", "b" ) for: true
  694. # CaseInsensitiveLess is case insensitive
  695. ok {test-number} - lt( "A", "B" ) for: true
  696. # Character pretty printing
  697. ok {test-number} - tab == '\t' for: '\t' == '\t'
  698. # Character pretty printing
  699. ok {test-number} - newline == '\n' for: '\n' == '\n'
  700. # Character pretty printing
  701. ok {test-number} - carr_return == '\r' for: '\r' == '\r'
  702. # Character pretty printing
  703. ok {test-number} - form_feed == '\f' for: '\f' == '\f'
  704. # Character pretty printing
  705. ok {test-number} - space == ' ' for: ' ' == ' '
  706. # Character pretty printing
  707. ok {test-number} - c == chars[i] for: 'a' == 'a'
  708. # Character pretty printing
  709. ok {test-number} - c == chars[i] for: 'z' == 'z'
  710. # Character pretty printing
  711. ok {test-number} - c == chars[i] for: 'A' == 'A'
  712. # Character pretty printing
  713. ok {test-number} - c == chars[i] for: 'Z' == 'Z'
  714. # Character pretty printing
  715. ok {test-number} - null_terminator == '\0' for: 0 == 0
  716. # Character pretty printing
  717. ok {test-number} - c == i for: 2 == 2
  718. # Character pretty printing
  719. ok {test-number} - c == i for: 3 == 3
  720. # Character pretty printing
  721. ok {test-number} - c == i for: 4 == 4
  722. # Character pretty printing
  723. ok {test-number} - c == i for: 5 == 5
  724. # Clara::Arg supports single-arg parse the way Opt does
  725. ok {test-number} - name.empty() for: true
  726. # Clara::Arg supports single-arg parse the way Opt does
  727. ok {test-number} - name == "foo" for: "foo" == "foo"
  728. # Clara::Opt supports accept-many lambdas
  729. ok {test-number} - !(parse_result) for: !{?}
  730. # Clara::Opt supports accept-many lambdas
  731. ok {test-number} - parse_result for: {?}
  732. # Clara::Opt supports accept-many lambdas
  733. ok {test-number} - res == std::vector<std::string>{ "aaa", "bbb" } for: { "aaa", "bbb" } == { "aaa", "bbb" }
  734. # ColourGuard behaviour
  735. ok {test-number} - streamWrapper.str().empty() for: true
  736. # ColourGuard behaviour
  737. ok {test-number} - streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" for: "1 Using code: 2 2 Using code: 0 3 " == "1 Using code: 2 2 Using code: 0 3 "
  738. # ColourGuard behaviour
  739. ok {test-number} - streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" for: "Using code: 2 A B Using code: 0 C " == "Using code: 2 A B Using code: 0 C "
  740. # Combining MatchAllOfGeneric does not nest
  741. ok {test-number} - with 1 message: 'std::is_same< decltype( ( MatcherA() && MatcherB() ) && MatcherC() ), Catch::Matchers::Detail:: MatchAllOfGeneric<MatcherA, MatcherB, MatcherC>>::value'
  742. # Combining MatchAllOfGeneric does not nest
  743. ok {test-number} - 1, ( MatcherA() && MatcherB() ) && MatcherC() for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 )
  744. # Combining MatchAllOfGeneric does not nest
  745. ok {test-number} - with 1 message: 'std::is_same< decltype( MatcherA() && ( MatcherB() && MatcherC() ) ), Catch::Matchers::Detail:: MatchAllOfGeneric<MatcherA, MatcherB, MatcherC>>::value'
  746. # Combining MatchAllOfGeneric does not nest
  747. ok {test-number} - 1, MatcherA() && ( MatcherB() && MatcherC() ) for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 )
  748. # Combining MatchAllOfGeneric does not nest
  749. ok {test-number} - with 1 message: 'std::is_same< decltype( ( MatcherA() && MatcherB() ) && ( MatcherC() && MatcherD() ) ), Catch::Matchers::Detail:: MatchAllOfGeneric<MatcherA, MatcherB, MatcherC, MatcherD>>:: value'
  750. # Combining MatchAllOfGeneric does not nest
  751. ok {test-number} - 1, ( MatcherA() && MatcherB() ) && ( MatcherC() && MatcherD() ) for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 and equals: true )
  752. # Combining MatchAnyOfGeneric does not nest
  753. ok {test-number} - with 1 message: 'std::is_same< decltype( ( MatcherA() || MatcherB() ) || MatcherC() ), Catch::Matchers::Detail:: MatchAnyOfGeneric<MatcherA, MatcherB, MatcherC>>::value'
  754. # Combining MatchAnyOfGeneric does not nest
  755. ok {test-number} - 1, ( MatcherA() || MatcherB() ) || MatcherC() for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 )
  756. # Combining MatchAnyOfGeneric does not nest
  757. ok {test-number} - with 1 message: 'std::is_same< decltype( MatcherA() || ( MatcherB() || MatcherC() ) ), Catch::Matchers::Detail:: MatchAnyOfGeneric<MatcherA, MatcherB, MatcherC>>::value'
  758. # Combining MatchAnyOfGeneric does not nest
  759. ok {test-number} - 1, MatcherA() || ( MatcherB() || MatcherC() ) for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 )
  760. # Combining MatchAnyOfGeneric does not nest
  761. ok {test-number} - with 1 message: 'std::is_same< decltype( ( MatcherA() || MatcherB() ) || ( MatcherC() || MatcherD() ) ), Catch::Matchers::Detail:: MatchAnyOfGeneric<MatcherA, MatcherB, MatcherC, MatcherD>>:: value'
  762. # Combining MatchAnyOfGeneric does not nest
  763. ok {test-number} - 1, ( MatcherA() || MatcherB() ) || ( MatcherC() || MatcherD() ) for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 or equals: true )
  764. # Combining MatchNotOfGeneric does not nest
  765. ok {test-number} - with 1 message: 'std::is_same< decltype( !MatcherA() ), Catch::Matchers::Detail::MatchNotOfGeneric<MatcherA>>::value'
  766. # Combining MatchNotOfGeneric does not nest
  767. ok {test-number} - 0, !MatcherA() for: 0 not equals: (int) 1 or (string) "1"
  768. # Combining MatchNotOfGeneric does not nest
  769. ok {test-number} - with 1 message: 'std::is_same<decltype( !!MatcherA() ), MatcherA const&>::value'
  770. # Combining MatchNotOfGeneric does not nest
  771. ok {test-number} - 1, !!MatcherA() for: 1 equals: (int) 1 or (string) "1"
  772. # Combining MatchNotOfGeneric does not nest
  773. ok {test-number} - with 1 message: 'std::is_same< decltype( !!!MatcherA() ), Catch::Matchers::Detail::MatchNotOfGeneric<MatcherA>>::value'
  774. # Combining MatchNotOfGeneric does not nest
  775. ok {test-number} - 0, !!!MatcherA() for: 0 not equals: (int) 1 or (string) "1"
  776. # Combining MatchNotOfGeneric does not nest
  777. ok {test-number} - with 1 message: 'std::is_same<decltype( !!!!MatcherA() ), MatcherA const&>::value'
  778. # Combining MatchNotOfGeneric does not nest
  779. ok {test-number} - 1, !!!!MatcherA() for: 1 equals: (int) 1 or (string) "1"
  780. # Combining concrete matchers does not use templated matchers
  781. ok {test-number} - with 1 message: 'std::is_same<decltype( StartsWith( "foo" ) || ( StartsWith( "bar" ) && EndsWith( "bar" ) && !EndsWith( "foo" ) ) ), Catch::Matchers::Detail::MatchAnyOf<std::string>>::value'
  782. # Combining only templated matchers
  783. ok {test-number} - with 1 message: 'std::is_same<decltype( MatcherA() || MatcherB() ), Catch::Matchers::Detail:: MatchAnyOfGeneric<MatcherA, MatcherB>>::value'
  784. # Combining only templated matchers
  785. ok {test-number} - 1, MatcherA() || MatcherB() for: 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 )
  786. # Combining only templated matchers
  787. ok {test-number} - with 1 message: 'std::is_same<decltype( MatcherA() && MatcherB() ), Catch::Matchers::Detail:: MatchAllOfGeneric<MatcherA, MatcherB>>::value'
  788. # Combining only templated matchers
  789. ok {test-number} - 1, MatcherA() && MatcherB() for: 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 )
  790. # Combining only templated matchers
  791. ok {test-number} - with 1 message: 'std::is_same< decltype( MatcherA() || !MatcherB() ), Catch::Matchers::Detail::MatchAnyOfGeneric< MatcherA, Catch::Matchers::Detail::MatchNotOfGeneric<MatcherB>>>::value'
  792. # Combining only templated matchers
  793. ok {test-number} - 1, MatcherA() || !MatcherB() for: 1 ( equals: (int) 1 or (string) "1" or not equals: (long long) 1 )
  794. # Combining templated and concrete matchers
  795. ok {test-number} - vec, Predicate<std::vector<int>>( []( auto const& v ) { return std::all_of( v.begin(), v.end(), []( int elem ) { return elem % 2 == 1; } ); }, "All elements are odd" ) && !EqualsRange( a ) for: { 1, 3, 5 } ( matches predicate: "All elements are odd" and not Equals: { 5, 3, 1 } )
  796. # Combining templated and concrete matchers
  797. ok {test-number} - str, StartsWith( "foo" ) && EqualsRange( arr ) && EndsWith( "bar" ) for: "foobar" ( starts with: "foo" and Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and ends with: "bar" )
  798. # Combining templated and concrete matchers
  799. ok {test-number} - str, StartsWith( "foo" ) && !EqualsRange( bad_arr ) && EndsWith( "bar" ) for: "foobar" ( starts with: "foo" and not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and ends with: "bar" )
  800. # Combining templated and concrete matchers
  801. ok {test-number} - str, EqualsRange( arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) for: "foobar" ( Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and starts with: "foo" and ends with: "bar" )
  802. # Combining templated and concrete matchers
  803. ok {test-number} - str, !EqualsRange( bad_arr ) && StartsWith( "foo" ) && EndsWith( "bar" ) for: "foobar" ( not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and starts with: "foo" and ends with: "bar" )
  804. # Combining templated and concrete matchers
  805. ok {test-number} - str, EqualsRange( bad_arr ) || ( StartsWith( "foo" ) && EndsWith( "bar" ) ) for: "foobar" ( Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } or ( starts with: "foo" and ends with: "bar" ) )
  806. # Combining templated and concrete matchers
  807. ok {test-number} - str, ( StartsWith( "foo" ) && EndsWith( "bar" ) ) || EqualsRange( bad_arr ) for: "foobar" ( ( starts with: "foo" and ends with: "bar" ) or Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } )
  808. # Combining templated matchers
  809. ok {test-number} - container, EqualsRange( a ) || EqualsRange( b ) || EqualsRange( c ) for: { 1, 2, 3 } ( Equals: { 1, 2, 3 } or Equals: { 0, 1, 2 } or Equals: { 4, 5, 6 } )
  810. # Commas in various macros are allowed
  811. ok {test-number} - std::vector<constructor_throws>{constructor_throws{}, constructor_throws{}}
  812. # Commas in various macros are allowed
  813. ok {test-number} - std::vector<constructor_throws>{constructor_throws{}, constructor_throws{}}
  814. # Commas in various macros are allowed
  815. ok {test-number} - std::vector<int>{1, 2, 3} == std::vector<int>{1, 2, 3}
  816. # Commas in various macros are allowed
  817. ok {test-number} - std::vector<int>{1, 2, 3} == std::vector<int>{1, 2, 3}
  818. # Commas in various macros are allowed
  819. ok {test-number} - std::vector<int>{1, 2} == std::vector<int>{1, 2} for: { 1, 2 } == { 1, 2 }
  820. # Commas in various macros are allowed
  821. ok {test-number} - std::vector<int>{1, 2} == std::vector<int>{1, 2} for: { 1, 2 } == { 1, 2 }
  822. # Commas in various macros are allowed
  823. ok {test-number} - !(std::vector<int>{1, 2} == std::vector<int>{1, 2, 3}) for: !({ 1, 2 } == { 1, 2, 3 })
  824. # Commas in various macros are allowed
  825. ok {test-number} - !(std::vector<int>{1, 2} == std::vector<int>{1, 2, 3}) for: !({ 1, 2 } == { 1, 2, 3 })
  826. # Commas in various macros are allowed
  827. ok {test-number} - std::vector<int>{1, 2} == std::vector<int>{1, 2} for: { 1, 2 } == { 1, 2 }
  828. # Commas in various macros are allowed
  829. ok {test-number} - std::vector<int>{1, 2} == std::vector<int>{1, 2} for: { 1, 2 } == { 1, 2 }
  830. # Commas in various macros are allowed
  831. ok {test-number} - true
  832. # Commas in various macros are allowed
  833. ok {test-number} - std::vector<int>{1, 2} == std::vector<int>{1, 2} for: { 1, 2 } == { 1, 2 }
  834. # Comparing function pointers
  835. ok {test-number} - a for: 0x<hex digits>
  836. # Comparing function pointers
  837. ok {test-number} - a == &foo for: 0x<hex digits> == 0x<hex digits>
  838. # Comparison ops
  839. ok {test-number} - SimplePcg32{} == SimplePcg32{} for: {?} == {?}
  840. # Comparison ops
  841. ok {test-number} - SimplePcg32{ 0 } != SimplePcg32{} for: {?} != {?}
  842. # Comparison ops
  843. ok {test-number} - !(SimplePcg32{ 1 } == SimplePcg32{ 2 }) for: !({?} == {?})
  844. # Comparison ops
  845. ok {test-number} - !(SimplePcg32{ 1 } != SimplePcg32{ 1 }) for: !({?} != {?})
  846. # Comparison with explicitly convertible types
  847. ok {test-number} - td == Approx(10.0) for: StrongDoubleTypedef(10) == Approx( 10.0 )
  848. # Comparison with explicitly convertible types
  849. ok {test-number} - Approx(10.0) == td for: Approx( 10.0 ) == StrongDoubleTypedef(10)
  850. # Comparison with explicitly convertible types
  851. ok {test-number} - td != Approx(11.0) for: StrongDoubleTypedef(10) != Approx( 11.0 )
  852. # Comparison with explicitly convertible types
  853. ok {test-number} - Approx(11.0) != td for: Approx( 11.0 ) != StrongDoubleTypedef(10)
  854. # Comparison with explicitly convertible types
  855. ok {test-number} - td <= Approx(10.0) for: StrongDoubleTypedef(10) <= Approx( 10.0 )
  856. # Comparison with explicitly convertible types
  857. ok {test-number} - td <= Approx(11.0) for: StrongDoubleTypedef(10) <= Approx( 11.0 )
  858. # Comparison with explicitly convertible types
  859. ok {test-number} - Approx(10.0) <= td for: Approx( 10.0 ) <= StrongDoubleTypedef(10)
  860. # Comparison with explicitly convertible types
  861. ok {test-number} - Approx(9.0) <= td for: Approx( 9.0 ) <= StrongDoubleTypedef(10)
  862. # Comparison with explicitly convertible types
  863. ok {test-number} - td >= Approx(9.0) for: StrongDoubleTypedef(10) >= Approx( 9.0 )
  864. # Comparison with explicitly convertible types
  865. ok {test-number} - td >= Approx(td) for: StrongDoubleTypedef(10) >= Approx( 10.0 )
  866. # Comparison with explicitly convertible types
  867. ok {test-number} - Approx(td) >= td for: Approx( 10.0 ) >= StrongDoubleTypedef(10)
  868. # Comparison with explicitly convertible types
  869. ok {test-number} - Approx(11.0) >= td for: Approx( 11.0 ) >= StrongDoubleTypedef(10)
  870. # Comparisons between ints where one side is computed
  871. ok {test-number} - 54 == 6*9 for: 54 == 54
  872. # Comparisons between unsigned ints and negative signed ints match c++ standard behaviour
  873. ok {test-number} - ( -1 > 2u ) for: true
  874. # Comparisons between unsigned ints and negative signed ints match c++ standard behaviour
  875. ok {test-number} - -1 > 2u for: -1 > 2
  876. # Comparisons between unsigned ints and negative signed ints match c++ standard behaviour
  877. ok {test-number} - ( 2u < -1 ) for: true
  878. # Comparisons between unsigned ints and negative signed ints match c++ standard behaviour
  879. ok {test-number} - 2u < -1 for: 2 < -1
  880. # Comparisons between unsigned ints and negative signed ints match c++ standard behaviour
  881. ok {test-number} - ( minInt > 2u ) for: true
  882. # Comparisons between unsigned ints and negative signed ints match c++ standard behaviour
  883. ok {test-number} - minInt > 2u for: -2147483648 > 2
  884. # Comparisons with int literals don't warn when mixing signed/ unsigned
  885. ok {test-number} - i == 1 for: 1 == 1
  886. # Comparisons with int literals don't warn when mixing signed/ unsigned
  887. ok {test-number} - ui == 2 for: 2 == 2
  888. # Comparisons with int literals don't warn when mixing signed/ unsigned
  889. ok {test-number} - l == 3 for: 3 == 3
  890. # Comparisons with int literals don't warn when mixing signed/ unsigned
  891. ok {test-number} - ul == 4 for: 4 == 4
  892. # Comparisons with int literals don't warn when mixing signed/ unsigned
  893. ok {test-number} - c == 5 for: 5 == 5
  894. # Comparisons with int literals don't warn when mixing signed/ unsigned
  895. ok {test-number} - uc == 6 for: 6 == 6
  896. # Comparisons with int literals don't warn when mixing signed/ unsigned
  897. ok {test-number} - 1 == i for: 1 == 1
  898. # Comparisons with int literals don't warn when mixing signed/ unsigned
  899. ok {test-number} - 2 == ui for: 2 == 2
  900. # Comparisons with int literals don't warn when mixing signed/ unsigned
  901. ok {test-number} - 3 == l for: 3 == 3
  902. # Comparisons with int literals don't warn when mixing signed/ unsigned
  903. ok {test-number} - 4 == ul for: 4 == 4
  904. # Comparisons with int literals don't warn when mixing signed/ unsigned
  905. ok {test-number} - 5 == c for: 5 == 5
  906. # Comparisons with int literals don't warn when mixing signed/ unsigned
  907. ok {test-number} - 6 == uc for: 6 == 6
  908. # Comparisons with int literals don't warn when mixing signed/ unsigned
  909. ok {test-number} - (std::numeric_limits<uint32_t>::max)() > ul for: 4294967295 (0x<hex digits>) > 4
  910. # Composed generic matchers shortcircuit
  911. ok {test-number} - !(matcher.match( 1 )) for: !false
  912. # Composed generic matchers shortcircuit
  913. ok {test-number} - first.matchCalled for: true
  914. # Composed generic matchers shortcircuit
  915. ok {test-number} - !second.matchCalled for: true
  916. # Composed generic matchers shortcircuit
  917. ok {test-number} - matcher.match( 1 ) for: true
  918. # Composed generic matchers shortcircuit
  919. ok {test-number} - first.matchCalled for: true
  920. # Composed generic matchers shortcircuit
  921. ok {test-number} - !second.matchCalled for: true
  922. # Composed matchers shortcircuit
  923. ok {test-number} - !(matcher.match( 1 )) for: !false
  924. # Composed matchers shortcircuit
  925. ok {test-number} - first.matchCalled for: true
  926. # Composed matchers shortcircuit
  927. ok {test-number} - !second.matchCalled for: true
  928. # Composed matchers shortcircuit
  929. ok {test-number} - matcher.match( 1 ) for: true
  930. # Composed matchers shortcircuit
  931. ok {test-number} - first.matchCalled for: true
  932. # Composed matchers shortcircuit
  933. ok {test-number} - !second.matchCalled for: true
  934. # Contains string matcher
  935. not ok {test-number} - testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "not there" (case insensitive)
  936. # Contains string matcher
  937. not ok {test-number} - testStringForMatching(), ContainsSubstring( "STRING" ) for: "this string contains 'abc' as a substring" contains: "STRING"
  938. # Copy and then generate a range
  939. ok {test-number} - elem % 2 == 1 for: 1 == 1
  940. # Copy and then generate a range
  941. ok {test-number} - elem % 2 == 1 for: 1 == 1
  942. # Copy and then generate a range
  943. ok {test-number} - elem % 2 == 1 for: 1 == 1
  944. # Copy and then generate a range
  945. ok {test-number} - elem % 2 == 1 for: 1 == 1
  946. # Copy and then generate a range
  947. ok {test-number} - elem % 2 == 1 for: 1 == 1
  948. # Copy and then generate a range
  949. ok {test-number} - elem % 2 == 1 for: 1 == 1
  950. # Copy and then generate a range
  951. ok {test-number} - elem % 2 == 1 for: 1 == 1
  952. # Copy and then generate a range
  953. ok {test-number} - elem % 2 == 1 for: 1 == 1
  954. # Copy and then generate a range
  955. ok {test-number} - elem % 2 == 1 for: 1 == 1
  956. # Copy and then generate a range
  957. ok {test-number} - elem % 2 == 1 for: 1 == 1
  958. # Copy and then generate a range
  959. ok {test-number} - elem % 2 == 1 for: 1 == 1
  960. # Copy and then generate a range
  961. ok {test-number} - elem % 2 == 1 for: 1 == 1
  962. # Copy and then generate a range
  963. ok {test-number} - call_count == 1 for: 1 == 1
  964. # Copy and then generate a range
  965. ok {test-number} - make_data().size() == test_count for: 6 == 6
  966. # Cout stream properly declares it writes to stdout
  967. ok {test-number} - Catch::makeStream( "-" )->isConsole() for: true
  968. # Custom exceptions can be translated when testing for nothrow
  969. not ok {test-number} - unexpected exception with message: 'custom exception - not std'; expression was: throwCustom()
  970. # Custom exceptions can be translated when testing for throwing as something else
  971. not ok {test-number} - unexpected exception with message: 'custom exception - not std'; expression was: throwCustom(), std::exception
  972. # Custom std-exceptions can be custom translated
  973. not ok {test-number} - unexpected exception with message: 'custom std exception'
  974. # Default scale is invisible to comparison
  975. ok {test-number} - 101.000001 != Approx(100).epsilon(0.01) for: 101.000001 != Approx( 100.0 )
  976. # Default scale is invisible to comparison
  977. ok {test-number} - std::pow(10, -5) != Approx(std::pow(10, -7)) for: 0.00001 != Approx( 0.0000001 )
  978. # Directly creating an EnumInfo
  979. ok {test-number} - enumInfo->lookup(0) == "Value1" for: Value1 == "Value1"
  980. # Directly creating an EnumInfo
  981. ok {test-number} - enumInfo->lookup(1) == "Value2" for: Value2 == "Value2"
  982. # Directly creating an EnumInfo
  983. ok {test-number} - enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} == "{** unexpected enum value **}"
  984. # Empty stream name opens cout stream
  985. ok {test-number} - Catch::makeStream( "" )->isConsole() for: true
  986. # Empty tag is not allowed
  987. ok {test-number} - Catch::TestCaseInfo( "", { "fake test name", "[]" }, dummySourceLineInfo )
  988. # EndsWith string matcher
  989. not ok {test-number} - testStringForMatching(), EndsWith( "Substring" ) for: "this string contains 'abc' as a substring" ends with: "Substring"
  990. # EndsWith string matcher
  991. not ok {test-number} - testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: "this" (case insensitive)
  992. # Enums can quickly have stringification enabled using REGISTER_ENUM
  993. ok {test-number} - stringify( EnumClass3::Value1 ) == "Value1" for: "Value1" == "Value1"
  994. # Enums can quickly have stringification enabled using REGISTER_ENUM
  995. ok {test-number} - stringify( EnumClass3::Value2 ) == "Value2" for: "Value2" == "Value2"
  996. # Enums can quickly have stringification enabled using REGISTER_ENUM
  997. ok {test-number} - stringify( EnumClass3::Value3 ) == "Value3" for: "Value3" == "Value3"
  998. # Enums can quickly have stringification enabled using REGISTER_ENUM
  999. ok {test-number} - stringify( EnumClass3::Value4 ) == "{** unexpected enum value **}" for: "{** unexpected enum value **}" == "{** unexpected enum value **}"
  1000. # Enums can quickly have stringification enabled using REGISTER_ENUM
  1001. ok {test-number} - stringify( ec3 ) == "Value2" for: "Value2" == "Value2"
  1002. # Enums in namespaces can quickly have stringification enabled using REGISTER_ENUM
  1003. ok {test-number} - stringify( Bikeshed::Colours::Red ) == "Red" for: "Red" == "Red"
  1004. # Enums in namespaces can quickly have stringification enabled using REGISTER_ENUM
  1005. ok {test-number} - stringify( Bikeshed::Colours::Blue ) == "Blue" for: "Blue" == "Blue"
  1006. # Epsilon only applies to Approx's value
  1007. ok {test-number} - 101.01 != Approx(100).epsilon(0.01) for: 101.01 != Approx( 100.0 )
  1008. # Equality checks that should fail
  1009. not ok {test-number} - data.int_seven == 6 for: 7 == 6
  1010. # Equality checks that should fail
  1011. not ok {test-number} - data.int_seven == 8 for: 7 == 8
  1012. # Equality checks that should fail
  1013. not ok {test-number} - data.int_seven == 0 for: 7 == 0
  1014. # Equality checks that should fail
  1015. not ok {test-number} - data.float_nine_point_one == Approx( 9.11f ) for: 9.1f == Approx( 9.1099996567 )
  1016. # Equality checks that should fail
  1017. not ok {test-number} - data.float_nine_point_one == Approx( 9.0f ) for: 9.1f == Approx( 9.0 )
  1018. # Equality checks that should fail
  1019. not ok {test-number} - data.float_nine_point_one == Approx( 1 ) for: 9.1f == Approx( 1.0 )
  1020. # Equality checks that should fail
  1021. not ok {test-number} - data.float_nine_point_one == Approx( 0 ) for: 9.1f == Approx( 0.0 )
  1022. # Equality checks that should fail
  1023. not ok {test-number} - data.double_pi == Approx( 3.1415 ) for: 3.1415926535 == Approx( 3.1415 )
  1024. # Equality checks that should fail
  1025. not ok {test-number} - data.str_hello == "goodbye" for: "hello" == "goodbye"
  1026. # Equality checks that should fail
  1027. not ok {test-number} - data.str_hello == "hell" for: "hello" == "hell"
  1028. # Equality checks that should fail
  1029. not ok {test-number} - data.str_hello == "hello1" for: "hello" == "hello1"
  1030. # Equality checks that should fail
  1031. not ok {test-number} - data.str_hello.size() == 6 for: 5 == 6
  1032. # Equality checks that should fail
  1033. not ok {test-number} - x == Approx( 1.301 ) for: 1.3 == Approx( 1.301 )
  1034. # Equality checks that should succeed
  1035. ok {test-number} - data.int_seven == 7 for: 7 == 7
  1036. # Equality checks that should succeed
  1037. ok {test-number} - data.float_nine_point_one == Approx( 9.1f ) for: 9.1f == Approx( 9.1000003815 )
  1038. # Equality checks that should succeed
  1039. ok {test-number} - data.double_pi == Approx( 3.1415926535 ) for: 3.1415926535 == Approx( 3.1415926535 )
  1040. # Equality checks that should succeed
  1041. ok {test-number} - data.str_hello == "hello" for: "hello" == "hello"
  1042. # Equality checks that should succeed
  1043. ok {test-number} - "hello" == data.str_hello for: "hello" == "hello"
  1044. # Equality checks that should succeed
  1045. ok {test-number} - data.str_hello.size() == 5 for: 5 == 5
  1046. # Equality checks that should succeed
  1047. ok {test-number} - x == Approx( 1.3 ) for: 1.3 == Approx( 1.3 )
  1048. # Equals
  1049. ok {test-number} - testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring"
  1050. # Equals
  1051. ok {test-number} - testStringForMatching(), Equals( "this string contains 'ABC' as a substring", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" (case insensitive)
  1052. # Equals string matcher
  1053. not ok {test-number} - testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) for: "this string contains 'abc' as a substring" equals: "this string contains 'ABC' as a substring"
  1054. # Equals string matcher
  1055. not ok {test-number} - testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" equals: "something else" (case insensitive)
  1056. # Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified
  1057. ok {test-number} - ::Catch::Detail::stringify(WhatException{}) == "This exception has overridden what() method" for: "This exception has overridden what() method" == "This exception has overridden what() method"
  1058. # Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified
  1059. ok {test-number} - ::Catch::Detail::stringify(OperatorException{}) == "OperatorException" for: "OperatorException" == "OperatorException"
  1060. # Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified
  1061. ok {test-number} - ::Catch::Detail::stringify(StringMakerException{}) == "StringMakerException" for: "StringMakerException" == "StringMakerException"
  1062. # Exception matchers that fail
  1063. not ok {test-number} - expected exception, got none; expression was: doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }
  1064. # Exception matchers that fail
  1065. not ok {test-number} - expected exception, got none; expression was: doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }
  1066. # Exception matchers that fail
  1067. not ok {test-number} - unexpected exception with message: 'Unknown exception'; expression was: throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 }
  1068. # Exception matchers that fail
  1069. not ok {test-number} - unexpected exception with message: 'Unknown exception'; expression was: throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 }
  1070. # Exception matchers that fail
  1071. not ok {test-number} - throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1
  1072. # Exception matchers that fail
  1073. not ok {test-number} - throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1
  1074. # Exception matchers that succeed
  1075. ok {test-number} - throwsSpecialException( 1 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1
  1076. # Exception matchers that succeed
  1077. ok {test-number} - throwsSpecialException( 2 ), SpecialException, ExceptionMatcher{ 2 } for: SpecialException::what special exception has value of 2
  1078. # Exception messages can be tested for
  1079. ok {test-number} - thisThrows(), "expected exception" for: "expected exception" equals: "expected exception"
  1080. # Exception messages can be tested for
  1081. ok {test-number} - thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) for: "expected exception" equals: "expected exception" (case insensitive)
  1082. # Exception messages can be tested for
  1083. ok {test-number} - thisThrows(), StartsWith( "expected" ) for: "expected exception" starts with: "expected"
  1084. # Exception messages can be tested for
  1085. ok {test-number} - thisThrows(), EndsWith( "exception" ) for: "expected exception" ends with: "exception"
  1086. # Exception messages can be tested for
  1087. ok {test-number} - thisThrows(), ContainsSubstring( "except" ) for: "expected exception" contains: "except"
  1088. # Exception messages can be tested for
  1089. ok {test-number} - thisThrows(), ContainsSubstring( "exCept", Catch::CaseSensitive::No ) for: "expected exception" contains: "except" (case insensitive)
  1090. # Exceptions matchers
  1091. ok {test-number} - throwsDerivedException(), DerivedException, Message( "DerivedException::what" ) for: DerivedException::what exception message matches "DerivedException::what"
  1092. # Exceptions matchers
  1093. ok {test-number} - throwsDerivedException(), DerivedException, !Message( "derivedexception::what" ) for: DerivedException::what not exception message matches "derivedexception::what"
  1094. # Exceptions matchers
  1095. ok {test-number} - throwsSpecialException( 2 ), SpecialException, !Message( "DerivedException::what" ) for: SpecialException::what not exception message matches "DerivedException::what"
  1096. # Exceptions matchers
  1097. ok {test-number} - throwsSpecialException( 2 ), SpecialException, Message( "SpecialException::what" ) for: SpecialException::what exception message matches "SpecialException::what"
  1098. # Expected exceptions that don't throw or unexpected exceptions fail the test
  1099. not ok {test-number} - unexpected exception with message: 'expected exception'; expression was: thisThrows(), std::string
  1100. # Expected exceptions that don't throw or unexpected exceptions fail the test
  1101. not ok {test-number} - expected exception, got none; expression was: thisDoesntThrow(), std::domain_error
  1102. # Expected exceptions that don't throw or unexpected exceptions fail the test
  1103. not ok {test-number} - unexpected exception with message: 'expected exception'; expression was: thisThrows()
  1104. # FAIL aborts the test
  1105. not ok {test-number} - explicitly with 1 message: 'This is a failure'
  1106. # FAIL does not require an argument
  1107. not ok {test-number} - explicitly
  1108. # FAIL_CHECK does not abort the test
  1109. not ok {test-number} - explicitly with 1 message: 'This is a failure'
  1110. # FAIL_CHECK does not abort the test
  1111. warning {test-number} - 'This message appears in the output'
  1112. # Factorials are computed
  1113. ok {test-number} - Factorial(0) == 1 for: 1 == 1
  1114. # Factorials are computed
  1115. ok {test-number} - Factorial(1) == 1 for: 1 == 1
  1116. # Factorials are computed
  1117. ok {test-number} - Factorial(2) == 2 for: 2 == 2
  1118. # Factorials are computed
  1119. ok {test-number} - Factorial(3) == 6 for: 6 == 6
  1120. # Factorials are computed
  1121. ok {test-number} - Factorial(10) == 3628800 for: 3628800 (0x<hex digits>) == 3628800 (0x<hex digits>)
  1122. # Floating point matchers: double
  1123. ok {test-number} - 10., WithinRel( 11.1, 0.1 ) for: 10.0 and 11.1 are within 10% of each other
  1124. # Floating point matchers: double
  1125. ok {test-number} - 10., !WithinRel( 11.2, 0.1 ) for: 10.0 not and 11.2 are within 10% of each other
  1126. # Floating point matchers: double
  1127. ok {test-number} - 1., !WithinRel( 0., 0.99 ) for: 1.0 not and 0 are within 99% of each other
  1128. # Floating point matchers: double
  1129. ok {test-number} - -0., WithinRel( 0. ) for: -0.0 and 0 are within 2.22045e-12% of each other
  1130. # Floating point matchers: double
  1131. ok {test-number} - v1, WithinRel( v2 ) for: 0.0 and 2.22507e-308 are within 2.22045e-12% of each other
  1132. # Floating point matchers: double
  1133. ok {test-number} - 1., WithinAbs( 1., 0 ) for: 1.0 is within 0.0 of 1.0
  1134. # Floating point matchers: double
  1135. ok {test-number} - 0., WithinAbs( 1., 1 ) for: 0.0 is within 1.0 of 1.0
  1136. # Floating point matchers: double
  1137. ok {test-number} - 0., !WithinAbs( 1., 0.99 ) for: 0.0 not is within 0.99 of 1.0
  1138. # Floating point matchers: double
  1139. ok {test-number} - 0., !WithinAbs( 1., 0.99 ) for: 0.0 not is within 0.99 of 1.0
  1140. # Floating point matchers: double
  1141. ok {test-number} - 11., !WithinAbs( 10., 0.5 ) for: 11.0 not is within 0.5 of 10.0
  1142. # Floating point matchers: double
  1143. ok {test-number} - 10., !WithinAbs( 11., 0.5 ) for: 10.0 not is within 0.5 of 11.0
  1144. # Floating point matchers: double
  1145. ok {test-number} - -10., WithinAbs( -10., 0.5 ) for: -10.0 is within 0.5 of -10.0
  1146. # Floating point matchers: double
  1147. ok {test-number} - -10., WithinAbs( -9.6, 0.5 ) for: -10.0 is within 0.5 of -9.6
  1148. # Floating point matchers: double
  1149. ok {test-number} - 1., WithinULP( 1., 0 ) for: 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00])
  1150. # Floating point matchers: double
  1151. ok {test-number} - nextafter( 1., 2. ), WithinULP( 1., 1 ) for: 1.0 is within 1 ULPs of 1.0000000000000000e+00 ([9.9999999999999989e-01, 1.0000000000000002e+00])
  1152. # Floating point matchers: double
  1153. ok {test-number} - 0., WithinULP( nextafter( 0., 1. ), 1 ) for: 0.0 is within 1 ULPs of 4.9406564584124654e-324 ([0.0000000000000000e+00, 9.8813129168249309e-324])
  1154. # Floating point matchers: double
  1155. ok {test-number} - 1., WithinULP( nextafter( 1., 0. ), 1 ) for: 1.0 is within 1 ULPs of 9.9999999999999989e-01 ([9.9999999999999978e-01, 1.0000000000000000e+00])
  1156. # Floating point matchers: double
  1157. ok {test-number} - 1., !WithinULP( nextafter( 1., 2. ), 0 ) for: 1.0 not is within 0 ULPs of 1.0000000000000002e+00 ([1.0000000000000002e+00, 1.0000000000000002e+00])
  1158. # Floating point matchers: double
  1159. ok {test-number} - 1., WithinULP( 1., 0 ) for: 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00])
  1160. # Floating point matchers: double
  1161. ok {test-number} - -0., WithinULP( 0., 0 ) for: -0.0 is within 0 ULPs of 0.0000000000000000e+00 ([0.0000000000000000e+00, 0.0000000000000000e+00])
  1162. # Floating point matchers: double
  1163. ok {test-number} - 1., WithinAbs( 1., 0.5 ) || WithinULP( 2., 1 ) for: 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0000000000000000e+00 ([1.9999999999999998e+00, 2.0000000000000004e+00]) )
  1164. # Floating point matchers: double
  1165. ok {test-number} - 1., WithinAbs( 2., 0.5 ) || WithinULP( 1., 0 ) for: 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) )
  1166. # Floating point matchers: double
  1167. ok {test-number} - 0.0001, WithinAbs( 0., 0.001 ) || WithinRel( 0., 0.1 ) for: 0.0001 ( is within 0.001 of 0.0 or and 0 are within 10% of each other )
  1168. # Floating point matchers: double
  1169. ok {test-number} - WithinAbs( 1., 0. )
  1170. # Floating point matchers: double
  1171. ok {test-number} - WithinAbs( 1., -1. ), std::domain_error
  1172. # Floating point matchers: double
  1173. ok {test-number} - WithinULP( 1., 0 )
  1174. # Floating point matchers: double
  1175. ok {test-number} - WithinRel( 1., 0. )
  1176. # Floating point matchers: double
  1177. ok {test-number} - WithinRel( 1., -0.2 ), std::domain_error
  1178. # Floating point matchers: double
  1179. ok {test-number} - WithinRel( 1., 1. ), std::domain_error
  1180. # Floating point matchers: float
  1181. ok {test-number} - 10.f, WithinRel( 11.1f, 0.1f ) for: 10.0f and 11.1 are within 10% of each other
  1182. # Floating point matchers: float
  1183. ok {test-number} - 10.f, !WithinRel( 11.2f, 0.1f ) for: 10.0f not and 11.2 are within 10% of each other
  1184. # Floating point matchers: float
  1185. ok {test-number} - 1.f, !WithinRel( 0.f, 0.99f ) for: 1.0f not and 0 are within 99% of each other
  1186. # Floating point matchers: float
  1187. ok {test-number} - -0.f, WithinRel( 0.f ) for: -0.0f and 0 are within 0.00119209% of each other
  1188. # Floating point matchers: float
  1189. ok {test-number} - v1, WithinRel( v2 ) for: 0.0f and 1.17549e-38 are within 0.00119209% of each other
  1190. # Floating point matchers: float
  1191. ok {test-number} - 1.f, WithinAbs( 1.f, 0 ) for: 1.0f is within 0.0 of 1.0
  1192. # Floating point matchers: float
  1193. ok {test-number} - 0.f, WithinAbs( 1.f, 1 ) for: 0.0f is within 1.0 of 1.0
  1194. # Floating point matchers: float
  1195. ok {test-number} - 0.f, !WithinAbs( 1.f, 0.99f ) for: 0.0f not is within 0.9900000095 of 1.0
  1196. # Floating point matchers: float
  1197. ok {test-number} - 0.f, !WithinAbs( 1.f, 0.99f ) for: 0.0f not is within 0.9900000095 of 1.0
  1198. # Floating point matchers: float
  1199. ok {test-number} - 0.f, WithinAbs( -0.f, 0 ) for: 0.0f is within 0.0 of -0.0
  1200. # Floating point matchers: float
  1201. ok {test-number} - 11.f, !WithinAbs( 10.f, 0.5f ) for: 11.0f not is within 0.5 of 10.0
  1202. # Floating point matchers: float
  1203. ok {test-number} - 10.f, !WithinAbs( 11.f, 0.5f ) for: 10.0f not is within 0.5 of 11.0
  1204. # Floating point matchers: float
  1205. ok {test-number} - -10.f, WithinAbs( -10.f, 0.5f ) for: -10.0f is within 0.5 of -10.0
  1206. # Floating point matchers: float
  1207. ok {test-number} - -10.f, WithinAbs( -9.6f, 0.5f ) for: -10.0f is within 0.5 of -9.6000003815
  1208. # Floating point matchers: float
  1209. ok {test-number} - 1.f, WithinULP( 1.f, 0 ) for: 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00])
  1210. # Floating point matchers: float
  1211. ok {test-number} - -1.f, WithinULP( -1.f, 0 ) for: -1.0f is within 0 ULPs of -1.00000000e+00f ([-1.00000000e+00, -1.00000000e+00])
  1212. # Floating point matchers: float
  1213. ok {test-number} - nextafter( 1.f, 2.f ), WithinULP( 1.f, 1 ) for: 1.0f is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00])
  1214. # Floating point matchers: float
  1215. ok {test-number} - 0.f, WithinULP( nextafter( 0.f, 1.f ), 1 ) for: 0.0f is within 1 ULPs of 1.40129846e-45f ([0.00000000e+00, 2.80259693e-45])
  1216. # Floating point matchers: float
  1217. ok {test-number} - 1.f, WithinULP( nextafter( 1.f, 0.f ), 1 ) for: 1.0f is within 1 ULPs of 9.99999940e-01f ([9.99999881e-01, 1.00000000e+00])
  1218. # Floating point matchers: float
  1219. ok {test-number} - 1.f, !WithinULP( nextafter( 1.f, 2.f ), 0 ) for: 1.0f not is within 0 ULPs of 1.00000012e+00f ([1.00000012e+00, 1.00000012e+00])
  1220. # Floating point matchers: float
  1221. ok {test-number} - 1.f, WithinULP( 1.f, 0 ) for: 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00])
  1222. # Floating point matchers: float
  1223. ok {test-number} - -0.f, WithinULP( 0.f, 0 ) for: -0.0f is within 0 ULPs of 0.00000000e+00f ([0.00000000e+00, 0.00000000e+00])
  1224. # Floating point matchers: float
  1225. ok {test-number} - 1.f, WithinAbs( 1.f, 0.5 ) || WithinULP( 1.f, 1 ) for: 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00]) )
  1226. # Floating point matchers: float
  1227. ok {test-number} - 1.f, WithinAbs( 2.f, 0.5 ) || WithinULP( 1.f, 0 ) for: 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) )
  1228. # Floating point matchers: float
  1229. ok {test-number} - 0.0001f, WithinAbs( 0.f, 0.001f ) || WithinRel( 0.f, 0.1f ) for: 0.0001f ( is within 0.001 of 0.0 or and 0 are within 10% of each other )
  1230. # Floating point matchers: float
  1231. ok {test-number} - WithinAbs( 1.f, 0.f )
  1232. # Floating point matchers: float
  1233. ok {test-number} - WithinAbs( 1.f, -1.f ), std::domain_error
  1234. # Floating point matchers: float
  1235. ok {test-number} - WithinULP( 1.f, 0 )
  1236. # Floating point matchers: float
  1237. ok {test-number} - WithinULP( 1.f, static_cast<uint64_t>( -1 ) ), std::domain_error
  1238. # Floating point matchers: float
  1239. ok {test-number} - WithinRel( 1.f, 0.f )
  1240. # Floating point matchers: float
  1241. ok {test-number} - WithinRel( 1.f, -0.2f ), std::domain_error
  1242. # Floating point matchers: float
  1243. ok {test-number} - WithinRel( 1.f, 1.f ), std::domain_error
  1244. # Generators -- adapters
  1245. ok {test-number} - i % 2 == 0 for: 0 == 0
  1246. # Generators -- adapters
  1247. ok {test-number} - i % 2 == 0 for: 0 == 0
  1248. # Generators -- adapters
  1249. ok {test-number} - i % 2 == 0 for: 0 == 0
  1250. # Generators -- adapters
  1251. ok {test-number} - filter([] (int) {return false; }, value(1)), Catch::GeneratorException
  1252. # Generators -- adapters
  1253. ok {test-number} - i < 4 for: 1 < 4
  1254. # Generators -- adapters
  1255. ok {test-number} - i < 4 for: 2 < 4
  1256. # Generators -- adapters
  1257. ok {test-number} - i < 4 for: 3 < 4
  1258. # Generators -- adapters
  1259. ok {test-number} - i % 2 == 0 for: 0 == 0
  1260. # Generators -- adapters
  1261. ok {test-number} - i % 2 == 0 for: 0 == 0
  1262. # Generators -- adapters
  1263. ok {test-number} - i % 2 == 0 for: 0 == 0
  1264. # Generators -- adapters
  1265. ok {test-number} - i.size() == 1 for: 1 == 1
  1266. # Generators -- adapters
  1267. ok {test-number} - i.size() == 1 for: 1 == 1
  1268. # Generators -- adapters
  1269. ok {test-number} - i.size() == 1 for: 1 == 1
  1270. # Generators -- adapters
  1271. ok {test-number} - i.size() == 1 for: 1 == 1
  1272. # Generators -- adapters
  1273. ok {test-number} - i.size() == 1 for: 1 == 1
  1274. # Generators -- adapters
  1275. ok {test-number} - i.size() == 1 for: 1 == 1
  1276. # Generators -- adapters
  1277. ok {test-number} - j > 0 for: 1 > 0
  1278. # Generators -- adapters
  1279. ok {test-number} - j > 0 for: 2 > 0
  1280. # Generators -- adapters
  1281. ok {test-number} - j > 0 for: 3 > 0
  1282. # Generators -- adapters
  1283. ok {test-number} - j > 0 for: 1 > 0
  1284. # Generators -- adapters
  1285. ok {test-number} - j > 0 for: 2 > 0
  1286. # Generators -- adapters
  1287. ok {test-number} - j > 0 for: 3 > 0
  1288. # Generators -- adapters
  1289. ok {test-number} - chunk2.size() == 2 for: 2 == 2
  1290. # Generators -- adapters
  1291. ok {test-number} - chunk2.front() == chunk2.back() for: 1 == 1
  1292. # Generators -- adapters
  1293. ok {test-number} - chunk2.size() == 2 for: 2 == 2
  1294. # Generators -- adapters
  1295. ok {test-number} - chunk2.front() == chunk2.back() for: 2 == 2
  1296. # Generators -- adapters
  1297. ok {test-number} - chunk2.size() == 2 for: 2 == 2
  1298. # Generators -- adapters
  1299. ok {test-number} - chunk2.front() == chunk2.back() for: 3 == 3
  1300. # Generators -- adapters
  1301. ok {test-number} - chunk2.size() == 2 for: 2 == 2
  1302. # Generators -- adapters
  1303. ok {test-number} - chunk2.front() == chunk2.back() for: 1 == 1
  1304. # Generators -- adapters
  1305. ok {test-number} - chunk2.front() < 3 for: 1 < 3
  1306. # Generators -- adapters
  1307. ok {test-number} - chunk2.size() == 2 for: 2 == 2
  1308. # Generators -- adapters
  1309. ok {test-number} - chunk2.front() == chunk2.back() for: 2 == 2
  1310. # Generators -- adapters
  1311. ok {test-number} - chunk2.front() < 3 for: 2 < 3
  1312. # Generators -- adapters
  1313. ok {test-number} - chunk2.size() == 0 for: 0 == 0
  1314. # Generators -- adapters
  1315. ok {test-number} - chunk2.size() == 0 for: 0 == 0
  1316. # Generators -- adapters
  1317. ok {test-number} - chunk2.size() == 0 for: 0 == 0
  1318. # Generators -- adapters
  1319. ok {test-number} - chunk(2, value(1)), Catch::GeneratorException
  1320. # Generators -- simple
  1321. ok {test-number} - j < i for: -3 < 1
  1322. # Generators -- simple
  1323. ok {test-number} - j < i for: -2 < 1
  1324. # Generators -- simple
  1325. ok {test-number} - j < i for: -1 < 1
  1326. # Generators -- simple
  1327. ok {test-number} - 4u * i > str.size() for: 4 > 1
  1328. # Generators -- simple
  1329. ok {test-number} - 4u * i > str.size() for: 4 > 2
  1330. # Generators -- simple
  1331. ok {test-number} - 4u * i > str.size() for: 4 > 3
  1332. # Generators -- simple
  1333. ok {test-number} - j < i for: -3 < 2
  1334. # Generators -- simple
  1335. ok {test-number} - j < i for: -2 < 2
  1336. # Generators -- simple
  1337. ok {test-number} - j < i for: -1 < 2
  1338. # Generators -- simple
  1339. ok {test-number} - 4u * i > str.size() for: 8 > 1
  1340. # Generators -- simple
  1341. ok {test-number} - 4u * i > str.size() for: 8 > 2
  1342. # Generators -- simple
  1343. ok {test-number} - 4u * i > str.size() for: 8 > 3
  1344. # Generators -- simple
  1345. ok {test-number} - j < i for: -3 < 3
  1346. # Generators -- simple
  1347. ok {test-number} - j < i for: -2 < 3
  1348. # Generators -- simple
  1349. ok {test-number} - j < i for: -1 < 3
  1350. # Generators -- simple
  1351. ok {test-number} - 4u * i > str.size() for: 12 > 1
  1352. # Generators -- simple
  1353. ok {test-number} - 4u * i > str.size() for: 12 > 2
  1354. # Generators -- simple
  1355. ok {test-number} - 4u * i > str.size() for: 12 > 3
  1356. # Generators internals
  1357. ok {test-number} - gen.get() == 123 for: 123 == 123
  1358. # Generators internals
  1359. ok {test-number} - !(gen.next()) for: !false
  1360. # Generators internals
  1361. ok {test-number} - gen.get() == 1 for: 1 == 1
  1362. # Generators internals
  1363. ok {test-number} - gen.next() for: true
  1364. # Generators internals
  1365. ok {test-number} - gen.get() == 3 for: 3 == 3
  1366. # Generators internals
  1367. ok {test-number} - gen.next() for: true
  1368. # Generators internals
  1369. ok {test-number} - gen.get() == 5 for: 5 == 5
  1370. # Generators internals
  1371. ok {test-number} - !(gen.next()) for: !false
  1372. # Generators internals
  1373. ok {test-number} - gen.get() == 1 for: 1 == 1
  1374. # Generators internals
  1375. ok {test-number} - gen.next() for: true
  1376. # Generators internals
  1377. ok {test-number} - gen.get() == 5 for: 5 == 5
  1378. # Generators internals
  1379. ok {test-number} - gen.next() for: true
  1380. # Generators internals
  1381. ok {test-number} - gen.get() == 2 for: 2 == 2
  1382. # Generators internals
  1383. ok {test-number} - gen.next() for: true
  1384. # Generators internals
  1385. ok {test-number} - gen.get() == 4 for: 4 == 4
  1386. # Generators internals
  1387. ok {test-number} - gen.next() for: true
  1388. # Generators internals
  1389. ok {test-number} - gen.get() == 0 for: 0 == 0
  1390. # Generators internals
  1391. ok {test-number} - !(gen.next()) for: !false
  1392. # Generators internals
  1393. ok {test-number} - gen.get().size() == 2 for: 2 == 2
  1394. # Generators internals
  1395. ok {test-number} - gen.get() == "aa" for: "aa" == "aa"
  1396. # Generators internals
  1397. ok {test-number} - gen.next() for: true
  1398. # Generators internals
  1399. ok {test-number} - gen.get() == "bb" for: "bb" == "bb"
  1400. # Generators internals
  1401. ok {test-number} - gen.next() for: true
  1402. # Generators internals
  1403. ok {test-number} - gen.get() == "cc" for: "cc" == "cc"
  1404. # Generators internals
  1405. ok {test-number} - !(gen.next()) for: !false
  1406. # Generators internals
  1407. ok {test-number} - gen.get() == 1 for: 1 == 1
  1408. # Generators internals
  1409. ok {test-number} - gen.next() for: true
  1410. # Generators internals
  1411. ok {test-number} - gen.get() == 3 for: 3 == 3
  1412. # Generators internals
  1413. ok {test-number} - !(gen.next()) for: !false
  1414. # Generators internals
  1415. ok {test-number} - gen.get() == 1 for: 1 == 1
  1416. # Generators internals
  1417. ok {test-number} - gen.next() for: true
  1418. # Generators internals
  1419. ok {test-number} - gen.get() == 3 for: 3 == 3
  1420. # Generators internals
  1421. ok {test-number} - !(gen.next()) for: !false
  1422. # Generators internals
  1423. ok {test-number} - filter([](int) { return false; }, value(1)), Catch::GeneratorException
  1424. # Generators internals
  1425. ok {test-number} - filter([](int) { return false; }, values({ 1, 2, 3 })), Catch::GeneratorException
  1426. # Generators internals
  1427. ok {test-number} - gen.get() == 1 for: 1 == 1
  1428. # Generators internals
  1429. ok {test-number} - gen.next() for: true
  1430. # Generators internals
  1431. ok {test-number} - gen.get() == 2 for: 2 == 2
  1432. # Generators internals
  1433. ok {test-number} - !(gen.next()) for: !false
  1434. # Generators internals
  1435. ok {test-number} - gen.get() == 1 for: 1 == 1
  1436. # Generators internals
  1437. ok {test-number} - !(gen.next()) for: !false
  1438. # Generators internals
  1439. ok {test-number} - gen.get() == 2.0 for: 2.0 == 2.0
  1440. # Generators internals
  1441. ok {test-number} - gen.next() for: true
  1442. # Generators internals
  1443. ok {test-number} - gen.get() == 4.0 for: 4.0 == 4.0
  1444. # Generators internals
  1445. ok {test-number} - gen.next() for: true
  1446. # Generators internals
  1447. ok {test-number} - gen.get() == 6.0 for: 6.0 == 6.0
  1448. # Generators internals
  1449. ok {test-number} - !(gen.next()) for: !false
  1450. # Generators internals
  1451. ok {test-number} - gen.get() == 2.0 for: 2.0 == 2.0
  1452. # Generators internals
  1453. ok {test-number} - gen.next() for: true
  1454. # Generators internals
  1455. ok {test-number} - gen.get() == 4.0 for: 4.0 == 4.0
  1456. # Generators internals
  1457. ok {test-number} - gen.next() for: true
  1458. # Generators internals
  1459. ok {test-number} - gen.get() == 6.0 for: 6.0 == 6.0
  1460. # Generators internals
  1461. ok {test-number} - !(gen.next()) for: !false
  1462. # Generators internals
  1463. ok {test-number} - gen.get() == 3 for: 3 == 3
  1464. # Generators internals
  1465. ok {test-number} - !(gen.next()) for: !false
  1466. # Generators internals
  1467. ok {test-number} - gen.get() == 1 for: 1 == 1
  1468. # Generators internals
  1469. ok {test-number} - gen.next() for: true
  1470. # Generators internals
  1471. ok {test-number} - gen.get() == 2 for: 2 == 2
  1472. # Generators internals
  1473. ok {test-number} - gen.next() for: true
  1474. # Generators internals
  1475. ok {test-number} - gen.get() == 3 for: 3 == 3
  1476. # Generators internals
  1477. ok {test-number} - gen.next() for: true
  1478. # Generators internals
  1479. ok {test-number} - gen.get() == 1 for: 1 == 1
  1480. # Generators internals
  1481. ok {test-number} - gen.next() for: true
  1482. # Generators internals
  1483. ok {test-number} - gen.get() == 2 for: 2 == 2
  1484. # Generators internals
  1485. ok {test-number} - gen.next() for: true
  1486. # Generators internals
  1487. ok {test-number} - gen.get() == 3 for: 3 == 3
  1488. # Generators internals
  1489. ok {test-number} - !(gen.next()) for: !false
  1490. # Generators internals
  1491. ok {test-number} - gen.get() == -2 for: -2 == -2
  1492. # Generators internals
  1493. ok {test-number} - gen.next() for: true
  1494. # Generators internals
  1495. ok {test-number} - gen.get() == -1 for: -1 == -1
  1496. # Generators internals
  1497. ok {test-number} - gen.next() for: true
  1498. # Generators internals
  1499. ok {test-number} - gen.get() == 0 for: 0 == 0
  1500. # Generators internals
  1501. ok {test-number} - gen.next() for: true
  1502. # Generators internals
  1503. ok {test-number} - gen.get() == 1 for: 1 == 1
  1504. # Generators internals
  1505. ok {test-number} - !(gen.next()) for: !false
  1506. # Generators internals
  1507. ok {test-number} - gen.get() == 2 for: 2 == 2
  1508. # Generators internals
  1509. ok {test-number} - gen.next() for: true
  1510. # Generators internals
  1511. ok {test-number} - gen.get() == 1 for: 1 == 1
  1512. # Generators internals
  1513. ok {test-number} - gen.next() for: true
  1514. # Generators internals
  1515. ok {test-number} - gen.get() == 0 for: 0 == 0
  1516. # Generators internals
  1517. ok {test-number} - gen.next() for: true
  1518. # Generators internals
  1519. ok {test-number} - gen.get() == -1 for: -1 == -1
  1520. # Generators internals
  1521. ok {test-number} - !(gen.next()) for: !false
  1522. # Generators internals
  1523. ok {test-number} - gen.get() == -7 for: -7 == -7
  1524. # Generators internals
  1525. ok {test-number} - gen.next() for: true
  1526. # Generators internals
  1527. ok {test-number} - gen.get() == -4 for: -4 == -4
  1528. # Generators internals
  1529. ok {test-number} - gen.next() for: true
  1530. # Generators internals
  1531. ok {test-number} - gen.get() == -1 for: -1 == -1
  1532. # Generators internals
  1533. ok {test-number} - gen.next() for: true
  1534. # Generators internals
  1535. ok {test-number} - gen.get() == 2 for: 2 == 2
  1536. # Generators internals
  1537. ok {test-number} - !(gen.next()) for: !false
  1538. # Generators internals
  1539. ok {test-number} - gen.get() == -7 for: -7 == -7
  1540. # Generators internals
  1541. ok {test-number} - gen.next() for: true
  1542. # Generators internals
  1543. ok {test-number} - gen.get() == -4 for: -4 == -4
  1544. # Generators internals
  1545. ok {test-number} - gen.next() for: true
  1546. # Generators internals
  1547. ok {test-number} - gen.get() == -1 for: -1 == -1
  1548. # Generators internals
  1549. ok {test-number} - gen.next() for: true
  1550. # Generators internals
  1551. ok {test-number} - gen.get() == 2 for: 2 == 2
  1552. # Generators internals
  1553. ok {test-number} - !(gen.next()) for: !false
  1554. # Generators internals
  1555. ok {test-number} - gen.get() == -7 for: -7 == -7
  1556. # Generators internals
  1557. ok {test-number} - gen.next() for: true
  1558. # Generators internals
  1559. ok {test-number} - gen.get() == -4 for: -4 == -4
  1560. # Generators internals
  1561. ok {test-number} - gen.next() for: true
  1562. # Generators internals
  1563. ok {test-number} - gen.get() == -1 for: -1 == -1
  1564. # Generators internals
  1565. ok {test-number} - gen.next() for: true
  1566. # Generators internals
  1567. ok {test-number} - gen.get() == 2 for: 2 == 2
  1568. # Generators internals
  1569. ok {test-number} - gen.next() for: true
  1570. # Generators internals
  1571. ok {test-number} - gen.get() == 5 for: 5 == 5
  1572. # Generators internals
  1573. ok {test-number} - !(gen.next()) for: !false
  1574. # Generators internals
  1575. ok {test-number} - gen.get() == Approx(expected) for: -1.0 == Approx( -1.0 ) with 1 message: 'Current expected value is -1'
  1576. # Generators internals
  1577. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -1'
  1578. # Generators internals
  1579. ok {test-number} - gen.get() == Approx(expected) for: -0.9 == Approx( -0.9 ) with 1 message: 'Current expected value is -0.9'
  1580. # Generators internals
  1581. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.9'
  1582. # Generators internals
  1583. ok {test-number} - gen.get() == Approx(expected) for: -0.8 == Approx( -0.8 ) with 1 message: 'Current expected value is -0.8'
  1584. # Generators internals
  1585. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.8'
  1586. # Generators internals
  1587. ok {test-number} - gen.get() == Approx(expected) for: -0.7 == Approx( -0.7 ) with 1 message: 'Current expected value is -0.7'
  1588. # Generators internals
  1589. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.7'
  1590. # Generators internals
  1591. ok {test-number} - gen.get() == Approx(expected) for: -0.6 == Approx( -0.6 ) with 1 message: 'Current expected value is -0.6'
  1592. # Generators internals
  1593. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.6'
  1594. # Generators internals
  1595. ok {test-number} - gen.get() == Approx(expected) for: -0.5 == Approx( -0.5 ) with 1 message: 'Current expected value is -0.5'
  1596. # Generators internals
  1597. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.5'
  1598. # Generators internals
  1599. ok {test-number} - gen.get() == Approx(expected) for: -0.4 == Approx( -0.4 ) with 1 message: 'Current expected value is -0.4'
  1600. # Generators internals
  1601. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.4'
  1602. # Generators internals
  1603. ok {test-number} - gen.get() == Approx(expected) for: -0.3 == Approx( -0.3 ) with 1 message: 'Current expected value is -0.3'
  1604. # Generators internals
  1605. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.3'
  1606. # Generators internals
  1607. ok {test-number} - gen.get() == Approx(expected) for: -0.2 == Approx( -0.2 ) with 1 message: 'Current expected value is -0.2'
  1608. # Generators internals
  1609. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.2'
  1610. # Generators internals
  1611. ok {test-number} - gen.get() == Approx(expected) for: -0.1 == Approx( -0.1 ) with 1 message: 'Current expected value is -0.1'
  1612. # Generators internals
  1613. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.1'
  1614. # Generators internals
  1615. ok {test-number} - gen.get() == Approx(expected) for: -0.0 == Approx( -0.0 ) with 1 message: 'Current expected value is -1.38778e-16'
  1616. # Generators internals
  1617. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -1.38778e-16'
  1618. # Generators internals
  1619. ok {test-number} - gen.get() == Approx(expected) for: 0.1 == Approx( 0.1 ) with 1 message: 'Current expected value is 0.1'
  1620. # Generators internals
  1621. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.1'
  1622. # Generators internals
  1623. ok {test-number} - gen.get() == Approx(expected) for: 0.2 == Approx( 0.2 ) with 1 message: 'Current expected value is 0.2'
  1624. # Generators internals
  1625. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.2'
  1626. # Generators internals
  1627. ok {test-number} - gen.get() == Approx(expected) for: 0.3 == Approx( 0.3 ) with 1 message: 'Current expected value is 0.3'
  1628. # Generators internals
  1629. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.3'
  1630. # Generators internals
  1631. ok {test-number} - gen.get() == Approx(expected) for: 0.4 == Approx( 0.4 ) with 1 message: 'Current expected value is 0.4'
  1632. # Generators internals
  1633. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.4'
  1634. # Generators internals
  1635. ok {test-number} - gen.get() == Approx(expected) for: 0.5 == Approx( 0.5 ) with 1 message: 'Current expected value is 0.5'
  1636. # Generators internals
  1637. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.5'
  1638. # Generators internals
  1639. ok {test-number} - gen.get() == Approx(expected) for: 0.6 == Approx( 0.6 ) with 1 message: 'Current expected value is 0.6'
  1640. # Generators internals
  1641. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.6'
  1642. # Generators internals
  1643. ok {test-number} - gen.get() == Approx(expected) for: 0.7 == Approx( 0.7 ) with 1 message: 'Current expected value is 0.7'
  1644. # Generators internals
  1645. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.7'
  1646. # Generators internals
  1647. ok {test-number} - gen.get() == Approx(expected) for: 0.8 == Approx( 0.8 ) with 1 message: 'Current expected value is 0.8'
  1648. # Generators internals
  1649. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.8'
  1650. # Generators internals
  1651. ok {test-number} - gen.get() == Approx(expected) for: 0.9 == Approx( 0.9 ) with 1 message: 'Current expected value is 0.9'
  1652. # Generators internals
  1653. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.9'
  1654. # Generators internals
  1655. ok {test-number} - gen.get() == Approx( rangeEnd ) for: 1.0 == Approx( 1.0 )
  1656. # Generators internals
  1657. ok {test-number} - !(gen.next()) for: !false
  1658. # Generators internals
  1659. ok {test-number} - gen.get() == Approx(expected) for: -1.0 == Approx( -1.0 ) with 1 message: 'Current expected value is -1'
  1660. # Generators internals
  1661. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -1'
  1662. # Generators internals
  1663. ok {test-number} - gen.get() == Approx(expected) for: -0.7 == Approx( -0.7 ) with 1 message: 'Current expected value is -0.7'
  1664. # Generators internals
  1665. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.7'
  1666. # Generators internals
  1667. ok {test-number} - gen.get() == Approx(expected) for: -0.4 == Approx( -0.4 ) with 1 message: 'Current expected value is -0.4'
  1668. # Generators internals
  1669. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.4'
  1670. # Generators internals
  1671. ok {test-number} - gen.get() == Approx(expected) for: -0.1 == Approx( -0.1 ) with 1 message: 'Current expected value is -0.1'
  1672. # Generators internals
  1673. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.1'
  1674. # Generators internals
  1675. ok {test-number} - gen.get() == Approx(expected) for: 0.2 == Approx( 0.2 ) with 1 message: 'Current expected value is 0.2'
  1676. # Generators internals
  1677. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.2'
  1678. # Generators internals
  1679. ok {test-number} - gen.get() == Approx(expected) for: 0.5 == Approx( 0.5 ) with 1 message: 'Current expected value is 0.5'
  1680. # Generators internals
  1681. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.5'
  1682. # Generators internals
  1683. ok {test-number} - !(gen.next()) for: !false
  1684. # Generators internals
  1685. ok {test-number} - gen.get() == Approx(expected) for: -1.0 == Approx( -1.0 ) with 1 message: 'Current expected value is -1'
  1686. # Generators internals
  1687. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -1'
  1688. # Generators internals
  1689. ok {test-number} - gen.get() == Approx(expected) for: -0.7 == Approx( -0.7 ) with 1 message: 'Current expected value is -0.7'
  1690. # Generators internals
  1691. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.7'
  1692. # Generators internals
  1693. ok {test-number} - gen.get() == Approx(expected) for: -0.4 == Approx( -0.4 ) with 1 message: 'Current expected value is -0.4'
  1694. # Generators internals
  1695. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.4'
  1696. # Generators internals
  1697. ok {test-number} - gen.get() == Approx(expected) for: -0.1 == Approx( -0.1 ) with 1 message: 'Current expected value is -0.1'
  1698. # Generators internals
  1699. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is -0.1'
  1700. # Generators internals
  1701. ok {test-number} - gen.get() == Approx(expected) for: 0.2 == Approx( 0.2 ) with 1 message: 'Current expected value is 0.2'
  1702. # Generators internals
  1703. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.2'
  1704. # Generators internals
  1705. ok {test-number} - gen.get() == Approx(expected) for: 0.5 == Approx( 0.5 ) with 1 message: 'Current expected value is 0.5'
  1706. # Generators internals
  1707. ok {test-number} - gen.next() for: true with 1 message: 'Current expected value is 0.5'
  1708. # Generators internals
  1709. ok {test-number} - !(gen.next()) for: !false
  1710. # Generators internals
  1711. ok {test-number} - gen.get() == 5 for: 5 == 5
  1712. # Generators internals
  1713. ok {test-number} - gen.next() for: true
  1714. # Generators internals
  1715. ok {test-number} - gen.get() == 2 for: 2 == 2
  1716. # Generators internals
  1717. ok {test-number} - gen.next() for: true
  1718. # Generators internals
  1719. ok {test-number} - gen.get() == -1 for: -1 == -1
  1720. # Generators internals
  1721. ok {test-number} - gen.next() for: true
  1722. # Generators internals
  1723. ok {test-number} - gen.get() == -4 for: -4 == -4
  1724. # Generators internals
  1725. ok {test-number} - !(gen.next()) for: !false
  1726. # Generators internals
  1727. ok {test-number} - gen.get() == 5 for: 5 == 5
  1728. # Generators internals
  1729. ok {test-number} - gen.next() for: true
  1730. # Generators internals
  1731. ok {test-number} - gen.get() == 2 for: 2 == 2
  1732. # Generators internals
  1733. ok {test-number} - gen.next() for: true
  1734. # Generators internals
  1735. ok {test-number} - gen.get() == -1 for: -1 == -1
  1736. # Generators internals
  1737. ok {test-number} - gen.next() for: true
  1738. # Generators internals
  1739. ok {test-number} - gen.get() == -4 for: -4 == -4
  1740. # Generators internals
  1741. ok {test-number} - !(gen.next()) for: !false
  1742. # Generators internals
  1743. ok {test-number} - gen.get() == 5 for: 5 == 5
  1744. # Generators internals
  1745. ok {test-number} - gen.next() for: true
  1746. # Generators internals
  1747. ok {test-number} - gen.get() == 2 for: 2 == 2
  1748. # Generators internals
  1749. ok {test-number} - gen.next() for: true
  1750. # Generators internals
  1751. ok {test-number} - gen.get() == -1 for: -1 == -1
  1752. # Generators internals
  1753. ok {test-number} - gen.next() for: true
  1754. # Generators internals
  1755. ok {test-number} - gen.get() == -4 for: -4 == -4
  1756. # Generators internals
  1757. ok {test-number} - gen.next() for: true
  1758. # Generators internals
  1759. ok {test-number} - gen.get() == -7 for: -7 == -7
  1760. # Generators internals
  1761. ok {test-number} - !(gen.next()) for: !false
  1762. # Greater-than inequalities with different epsilons
  1763. ok {test-number} - d >= Approx( 1.22 ) for: 1.23 >= Approx( 1.22 )
  1764. # Greater-than inequalities with different epsilons
  1765. ok {test-number} - d >= Approx( 1.23 ) for: 1.23 >= Approx( 1.23 )
  1766. # Greater-than inequalities with different epsilons
  1767. ok {test-number} - !(d >= Approx( 1.24 )) for: !(1.23 >= Approx( 1.24 ))
  1768. # Greater-than inequalities with different epsilons
  1769. ok {test-number} - d >= Approx( 1.24 ).epsilon(0.1) for: 1.23 >= Approx( 1.24 )
  1770. # Hashers with different seed produce different hash with same test case
  1771. ok {test-number} - h1( dummy ) != h2( dummy ) for: 3422778688 (0x<hex digits>) != 130711275 (0x<hex digits>)
  1772. # Hashers with same seed produce same hash
  1773. ok {test-number} - h1( dummy ) == h2( dummy ) for: 3422778688 (0x<hex digits>) == 3422778688 (0x<hex digits>)
  1774. # Hashing different test cases produces different result
  1775. ok {test-number} - h( dummy1 ) != h( dummy2 ) for: 2903002874 (0x<hex digits>) != 2668622104 (0x<hex digits>)
  1776. # Hashing different test cases produces different result
  1777. ok {test-number} - h( dummy1 ) != h( dummy2 ) for: 2673152918 (0x<hex digits>) != 3916075712 (0x<hex digits>)
  1778. # Hashing different test cases produces different result
  1779. ok {test-number} - h( dummy1 ) != h( dummy2 ) for: 2074929312 (0x<hex digits>) != 3429949824 (0x<hex digits>)
  1780. # Hashing test case produces same hash across multiple calls
  1781. ok {test-number} - h( dummy ) == h( dummy ) for: 3422778688 (0x<hex digits>) == 3422778688 (0x<hex digits>)
  1782. # INFO and WARN do not abort tests
  1783. warning {test-number} - 'this is a message' with 1 message: 'this is a warning'
  1784. # INFO gets logged on failure
  1785. not ok {test-number} - a == 1 for: 2 == 1 with 2 messages: 'this message should be logged' and 'so should this'
  1786. # INFO gets logged on failure, even if captured before successful assertions
  1787. ok {test-number} - a == 2 for: 2 == 2 with 1 message: 'this message may be logged later'
  1788. # INFO gets logged on failure, even if captured before successful assertions
  1789. not ok {test-number} - a == 1 for: 2 == 1 with 2 messages: 'this message may be logged later' and 'this message should be logged'
  1790. # INFO gets logged on failure, even if captured before successful assertions
  1791. not ok {test-number} - a == 0 for: 2 == 0 with 3 messages: 'this message may be logged later' and 'this message should be logged' and 'and this, but later'
  1792. # INFO gets logged on failure, even if captured before successful assertions
  1793. ok {test-number} - a == 2 for: 2 == 2 with 4 messages: 'this message may be logged later' and 'this message should be logged' and 'and this, but later' and 'but not this'
  1794. # INFO is reset for each loop
  1795. ok {test-number} - i < 10 for: 0 < 10 with 2 messages: 'current counter 0' and 'i := 0'
  1796. # INFO is reset for each loop
  1797. ok {test-number} - i < 10 for: 1 < 10 with 2 messages: 'current counter 1' and 'i := 1'
  1798. # INFO is reset for each loop
  1799. ok {test-number} - i < 10 for: 2 < 10 with 2 messages: 'current counter 2' and 'i := 2'
  1800. # INFO is reset for each loop
  1801. ok {test-number} - i < 10 for: 3 < 10 with 2 messages: 'current counter 3' and 'i := 3'
  1802. # INFO is reset for each loop
  1803. ok {test-number} - i < 10 for: 4 < 10 with 2 messages: 'current counter 4' and 'i := 4'
  1804. # INFO is reset for each loop
  1805. ok {test-number} - i < 10 for: 5 < 10 with 2 messages: 'current counter 5' and 'i := 5'
  1806. # INFO is reset for each loop
  1807. ok {test-number} - i < 10 for: 6 < 10 with 2 messages: 'current counter 6' and 'i := 6'
  1808. # INFO is reset for each loop
  1809. ok {test-number} - i < 10 for: 7 < 10 with 2 messages: 'current counter 7' and 'i := 7'
  1810. # INFO is reset for each loop
  1811. ok {test-number} - i < 10 for: 8 < 10 with 2 messages: 'current counter 8' and 'i := 8'
  1812. # INFO is reset for each loop
  1813. ok {test-number} - i < 10 for: 9 < 10 with 2 messages: 'current counter 9' and 'i := 9'
  1814. # INFO is reset for each loop
  1815. not ok {test-number} - i < 10 for: 10 < 10 with 2 messages: 'current counter 10' and 'i := 10'
  1816. # Inequality checks that should fail
  1817. not ok {test-number} - data.int_seven != 7 for: 7 != 7
  1818. # Inequality checks that should fail
  1819. not ok {test-number} - data.float_nine_point_one != Approx( 9.1f ) for: 9.1f != Approx( 9.1000003815 )
  1820. # Inequality checks that should fail
  1821. not ok {test-number} - data.double_pi != Approx( 3.1415926535 ) for: 3.1415926535 != Approx( 3.1415926535 )
  1822. # Inequality checks that should fail
  1823. not ok {test-number} - data.str_hello != "hello" for: "hello" != "hello"
  1824. # Inequality checks that should fail
  1825. not ok {test-number} - data.str_hello.size() != 5 for: 5 != 5
  1826. # Inequality checks that should succeed
  1827. ok {test-number} - data.int_seven != 6 for: 7 != 6
  1828. # Inequality checks that should succeed
  1829. ok {test-number} - data.int_seven != 8 for: 7 != 8
  1830. # Inequality checks that should succeed
  1831. ok {test-number} - data.float_nine_point_one != Approx( 9.11f ) for: 9.1f != Approx( 9.1099996567 )
  1832. # Inequality checks that should succeed
  1833. ok {test-number} - data.float_nine_point_one != Approx( 9.0f ) for: 9.1f != Approx( 9.0 )
  1834. # Inequality checks that should succeed
  1835. ok {test-number} - data.float_nine_point_one != Approx( 1 ) for: 9.1f != Approx( 1.0 )
  1836. # Inequality checks that should succeed
  1837. ok {test-number} - data.float_nine_point_one != Approx( 0 ) for: 9.1f != Approx( 0.0 )
  1838. # Inequality checks that should succeed
  1839. ok {test-number} - data.double_pi != Approx( 3.1415 ) for: 3.1415926535 != Approx( 3.1415 )
  1840. # Inequality checks that should succeed
  1841. ok {test-number} - data.str_hello != "goodbye" for: "hello" != "goodbye"
  1842. # Inequality checks that should succeed
  1843. ok {test-number} - data.str_hello != "hell" for: "hello" != "hell"
  1844. # Inequality checks that should succeed
  1845. ok {test-number} - data.str_hello != "hello1" for: "hello" != "hello1"
  1846. # Inequality checks that should succeed
  1847. ok {test-number} - data.str_hello.size() != 6 for: 5 != 6
  1848. # Lambdas in assertions
  1849. ok {test-number} - []() { return true; }() for: true
  1850. # Less-than inequalities with different epsilons
  1851. ok {test-number} - d <= Approx( 1.24 ) for: 1.23 <= Approx( 1.24 )
  1852. # Less-than inequalities with different epsilons
  1853. ok {test-number} - d <= Approx( 1.23 ) for: 1.23 <= Approx( 1.23 )
  1854. # Less-than inequalities with different epsilons
  1855. ok {test-number} - !(d <= Approx( 1.22 )) for: !(1.23 <= Approx( 1.22 ))
  1856. # Less-than inequalities with different epsilons
  1857. ok {test-number} - d <= Approx( 1.22 ).epsilon(0.1) for: 1.23 <= Approx( 1.22 )
  1858. # ManuallyRegistered
  1859. ok {test-number} - with 1 message: 'was called'
  1860. # Matchers can be (AllOf) composed with the && operator
  1861. ok {test-number} - testStringForMatching(), ContainsSubstring( "string" ) && ContainsSubstring( "abc" ) && ContainsSubstring( "substring" ) && ContainsSubstring( "contains" ) for: "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" and contains: "substring" and contains: "contains" )
  1862. # Matchers can be (AnyOf) composed with the || operator
  1863. ok {test-number} - testStringForMatching(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) for: "this string contains 'abc' as a substring" ( contains: "string" or contains: "different" or contains: "random" )
  1864. # Matchers can be (AnyOf) composed with the || operator
  1865. ok {test-number} - testStringForMatching2(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) for: "some completely different text that contains one common word" ( contains: "string" or contains: "different" or contains: "random" )
  1866. # Matchers can be composed with both && and ||
  1867. ok {test-number} - testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "substring" )
  1868. # Matchers can be composed with both && and || - failing
  1869. not ok {test-number} - testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )
  1870. # Matchers can be negated (Not) with the ! operator
  1871. ok {test-number} - testStringForMatching(), !ContainsSubstring( "different" ) for: "this string contains 'abc' as a substring" not contains: "different"
  1872. # Matchers can be negated (Not) with the ! operator - failing
  1873. not ok {test-number} - testStringForMatching(), !ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" not contains: "substring"
  1874. # Mayfail test case with nested sections
  1875. not ok {test-number} - explicitly
  1876. # Mayfail test case with nested sections
  1877. not ok {test-number} - explicitly
  1878. # Mayfail test case with nested sections
  1879. not ok {test-number} - explicitly
  1880. # Mayfail test case with nested sections
  1881. not ok {test-number} - explicitly
  1882. # Mismatching exception messages failing the test
  1883. ok {test-number} - thisThrows(), "expected exception" for: "expected exception" equals: "expected exception"
  1884. # Mismatching exception messages failing the test
  1885. not ok {test-number} - thisThrows(), "should fail" for: "expected exception" equals: "should fail"
  1886. # Multireporter calls reporters and listeners in correct order
  1887. ok {test-number} - records == expected for: { "Hello", "world", "Goodbye", "world" } == { "Hello", "world", "Goodbye", "world" }
  1888. # Multireporter updates ReporterPreferences properly
  1889. ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == false for: false == false
  1890. # Multireporter updates ReporterPreferences properly
  1891. ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false
  1892. # Multireporter updates ReporterPreferences properly
  1893. ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true
  1894. # Multireporter updates ReporterPreferences properly
  1895. ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false
  1896. # Multireporter updates ReporterPreferences properly
  1897. ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true
  1898. # Multireporter updates ReporterPreferences properly
  1899. ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true
  1900. # Multireporter updates ReporterPreferences properly
  1901. ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true
  1902. # Multireporter updates ReporterPreferences properly
  1903. ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true
  1904. # Multireporter updates ReporterPreferences properly
  1905. ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == false for: false == false
  1906. # Multireporter updates ReporterPreferences properly
  1907. ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false
  1908. # Multireporter updates ReporterPreferences properly
  1909. ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true
  1910. # Multireporter updates ReporterPreferences properly
  1911. ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == false for: false == false
  1912. # Multireporter updates ReporterPreferences properly
  1913. ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true
  1914. # Multireporter updates ReporterPreferences properly
  1915. ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true
  1916. # Multireporter updates ReporterPreferences properly
  1917. ok {test-number} - multiReporter.getPreferences().shouldRedirectStdOut == true for: true == true
  1918. # Multireporter updates ReporterPreferences properly
  1919. ok {test-number} - multiReporter.getPreferences().shouldReportAllAssertions == true for: true == true
  1920. # Nested generators and captured variables
  1921. ok {test-number} - values > -6 for: 3 > -6
  1922. # Nested generators and captured variables
  1923. ok {test-number} - values > -6 for: 4 > -6
  1924. # Nested generators and captured variables
  1925. ok {test-number} - values > -6 for: 5 > -6
  1926. # Nested generators and captured variables
  1927. ok {test-number} - values > -6 for: 6 > -6
  1928. # Nested generators and captured variables
  1929. ok {test-number} - values > -6 for: -5 > -6
  1930. # Nested generators and captured variables
  1931. ok {test-number} - values > -6 for: -4 > -6
  1932. # Nested generators and captured variables
  1933. ok {test-number} - values > -6 for: 90 > -6
  1934. # Nested generators and captured variables
  1935. ok {test-number} - values > -6 for: 91 > -6
  1936. # Nested generators and captured variables
  1937. ok {test-number} - values > -6 for: 92 > -6
  1938. # Nested generators and captured variables
  1939. ok {test-number} - values > -6 for: 93 > -6
  1940. # Nested generators and captured variables
  1941. ok {test-number} - values > -6 for: 94 > -6
  1942. # Nested generators and captured variables
  1943. ok {test-number} - values > -6 for: 95 > -6
  1944. # Nested generators and captured variables
  1945. ok {test-number} - values > -6 for: 96 > -6
  1946. # Nested generators and captured variables
  1947. ok {test-number} - values > -6 for: 97 > -6
  1948. # Nested generators and captured variables
  1949. ok {test-number} - values > -6 for: 98 > -6
  1950. # Nested generators and captured variables
  1951. ok {test-number} - values > -6 for: 99 > -6
  1952. # Nice descriptive name
  1953. warning {test-number} - 'This one ran'
  1954. # Non-std exceptions can be translated
  1955. not ok {test-number} - unexpected exception with message: 'custom exception'
  1956. # Objects that evaluated in boolean contexts can be checked
  1957. ok {test-number} - True for: {?}
  1958. # Objects that evaluated in boolean contexts can be checked
  1959. ok {test-number} - !False for: true
  1960. # Objects that evaluated in boolean contexts can be checked
  1961. ok {test-number} - !(False) for: !{?}
  1962. # Optionally static assertions
  1963. ok {test-number} - with 1 message: 'std::is_void<void>::value'
  1964. # Optionally static assertions
  1965. ok {test-number} - with 1 message: '!(std::is_void<int>::value)'
  1966. # Optionally static assertions
  1967. ok {test-number} - with 1 message: 'std::is_void<void>::value'
  1968. # Optionally static assertions
  1969. ok {test-number} - with 1 message: '!(std::is_void<int>::value)'
  1970. # Ordering comparison checks that should fail
  1971. not ok {test-number} - data.int_seven > 7 for: 7 > 7
  1972. # Ordering comparison checks that should fail
  1973. not ok {test-number} - data.int_seven < 7 for: 7 < 7
  1974. # Ordering comparison checks that should fail
  1975. not ok {test-number} - data.int_seven > 8 for: 7 > 8
  1976. # Ordering comparison checks that should fail
  1977. not ok {test-number} - data.int_seven < 6 for: 7 < 6
  1978. # Ordering comparison checks that should fail
  1979. not ok {test-number} - data.int_seven < 0 for: 7 < 0
  1980. # Ordering comparison checks that should fail
  1981. not ok {test-number} - data.int_seven < -1 for: 7 < -1
  1982. # Ordering comparison checks that should fail
  1983. not ok {test-number} - data.int_seven >= 8 for: 7 >= 8
  1984. # Ordering comparison checks that should fail
  1985. not ok {test-number} - data.int_seven <= 6 for: 7 <= 6
  1986. # Ordering comparison checks that should fail
  1987. not ok {test-number} - data.float_nine_point_one < 9 for: 9.1f < 9
  1988. # Ordering comparison checks that should fail
  1989. not ok {test-number} - data.float_nine_point_one > 10 for: 9.1f > 10
  1990. # Ordering comparison checks that should fail
  1991. not ok {test-number} - data.float_nine_point_one > 9.2 for: 9.1f > 9.2
  1992. # Ordering comparison checks that should fail
  1993. not ok {test-number} - data.str_hello > "hello" for: "hello" > "hello"
  1994. # Ordering comparison checks that should fail
  1995. not ok {test-number} - data.str_hello < "hello" for: "hello" < "hello"
  1996. # Ordering comparison checks that should fail
  1997. not ok {test-number} - data.str_hello > "hellp" for: "hello" > "hellp"
  1998. # Ordering comparison checks that should fail
  1999. not ok {test-number} - data.str_hello > "z" for: "hello" > "z"
  2000. # Ordering comparison checks that should fail
  2001. not ok {test-number} - data.str_hello < "hellm" for: "hello" < "hellm"
  2002. # Ordering comparison checks that should fail
  2003. not ok {test-number} - data.str_hello < "a" for: "hello" < "a"
  2004. # Ordering comparison checks that should fail
  2005. not ok {test-number} - data.str_hello >= "z" for: "hello" >= "z"
  2006. # Ordering comparison checks that should fail
  2007. not ok {test-number} - data.str_hello <= "a" for: "hello" <= "a"
  2008. # Ordering comparison checks that should succeed
  2009. ok {test-number} - data.int_seven < 8 for: 7 < 8
  2010. # Ordering comparison checks that should succeed
  2011. ok {test-number} - data.int_seven > 6 for: 7 > 6
  2012. # Ordering comparison checks that should succeed
  2013. ok {test-number} - data.int_seven > 0 for: 7 > 0
  2014. # Ordering comparison checks that should succeed
  2015. ok {test-number} - data.int_seven > -1 for: 7 > -1
  2016. # Ordering comparison checks that should succeed
  2017. ok {test-number} - data.int_seven >= 7 for: 7 >= 7
  2018. # Ordering comparison checks that should succeed
  2019. ok {test-number} - data.int_seven >= 6 for: 7 >= 6
  2020. # Ordering comparison checks that should succeed
  2021. ok {test-number} - data.int_seven <= 7 for: 7 <= 7
  2022. # Ordering comparison checks that should succeed
  2023. ok {test-number} - data.int_seven <= 8 for: 7 <= 8
  2024. # Ordering comparison checks that should succeed
  2025. ok {test-number} - data.float_nine_point_one > 9 for: 9.1f > 9
  2026. # Ordering comparison checks that should succeed
  2027. ok {test-number} - data.float_nine_point_one < 10 for: 9.1f < 10
  2028. # Ordering comparison checks that should succeed
  2029. ok {test-number} - data.float_nine_point_one < 9.2 for: 9.1f < 9.2
  2030. # Ordering comparison checks that should succeed
  2031. ok {test-number} - data.str_hello <= "hello" for: "hello" <= "hello"
  2032. # Ordering comparison checks that should succeed
  2033. ok {test-number} - data.str_hello >= "hello" for: "hello" >= "hello"
  2034. # Ordering comparison checks that should succeed
  2035. ok {test-number} - data.str_hello < "hellp" for: "hello" < "hellp"
  2036. # Ordering comparison checks that should succeed
  2037. ok {test-number} - data.str_hello < "zebra" for: "hello" < "zebra"
  2038. # Ordering comparison checks that should succeed
  2039. ok {test-number} - data.str_hello > "hellm" for: "hello" > "hellm"
  2040. # Ordering comparison checks that should succeed
  2041. ok {test-number} - data.str_hello > "a" for: "hello" > "a"
  2042. # Our PCG implementation provides expected results for known seeds
  2043. ok {test-number} - rng() == 0x<hex digits> for: 4242248763 (0x<hex digits>) == 4242248763 (0x<hex digits>)
  2044. # Our PCG implementation provides expected results for known seeds
  2045. ok {test-number} - rng() == 0x<hex digits> for: 1867888929 (0x<hex digits>) == 1867888929 (0x<hex digits>)
  2046. # Our PCG implementation provides expected results for known seeds
  2047. ok {test-number} - rng() == 0x<hex digits> for: 1276619030 (0x<hex digits>) == 1276619030 (0x<hex digits>)
  2048. # Our PCG implementation provides expected results for known seeds
  2049. ok {test-number} - rng() == 0x<hex digits> for: 1911218783 (0x<hex digits>) == 1911218783 (0x<hex digits>)
  2050. # Our PCG implementation provides expected results for known seeds
  2051. ok {test-number} - rng() == 0x<hex digits> for: 1827115164 (0x<hex digits>) == 1827115164 (0x<hex digits>)
  2052. # Our PCG implementation provides expected results for known seeds
  2053. ok {test-number} - rng() == 0x<hex digits> for: 1472234645 (0x<hex digits>) == 1472234645 (0x<hex digits>)
  2054. # Our PCG implementation provides expected results for known seeds
  2055. ok {test-number} - rng() == 0x<hex digits> for: 868832940 (0x<hex digits>) == 868832940 (0x<hex digits>)
  2056. # Our PCG implementation provides expected results for known seeds
  2057. ok {test-number} - rng() == 0x<hex digits> for: 570883446 (0x<hex digits>) == 570883446 (0x<hex digits>)
  2058. # Our PCG implementation provides expected results for known seeds
  2059. ok {test-number} - rng() == 0x<hex digits> for: 889299803 (0x<hex digits>) == 889299803 (0x<hex digits>)
  2060. # Our PCG implementation provides expected results for known seeds
  2061. ok {test-number} - rng() == 0x<hex digits> for: 4261393167 (0x<hex digits>) == 4261393167 (0x<hex digits>)
  2062. # Our PCG implementation provides expected results for known seeds
  2063. ok {test-number} - rng() == 0x<hex digits> for: 1472234645 (0x<hex digits>) == 1472234645 (0x<hex digits>)
  2064. # Our PCG implementation provides expected results for known seeds
  2065. ok {test-number} - rng() == 0x<hex digits> for: 868832940 (0x<hex digits>) == 868832940 (0x<hex digits>)
  2066. # Our PCG implementation provides expected results for known seeds
  2067. ok {test-number} - rng() == 0x<hex digits> for: 570883446 (0x<hex digits>) == 570883446 (0x<hex digits>)
  2068. # Our PCG implementation provides expected results for known seeds
  2069. ok {test-number} - rng() == 0x<hex digits> for: 889299803 (0x<hex digits>) == 889299803 (0x<hex digits>)
  2070. # Our PCG implementation provides expected results for known seeds
  2071. ok {test-number} - rng() == 0x<hex digits> for: 4261393167 (0x<hex digits>) == 4261393167 (0x<hex digits>)
  2072. # Output from all sections is reported
  2073. not ok {test-number} - explicitly with 1 message: 'Message from section one'
  2074. # Output from all sections is reported
  2075. not ok {test-number} - explicitly with 1 message: 'Message from section two'
  2076. # Overloaded comma or address-of operators are not used
  2077. ok {test-number} - ( EvilMatcher(), EvilMatcher() ), EvilCommaOperatorUsed
  2078. # Overloaded comma or address-of operators are not used
  2079. ok {test-number} - &EvilMatcher(), EvilAddressOfOperatorUsed
  2080. # Overloaded comma or address-of operators are not used
  2081. ok {test-number} - EvilMatcher() || ( EvilMatcher() && !EvilMatcher() )
  2082. # Overloaded comma or address-of operators are not used
  2083. ok {test-number} - ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher()
  2084. # Parse test names and tags
  2085. ok {test-number} - spec.hasFilters() == false for: false == false
  2086. # Parse test names and tags
  2087. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2088. # Parse test names and tags
  2089. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2090. # Parse test names and tags
  2091. ok {test-number} - spec.hasFilters() == false for: false == false
  2092. # Parse test names and tags
  2093. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2094. # Parse test names and tags
  2095. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2096. # Parse test names and tags
  2097. ok {test-number} - spec.hasFilters() == false for: false == false
  2098. # Parse test names and tags
  2099. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2100. # Parse test names and tags
  2101. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2102. # Parse test names and tags
  2103. ok {test-number} - spec.hasFilters() == true for: true == true
  2104. # Parse test names and tags
  2105. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2106. # Parse test names and tags
  2107. ok {test-number} - spec.matches( *tcB ) == true for: true == true
  2108. # Parse test names and tags
  2109. ok {test-number} - spec.hasFilters() == true for: true == true
  2110. # Parse test names and tags
  2111. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2112. # Parse test names and tags
  2113. ok {test-number} - spec.matches( *tcB ) == true for: true == true
  2114. # Parse test names and tags
  2115. ok {test-number} - spec.hasFilters() == true for: true == true
  2116. # Parse test names and tags
  2117. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2118. # Parse test names and tags
  2119. ok {test-number} - spec.matches( *tcB ) == true for: true == true
  2120. # Parse test names and tags
  2121. ok {test-number} - spec.matches( *tcC ) == false for: false == false
  2122. # Parse test names and tags
  2123. ok {test-number} - spec.hasFilters() == true for: true == true
  2124. # Parse test names and tags
  2125. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2126. # Parse test names and tags
  2127. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2128. # Parse test names and tags
  2129. ok {test-number} - spec.matches( *tcC ) == true for: true == true
  2130. # Parse test names and tags
  2131. ok {test-number} - spec.matches( *tcD ) == false for: false == false
  2132. # Parse test names and tags
  2133. ok {test-number} - parseTestSpec( "*a" ).matches( *tcA ) == true for: true == true
  2134. # Parse test names and tags
  2135. ok {test-number} - spec.hasFilters() == true for: true == true
  2136. # Parse test names and tags
  2137. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2138. # Parse test names and tags
  2139. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2140. # Parse test names and tags
  2141. ok {test-number} - spec.matches( *tcC ) == true for: true == true
  2142. # Parse test names and tags
  2143. ok {test-number} - spec.matches( *tcD ) == false for: false == false
  2144. # Parse test names and tags
  2145. ok {test-number} - parseTestSpec( "a*" ).matches( *tcA ) == true for: true == true
  2146. # Parse test names and tags
  2147. ok {test-number} - spec.hasFilters() == true for: true == true
  2148. # Parse test names and tags
  2149. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2150. # Parse test names and tags
  2151. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2152. # Parse test names and tags
  2153. ok {test-number} - spec.matches( *tcC ) == true for: true == true
  2154. # Parse test names and tags
  2155. ok {test-number} - spec.matches( *tcD ) == true for: true == true
  2156. # Parse test names and tags
  2157. ok {test-number} - parseTestSpec( "*a*" ).matches( *tcA ) == true for: true == true
  2158. # Parse test names and tags
  2159. ok {test-number} - spec.hasFilters() == true for: true == true
  2160. # Parse test names and tags
  2161. ok {test-number} - spec.matches( *tcA ) == true for: true == true
  2162. # Parse test names and tags
  2163. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2164. # Parse test names and tags
  2165. ok {test-number} - spec.hasFilters() == true for: true == true
  2166. # Parse test names and tags
  2167. ok {test-number} - spec.matches( *tcA ) == true for: true == true
  2168. # Parse test names and tags
  2169. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2170. # Parse test names and tags
  2171. ok {test-number} - spec.hasFilters() == true for: true == true
  2172. # Parse test names and tags
  2173. ok {test-number} - spec.matches( *tcA ) == true for: true == true
  2174. # Parse test names and tags
  2175. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2176. # Parse test names and tags
  2177. ok {test-number} - spec.hasFilters() == true for: true == true
  2178. # Parse test names and tags
  2179. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2180. # Parse test names and tags
  2181. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2182. # Parse test names and tags
  2183. ok {test-number} - spec.matches( *tcC ) == true for: true == true
  2184. # Parse test names and tags
  2185. ok {test-number} - spec.matches( *tcD ) == true for: true == true
  2186. # Parse test names and tags
  2187. ok {test-number} - spec.hasFilters() == true for: true == true
  2188. # Parse test names and tags
  2189. ok {test-number} - spec.matches( *tcA ) == true for: true == true
  2190. # Parse test names and tags
  2191. ok {test-number} - spec.matches( *tcB ) == true for: true == true
  2192. # Parse test names and tags
  2193. ok {test-number} - spec.matches( *tcC ) == true for: true == true
  2194. # Parse test names and tags
  2195. ok {test-number} - spec.matches( *tcD ) == true for: true == true
  2196. # Parse test names and tags
  2197. ok {test-number} - spec.hasFilters() == true for: true == true
  2198. # Parse test names and tags
  2199. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2200. # Parse test names and tags
  2201. ok {test-number} - spec.matches( *tcB ) == true for: true == true
  2202. # Parse test names and tags
  2203. ok {test-number} - spec.matches( *tcC ) == false for: false == false
  2204. # Parse test names and tags
  2205. ok {test-number} - spec.hasFilters() == true for: true == true
  2206. # Parse test names and tags
  2207. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2208. # Parse test names and tags
  2209. ok {test-number} - spec.matches( *tcB ) == true for: true == true
  2210. # Parse test names and tags
  2211. ok {test-number} - spec.matches( *tcC ) == true for: true == true
  2212. # Parse test names and tags
  2213. ok {test-number} - spec.hasFilters() == true for: true == true
  2214. # Parse test names and tags
  2215. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2216. # Parse test names and tags
  2217. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2218. # Parse test names and tags
  2219. ok {test-number} - spec.matches( *tcC ) == true for: true == true
  2220. # Parse test names and tags
  2221. ok {test-number} - spec.hasFilters() == true for: true == true
  2222. # Parse test names and tags
  2223. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2224. # Parse test names and tags
  2225. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2226. # Parse test names and tags
  2227. ok {test-number} - spec.matches( *tcC ) == true for: true == true
  2228. # Parse test names and tags
  2229. ok {test-number} - spec.hasFilters() == true for: true == true
  2230. # Parse test names and tags
  2231. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2232. # Parse test names and tags
  2233. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2234. # Parse test names and tags
  2235. ok {test-number} - spec.matches( *tcC ) == true for: true == true
  2236. # Parse test names and tags
  2237. ok {test-number} - spec.matches( *tcD ) == false for: false == false
  2238. # Parse test names and tags
  2239. ok {test-number} - spec.hasFilters() == true for: true == true
  2240. # Parse test names and tags
  2241. ok {test-number} - spec.matches( *tcA ) == true for: true == true
  2242. # Parse test names and tags
  2243. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2244. # Parse test names and tags
  2245. ok {test-number} - spec.matches( *tcC ) == false for: false == false
  2246. # Parse test names and tags
  2247. ok {test-number} - spec.hasFilters() == true for: true == true
  2248. # Parse test names and tags
  2249. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2250. # Parse test names and tags
  2251. ok {test-number} - spec.matches( *tcB ) == true for: true == true
  2252. # Parse test names and tags
  2253. ok {test-number} - spec.matches( *tcC ) == false for: false == false
  2254. # Parse test names and tags
  2255. ok {test-number} - spec.hasFilters() == true for: true == true
  2256. # Parse test names and tags
  2257. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2258. # Parse test names and tags
  2259. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2260. # Parse test names and tags
  2261. ok {test-number} - spec.matches( *tcC ) == false for: false == false
  2262. # Parse test names and tags
  2263. ok {test-number} - spec.matches( *tcD ) == true for: true == true
  2264. # Parse test names and tags
  2265. ok {test-number} - spec.hasFilters() == true for: true == true
  2266. # Parse test names and tags
  2267. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2268. # Parse test names and tags
  2269. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2270. # Parse test names and tags
  2271. ok {test-number} - spec.matches( *tcC ) == false for: false == false
  2272. # Parse test names and tags
  2273. ok {test-number} - spec.matches( *tcD ) == true for: true == true
  2274. # Parse test names and tags
  2275. ok {test-number} - spec.hasFilters() == true for: true == true
  2276. # Parse test names and tags
  2277. ok {test-number} - spec.matches( *tcA ) == true for: true == true
  2278. # Parse test names and tags
  2279. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2280. # Parse test names and tags
  2281. ok {test-number} - spec.matches( *tcC ) == false for: false == false
  2282. # Parse test names and tags
  2283. ok {test-number} - spec.matches( *tcD ) == true for: true == true
  2284. # Parse test names and tags
  2285. ok {test-number} - spec.hasFilters() == true for: true == true
  2286. # Parse test names and tags
  2287. ok {test-number} - spec.matches( *tcA ) == true for: true == true
  2288. # Parse test names and tags
  2289. ok {test-number} - spec.matches( *tcB ) == true for: true == true
  2290. # Parse test names and tags
  2291. ok {test-number} - spec.matches( *tcC ) == false for: false == false
  2292. # Parse test names and tags
  2293. ok {test-number} - spec.matches( *tcD ) == false for: false == false
  2294. # Parse test names and tags
  2295. ok {test-number} - spec.hasFilters() == true for: true == true
  2296. # Parse test names and tags
  2297. ok {test-number} - spec.matches( *tcA ) == true for: true == true
  2298. # Parse test names and tags
  2299. ok {test-number} - spec.matches( *tcB ) == true for: true == true
  2300. # Parse test names and tags
  2301. ok {test-number} - spec.matches( *tcC ) == true for: true == true
  2302. # Parse test names and tags
  2303. ok {test-number} - spec.matches( *tcD ) == false for: false == false
  2304. # Parse test names and tags
  2305. ok {test-number} - spec.hasFilters() == true for: true == true
  2306. # Parse test names and tags
  2307. ok {test-number} - spec.matches( *tcA ) == true for: true == true
  2308. # Parse test names and tags
  2309. ok {test-number} - spec.matches( *tcB ) == true for: true == true
  2310. # Parse test names and tags
  2311. ok {test-number} - spec.matches( *tcC ) == true for: true == true
  2312. # Parse test names and tags
  2313. ok {test-number} - spec.matches( *tcD ) == false for: false == false
  2314. # Parse test names and tags
  2315. ok {test-number} - spec.hasFilters() == true for: true == true
  2316. # Parse test names and tags
  2317. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2318. # Parse test names and tags
  2319. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2320. # Parse test names and tags
  2321. ok {test-number} - spec.matches( *tcC ) == true for: true == true
  2322. # Parse test names and tags
  2323. ok {test-number} - spec.matches( *tcD ) == false for: false == false
  2324. # Parse test names and tags
  2325. ok {test-number} - spec.hasFilters() == false for: false == false
  2326. # Parse test names and tags
  2327. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2328. # Parse test names and tags
  2329. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2330. # Parse test names and tags
  2331. ok {test-number} - spec.matches( *tcC ) == false for: false == false
  2332. # Parse test names and tags
  2333. ok {test-number} - spec.matches( *tcD ) == false for: false == false
  2334. # Parse test names and tags
  2335. ok {test-number} - spec.hasFilters() == false for: false == false
  2336. # Parse test names and tags
  2337. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2338. # Parse test names and tags
  2339. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2340. # Parse test names and tags
  2341. ok {test-number} - spec.matches( *tcC ) == false for: false == false
  2342. # Parse test names and tags
  2343. ok {test-number} - spec.matches( *tcD ) == false for: false == false
  2344. # Parse test names and tags
  2345. ok {test-number} - spec.hasFilters() == true for: true == true
  2346. # Parse test names and tags
  2347. ok {test-number} - spec.matches( *tcA ) == false for: false == false
  2348. # Parse test names and tags
  2349. ok {test-number} - spec.matches( *tcB ) == false for: false == false
  2350. # Parse test names and tags
  2351. ok {test-number} - spec.matches( *tcC ) == false for: false == false
  2352. # Parse test names and tags
  2353. ok {test-number} - spec.matches( *tcD ) == true for: true == true
  2354. # Parse test names and tags
  2355. ok {test-number} - spec.matches( *fakeTestCase( " aardvark " ) ) for: true
  2356. # Parse test names and tags
  2357. ok {test-number} - spec.matches( *fakeTestCase( " aardvark" ) ) for: true
  2358. # Parse test names and tags
  2359. ok {test-number} - spec.matches( *fakeTestCase( " aardvark " ) ) for: true
  2360. # Parse test names and tags
  2361. ok {test-number} - spec.matches( *fakeTestCase( "aardvark " ) ) for: true
  2362. # Parse test names and tags
  2363. ok {test-number} - spec.matches( *fakeTestCase( "aardvark" ) ) for: true
  2364. # Parse test names and tags
  2365. ok {test-number} - spec.matches( *fakeTestCase( " aardvark " ) ) for: true
  2366. # Parse test names and tags
  2367. ok {test-number} - spec.matches( *fakeTestCase( " aardvark" ) ) for: true
  2368. # Parse test names and tags
  2369. ok {test-number} - spec.matches( *fakeTestCase( " aardvark " ) ) for: true
  2370. # Parse test names and tags
  2371. ok {test-number} - spec.matches( *fakeTestCase( "aardvark " ) ) for: true
  2372. # Parse test names and tags
  2373. ok {test-number} - spec.matches( *fakeTestCase( "aardvark" ) ) for: true
  2374. # Parse test names and tags
  2375. ok {test-number} - spec.matches(*fakeTestCase("hidden and foo", "[.][foo]")) for: true
  2376. # Parse test names and tags
  2377. ok {test-number} - !(spec.matches(*fakeTestCase("only foo", "[foo]"))) for: !false
  2378. # Parse test names and tags
  2379. ok {test-number} - !(spec.matches(*fakeTestCase("hidden and foo", "[.][foo]"))) for: !false
  2380. # Parse test names and tags
  2381. ok {test-number} - !(spec.matches(*fakeTestCase("only foo", "[foo]"))) for: !false
  2382. # Parse test names and tags
  2383. ok {test-number} - !(spec.matches(*fakeTestCase("only hidden", "[.]"))) for: !false
  2384. # Parse test names and tags
  2385. ok {test-number} - spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]")) for: true
  2386. # Parsed tags are matched case insensitive
  2387. ok {test-number} - spec.hasFilters() for: true
  2388. # Parsed tags are matched case insensitive
  2389. ok {test-number} - spec.getInvalidSpecs().empty() for: true
  2390. # Parsed tags are matched case insensitive
  2391. ok {test-number} - spec.matches( testCase ) for: true
  2392. # Parsing sharding-related cli flags
  2393. ok {test-number} - cli.parse({ "test", "--shard-count=8" }) for: {?}
  2394. # Parsing sharding-related cli flags
  2395. ok {test-number} - config.shardCount == 8 for: 8 == 8
  2396. # Parsing sharding-related cli flags
  2397. ok {test-number} - !(result) for: !{?}
  2398. # Parsing sharding-related cli flags
  2399. ok {test-number} - result.errorMessage(), ContainsSubstring("Shard count must be a positive number") for: "Shard count must be a positive number" contains: "Shard count must be a positive number"
  2400. # Parsing sharding-related cli flags
  2401. ok {test-number} - !(result) for: !{?}
  2402. # Parsing sharding-related cli flags
  2403. ok {test-number} - result.errorMessage(), ContainsSubstring("Shard count must be a positive number") for: "Shard count must be a positive number" contains: "Shard count must be a positive number"
  2404. # Parsing sharding-related cli flags
  2405. ok {test-number} - cli.parse({ "test", "--shard-index=2" }) for: {?}
  2406. # Parsing sharding-related cli flags
  2407. ok {test-number} - config.shardIndex == 2 for: 2 == 2
  2408. # Parsing sharding-related cli flags
  2409. ok {test-number} - !(result) for: !{?}
  2410. # Parsing sharding-related cli flags
  2411. ok {test-number} - result.errorMessage(), ContainsSubstring("Shard index must be a non-negative number") for: "Shard index must be a non-negative number" contains: "Shard index must be a non-negative number"
  2412. # Parsing sharding-related cli flags
  2413. ok {test-number} - cli.parse({ "test", "--shard-index=0" }) for: {?}
  2414. # Parsing sharding-related cli flags
  2415. ok {test-number} - config.shardIndex == 0 for: 0 == 0
  2416. # Parsing tags with non-alphabetical characters is pass-through
  2417. ok {test-number} - spec.hasFilters() for: true with 1 message: 'tagString := "[tag with spaces]"'
  2418. # Parsing tags with non-alphabetical characters is pass-through
  2419. ok {test-number} - spec.getInvalidSpecs().empty() for: true with 1 message: 'tagString := "[tag with spaces]"'
  2420. # Parsing tags with non-alphabetical characters is pass-through
  2421. ok {test-number} - spec.matches( testCase ) for: true with 1 message: 'tagString := "[tag with spaces]"'
  2422. # Parsing tags with non-alphabetical characters is pass-through
  2423. ok {test-number} - spec.hasFilters() for: true with 1 message: 'tagString := "[I said "good day" sir!]"'
  2424. # Parsing tags with non-alphabetical characters is pass-through
  2425. ok {test-number} - spec.getInvalidSpecs().empty() for: true with 1 message: 'tagString := "[I said "good day" sir!]"'
  2426. # Parsing tags with non-alphabetical characters is pass-through
  2427. ok {test-number} - spec.matches( testCase ) for: true with 1 message: 'tagString := "[I said "good day" sir!]"'
  2428. # Parsing warnings
  2429. ok {test-number} - cli.parse( { "test", "-w", "NoAssertions" } ) for: {?}
  2430. # Parsing warnings
  2431. ok {test-number} - config.warnings == WarnAbout::NoAssertions for: 1 == 1
  2432. # Parsing warnings
  2433. ok {test-number} - !(cli.parse( { "test", "-w", "NoTests" } )) for: !{?}
  2434. # Parsing warnings
  2435. ok {test-number} - cli.parse( { "test", "--warn", "NoAssertions", "--warn", "UnmatchedTestSpec" } ) for: {?}
  2436. # Parsing warnings
  2437. ok {test-number} - config.warnings == ( WarnAbout::NoAssertions | WarnAbout::UnmatchedTestSpec ) for: 3 == 3
  2438. # Pointers can be compared to null
  2439. ok {test-number} - p == 0 for: 0 == 0
  2440. # Pointers can be compared to null
  2441. ok {test-number} - p == pNULL for: 0 == 0
  2442. # Pointers can be compared to null
  2443. ok {test-number} - p != 0 for: 0x<hex digits> != 0
  2444. # Pointers can be compared to null
  2445. ok {test-number} - cp != 0 for: 0x<hex digits> != 0
  2446. # Pointers can be compared to null
  2447. ok {test-number} - cpc != 0 for: 0x<hex digits> != 0
  2448. # Pointers can be compared to null
  2449. ok {test-number} - returnsNull() == 0 for: {null string} == 0
  2450. # Pointers can be compared to null
  2451. ok {test-number} - returnsConstNull() == 0 for: {null string} == 0
  2452. # Pointers can be compared to null
  2453. ok {test-number} - 0 != p for: 0 != 0x<hex digits>
  2454. # Precision of floating point stringification can be set
  2455. ok {test-number} - str1.size() == 3 + 5 for: 8 == 8
  2456. # Precision of floating point stringification can be set
  2457. ok {test-number} - str2.size() == 3 + 10 for: 13 == 13
  2458. # Precision of floating point stringification can be set
  2459. ok {test-number} - str1.size() == 2 + 5 for: 7 == 7
  2460. # Precision of floating point stringification can be set
  2461. ok {test-number} - str2.size() == 2 + 15 for: 17 == 17
  2462. # Predicate matcher can accept const char*
  2463. ok {test-number} - "foo", Predicate<const char*>( []( const char* const& ) { return true; } ) for: "foo" matches undescribed predicate
  2464. # Process can be configured on command line
  2465. ok {test-number} - result for: {?}
  2466. # Process can be configured on command line
  2467. ok {test-number} - config.processName == "" for: "" == ""
  2468. # Process can be configured on command line
  2469. ok {test-number} - result for: {?}
  2470. # Process can be configured on command line
  2471. ok {test-number} - config.processName == "test" for: "test" == "test"
  2472. # Process can be configured on command line
  2473. ok {test-number} - config.shouldDebugBreak == false for: false == false
  2474. # Process can be configured on command line
  2475. ok {test-number} - config.abortAfter == -1 for: -1 == -1
  2476. # Process can be configured on command line
  2477. ok {test-number} - config.noThrow == false for: false == false
  2478. # Process can be configured on command line
  2479. ok {test-number} - config.reporterSpecifications.empty() for: true
  2480. # Process can be configured on command line
  2481. ok {test-number} - !(cfg.hasTestFilters()) for: !false
  2482. # Process can be configured on command line
  2483. ok {test-number} - cfg.getReporterSpecs().size() == 1 for: 1 == 1
  2484. # Process can be configured on command line
  2485. ok {test-number} - cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} } for: {?} == {?}
  2486. # Process can be configured on command line
  2487. ok {test-number} - cfg.getProcessedReporterSpecs().size() == 1 for: 1 == 1
  2488. # Process can be configured on command line
  2489. ok {test-number} - cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } for: {?} == {?}
  2490. # Process can be configured on command line
  2491. ok {test-number} - result for: {?}
  2492. # Process can be configured on command line
  2493. ok {test-number} - cfg.hasTestFilters() for: true
  2494. # Process can be configured on command line
  2495. ok {test-number} - cfg.testSpec().matches(*fakeTestCase("notIncluded")) == false for: false == false
  2496. # Process can be configured on command line
  2497. ok {test-number} - cfg.testSpec().matches(*fakeTestCase("test1")) for: true
  2498. # Process can be configured on command line
  2499. ok {test-number} - result for: {?}
  2500. # Process can be configured on command line
  2501. ok {test-number} - cfg.hasTestFilters() for: true
  2502. # Process can be configured on command line
  2503. ok {test-number} - cfg.testSpec().matches(*fakeTestCase("test1")) == false for: false == false
  2504. # Process can be configured on command line
  2505. ok {test-number} - cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) for: true
  2506. # Process can be configured on command line
  2507. ok {test-number} - result for: {?}
  2508. # Process can be configured on command line
  2509. ok {test-number} - cfg.hasTestFilters() for: true
  2510. # Process can be configured on command line
  2511. ok {test-number} - cfg.testSpec().matches(*fakeTestCase("test1")) == false for: false == false
  2512. # Process can be configured on command line
  2513. ok {test-number} - cfg.testSpec().matches(*fakeTestCase("alwaysIncluded")) for: true
  2514. # Process can be configured on command line
  2515. ok {test-number} - result for: {?} with 1 message: 'result.errorMessage() := ""'
  2516. # Process can be configured on command line
  2517. ok {test-number} - config.reporterSpecifications == vec_Specs{ { "console", {}, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""'
  2518. # Process can be configured on command line
  2519. ok {test-number} - result for: {?} with 1 message: 'result.errorMessage() := ""'
  2520. # Process can be configured on command line
  2521. ok {test-number} - config.reporterSpecifications == vec_Specs{ { "xml", {}, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""'
  2522. # Process can be configured on command line
  2523. ok {test-number} - result for: {?} with 1 message: 'result.errorMessage() := ""'
  2524. # Process can be configured on command line
  2525. ok {test-number} - config.reporterSpecifications == vec_Specs{ { "junit", {}, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""'
  2526. # Process can be configured on command line
  2527. ok {test-number} - !result for: true
  2528. # Process can be configured on command line
  2529. ok {test-number} - result.errorMessage(), ContainsSubstring("Unrecognized reporter") for: "Unrecognized reporter, 'unsupported'. Check available with --list-reporters" contains: "Unrecognized reporter"
  2530. # Process can be configured on command line
  2531. ok {test-number} - result for: {?} with 1 message: 'result.errorMessage() := ""'
  2532. # Process can be configured on command line
  2533. ok {test-number} - config.reporterSpecifications == vec_Specs{ { "console", "out.txt"s, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""'
  2534. # Process can be configured on command line
  2535. ok {test-number} - result for: {?} with 1 message: 'result.errorMessage() := ""'
  2536. # Process can be configured on command line
  2537. ok {test-number} - config.reporterSpecifications == vec_Specs{ { "console", "C:\\Temp\\out.txt"s, {}, {} } } for: { {?} } == { {?} } with 1 message: 'result.errorMessage() := ""'
  2538. # Process can be configured on command line
  2539. ok {test-number} - cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "junit::out=output-junit.xml" }) for: {?}
  2540. # Process can be configured on command line
  2541. ok {test-number} - config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "junit", "output-junit.xml"s, {}, {} } } for: { {?}, {?} } == { {?}, {?} }
  2542. # Process can be configured on command line
  2543. ok {test-number} - cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "console" }) for: {?}
  2544. # Process can be configured on command line
  2545. ok {test-number} - config.reporterSpecifications == vec_Specs{ { "xml", "output.xml"s, {}, {} }, { "console", {}, {}, {} } } for: { {?}, {?} } == { {?}, {?} }
  2546. # Process can be configured on command line
  2547. ok {test-number} - !result for: true
  2548. # Process can be configured on command line
  2549. ok {test-number} - result.errorMessage(), ContainsSubstring("Only one reporter may have unspecified output file.") for: "Only one reporter may have unspecified output file." contains: "Only one reporter may have unspecified output file."
  2550. # Process can be configured on command line
  2551. ok {test-number} - cli.parse({"test", "-b"}) for: {?}
  2552. # Process can be configured on command line
  2553. ok {test-number} - config.shouldDebugBreak == true for: true == true
  2554. # Process can be configured on command line
  2555. ok {test-number} - cli.parse({"test", "--break"}) for: {?}
  2556. # Process can be configured on command line
  2557. ok {test-number} - config.shouldDebugBreak for: true
  2558. # Process can be configured on command line
  2559. ok {test-number} - cli.parse({"test", "-a"}) for: {?}
  2560. # Process can be configured on command line
  2561. ok {test-number} - config.abortAfter == 1 for: 1 == 1
  2562. # Process can be configured on command line
  2563. ok {test-number} - cli.parse({"test", "-x", "2"}) for: {?}
  2564. # Process can be configured on command line
  2565. ok {test-number} - config.abortAfter == 2 for: 2 == 2
  2566. # Process can be configured on command line
  2567. ok {test-number} - !result for: true
  2568. # Process can be configured on command line
  2569. ok {test-number} - result.errorMessage(), ContainsSubstring("convert") && ContainsSubstring("oops") for: "Unable to convert 'oops' to destination type" ( contains: "convert" and contains: "oops" )
  2570. # Process can be configured on command line
  2571. ok {test-number} - cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?}
  2572. # Process can be configured on command line
  2573. ok {test-number} - config.waitForKeypress == std::get<1>(input) for: 0 == 0
  2574. # Process can be configured on command line
  2575. ok {test-number} - cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?}
  2576. # Process can be configured on command line
  2577. ok {test-number} - config.waitForKeypress == std::get<1>(input) for: 1 == 1
  2578. # Process can be configured on command line
  2579. ok {test-number} - cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?}
  2580. # Process can be configured on command line
  2581. ok {test-number} - config.waitForKeypress == std::get<1>(input) for: 2 == 2
  2582. # Process can be configured on command line
  2583. ok {test-number} - cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?}
  2584. # Process can be configured on command line
  2585. ok {test-number} - config.waitForKeypress == std::get<1>(input) for: 3 == 3
  2586. # Process can be configured on command line
  2587. ok {test-number} - !result for: true
  2588. # Process can be configured on command line
  2589. ok {test-number} - result.errorMessage(), ContainsSubstring("never") && ContainsSubstring("both") for: "keypress argument must be one of: never, start, exit or both. 'sometimes' not recognised" ( contains: "never" and contains: "both" )
  2590. # Process can be configured on command line
  2591. ok {test-number} - cli.parse({"test", "-e"}) for: {?}
  2592. # Process can be configured on command line
  2593. ok {test-number} - config.noThrow for: true
  2594. # Process can be configured on command line
  2595. ok {test-number} - cli.parse({"test", "--nothrow"}) for: {?}
  2596. # Process can be configured on command line
  2597. ok {test-number} - config.noThrow for: true
  2598. # Process can be configured on command line
  2599. ok {test-number} - cli.parse({"test", "-o", "filename.ext"}) for: {?}
  2600. # Process can be configured on command line
  2601. ok {test-number} - config.defaultOutputFilename == "filename.ext" for: "filename.ext" == "filename.ext"
  2602. # Process can be configured on command line
  2603. ok {test-number} - cli.parse({"test", "--out", "filename.ext"}) for: {?}
  2604. # Process can be configured on command line
  2605. ok {test-number} - config.defaultOutputFilename == "filename.ext" for: "filename.ext" == "filename.ext"
  2606. # Process can be configured on command line
  2607. ok {test-number} - cli.parse({"test", "-abe"}) for: {?}
  2608. # Process can be configured on command line
  2609. ok {test-number} - config.abortAfter == 1 for: 1 == 1
  2610. # Process can be configured on command line
  2611. ok {test-number} - config.shouldDebugBreak for: true
  2612. # Process can be configured on command line
  2613. ok {test-number} - config.noThrow == true for: true == true
  2614. # Process can be configured on command line
  2615. ok {test-number} - cli.parse({"test"}) for: {?}
  2616. # Process can be configured on command line
  2617. ok {test-number} - config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0
  2618. # Process can be configured on command line
  2619. ok {test-number} - cli.parse( { "test", "--colour-mode", "default" } ) for: {?}
  2620. # Process can be configured on command line
  2621. ok {test-number} - config.defaultColourMode == ColourMode::PlatformDefault for: 0 == 0
  2622. # Process can be configured on command line
  2623. ok {test-number} - cli.parse({"test", "--colour-mode", "ansi"}) for: {?}
  2624. # Process can be configured on command line
  2625. ok {test-number} - config.defaultColourMode == ColourMode::ANSI for: 1 == 1
  2626. # Process can be configured on command line
  2627. ok {test-number} - cli.parse({"test", "--colour-mode", "none"}) for: {?}
  2628. # Process can be configured on command line
  2629. ok {test-number} - config.defaultColourMode == ColourMode::None for: 3 == 3
  2630. # Process can be configured on command line
  2631. ok {test-number} - !result for: true
  2632. # Process can be configured on command line
  2633. ok {test-number} - result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) for: "colour mode must be one of: default, ansi, win32, or none. 'wrong' is not recognised" contains: "colour mode must be one of"
  2634. # Process can be configured on command line
  2635. ok {test-number} - cli.parse({ "test", "--benchmark-samples=200" }) for: {?}
  2636. # Process can be configured on command line
  2637. ok {test-number} - config.benchmarkSamples == 200 for: 200 == 200
  2638. # Process can be configured on command line
  2639. ok {test-number} - cli.parse({ "test", "--benchmark-resamples=20000" }) for: {?}
  2640. # Process can be configured on command line
  2641. ok {test-number} - config.benchmarkResamples == 20000 for: 20000 (0x<hex digits>) == 20000 (0x<hex digits>)
  2642. # Process can be configured on command line
  2643. ok {test-number} - cli.parse({ "test", "--benchmark-confidence-interval=0.99" }) for: {?}
  2644. # Process can be configured on command line
  2645. ok {test-number} - config.benchmarkConfidenceInterval == Catch::Approx(0.99) for: 0.99 == Approx( 0.99 )
  2646. # Process can be configured on command line
  2647. ok {test-number} - cli.parse({ "test", "--benchmark-no-analysis" }) for: {?}
  2648. # Process can be configured on command line
  2649. ok {test-number} - config.benchmarkNoAnalysis for: true
  2650. # Process can be configured on command line
  2651. ok {test-number} - cli.parse({ "test", "--benchmark-warmup-time=10" }) for: {?}
  2652. # Process can be configured on command line
  2653. ok {test-number} - config.benchmarkWarmupTime == 10 for: 10 == 10
  2654. # Product with differing arities - std::tuple<int, double, float>
  2655. ok {test-number} - std::tuple_size<TestType>::value >= 1 for: 3 >= 1
  2656. # Product with differing arities - std::tuple<int, double>
  2657. ok {test-number} - std::tuple_size<TestType>::value >= 1 for: 2 >= 1
  2658. # Product with differing arities - std::tuple<int>
  2659. ok {test-number} - std::tuple_size<TestType>::value >= 1 for: 1 >= 1
  2660. # Random seed generation accepts known methods
  2661. ok {test-number} - Catch::generateRandomSeed(method)
  2662. # Random seed generation accepts known methods
  2663. ok {test-number} - Catch::generateRandomSeed(method)
  2664. # Random seed generation accepts known methods
  2665. ok {test-number} - Catch::generateRandomSeed(method)
  2666. # Random seed generation reports unknown methods
  2667. ok {test-number} - Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77))
  2668. # Range type with sentinel
  2669. ok {test-number} - Catch::Detail::stringify(UsesSentinel{}) == "{ }" for: "{ }" == "{ }"
  2670. # Reconstruction should be based on stringification: #914
  2671. not ok {test-number} - truthy(false) for: Hey, its truthy!
  2672. # Regex string matcher
  2673. not ok {test-number} - testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively
  2674. # Regex string matcher
  2675. not ok {test-number} - testStringForMatching(), Matches( "contains 'abc' as a substring" ) for: "this string contains 'abc' as a substring" matches "contains 'abc' as a substring" case sensitively
  2676. # Regex string matcher
  2677. not ok {test-number} - testStringForMatching(), Matches( "this string contains 'abc' as a" ) for: "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively
  2678. # Registering reporter with '::' in name fails
  2679. ok {test-number} - registry.registerReporter( "with::doublecolons", Catch::Detail::make_unique<TestReporterFactory>() ), "'::' is not allowed in reporter name: 'with::doublecolons'" for: "'::' is not allowed in reporter name: 'with::doublecolons'" equals: "'::' is not allowed in reporter name: 'with::doublecolons'"
  2680. # Regression test #1
  2681. ok {test-number} - actual, !UnorderedEquals( expected ) for: { 'a', 'b' } not UnorderedEquals: { 'c', 'b' }
  2682. # Reporter's write listings to provided stream
  2683. ok {test-number} - !(factories.empty()) for: !false
  2684. # Reporter's write listings to provided stream
  2685. ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: Automake'
  2686. # Reporter's write listings to provided stream
  2687. ok {test-number} - !(factories.empty()) for: !false
  2688. # Reporter's write listings to provided stream
  2689. ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: Automake'
  2690. # Reporter's write listings to provided stream
  2691. ok {test-number} - !(factories.empty()) for: !false
  2692. # Reporter's write listings to provided stream
  2693. ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: Automake'
  2694. # Reporter's write listings to provided stream
  2695. ok {test-number} - !(factories.empty()) for: !false
  2696. # Reporter's write listings to provided stream
  2697. ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: compact'
  2698. # Reporter's write listings to provided stream
  2699. ok {test-number} - !(factories.empty()) for: !false
  2700. # Reporter's write listings to provided stream
  2701. ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: compact'
  2702. # Reporter's write listings to provided stream
  2703. ok {test-number} - !(factories.empty()) for: !false
  2704. # Reporter's write listings to provided stream
  2705. ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: compact'
  2706. # Reporter's write listings to provided stream
  2707. ok {test-number} - !(factories.empty()) for: !false
  2708. # Reporter's write listings to provided stream
  2709. ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: console'
  2710. # Reporter's write listings to provided stream
  2711. ok {test-number} - !(factories.empty()) for: !false
  2712. # Reporter's write listings to provided stream
  2713. ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: console'
  2714. # Reporter's write listings to provided stream
  2715. ok {test-number} - !(factories.empty()) for: !false
  2716. # Reporter's write listings to provided stream
  2717. ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: console'
  2718. # Reporter's write listings to provided stream
  2719. ok {test-number} - !(factories.empty()) for: !false
  2720. # Reporter's write listings to provided stream
  2721. ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?> All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: JUnit'
  2722. # Reporter's write listings to provided stream
  2723. ok {test-number} - !(factories.empty()) for: !false
  2724. # Reporter's write listings to provided stream
  2725. ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "<?xml version="1.0" encoding="UTF-8"?> Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: JUnit'
  2726. # Reporter's write listings to provided stream
  2727. ok {test-number} - !(factories.empty()) for: !false
  2728. # Reporter's write listings to provided stream
  2729. ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "<?xml version="1.0" encoding="UTF-8"?> All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JUnit'
  2730. # Reporter's write listings to provided stream
  2731. ok {test-number} - !(factories.empty()) for: !false
  2732. # Reporter's write listings to provided stream
  2733. ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?> All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: SonarQube'
  2734. # Reporter's write listings to provided stream
  2735. ok {test-number} - !(factories.empty()) for: !false
  2736. # Reporter's write listings to provided stream
  2737. ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "<?xml version="1.0" encoding="UTF-8"?> Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: SonarQube'
  2738. # Reporter's write listings to provided stream
  2739. ok {test-number} - !(factories.empty()) for: !false
  2740. # Reporter's write listings to provided stream
  2741. ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "<?xml version="1.0" encoding="UTF-8"?> All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: SonarQube'
  2742. # Reporter's write listings to provided stream
  2743. ok {test-number} - !(factories.empty()) for: !false
  2744. # Reporter's write listings to provided stream
  2745. ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: TAP'
  2746. # Reporter's write listings to provided stream
  2747. ok {test-number} - !(factories.empty()) for: !false
  2748. # Reporter's write listings to provided stream
  2749. ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: TAP'
  2750. # Reporter's write listings to provided stream
  2751. ok {test-number} - !(factories.empty()) for: !false
  2752. # Reporter's write listings to provided stream
  2753. ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: TAP'
  2754. # Reporter's write listings to provided stream
  2755. ok {test-number} - !(factories.empty()) for: !false
  2756. # Reporter's write listings to provided stream
  2757. ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: TeamCity'
  2758. # Reporter's write listings to provided stream
  2759. ok {test-number} - !(factories.empty()) for: !false
  2760. # Reporter's write listings to provided stream
  2761. ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: TeamCity'
  2762. # Reporter's write listings to provided stream
  2763. ok {test-number} - !(factories.empty()) for: !false
  2764. # Reporter's write listings to provided stream
  2765. ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: TeamCity'
  2766. # Reporter's write listings to provided stream
  2767. ok {test-number} - !(factories.empty()) for: !false
  2768. # Reporter's write listings to provided stream
  2769. ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?> <TagsFromMatchingTests> <Tag> <Count>1</Count> <Aliases> <Alias>fakeTag</Alias> </Aliases> </Tag> </TagsFromMatchingTests>" contains: "fakeTag" with 1 message: 'Tested reporter: XML'
  2770. # Reporter's write listings to provided stream
  2771. ok {test-number} - !(factories.empty()) for: !false
  2772. # Reporter's write listings to provided stream
  2773. ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "<?xml version="1.0" encoding="UTF-8"?> <AvailableReporters> <Reporter> <Name>fake reporter</Name> <Description>fake description</Description> </Reporter> </AvailableReporters>" contains: "fake reporter" with 1 message: 'Tested reporter: XML'
  2774. # Reporter's write listings to provided stream
  2775. ok {test-number} - !(factories.empty()) for: !false
  2776. # Reporter's write listings to provided stream
  2777. ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "<?xml version="1.0" encoding="UTF-8"?> <MatchingTests> <TestCase> <Name>fake test name</Name> <ClassName/> <Tags>[fakeTestTag]</Tags> <SourceInfo> <File>fake-file.cpp</File> <Line>123456789</Line> </SourceInfo> </TestCase> </MatchingTests>" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: XML'
  2778. # Reproducer for #2309 - a very long description past 80 chars (default console width) with a late colon : blablabla
  2779. ok {test-number} -
  2780. # SUCCEED counts as a test pass
  2781. ok {test-number} - with 1 message: 'this is a success'
  2782. # SUCCEED does not require an argument
  2783. ok {test-number} -
  2784. # Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods
  2785. ok {test-number} - before == 0 for: 0 == 0
  2786. # Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods
  2787. ok {test-number} - after > before for: 1 > 0
  2788. # Scenario: Do that thing with the thing
  2789. ok {test-number} - itDoesThis() for: true
  2790. # Scenario: Do that thing with the thing
  2791. ok {test-number} - itDoesThat() for: true
  2792. # Scenario: This is a really long scenario name to see how the list command deals with wrapping
  2793. ok {test-number} - with 1 message: 'boo!'
  2794. # Scenario: Vector resizing affects size and capacity
  2795. ok {test-number} - v.size() == 0 for: 0 == 0
  2796. # Scenario: Vector resizing affects size and capacity
  2797. ok {test-number} - v.size() == 10 for: 10 == 10
  2798. # Scenario: Vector resizing affects size and capacity
  2799. ok {test-number} - v.capacity() >= 10 for: 10 >= 10
  2800. # Scenario: Vector resizing affects size and capacity
  2801. ok {test-number} - v.size() == 5 for: 5 == 5
  2802. # Scenario: Vector resizing affects size and capacity
  2803. ok {test-number} - v.capacity() >= 10 for: 10 >= 10
  2804. # Scenario: Vector resizing affects size and capacity
  2805. ok {test-number} - v.size() == 0 for: 0 == 0
  2806. # Scenario: Vector resizing affects size and capacity
  2807. ok {test-number} - v.capacity() >= 10 for: 10 >= 10
  2808. # Scenario: Vector resizing affects size and capacity
  2809. ok {test-number} - v.size() == 0 for: 0 == 0
  2810. A string sent directly to stdout
  2811. A string sent directly to stderr
  2812. A string sent to stderr via clog
  2813. # Some simple comparisons between doubles
  2814. ok {test-number} - d == Approx( 1.23 ) for: 1.23 == Approx( 1.23 )
  2815. # Some simple comparisons between doubles
  2816. ok {test-number} - d != Approx( 1.22 ) for: 1.23 != Approx( 1.22 )
  2817. # Some simple comparisons between doubles
  2818. ok {test-number} - d != Approx( 1.24 ) for: 1.23 != Approx( 1.24 )
  2819. # Some simple comparisons between doubles
  2820. ok {test-number} - d == 1.23_a for: 1.23 == Approx( 1.23 )
  2821. # Some simple comparisons between doubles
  2822. ok {test-number} - d != 1.22_a for: 1.23 != Approx( 1.22 )
  2823. # Some simple comparisons between doubles
  2824. ok {test-number} - Approx( d ) == 1.23 for: Approx( 1.23 ) == 1.23
  2825. # Some simple comparisons between doubles
  2826. ok {test-number} - Approx( d ) != 1.22 for: Approx( 1.23 ) != 1.22
  2827. # Some simple comparisons between doubles
  2828. ok {test-number} - Approx( d ) != 1.24 for: Approx( 1.23 ) != 1.24
  2829. Message from section one
  2830. Message from section two
  2831. # StartsWith string matcher
  2832. not ok {test-number} - testStringForMatching(), StartsWith( "This String" ) for: "this string contains 'abc' as a substring" starts with: "This String"
  2833. # StartsWith string matcher
  2834. not ok {test-number} - testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" starts with: "string" (case insensitive)
  2835. # Static arrays are convertible to string
  2836. ok {test-number} - Catch::Detail::stringify(singular) == "{ 1 }" for: "{ 1 }" == "{ 1 }"
  2837. # Static arrays are convertible to string
  2838. ok {test-number} - Catch::Detail::stringify(arr) == "{ 3, 2, 1 }" for: "{ 3, 2, 1 }" == "{ 3, 2, 1 }"
  2839. # Static arrays are convertible to string
  2840. ok {test-number} - Catch::Detail::stringify(arr) == R"({ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } })" for: "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" == "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }"
  2841. # String matchers
  2842. ok {test-number} - testStringForMatching(), ContainsSubstring( "string" ) for: "this string contains 'abc' as a substring" contains: "string"
  2843. # String matchers
  2844. ok {test-number} - testStringForMatching(), ContainsSubstring( "string", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "string" (case insensitive)
  2845. # String matchers
  2846. ok {test-number} - testStringForMatching(), ContainsSubstring( "abc" ) for: "this string contains 'abc' as a substring" contains: "abc"
  2847. # String matchers
  2848. ok {test-number} - testStringForMatching(), ContainsSubstring( "aBC", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "abc" (case insensitive)
  2849. # String matchers
  2850. ok {test-number} - testStringForMatching(), StartsWith( "this" ) for: "this string contains 'abc' as a substring" starts with: "this"
  2851. # String matchers
  2852. ok {test-number} - testStringForMatching(), StartsWith( "THIS", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" starts with: "this" (case insensitive)
  2853. # String matchers
  2854. ok {test-number} - testStringForMatching(), EndsWith( "substring" ) for: "this string contains 'abc' as a substring" ends with: "substring"
  2855. # String matchers
  2856. ok {test-number} - testStringForMatching(), EndsWith( " SuBsTrInG", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: " substring" (case insensitive)
  2857. # StringRef
  2858. ok {test-number} - empty.empty() for: true
  2859. # StringRef
  2860. ok {test-number} - empty.size() == 0 for: 0 == 0
  2861. # StringRef
  2862. ok {test-number} - std::strcmp( empty.data(), "" ) == 0 for: 0 == 0
  2863. # StringRef
  2864. ok {test-number} - s.empty() == false for: false == false
  2865. # StringRef
  2866. ok {test-number} - s.size() == 5 for: 5 == 5
  2867. # StringRef
  2868. ok {test-number} - std::strcmp( rawChars, "hello" ) == 0 for: 0 == 0
  2869. # StringRef
  2870. ok {test-number} - s.data() == rawChars for: "hello" == "hello"
  2871. # StringRef
  2872. ok {test-number} - original == "original"
  2873. # StringRef
  2874. ok {test-number} - original.data()
  2875. # StringRef
  2876. ok {test-number} - original.begin() == copy.begin() for: "original string" == "original string"
  2877. # StringRef
  2878. ok {test-number} - original.begin() == copy.begin() for: "original string" == "original string"
  2879. # StringRef
  2880. ok {test-number} - ss.empty() == false for: false == false
  2881. # StringRef
  2882. ok {test-number} - ss.size() == 5 for: 5 == 5
  2883. # StringRef
  2884. ok {test-number} - std::strncmp( ss.data(), "hello", 5 ) == 0 for: 0 == 0
  2885. # StringRef
  2886. ok {test-number} - ss == "hello" for: hello == "hello"
  2887. # StringRef
  2888. ok {test-number} - ss.size() == 6 for: 6 == 6
  2889. # StringRef
  2890. ok {test-number} - std::strcmp( ss.data(), "world!" ) == 0 for: 0 == 0
  2891. # StringRef
  2892. ok {test-number} - s.data() == s2.data() for: "hello world!" == "hello world!"
  2893. # StringRef
  2894. ok {test-number} - s.data() == ss.data() for: "hello world!" == "hello world!"
  2895. # StringRef
  2896. ok {test-number} - s.substr(s.size() + 1, 123).empty() for: true
  2897. # StringRef
  2898. ok {test-number} - std::strcmp(ss.data(), "world!") == 0 for: 0 == 0
  2899. # StringRef
  2900. ok {test-number} - s.substr(1'000'000, 1).empty() for: true
  2901. # StringRef
  2902. ok {test-number} - reinterpret_cast<char*>(buffer1) != reinterpret_cast<char*>(buffer2) for: "Hello" != "Hello"
  2903. # StringRef
  2904. ok {test-number} - left == right for: Hello == Hello
  2905. # StringRef
  2906. ok {test-number} - left != left.substr(0, 3) for: Hello != Hel
  2907. # StringRef
  2908. ok {test-number} - sr == "a standard string" for: a standard string == "a standard string"
  2909. # StringRef
  2910. ok {test-number} - sr.size() == stdStr.size() for: 17 == 17
  2911. # StringRef
  2912. ok {test-number} - sr == "a standard string" for: a standard string == "a standard string"
  2913. # StringRef
  2914. ok {test-number} - sr.size() == stdStr.size() for: 17 == 17
  2915. # StringRef
  2916. ok {test-number} - sr == "a standard string" for: a standard string == "a standard string"
  2917. # StringRef
  2918. ok {test-number} - sr.size() == stdStr.size() for: 17 == 17
  2919. # StringRef
  2920. ok {test-number} - stdStr == "a stringref" for: "a stringref" == "a stringref"
  2921. # StringRef
  2922. ok {test-number} - stdStr.size() == sr.size() for: 11 == 11
  2923. # StringRef
  2924. ok {test-number} - stdStr == "a stringref" for: "a stringref" == "a stringref"
  2925. # StringRef
  2926. ok {test-number} - stdStr.size() == sr.size() for: 11 == 11
  2927. # StringRef
  2928. ok {test-number} - lhs == "some string += the stringref contents" for: "some string += the stringref contents" == "some string += the stringref contents"
  2929. # StringRef
  2930. ok {test-number} - together == "abrakadabra" for: "abrakadabra" == "abrakadabra"
  2931. # StringRef at compilation time
  2932. ok {test-number} - with 1 message: 'empty.size() == 0'
  2933. # StringRef at compilation time
  2934. ok {test-number} - with 1 message: 'empty.begin() == empty.end()'
  2935. # StringRef at compilation time
  2936. ok {test-number} - with 1 message: 'stringref.size() == 3'
  2937. # StringRef at compilation time
  2938. ok {test-number} - with 1 message: 'stringref.data() == abc'
  2939. # StringRef at compilation time
  2940. ok {test-number} - with 1 message: 'stringref.begin() == abc'
  2941. # StringRef at compilation time
  2942. ok {test-number} - with 1 message: 'stringref.begin() != stringref.end()'
  2943. # StringRef at compilation time
  2944. ok {test-number} - with 1 message: 'stringref.substr(10, 0).empty()'
  2945. # StringRef at compilation time
  2946. ok {test-number} - with 1 message: 'stringref.substr(2, 1).data() == abc + 2'
  2947. # StringRef at compilation time
  2948. ok {test-number} - with 1 message: 'stringref[1] == 'b''
  2949. # StringRef at compilation time
  2950. ok {test-number} - with 1 message: 'shortened.size() == 2'
  2951. # StringRef at compilation time
  2952. ok {test-number} - with 1 message: 'shortened.data() == abc'
  2953. # StringRef at compilation time
  2954. ok {test-number} - with 1 message: 'shortened.begin() != shortened.end()'
  2955. # StringRef at compilation time
  2956. ok {test-number} - with 1 message: '!(sr1.empty())'
  2957. # StringRef at compilation time
  2958. ok {test-number} - with 1 message: 'sr1.size() == 3'
  2959. # StringRef at compilation time
  2960. ok {test-number} - with 1 message: 'sr2.empty()'
  2961. # StringRef at compilation time
  2962. ok {test-number} - with 1 message: 'sr2.size() == 0'
  2963. # Stringifying char arrays with statically known sizes - char
  2964. ok {test-number} - ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc""
  2965. # Stringifying char arrays with statically known sizes - char
  2966. ok {test-number} - ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc""
  2967. # Stringifying char arrays with statically known sizes - signed char
  2968. ok {test-number} - ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc""
  2969. # Stringifying char arrays with statically known sizes - signed char
  2970. ok {test-number} - ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc""
  2971. # Stringifying char arrays with statically known sizes - unsigned char
  2972. ok {test-number} - ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc""
  2973. # Stringifying char arrays with statically known sizes - unsigned char
  2974. ok {test-number} - ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc""
  2975. # Stringifying std::chrono::duration helpers
  2976. ok {test-number} - minute == seconds for: 1 m == 60 s
  2977. # Stringifying std::chrono::duration helpers
  2978. ok {test-number} - hour != seconds for: 1 h != 60 s
  2979. # Stringifying std::chrono::duration helpers
  2980. ok {test-number} - micro != milli for: 1 us != 1 ms
  2981. # Stringifying std::chrono::duration helpers
  2982. ok {test-number} - nano != micro for: 1 ns != 1 us
  2983. # Stringifying std::chrono::duration with weird ratios
  2984. ok {test-number} - half_minute != femto_second for: 1 [30/1]s != 1 fs
  2985. # Stringifying std::chrono::duration with weird ratios
  2986. ok {test-number} - pico_second != atto_second for: 1 ps != 1 as
  2987. # Stringifying std::chrono::time_point<system_clock>
  2988. ok {test-number} - now != later for: {iso8601-timestamp} != {iso8601-timestamp}
  2989. # Tabs and newlines show in output
  2990. not ok {test-number} - s1 == s2 for: "if ($b == 10) { $a = 20; }" == "if ($b == 10) { $a = 20; } "
  2991. # Tag alias can be registered against tag patterns
  2992. ok {test-number} - what, ContainsSubstring( "[@zzz]" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "[@zzz]"
  2993. # Tag alias can be registered against tag patterns
  2994. ok {test-number} - what, ContainsSubstring( "file" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "file"
  2995. # Tag alias can be registered against tag patterns
  2996. ok {test-number} - what, ContainsSubstring( "2" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "2"
  2997. # Tag alias can be registered against tag patterns
  2998. ok {test-number} - what, ContainsSubstring( "10" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "10"
  2999. # Tag alias can be registered against tag patterns
  3000. ok {test-number} - registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) )
  3001. # Tag alias can be registered against tag patterns
  3002. ok {test-number} - registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) )
  3003. # Tag alias can be registered against tag patterns
  3004. ok {test-number} - registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) )
  3005. # Tag alias can be registered against tag patterns
  3006. ok {test-number} - registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) )
  3007. # Tags with spaces and non-alphanumerical characters are accepted
  3008. ok {test-number} - testCase.tags.size() == 2 for: 2 == 2
  3009. # Tags with spaces and non-alphanumerical characters are accepted
  3010. ok {test-number} - testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
  3011. # Template test case method with test types specified inside std::tuple - MyTypes - 0
  3012. ok {test-number} - Template_Fixture<TestType>::m_a == 1 for: 1 == 1
  3013. # Template test case method with test types specified inside std::tuple - MyTypes - 1
  3014. ok {test-number} - Template_Fixture<TestType>::m_a == 1 for: 1 == 1
  3015. # Template test case method with test types specified inside std::tuple - MyTypes - 2
  3016. ok {test-number} - Template_Fixture<TestType>::m_a == 1 for: 1.0 == 1
  3017. # Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0
  3018. ok {test-number} - sizeof(TestType) > 0 for: 1 > 0
  3019. # Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1
  3020. ok {test-number} - sizeof(TestType) > 0 for: 4 > 0
  3021. # Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 0
  3022. ok {test-number} - sizeof(TestType) > 0 for: 1 > 0
  3023. # Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 1
  3024. ok {test-number} - sizeof(TestType) > 0 for: 4 > 0
  3025. # Template test case with test types specified inside std::tuple - MyTypes - 0
  3026. ok {test-number} - sizeof(TestType) > 0 for: 4 > 0
  3027. # Template test case with test types specified inside std::tuple - MyTypes - 1
  3028. ok {test-number} - sizeof(TestType) > 0 for: 1 > 0
  3029. # Template test case with test types specified inside std::tuple - MyTypes - 2
  3030. ok {test-number} - sizeof(TestType) > 0 for: 4 > 0
  3031. # TemplateTest: vectors can be sized and resized - float
  3032. ok {test-number} - v.size() == 5 for: 5 == 5
  3033. # TemplateTest: vectors can be sized and resized - float
  3034. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3035. # TemplateTest: vectors can be sized and resized - float
  3036. ok {test-number} - v.size() == 10 for: 10 == 10
  3037. # TemplateTest: vectors can be sized and resized - float
  3038. ok {test-number} - v.capacity() >= 10 for: 10 >= 10
  3039. # TemplateTest: vectors can be sized and resized - float
  3040. ok {test-number} - v.size() == 5 for: 5 == 5
  3041. # TemplateTest: vectors can be sized and resized - float
  3042. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3043. # TemplateTest: vectors can be sized and resized - float
  3044. ok {test-number} - v.size() == 0 for: 0 == 0
  3045. # TemplateTest: vectors can be sized and resized - float
  3046. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3047. # TemplateTest: vectors can be sized and resized - float
  3048. ok {test-number} - v.capacity() == 0 for: 0 == 0
  3049. # TemplateTest: vectors can be sized and resized - float
  3050. ok {test-number} - v.size() == 5 for: 5 == 5
  3051. # TemplateTest: vectors can be sized and resized - float
  3052. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3053. # TemplateTest: vectors can be sized and resized - float
  3054. ok {test-number} - v.size() == 5 for: 5 == 5
  3055. # TemplateTest: vectors can be sized and resized - float
  3056. ok {test-number} - v.capacity() >= 10 for: 10 >= 10
  3057. # TemplateTest: vectors can be sized and resized - float
  3058. ok {test-number} - v.size() == 5 for: 5 == 5
  3059. # TemplateTest: vectors can be sized and resized - float
  3060. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3061. # TemplateTest: vectors can be sized and resized - float
  3062. ok {test-number} - v.size() == 5 for: 5 == 5
  3063. # TemplateTest: vectors can be sized and resized - float
  3064. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3065. # TemplateTest: vectors can be sized and resized - int
  3066. ok {test-number} - v.size() == 5 for: 5 == 5
  3067. # TemplateTest: vectors can be sized and resized - int
  3068. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3069. # TemplateTest: vectors can be sized and resized - int
  3070. ok {test-number} - v.size() == 10 for: 10 == 10
  3071. # TemplateTest: vectors can be sized and resized - int
  3072. ok {test-number} - v.capacity() >= 10 for: 10 >= 10
  3073. # TemplateTest: vectors can be sized and resized - int
  3074. ok {test-number} - v.size() == 5 for: 5 == 5
  3075. # TemplateTest: vectors can be sized and resized - int
  3076. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3077. # TemplateTest: vectors can be sized and resized - int
  3078. ok {test-number} - v.size() == 0 for: 0 == 0
  3079. # TemplateTest: vectors can be sized and resized - int
  3080. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3081. # TemplateTest: vectors can be sized and resized - int
  3082. ok {test-number} - v.capacity() == 0 for: 0 == 0
  3083. # TemplateTest: vectors can be sized and resized - int
  3084. ok {test-number} - v.size() == 5 for: 5 == 5
  3085. # TemplateTest: vectors can be sized and resized - int
  3086. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3087. # TemplateTest: vectors can be sized and resized - int
  3088. ok {test-number} - v.size() == 5 for: 5 == 5
  3089. # TemplateTest: vectors can be sized and resized - int
  3090. ok {test-number} - v.capacity() >= 10 for: 10 >= 10
  3091. # TemplateTest: vectors can be sized and resized - int
  3092. ok {test-number} - v.size() == 5 for: 5 == 5
  3093. # TemplateTest: vectors can be sized and resized - int
  3094. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3095. # TemplateTest: vectors can be sized and resized - int
  3096. ok {test-number} - v.size() == 5 for: 5 == 5
  3097. # TemplateTest: vectors can be sized and resized - int
  3098. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3099. # TemplateTest: vectors can be sized and resized - std::string
  3100. ok {test-number} - v.size() == 5 for: 5 == 5
  3101. # TemplateTest: vectors can be sized and resized - std::string
  3102. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3103. # TemplateTest: vectors can be sized and resized - std::string
  3104. ok {test-number} - v.size() == 10 for: 10 == 10
  3105. # TemplateTest: vectors can be sized and resized - std::string
  3106. ok {test-number} - v.capacity() >= 10 for: 10 >= 10
  3107. # TemplateTest: vectors can be sized and resized - std::string
  3108. ok {test-number} - v.size() == 5 for: 5 == 5
  3109. # TemplateTest: vectors can be sized and resized - std::string
  3110. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3111. # TemplateTest: vectors can be sized and resized - std::string
  3112. ok {test-number} - v.size() == 0 for: 0 == 0
  3113. # TemplateTest: vectors can be sized and resized - std::string
  3114. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3115. # TemplateTest: vectors can be sized and resized - std::string
  3116. ok {test-number} - v.capacity() == 0 for: 0 == 0
  3117. # TemplateTest: vectors can be sized and resized - std::string
  3118. ok {test-number} - v.size() == 5 for: 5 == 5
  3119. # TemplateTest: vectors can be sized and resized - std::string
  3120. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3121. # TemplateTest: vectors can be sized and resized - std::string
  3122. ok {test-number} - v.size() == 5 for: 5 == 5
  3123. # TemplateTest: vectors can be sized and resized - std::string
  3124. ok {test-number} - v.capacity() >= 10 for: 10 >= 10
  3125. # TemplateTest: vectors can be sized and resized - std::string
  3126. ok {test-number} - v.size() == 5 for: 5 == 5
  3127. # TemplateTest: vectors can be sized and resized - std::string
  3128. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3129. # TemplateTest: vectors can be sized and resized - std::string
  3130. ok {test-number} - v.size() == 5 for: 5 == 5
  3131. # TemplateTest: vectors can be sized and resized - std::string
  3132. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3133. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3134. ok {test-number} - v.size() == 5 for: 5 == 5
  3135. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3136. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3137. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3138. ok {test-number} - v.size() == 10 for: 10 == 10
  3139. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3140. ok {test-number} - v.capacity() >= 10 for: 10 >= 10
  3141. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3142. ok {test-number} - v.size() == 5 for: 5 == 5
  3143. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3144. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3145. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3146. ok {test-number} - v.size() == 0 for: 0 == 0
  3147. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3148. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3149. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3150. ok {test-number} - v.capacity() == 0 for: 0 == 0
  3151. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3152. ok {test-number} - v.size() == 5 for: 5 == 5
  3153. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3154. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3155. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3156. ok {test-number} - v.size() == 5 for: 5 == 5
  3157. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3158. ok {test-number} - v.capacity() >= 10 for: 10 >= 10
  3159. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3160. ok {test-number} - v.size() == 5 for: 5 == 5
  3161. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3162. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3163. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3164. ok {test-number} - v.size() == 5 for: 5 == 5
  3165. # TemplateTest: vectors can be sized and resized - std::tuple<int,float>
  3166. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  3167. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3168. ok {test-number} - v.size() == V for: 6 == 6
  3169. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3170. ok {test-number} - v.capacity() >= V for: 6 >= 6
  3171. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3172. ok {test-number} - v.size() == 2 * V for: 12 == 12
  3173. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3174. ok {test-number} - v.capacity() >= 2 * V for: 12 >= 12
  3175. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3176. ok {test-number} - v.size() == V for: 6 == 6
  3177. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3178. ok {test-number} - v.capacity() >= V for: 6 >= 6
  3179. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3180. ok {test-number} - v.size() == 0 for: 0 == 0
  3181. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3182. ok {test-number} - v.capacity() >= V for: 6 >= 6
  3183. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3184. ok {test-number} - v.capacity() == 0 for: 0 == 0
  3185. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3186. ok {test-number} - v.size() == V for: 6 == 6
  3187. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3188. ok {test-number} - v.capacity() >= V for: 6 >= 6
  3189. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3190. ok {test-number} - v.size() == V for: 6 == 6
  3191. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3192. ok {test-number} - v.capacity() >= 2 * V for: 12 >= 12
  3193. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3194. ok {test-number} - v.size() == V for: 6 == 6
  3195. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3196. ok {test-number} - v.capacity() >= V for: 6 >= 6
  3197. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3198. ok {test-number} - v.size() == V for: 6 == 6
  3199. # TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
  3200. ok {test-number} - v.capacity() >= V for: 6 >= 6
  3201. # TemplateTestSig: vectors can be sized and resized - float,4
  3202. ok {test-number} - v.size() == V for: 4 == 4
  3203. # TemplateTestSig: vectors can be sized and resized - float,4
  3204. ok {test-number} - v.capacity() >= V for: 4 >= 4
  3205. # TemplateTestSig: vectors can be sized and resized - float,4
  3206. ok {test-number} - v.size() == 2 * V for: 8 == 8
  3207. # TemplateTestSig: vectors can be sized and resized - float,4
  3208. ok {test-number} - v.capacity() >= 2 * V for: 8 >= 8
  3209. # TemplateTestSig: vectors can be sized and resized - float,4
  3210. ok {test-number} - v.size() == V for: 4 == 4
  3211. # TemplateTestSig: vectors can be sized and resized - float,4
  3212. ok {test-number} - v.capacity() >= V for: 4 >= 4
  3213. # TemplateTestSig: vectors can be sized and resized - float,4
  3214. ok {test-number} - v.size() == 0 for: 0 == 0
  3215. # TemplateTestSig: vectors can be sized and resized - float,4
  3216. ok {test-number} - v.capacity() >= V for: 4 >= 4
  3217. # TemplateTestSig: vectors can be sized and resized - float,4
  3218. ok {test-number} - v.capacity() == 0 for: 0 == 0
  3219. # TemplateTestSig: vectors can be sized and resized - float,4
  3220. ok {test-number} - v.size() == V for: 4 == 4
  3221. # TemplateTestSig: vectors can be sized and resized - float,4
  3222. ok {test-number} - v.capacity() >= V for: 4 >= 4
  3223. # TemplateTestSig: vectors can be sized and resized - float,4
  3224. ok {test-number} - v.size() == V for: 4 == 4
  3225. # TemplateTestSig: vectors can be sized and resized - float,4
  3226. ok {test-number} - v.capacity() >= 2 * V for: 8 >= 8
  3227. # TemplateTestSig: vectors can be sized and resized - float,4
  3228. ok {test-number} - v.size() == V for: 4 == 4
  3229. # TemplateTestSig: vectors can be sized and resized - float,4
  3230. ok {test-number} - v.capacity() >= V for: 4 >= 4
  3231. # TemplateTestSig: vectors can be sized and resized - float,4
  3232. ok {test-number} - v.size() == V for: 4 == 4
  3233. # TemplateTestSig: vectors can be sized and resized - float,4
  3234. ok {test-number} - v.capacity() >= V for: 4 >= 4
  3235. # TemplateTestSig: vectors can be sized and resized - int,5
  3236. ok {test-number} - v.size() == V for: 5 == 5
  3237. # TemplateTestSig: vectors can be sized and resized - int,5
  3238. ok {test-number} - v.capacity() >= V for: 5 >= 5
  3239. # TemplateTestSig: vectors can be sized and resized - int,5
  3240. ok {test-number} - v.size() == 2 * V for: 10 == 10
  3241. # TemplateTestSig: vectors can be sized and resized - int,5
  3242. ok {test-number} - v.capacity() >= 2 * V for: 10 >= 10
  3243. # TemplateTestSig: vectors can be sized and resized - int,5
  3244. ok {test-number} - v.size() == V for: 5 == 5
  3245. # TemplateTestSig: vectors can be sized and resized - int,5
  3246. ok {test-number} - v.capacity() >= V for: 5 >= 5
  3247. # TemplateTestSig: vectors can be sized and resized - int,5
  3248. ok {test-number} - v.size() == 0 for: 0 == 0
  3249. # TemplateTestSig: vectors can be sized and resized - int,5
  3250. ok {test-number} - v.capacity() >= V for: 5 >= 5
  3251. # TemplateTestSig: vectors can be sized and resized - int,5
  3252. ok {test-number} - v.capacity() == 0 for: 0 == 0
  3253. # TemplateTestSig: vectors can be sized and resized - int,5
  3254. ok {test-number} - v.size() == V for: 5 == 5
  3255. # TemplateTestSig: vectors can be sized and resized - int,5
  3256. ok {test-number} - v.capacity() >= V for: 5 >= 5
  3257. # TemplateTestSig: vectors can be sized and resized - int,5
  3258. ok {test-number} - v.size() == V for: 5 == 5
  3259. # TemplateTestSig: vectors can be sized and resized - int,5
  3260. ok {test-number} - v.capacity() >= 2 * V for: 10 >= 10
  3261. # TemplateTestSig: vectors can be sized and resized - int,5
  3262. ok {test-number} - v.size() == V for: 5 == 5
  3263. # TemplateTestSig: vectors can be sized and resized - int,5
  3264. ok {test-number} - v.capacity() >= V for: 5 >= 5
  3265. # TemplateTestSig: vectors can be sized and resized - int,5
  3266. ok {test-number} - v.size() == V for: 5 == 5
  3267. # TemplateTestSig: vectors can be sized and resized - int,5
  3268. ok {test-number} - v.capacity() >= V for: 5 >= 5
  3269. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3270. ok {test-number} - v.size() == V for: 15 == 15
  3271. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3272. ok {test-number} - v.capacity() >= V for: 15 >= 15
  3273. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3274. ok {test-number} - v.size() == 2 * V for: 30 == 30
  3275. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3276. ok {test-number} - v.capacity() >= 2 * V for: 30 >= 30
  3277. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3278. ok {test-number} - v.size() == V for: 15 == 15
  3279. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3280. ok {test-number} - v.capacity() >= V for: 15 >= 15
  3281. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3282. ok {test-number} - v.size() == 0 for: 0 == 0
  3283. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3284. ok {test-number} - v.capacity() >= V for: 15 >= 15
  3285. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3286. ok {test-number} - v.capacity() == 0 for: 0 == 0
  3287. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3288. ok {test-number} - v.size() == V for: 15 == 15
  3289. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3290. ok {test-number} - v.capacity() >= V for: 15 >= 15
  3291. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3292. ok {test-number} - v.size() == V for: 15 == 15
  3293. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3294. ok {test-number} - v.capacity() >= 2 * V for: 30 >= 30
  3295. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3296. ok {test-number} - v.size() == V for: 15 == 15
  3297. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3298. ok {test-number} - v.capacity() >= V for: 15 >= 15
  3299. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3300. ok {test-number} - v.size() == V for: 15 == 15
  3301. # TemplateTestSig: vectors can be sized and resized - std::string,15
  3302. ok {test-number} - v.capacity() >= V for: 15 >= 15
  3303. # Test case with identical tags keeps just one
  3304. ok {test-number} - testCase.tags.size() == 1 for: 1 == 1
  3305. # Test case with identical tags keeps just one
  3306. ok {test-number} - testCase.tags[0] == Tag( "tag1" ) for: {?} == {?}
  3307. # Test case with one argument
  3308. ok {test-number} - with 1 message: 'no assertions'
  3309. # Test enum bit values
  3310. ok {test-number} - 0x<hex digits> == bit30and31 for: 3221225472 (0x<hex digits>) == 3221225472
  3311. # Test with special, characters "in name
  3312. ok {test-number} -
  3313. # Testing checked-if
  3314. ok {test-number} - true
  3315. # Testing checked-if
  3316. ok {test-number} -
  3317. # Testing checked-if
  3318. ok {test-number} - false # TODO
  3319. # Testing checked-if
  3320. ok {test-number} - true
  3321. # Testing checked-if
  3322. ok {test-number} - false # TODO
  3323. # Testing checked-if
  3324. ok {test-number} -
  3325. # Testing checked-if 2
  3326. ok {test-number} - true
  3327. # Testing checked-if 2
  3328. not ok {test-number} - explicitly
  3329. # Testing checked-if 3
  3330. ok {test-number} - false # TODO
  3331. # Testing checked-if 3
  3332. not ok {test-number} - explicitly
  3333. # The NO_FAIL macro reports a failure but does not fail the test
  3334. ok {test-number} - 1 == 2 # TODO
  3335. # The default listing implementation write to provided stream
  3336. ok {test-number} - listingString, ContainsSubstring("[fakeTag]"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "[fakeTag]"
  3337. # The default listing implementation write to provided stream
  3338. ok {test-number} - listingString, ContainsSubstring( "fake reporter"s ) && ContainsSubstring( "fake description"s ) for: "Available reporters: fake reporter: fake description " ( contains: "fake reporter" and contains: "fake description" )
  3339. # The default listing implementation write to provided stream
  3340. ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" )
  3341. # The default listing implementation write to provided stream
  3342. ok {test-number} - listingString, ContainsSubstring( "fakeListener"s ) && ContainsSubstring( "fake description"s ) for: "Registered listeners: fakeListener: fake description " ( contains: "fakeListener" and contains: "fake description" )
  3343. # This test 'should' fail but doesn't
  3344. ok {test-number} - with 1 message: 'oops!'
  3345. # Thrown string literals are translated
  3346. not ok {test-number} - unexpected exception with message: 'For some reason someone is throwing a string literal!'
  3347. # Tracker
  3348. ok {test-number} - testCase.isOpen() for: true
  3349. # Tracker
  3350. ok {test-number} - s1.isOpen() for: true
  3351. # Tracker
  3352. ok {test-number} - s1.isSuccessfullyCompleted() for: true
  3353. # Tracker
  3354. ok {test-number} - testCase.isComplete() == false for: false == false
  3355. # Tracker
  3356. ok {test-number} - ctx.completedCycle() for: true
  3357. # Tracker
  3358. ok {test-number} - testCase.isSuccessfullyCompleted() for: true
  3359. # Tracker
  3360. ok {test-number} - testCase.isOpen() for: true
  3361. # Tracker
  3362. ok {test-number} - s1.isOpen() for: true
  3363. # Tracker
  3364. ok {test-number} - s1.isComplete() for: true
  3365. # Tracker
  3366. ok {test-number} - s1.isSuccessfullyCompleted() == false for: false == false
  3367. # Tracker
  3368. ok {test-number} - testCase.isComplete() == false for: false == false
  3369. # Tracker
  3370. ok {test-number} - ctx.completedCycle() for: true
  3371. # Tracker
  3372. ok {test-number} - testCase.isSuccessfullyCompleted() == false for: false == false
  3373. # Tracker
  3374. ok {test-number} - testCase2.isOpen() for: true
  3375. # Tracker
  3376. ok {test-number} - s1b.isOpen() == false for: false == false
  3377. # Tracker
  3378. ok {test-number} - ctx.completedCycle() for: true
  3379. # Tracker
  3380. ok {test-number} - testCase.isComplete() for: true
  3381. # Tracker
  3382. ok {test-number} - testCase.isSuccessfullyCompleted() for: true
  3383. # Tracker
  3384. ok {test-number} - testCase.isOpen() for: true
  3385. # Tracker
  3386. ok {test-number} - s1.isOpen() for: true
  3387. # Tracker
  3388. ok {test-number} - s1.isComplete() for: true
  3389. # Tracker
  3390. ok {test-number} - s1.isSuccessfullyCompleted() == false for: false == false
  3391. # Tracker
  3392. ok {test-number} - testCase.isComplete() == false for: false == false
  3393. # Tracker
  3394. ok {test-number} - ctx.completedCycle() for: true
  3395. # Tracker
  3396. ok {test-number} - testCase.isSuccessfullyCompleted() == false for: false == false
  3397. # Tracker
  3398. ok {test-number} - testCase2.isOpen() for: true
  3399. # Tracker
  3400. ok {test-number} - s1b.isOpen() == false for: false == false
  3401. # Tracker
  3402. ok {test-number} - s2.isOpen() for: true
  3403. # Tracker
  3404. ok {test-number} - ctx.completedCycle() for: true
  3405. # Tracker
  3406. ok {test-number} - testCase.isComplete() for: true
  3407. # Tracker
  3408. ok {test-number} - testCase.isSuccessfullyCompleted() for: true
  3409. # Tracker
  3410. ok {test-number} - testCase.isOpen() for: true
  3411. # Tracker
  3412. ok {test-number} - s1.isOpen() for: true
  3413. # Tracker
  3414. ok {test-number} - s2.isOpen() == false for: false == false
  3415. # Tracker
  3416. ok {test-number} - testCase.isComplete() == false for: false == false
  3417. # Tracker
  3418. ok {test-number} - testCase2.isOpen() for: true
  3419. # Tracker
  3420. ok {test-number} - s1b.isOpen() == false for: false == false
  3421. # Tracker
  3422. ok {test-number} - s2b.isOpen() for: true
  3423. # Tracker
  3424. ok {test-number} - ctx.completedCycle() == false for: false == false
  3425. # Tracker
  3426. ok {test-number} - ctx.completedCycle() for: true
  3427. # Tracker
  3428. ok {test-number} - s2b.isSuccessfullyCompleted() for: true
  3429. # Tracker
  3430. ok {test-number} - testCase2.isComplete() == false for: false == false
  3431. # Tracker
  3432. ok {test-number} - testCase2.isSuccessfullyCompleted() for: true
  3433. # Tracker
  3434. ok {test-number} - testCase.isOpen() for: true
  3435. # Tracker
  3436. ok {test-number} - s1.isOpen() for: true
  3437. # Tracker
  3438. ok {test-number} - s2.isOpen() == false for: false == false
  3439. # Tracker
  3440. ok {test-number} - testCase.isComplete() == false for: false == false
  3441. # Tracker
  3442. ok {test-number} - testCase2.isOpen() for: true
  3443. # Tracker
  3444. ok {test-number} - s1b.isOpen() == false for: false == false
  3445. # Tracker
  3446. ok {test-number} - s2b.isOpen() for: true
  3447. # Tracker
  3448. ok {test-number} - ctx.completedCycle() == false for: false == false
  3449. # Tracker
  3450. ok {test-number} - ctx.completedCycle() for: true
  3451. # Tracker
  3452. ok {test-number} - s2b.isComplete() for: true
  3453. # Tracker
  3454. ok {test-number} - s2b.isSuccessfullyCompleted() == false for: false == false
  3455. # Tracker
  3456. ok {test-number} - testCase2.isSuccessfullyCompleted() == false for: false == false
  3457. # Tracker
  3458. ok {test-number} - testCase3.isOpen() for: true
  3459. # Tracker
  3460. ok {test-number} - s1c.isOpen() == false for: false == false
  3461. # Tracker
  3462. ok {test-number} - s2c.isOpen() == false for: false == false
  3463. # Tracker
  3464. ok {test-number} - testCase3.isSuccessfullyCompleted() for: true
  3465. # Tracker
  3466. ok {test-number} - testCase.isOpen() for: true
  3467. # Tracker
  3468. ok {test-number} - s1.isOpen() for: true
  3469. # Tracker
  3470. ok {test-number} - s2.isOpen() for: true
  3471. # Tracker
  3472. ok {test-number} - s2.isComplete() for: true
  3473. # Tracker
  3474. ok {test-number} - s1.isComplete() == false for: false == false
  3475. # Tracker
  3476. ok {test-number} - s1.isComplete() for: true
  3477. # Tracker
  3478. ok {test-number} - testCase.isComplete() == false for: false == false
  3479. # Tracker
  3480. ok {test-number} - testCase.isComplete() for: true
  3481. # Trim strings
  3482. ok {test-number} - trim(std::string(no_whitespace)) == no_whitespace for: "There is no extra whitespace here" == "There is no extra whitespace here"
  3483. # Trim strings
  3484. ok {test-number} - trim(std::string(leading_whitespace)) == no_whitespace for: "There is no extra whitespace here" == "There is no extra whitespace here"
  3485. # Trim strings
  3486. ok {test-number} - trim(std::string(trailing_whitespace)) == no_whitespace for: "There is no extra whitespace here" == "There is no extra whitespace here"
  3487. # Trim strings
  3488. ok {test-number} - trim(std::string(whitespace_at_both_ends)) == no_whitespace for: "There is no extra whitespace here" == "There is no extra whitespace here"
  3489. # Trim strings
  3490. ok {test-number} - trim(StringRef(no_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here
  3491. # Trim strings
  3492. ok {test-number} - trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here
  3493. # Trim strings
  3494. ok {test-number} - trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here
  3495. # Trim strings
  3496. ok {test-number} - trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here
  3497. # Unexpected exceptions can be translated
  3498. not ok {test-number} - unexpected exception with message: '3.14'
  3499. # Upcasting special member functions
  3500. ok {test-number} - bptr->i == 3 for: 3 == 3
  3501. # Upcasting special member functions
  3502. ok {test-number} - bptr->i == 3 for: 3 == 3
  3503. # Usage of AllMatch range matcher
  3504. ok {test-number} - data, AllMatch(SizeIs(5)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } all match has size == 5
  3505. # Usage of AllMatch range matcher
  3506. ok {test-number} - data, !AllMatch(Contains(0) && Contains(1)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not all match ( contains element 0 and contains element 1 )
  3507. # Usage of AllMatch range matcher
  3508. ok {test-number} - needs_adl, AllMatch( Predicate<int>( []( int elem ) { return elem < 6; } ) ) for: { 1, 2, 3, 4, 5 } all match matches undescribed predicate
  3509. # Usage of AllMatch range matcher
  3510. ok {test-number} - mocked, allMatch for: { 1, 2, 3, 4, 5 } all match matches undescribed predicate
  3511. # Usage of AllMatch range matcher
  3512. ok {test-number} - mocked.m_derefed[0] for: true
  3513. # Usage of AllMatch range matcher
  3514. ok {test-number} - mocked.m_derefed[1] for: true
  3515. # Usage of AllMatch range matcher
  3516. ok {test-number} - mocked.m_derefed[2] for: true
  3517. # Usage of AllMatch range matcher
  3518. ok {test-number} - mocked.m_derefed[3] for: true
  3519. # Usage of AllMatch range matcher
  3520. ok {test-number} - mocked.m_derefed[4] for: true
  3521. # Usage of AllMatch range matcher
  3522. ok {test-number} - mocked, !allMatch for: { 1, 2, 3, 4, 5 } not all match matches undescribed predicate
  3523. # Usage of AllMatch range matcher
  3524. ok {test-number} - mocked.m_derefed[0] for: true
  3525. # Usage of AllMatch range matcher
  3526. ok {test-number} - mocked.m_derefed[1] for: true
  3527. # Usage of AllMatch range matcher
  3528. ok {test-number} - mocked.m_derefed[2] for: true
  3529. # Usage of AllMatch range matcher
  3530. ok {test-number} - !(mocked.m_derefed[3]) for: !false
  3531. # Usage of AllMatch range matcher
  3532. ok {test-number} - !(mocked.m_derefed[4]) for: !false
  3533. # Usage of AllTrue range matcher
  3534. ok {test-number} - data, AllTrue() for: { true, true, true, true, true } contains only true
  3535. # Usage of AllTrue range matcher
  3536. ok {test-number} - data, AllTrue() for: { } contains only true
  3537. # Usage of AllTrue range matcher
  3538. ok {test-number} - data, !AllTrue() for: { true, true, false, true, true } not contains only true
  3539. # Usage of AllTrue range matcher
  3540. ok {test-number} - data, !AllTrue() for: { false, false, false, false, false } not contains only true
  3541. # Usage of AllTrue range matcher
  3542. ok {test-number} - data, AllTrue() for: { true, true, true, true, true } contains only true
  3543. # Usage of AllTrue range matcher
  3544. ok {test-number} - data, !AllTrue() for: { true, true, false, true, true } not contains only true
  3545. # Usage of AllTrue range matcher
  3546. ok {test-number} - data, !AllTrue() for: { false, false, false, false, false } not contains only true
  3547. # Usage of AllTrue range matcher
  3548. ok {test-number} - mocked, AllTrue() for: { true, true, true, true, true } contains only true
  3549. # Usage of AllTrue range matcher
  3550. ok {test-number} - mocked.m_derefed[0] for: true
  3551. # Usage of AllTrue range matcher
  3552. ok {test-number} - mocked.m_derefed[1] for: true
  3553. # Usage of AllTrue range matcher
  3554. ok {test-number} - mocked.m_derefed[2] for: true
  3555. # Usage of AllTrue range matcher
  3556. ok {test-number} - mocked.m_derefed[3] for: true
  3557. # Usage of AllTrue range matcher
  3558. ok {test-number} - mocked.m_derefed[4] for: true
  3559. # Usage of AllTrue range matcher
  3560. ok {test-number} - mocked, !AllTrue() for: { true, true, false, true, true } not contains only true
  3561. # Usage of AllTrue range matcher
  3562. ok {test-number} - mocked.m_derefed[0] for: true
  3563. # Usage of AllTrue range matcher
  3564. ok {test-number} - mocked.m_derefed[1] for: true
  3565. # Usage of AllTrue range matcher
  3566. ok {test-number} - mocked.m_derefed[2] for: true
  3567. # Usage of AllTrue range matcher
  3568. ok {test-number} - !(mocked.m_derefed[3]) for: !false
  3569. # Usage of AllTrue range matcher
  3570. ok {test-number} - !(mocked.m_derefed[4]) for: !false
  3571. # Usage of AnyMatch range matcher
  3572. ok {test-number} - data, AnyMatch(SizeIs(5)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } any match has size == 5
  3573. # Usage of AnyMatch range matcher
  3574. ok {test-number} - data, !AnyMatch(Contains(0) && Contains(10)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not any match ( contains element 0 and contains element 10 )
  3575. # Usage of AnyMatch range matcher
  3576. ok {test-number} - needs_adl, AnyMatch( Predicate<int>( []( int elem ) { return elem < 3; } ) ) for: { 1, 2, 3, 4, 5 } any match matches undescribed predicate
  3577. # Usage of AnyMatch range matcher
  3578. ok {test-number} - mocked, !anyMatch for: { 1, 2, 3, 4, 5 } not any match matches undescribed predicate
  3579. # Usage of AnyMatch range matcher
  3580. ok {test-number} - mocked.m_derefed[0] for: true
  3581. # Usage of AnyMatch range matcher
  3582. ok {test-number} - mocked.m_derefed[1] for: true
  3583. # Usage of AnyMatch range matcher
  3584. ok {test-number} - mocked.m_derefed[2] for: true
  3585. # Usage of AnyMatch range matcher
  3586. ok {test-number} - mocked.m_derefed[3] for: true
  3587. # Usage of AnyMatch range matcher
  3588. ok {test-number} - mocked.m_derefed[4] for: true
  3589. # Usage of AnyMatch range matcher
  3590. ok {test-number} - mocked, anyMatch for: { 1, 2, 3, 4, 5 } any match matches undescribed predicate
  3591. # Usage of AnyMatch range matcher
  3592. ok {test-number} - mocked.m_derefed[0] for: true
  3593. # Usage of AnyMatch range matcher
  3594. ok {test-number} - !(mocked.m_derefed[1]) for: !false
  3595. # Usage of AnyMatch range matcher
  3596. ok {test-number} - !(mocked.m_derefed[2]) for: !false
  3597. # Usage of AnyMatch range matcher
  3598. ok {test-number} - !(mocked.m_derefed[3]) for: !false
  3599. # Usage of AnyMatch range matcher
  3600. ok {test-number} - !(mocked.m_derefed[4]) for: !false
  3601. # Usage of AnyTrue range matcher
  3602. ok {test-number} - data, AnyTrue() for: { true, true, true, true, true } contains at least one true
  3603. # Usage of AnyTrue range matcher
  3604. ok {test-number} - data, !AnyTrue() for: { } not contains at least one true
  3605. # Usage of AnyTrue range matcher
  3606. ok {test-number} - data, AnyTrue() for: { false, false, true, false, false } contains at least one true
  3607. # Usage of AnyTrue range matcher
  3608. ok {test-number} - data, !AnyTrue() for: { false, false, false, false, false } not contains at least one true
  3609. # Usage of AnyTrue range matcher
  3610. ok {test-number} - data, AnyTrue() for: { true, true, true, true, true } contains at least one true
  3611. # Usage of AnyTrue range matcher
  3612. ok {test-number} - data, AnyTrue() for: { false, false, true, false, false } contains at least one true
  3613. # Usage of AnyTrue range matcher
  3614. ok {test-number} - data, !AnyTrue() for: { false, false, false, false, false } not contains at least one true
  3615. # Usage of AnyTrue range matcher
  3616. ok {test-number} - mocked, AnyTrue() for: { false, false, false, false, true } contains at least one true
  3617. # Usage of AnyTrue range matcher
  3618. ok {test-number} - mocked.m_derefed[0] for: true
  3619. # Usage of AnyTrue range matcher
  3620. ok {test-number} - mocked.m_derefed[1] for: true
  3621. # Usage of AnyTrue range matcher
  3622. ok {test-number} - mocked.m_derefed[2] for: true
  3623. # Usage of AnyTrue range matcher
  3624. ok {test-number} - mocked.m_derefed[3] for: true
  3625. # Usage of AnyTrue range matcher
  3626. ok {test-number} - mocked.m_derefed[4] for: true
  3627. # Usage of AnyTrue range matcher
  3628. ok {test-number} - mocked, AnyTrue() for: { false, false, true, true, true } contains at least one true
  3629. # Usage of AnyTrue range matcher
  3630. ok {test-number} - mocked.m_derefed[0] for: true
  3631. # Usage of AnyTrue range matcher
  3632. ok {test-number} - mocked.m_derefed[1] for: true
  3633. # Usage of AnyTrue range matcher
  3634. ok {test-number} - mocked.m_derefed[2] for: true
  3635. # Usage of AnyTrue range matcher
  3636. ok {test-number} - !(mocked.m_derefed[3]) for: !false
  3637. # Usage of AnyTrue range matcher
  3638. ok {test-number} - !(mocked.m_derefed[4]) for: !false
  3639. # Usage of NoneMatch range matcher
  3640. ok {test-number} - data, NoneMatch(SizeIs(6)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } none match has size == 6
  3641. # Usage of NoneMatch range matcher
  3642. ok {test-number} - data, !NoneMatch(Contains(0) && Contains(1)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not none match ( contains element 0 and contains element 1 )
  3643. # Usage of NoneMatch range matcher
  3644. ok {test-number} - needs_adl, NoneMatch( Predicate<int>( []( int elem ) { return elem > 6; } ) ) for: { 1, 2, 3, 4, 5 } none match matches undescribed predicate
  3645. # Usage of NoneMatch range matcher
  3646. ok {test-number} - mocked, noneMatch for: { 1, 2, 3, 4, 5 } none match matches undescribed predicate
  3647. # Usage of NoneMatch range matcher
  3648. ok {test-number} - mocked.m_derefed[0] for: true
  3649. # Usage of NoneMatch range matcher
  3650. ok {test-number} - mocked.m_derefed[1] for: true
  3651. # Usage of NoneMatch range matcher
  3652. ok {test-number} - mocked.m_derefed[2] for: true
  3653. # Usage of NoneMatch range matcher
  3654. ok {test-number} - mocked.m_derefed[3] for: true
  3655. # Usage of NoneMatch range matcher
  3656. ok {test-number} - mocked.m_derefed[4] for: true
  3657. # Usage of NoneMatch range matcher
  3658. ok {test-number} - mocked, !noneMatch for: { 1, 2, 3, 4, 5 } not none match matches undescribed predicate
  3659. # Usage of NoneMatch range matcher
  3660. ok {test-number} - mocked.m_derefed[0] for: true
  3661. # Usage of NoneMatch range matcher
  3662. ok {test-number} - !(mocked.m_derefed[1]) for: !false
  3663. # Usage of NoneMatch range matcher
  3664. ok {test-number} - !(mocked.m_derefed[2]) for: !false
  3665. # Usage of NoneMatch range matcher
  3666. ok {test-number} - !(mocked.m_derefed[3]) for: !false
  3667. # Usage of NoneMatch range matcher
  3668. ok {test-number} - !(mocked.m_derefed[4]) for: !false
  3669. # Usage of NoneTrue range matcher
  3670. ok {test-number} - data, !NoneTrue() for: { true, true, true, true, true } not contains no true
  3671. # Usage of NoneTrue range matcher
  3672. ok {test-number} - data, NoneTrue() for: { } contains no true
  3673. # Usage of NoneTrue range matcher
  3674. ok {test-number} - data, !NoneTrue() for: { false, false, true, false, false } not contains no true
  3675. # Usage of NoneTrue range matcher
  3676. ok {test-number} - data, NoneTrue() for: { false, false, false, false, false } contains no true
  3677. # Usage of NoneTrue range matcher
  3678. ok {test-number} - data, !NoneTrue() for: { true, true, true, true, true } not contains no true
  3679. # Usage of NoneTrue range matcher
  3680. ok {test-number} - data, !NoneTrue() for: { false, false, true, false, false } not contains no true
  3681. # Usage of NoneTrue range matcher
  3682. ok {test-number} - data, NoneTrue() for: { false, false, false, false, false } contains no true
  3683. # Usage of NoneTrue range matcher
  3684. ok {test-number} - mocked, NoneTrue() for: { false, false, false, false, false } contains no true
  3685. # Usage of NoneTrue range matcher
  3686. ok {test-number} - mocked.m_derefed[0] for: true
  3687. # Usage of NoneTrue range matcher
  3688. ok {test-number} - mocked.m_derefed[1] for: true
  3689. # Usage of NoneTrue range matcher
  3690. ok {test-number} - mocked.m_derefed[2] for: true
  3691. # Usage of NoneTrue range matcher
  3692. ok {test-number} - mocked.m_derefed[3] for: true
  3693. # Usage of NoneTrue range matcher
  3694. ok {test-number} - mocked.m_derefed[4] for: true
  3695. # Usage of NoneTrue range matcher
  3696. ok {test-number} - mocked, !NoneTrue() for: { false, false, true, true, true } not contains no true
  3697. # Usage of NoneTrue range matcher
  3698. ok {test-number} - mocked.m_derefed[0] for: true
  3699. # Usage of NoneTrue range matcher
  3700. ok {test-number} - mocked.m_derefed[1] for: true
  3701. # Usage of NoneTrue range matcher
  3702. ok {test-number} - mocked.m_derefed[2] for: true
  3703. # Usage of NoneTrue range matcher
  3704. ok {test-number} - !(mocked.m_derefed[3]) for: !false
  3705. # Usage of NoneTrue range matcher
  3706. ok {test-number} - !(mocked.m_derefed[4]) for: !false
  3707. # Usage of the SizeIs range matcher
  3708. ok {test-number} - empty_vec, SizeIs(0) for: { } has size == 0
  3709. # Usage of the SizeIs range matcher
  3710. ok {test-number} - empty_vec, !SizeIs(2) for: { } not has size == 2
  3711. # Usage of the SizeIs range matcher
  3712. ok {test-number} - empty_vec, SizeIs(Lt(2)) for: { } size matches is less than 2
  3713. # Usage of the SizeIs range matcher
  3714. ok {test-number} - arr, SizeIs(2) for: { 0, 0 } has size == 2
  3715. # Usage of the SizeIs range matcher
  3716. ok {test-number} - arr, SizeIs( Lt(3)) for: { 0, 0 } size matches is less than 3
  3717. # Usage of the SizeIs range matcher
  3718. ok {test-number} - arr, !SizeIs(!Lt(3)) for: { 0, 0 } not size matches not is less than 3
  3719. # Usage of the SizeIs range matcher
  3720. ok {test-number} - map, SizeIs(3) for: { {?}, {?}, {?} } has size == 3
  3721. # Usage of the SizeIs range matcher
  3722. ok {test-number} - unrelated::ADL_size{}, SizeIs(12) for: {?} has size == 12
  3723. # Usage of the SizeIs range matcher
  3724. ok {test-number} - has_size{}, SizeIs(13) for: {?} has size == 13
  3725. # Use a custom approx
  3726. ok {test-number} - d == approx( 1.23 ) for: 1.23 == Approx( 1.23 )
  3727. # Use a custom approx
  3728. ok {test-number} - d == approx( 1.22 ) for: 1.23 == Approx( 1.22 )
  3729. # Use a custom approx
  3730. ok {test-number} - d == approx( 1.24 ) for: 1.23 == Approx( 1.24 )
  3731. # Use a custom approx
  3732. ok {test-number} - d != approx( 1.25 ) for: 1.23 != Approx( 1.25 )
  3733. # Use a custom approx
  3734. ok {test-number} - approx( d ) == 1.23 for: Approx( 1.23 ) == 1.23
  3735. # Use a custom approx
  3736. ok {test-number} - approx( d ) == 1.22 for: Approx( 1.23 ) == 1.22
  3737. # Use a custom approx
  3738. ok {test-number} - approx( d ) == 1.24 for: Approx( 1.23 ) == 1.24
  3739. # Use a custom approx
  3740. ok {test-number} - approx( d ) != 1.25 for: Approx( 1.23 ) != 1.25
  3741. # Variadic macros
  3742. ok {test-number} - with 1 message: 'no assertions'
  3743. # Vector Approx matcher
  3744. ok {test-number} - empty, Approx( empty ) for: { } is approx: { }
  3745. # Vector Approx matcher
  3746. ok {test-number} - v1, Approx( v1 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 }
  3747. # Vector Approx matcher
  3748. ok {test-number} - v1, Approx<double>( { 1., 2., 3. } ) for: { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 }
  3749. # Vector Approx matcher
  3750. ok {test-number} - v1, !Approx( temp ) for: { 1.0, 2.0, 3.0 } not is approx: { 1.0, 2.0, 3.0, 4.0 }
  3751. # Vector Approx matcher
  3752. ok {test-number} - v1, !Approx( v2 ) for: { 1.0, 2.0, 3.0 } not is approx: { 1.5, 2.5, 3.5 }
  3753. # Vector Approx matcher
  3754. ok {test-number} - v1, Approx( v2 ).margin( 0.5 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 }
  3755. # Vector Approx matcher
  3756. ok {test-number} - v1, Approx( v2 ).epsilon( 0.5 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 }
  3757. # Vector Approx matcher
  3758. ok {test-number} - v1, Approx( v2 ).epsilon( 0.1 ).scale( 500 ) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 }
  3759. # Vector Approx matcher -- failing
  3760. not ok {test-number} - empty, Approx( t1 ) for: { } is approx: { 1.0, 2.0 }
  3761. # Vector Approx matcher -- failing
  3762. not ok {test-number} - v1, Approx( v2 ) for: { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 }
  3763. # Vector matchers
  3764. ok {test-number} - v, VectorContains( 1 ) for: { 1, 2, 3 } Contains: 1
  3765. # Vector matchers
  3766. ok {test-number} - v, VectorContains( 2 ) for: { 1, 2, 3 } Contains: 2
  3767. # Vector matchers
  3768. ok {test-number} - v5, ( VectorContains<int, CustomAllocator<int>>( 2 ) ) for: { 1, 2, 3 } Contains: 2
  3769. # Vector matchers
  3770. ok {test-number} - v, Contains( v2 ) for: { 1, 2, 3 } Contains: { 1, 2 }
  3771. # Vector matchers
  3772. ok {test-number} - v, Contains<int>( { 1, 2 } ) for: { 1, 2, 3 } Contains: { 1, 2 }
  3773. # Vector matchers
  3774. ok {test-number} - v5, ( Contains<int, std::allocator<int>, CustomAllocator<int>>( v2 ) ) for: { 1, 2, 3 } Contains: { 1, 2 }
  3775. # Vector matchers
  3776. ok {test-number} - v, Contains( v2 ) for: { 1, 2, 3 } Contains: { 1, 2, 3 }
  3777. # Vector matchers
  3778. ok {test-number} - v, Contains( empty ) for: { 1, 2, 3 } Contains: { }
  3779. # Vector matchers
  3780. ok {test-number} - empty, Contains( empty ) for: { } Contains: { }
  3781. # Vector matchers
  3782. ok {test-number} - v5, ( Contains<int, std::allocator<int>, CustomAllocator<int>>( v2 ) ) for: { 1, 2, 3 } Contains: { 1, 2, 3 }
  3783. # Vector matchers
  3784. ok {test-number} - v5, Contains( v6 ) for: { 1, 2, 3 } Contains: { 1, 2 }
  3785. # Vector matchers
  3786. ok {test-number} - v, VectorContains( 1 ) && VectorContains( 2 ) for: { 1, 2, 3 } ( Contains: 1 and Contains: 2 )
  3787. # Vector matchers
  3788. ok {test-number} - v, Equals( v ) for: { 1, 2, 3 } Equals: { 1, 2, 3 }
  3789. # Vector matchers
  3790. ok {test-number} - empty, Equals( empty ) for: { } Equals: { }
  3791. # Vector matchers
  3792. ok {test-number} - v, Equals<int>( { 1, 2, 3 } ) for: { 1, 2, 3 } Equals: { 1, 2, 3 }
  3793. # Vector matchers
  3794. ok {test-number} - v, Equals( v2 ) for: { 1, 2, 3 } Equals: { 1, 2, 3 }
  3795. # Vector matchers
  3796. ok {test-number} - v5, ( Equals<int, std::allocator<int>, CustomAllocator<int>>( v2 ) ) for: { 1, 2, 3 } Equals: { 1, 2, 3 }
  3797. # Vector matchers
  3798. ok {test-number} - v5, Equals( v6 ) for: { 1, 2, 3 } Equals: { 1, 2, 3 }
  3799. # Vector matchers
  3800. ok {test-number} - v, UnorderedEquals( v ) for: { 1, 2, 3 } UnorderedEquals: { 1, 2, 3 }
  3801. # Vector matchers
  3802. ok {test-number} - v, UnorderedEquals<int>( { 3, 2, 1 } ) for: { 1, 2, 3 } UnorderedEquals: { 3, 2, 1 }
  3803. # Vector matchers
  3804. ok {test-number} - empty, UnorderedEquals( empty ) for: { } UnorderedEquals: { }
  3805. # Vector matchers
  3806. ok {test-number} - permuted, UnorderedEquals( v ) for: { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 }
  3807. # Vector matchers
  3808. ok {test-number} - permuted, UnorderedEquals( v ) for: { 2, 3, 1 } UnorderedEquals: { 1, 2, 3 }
  3809. # Vector matchers
  3810. ok {test-number} - v5, ( UnorderedEquals<int, std::allocator<int>, CustomAllocator<int>>( permuted ) ) for: { 1, 2, 3 } UnorderedEquals: { 2, 3, 1 }
  3811. # Vector matchers
  3812. ok {test-number} - v5_permuted, UnorderedEquals( v5 ) for: { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 }
  3813. # Vector matchers that fail
  3814. not ok {test-number} - v, VectorContains( -1 ) for: { 1, 2, 3 } Contains: -1
  3815. # Vector matchers that fail
  3816. not ok {test-number} - empty, VectorContains( 1 ) for: { } Contains: 1
  3817. # Vector matchers that fail
  3818. not ok {test-number} - empty, Contains( v ) for: { } Contains: { 1, 2, 3 }
  3819. # Vector matchers that fail
  3820. not ok {test-number} - v, Contains( v2 ) for: { 1, 2, 3 } Contains: { 1, 2, 4 }
  3821. # Vector matchers that fail
  3822. not ok {test-number} - v, Equals( v2 ) for: { 1, 2, 3 } Equals: { 1, 2 }
  3823. # Vector matchers that fail
  3824. not ok {test-number} - v2, Equals( v ) for: { 1, 2 } Equals: { 1, 2, 3 }
  3825. # Vector matchers that fail
  3826. not ok {test-number} - empty, Equals( v ) for: { } Equals: { 1, 2, 3 }
  3827. # Vector matchers that fail
  3828. not ok {test-number} - v, Equals( empty ) for: { 1, 2, 3 } Equals: { }
  3829. # Vector matchers that fail
  3830. not ok {test-number} - v, UnorderedEquals( empty ) for: { 1, 2, 3 } UnorderedEquals: { }
  3831. # Vector matchers that fail
  3832. not ok {test-number} - empty, UnorderedEquals( v ) for: { } UnorderedEquals: { 1, 2, 3 }
  3833. # Vector matchers that fail
  3834. not ok {test-number} - permuted, UnorderedEquals( v ) for: { 1, 3 } UnorderedEquals: { 1, 2, 3 }
  3835. # Vector matchers that fail
  3836. not ok {test-number} - permuted, UnorderedEquals( v ) for: { 3, 1 } UnorderedEquals: { 1, 2, 3 }
  3837. # When checked exceptions are thrown they can be expected or unexpected
  3838. ok {test-number} - thisThrows(), std::domain_error
  3839. # When checked exceptions are thrown they can be expected or unexpected
  3840. ok {test-number} - thisDoesntThrow()
  3841. # When checked exceptions are thrown they can be expected or unexpected
  3842. ok {test-number} - thisThrows()
  3843. # When unchecked exceptions are thrown directly they are always failures
  3844. not ok {test-number} - unexpected exception with message: 'unexpected exception'
  3845. # When unchecked exceptions are thrown during a CHECK the test should continue
  3846. not ok {test-number} - unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0
  3847. # When unchecked exceptions are thrown during a REQUIRE the test should abort fail
  3848. not ok {test-number} - unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0
  3849. # When unchecked exceptions are thrown from functions they are always failures
  3850. not ok {test-number} - unexpected exception with message: 'expected exception'; expression was: thisThrows() == 0
  3851. # When unchecked exceptions are thrown from sections they are always failures
  3852. not ok {test-number} - unexpected exception with message: 'unexpected exception'
  3853. # X/level/0/a
  3854. ok {test-number} -
  3855. # X/level/0/b
  3856. ok {test-number} -
  3857. # X/level/1/a
  3858. ok {test-number} -
  3859. # X/level/1/b
  3860. ok {test-number} -
  3861. # XmlEncode
  3862. ok {test-number} - encode( "normal string" ) == "normal string" for: "normal string" == "normal string"
  3863. # XmlEncode
  3864. ok {test-number} - encode( "" ) == "" for: "" == ""
  3865. # XmlEncode
  3866. ok {test-number} - encode( "smith & jones" ) == "smith &amp; jones" for: "smith &amp; jones" == "smith &amp; jones"
  3867. # XmlEncode
  3868. ok {test-number} - encode( "smith < jones" ) == "smith &lt; jones" for: "smith &lt; jones" == "smith &lt; jones"
  3869. # XmlEncode
  3870. ok {test-number} - encode( "smith > jones" ) == "smith > jones" for: "smith > jones" == "smith > jones"
  3871. # XmlEncode
  3872. ok {test-number} - encode( "smith ]]> jones" ) == "smith ]]&gt; jones" for: "smith ]]&gt; jones" == "smith ]]&gt; jones"
  3873. # XmlEncode
  3874. ok {test-number} - encode( stringWithQuotes ) == stringWithQuotes for: "don't "quote" me on that" == "don't "quote" me on that"
  3875. # XmlEncode
  3876. ok {test-number} - encode( stringWithQuotes, Catch::XmlEncode::ForAttributes ) == "don't &quot;quote&quot; me on that" for: "don't &quot;quote&quot; me on that" == "don't &quot;quote&quot; me on that"
  3877. # XmlEncode
  3878. ok {test-number} - encode( "[\x01]" ) == "[\\x01]" for: "[\x01]" == "[\x01]"
  3879. # XmlEncode
  3880. ok {test-number} - encode( "[\x7F]" ) == "[\\x7F]" for: "[\x7F]" == "[\x7F]"
  3881. # XmlWriter writes boolean attributes as true/false
  3882. ok {test-number} - stream.str(), ContainsSubstring(R"(attr1="true")") && ContainsSubstring(R"(attr2="false")") for: "<?xml version="1.0" encoding="UTF-8"?> <Element1 attr1="true" attr2="false"/> " ( contains: "attr1="true"" and contains: "attr2="false"" )
  3883. # analyse no analysis
  3884. ok {test-number} - analysis.mean.point.count() == 23 for: 23.0 == 23
  3885. # analyse no analysis
  3886. ok {test-number} - analysis.mean.lower_bound.count() == 23 for: 23.0 == 23
  3887. # analyse no analysis
  3888. ok {test-number} - analysis.mean.upper_bound.count() == 23 for: 23.0 == 23
  3889. # analyse no analysis
  3890. ok {test-number} - analysis.standard_deviation.point.count() == 0 for: 0.0 == 0
  3891. # analyse no analysis
  3892. ok {test-number} - analysis.standard_deviation.lower_bound.count() == 0 for: 0.0 == 0
  3893. # analyse no analysis
  3894. ok {test-number} - analysis.standard_deviation.upper_bound.count() == 0 for: 0.0 == 0
  3895. # analyse no analysis
  3896. ok {test-number} - analysis.outliers.total() == 0 for: 0 == 0
  3897. # analyse no analysis
  3898. ok {test-number} - analysis.outliers.low_mild == 0 for: 0 == 0
  3899. # analyse no analysis
  3900. ok {test-number} - analysis.outliers.low_severe == 0 for: 0 == 0
  3901. # analyse no analysis
  3902. ok {test-number} - analysis.outliers.high_mild == 0 for: 0 == 0
  3903. # analyse no analysis
  3904. ok {test-number} - analysis.outliers.high_severe == 0 for: 0 == 0
  3905. # analyse no analysis
  3906. ok {test-number} - analysis.outliers.samples_seen == 0 for: 0 == 0
  3907. # analyse no analysis
  3908. ok {test-number} - analysis.outlier_variance == 0 for: 0.0 == 0
  3909. # array<int, N> -> toString
  3910. ok {test-number} - Catch::Detail::stringify( empty ) == "{ }" for: "{ }" == "{ }"
  3911. # array<int, N> -> toString
  3912. ok {test-number} - Catch::Detail::stringify( oneValue ) == "{ 42 }" for: "{ 42 }" == "{ 42 }"
  3913. # array<int, N> -> toString
  3914. ok {test-number} - Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }"
  3915. # benchmark function call
  3916. ok {test-number} - model.started == 1 for: 1 == 1
  3917. # benchmark function call
  3918. ok {test-number} - model.finished == 0 for: 0 == 0
  3919. # benchmark function call
  3920. ok {test-number} - model.started == 1 for: 1 == 1
  3921. # benchmark function call
  3922. ok {test-number} - model.finished == 1 for: 1 == 1
  3923. # benchmark function call
  3924. ok {test-number} - called == 1 for: 1 == 1
  3925. # benchmark function call
  3926. ok {test-number} - model.started == 0 for: 0 == 0
  3927. # benchmark function call
  3928. ok {test-number} - model.finished == 0 for: 0 == 0
  3929. # benchmark function call
  3930. ok {test-number} - model.started == 0 for: 0 == 0
  3931. # benchmark function call
  3932. ok {test-number} - model.finished == 0 for: 0 == 0
  3933. # benchmark function call
  3934. ok {test-number} - called == 1 for: 1 == 1
  3935. # boolean member
  3936. ok {test-number} - obj.prop != 0 for: 0x<hex digits> != 0
  3937. # checkedElse
  3938. ok {test-number} - flag for: true
  3939. # checkedElse
  3940. ok {test-number} - testCheckedElse( true ) for: true
  3941. # checkedElse, failing
  3942. ok {test-number} - flag for: false # TODO
  3943. # checkedElse, failing
  3944. not ok {test-number} - testCheckedElse( false ) for: false
  3945. # checkedIf
  3946. ok {test-number} - flag for: true
  3947. # checkedIf
  3948. ok {test-number} - testCheckedIf( true ) for: true
  3949. # checkedIf, failing
  3950. ok {test-number} - flag for: false # TODO
  3951. # checkedIf, failing
  3952. not ok {test-number} - testCheckedIf( false ) for: false
  3953. # classify_outliers
  3954. ok {test-number} - o.samples_seen == static_cast<int>(x.size()) for: 6 == 6
  3955. # classify_outliers
  3956. ok {test-number} - o.low_severe == los for: 0 == 0
  3957. # classify_outliers
  3958. ok {test-number} - o.low_mild == lom for: 0 == 0
  3959. # classify_outliers
  3960. ok {test-number} - o.high_mild == him for: 0 == 0
  3961. # classify_outliers
  3962. ok {test-number} - o.high_severe == his for: 0 == 0
  3963. # classify_outliers
  3964. ok {test-number} - o.total() == los + lom + him + his for: 0 == 0
  3965. # classify_outliers
  3966. ok {test-number} - o.samples_seen == static_cast<int>(x.size()) for: 6 == 6
  3967. # classify_outliers
  3968. ok {test-number} - o.low_severe == los for: 1 == 1
  3969. # classify_outliers
  3970. ok {test-number} - o.low_mild == lom for: 0 == 0
  3971. # classify_outliers
  3972. ok {test-number} - o.high_mild == him for: 0 == 0
  3973. # classify_outliers
  3974. ok {test-number} - o.high_severe == his for: 0 == 0
  3975. # classify_outliers
  3976. ok {test-number} - o.total() == los + lom + him + his for: 1 == 1
  3977. # classify_outliers
  3978. ok {test-number} - o.samples_seen == static_cast<int>(x.size()) for: 6 == 6
  3979. # classify_outliers
  3980. ok {test-number} - o.low_severe == los for: 0 == 0
  3981. # classify_outliers
  3982. ok {test-number} - o.low_mild == lom for: 1 == 1
  3983. # classify_outliers
  3984. ok {test-number} - o.high_mild == him for: 0 == 0
  3985. # classify_outliers
  3986. ok {test-number} - o.high_severe == his for: 0 == 0
  3987. # classify_outliers
  3988. ok {test-number} - o.total() == los + lom + him + his for: 1 == 1
  3989. # classify_outliers
  3990. ok {test-number} - o.samples_seen == static_cast<int>(x.size()) for: 6 == 6
  3991. # classify_outliers
  3992. ok {test-number} - o.low_severe == los for: 0 == 0
  3993. # classify_outliers
  3994. ok {test-number} - o.low_mild == lom for: 0 == 0
  3995. # classify_outliers
  3996. ok {test-number} - o.high_mild == him for: 1 == 1
  3997. # classify_outliers
  3998. ok {test-number} - o.high_severe == his for: 0 == 0
  3999. # classify_outliers
  4000. ok {test-number} - o.total() == los + lom + him + his for: 1 == 1
  4001. # classify_outliers
  4002. ok {test-number} - o.samples_seen == static_cast<int>(x.size()) for: 6 == 6
  4003. # classify_outliers
  4004. ok {test-number} - o.low_severe == los for: 0 == 0
  4005. # classify_outliers
  4006. ok {test-number} - o.low_mild == lom for: 0 == 0
  4007. # classify_outliers
  4008. ok {test-number} - o.high_mild == him for: 0 == 0
  4009. # classify_outliers
  4010. ok {test-number} - o.high_severe == his for: 1 == 1
  4011. # classify_outliers
  4012. ok {test-number} - o.total() == los + lom + him + his for: 1 == 1
  4013. # classify_outliers
  4014. ok {test-number} - o.samples_seen == static_cast<int>(x.size()) for: 6 == 6
  4015. # classify_outliers
  4016. ok {test-number} - o.low_severe == los for: 1 == 1
  4017. # classify_outliers
  4018. ok {test-number} - o.low_mild == lom for: 0 == 0
  4019. # classify_outliers
  4020. ok {test-number} - o.high_mild == him for: 1 == 1
  4021. # classify_outliers
  4022. ok {test-number} - o.high_severe == his for: 0 == 0
  4023. # classify_outliers
  4024. ok {test-number} - o.total() == los + lom + him + his for: 2 == 2
  4025. # comparisons between const int variables
  4026. ok {test-number} - unsigned_char_var == 1 for: 1 == 1
  4027. # comparisons between const int variables
  4028. ok {test-number} - unsigned_short_var == 1 for: 1 == 1
  4029. # comparisons between const int variables
  4030. ok {test-number} - unsigned_int_var == 1 for: 1 == 1
  4031. # comparisons between const int variables
  4032. ok {test-number} - unsigned_long_var == 1 for: 1 == 1
  4033. # comparisons between int variables
  4034. ok {test-number} - long_var == unsigned_char_var for: 1 == 1
  4035. # comparisons between int variables
  4036. ok {test-number} - long_var == unsigned_short_var for: 1 == 1
  4037. # comparisons between int variables
  4038. ok {test-number} - long_var == unsigned_int_var for: 1 == 1
  4039. # comparisons between int variables
  4040. ok {test-number} - long_var == unsigned_long_var for: 1 == 1
  4041. # convertToBits
  4042. ok {test-number} - convertToBits( 0.f ) == 0 for: 0 == 0
  4043. # convertToBits
  4044. ok {test-number} - convertToBits( -0.f ) == ( 1ULL << 31 ) for: 2147483648 (0x<hex digits>) == 2147483648 (0x<hex digits>)
  4045. # convertToBits
  4046. ok {test-number} - convertToBits( 0. ) == 0 for: 0 == 0
  4047. # convertToBits
  4048. ok {test-number} - convertToBits( -0. ) == ( 1ULL << 63 ) for: 9223372036854775808 (0x<hex digits>) == 9223372036854775808 (0x<hex digits>)
  4049. # convertToBits
  4050. ok {test-number} - convertToBits( std::numeric_limits<float>::denorm_min() ) == 1 for: 1 == 1
  4051. # convertToBits
  4052. ok {test-number} - convertToBits( std::numeric_limits<double>::denorm_min() ) == 1 for: 1 == 1
  4053. # empty tags are not allowed
  4054. ok {test-number} - Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo)
  4055. # erfc_inv
  4056. ok {test-number} - erfc_inv(1.103560) == Approx(-0.09203687623843015) for: -0.0920368762 == Approx( -0.0920368762 )
  4057. # erfc_inv
  4058. ok {test-number} - erfc_inv(1.067400) == Approx(-0.05980291115763361) for: -0.0598029112 == Approx( -0.0598029112 )
  4059. # erfc_inv
  4060. ok {test-number} - erfc_inv(0.050000) == Approx(1.38590382434967796) for: 1.3859038243 == Approx( 1.3859038243 )
  4061. # estimate_clock_resolution
  4062. ok {test-number} - res.mean.count() == rate for: 2000.0 == 2000 (0x<hex digits>)
  4063. # estimate_clock_resolution
  4064. ok {test-number} - res.outliers.total() == 0 for: 0 == 0
  4065. # even more nested SECTION tests
  4066. ok {test-number} -
  4067. # even more nested SECTION tests
  4068. ok {test-number} -
  4069. # even more nested SECTION tests
  4070. ok {test-number} -
  4071. loose text artifact
  4072. # is_unary_function
  4073. ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary1)>::value'
  4074. # is_unary_function
  4075. ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary2)>::value'
  4076. # is_unary_function
  4077. ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary3)>::value'
  4078. # is_unary_function
  4079. ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary4)>::value'
  4080. # is_unary_function
  4081. ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary5)>::value'
  4082. # is_unary_function
  4083. ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary6)>::value'
  4084. # is_unary_function
  4085. ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function<decltype(binary1)>::value)'
  4086. # is_unary_function
  4087. ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function<decltype(binary2)>::value)'
  4088. # is_unary_function
  4089. ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function<decltype(nullary1)>::value)'
  4090. # is_unary_function
  4091. ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function<decltype(nullary2)>::value)'
  4092. # is_unary_function
  4093. ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function<int>::value)'
  4094. # is_unary_function
  4095. ok {test-number} - with 1 message: '!(Catch::Clara::Detail::is_unary_function<std::string const&>::value)'
  4096. # just failure
  4097. not ok {test-number} - explicitly with 1 message: 'Previous info should not be seen'
  4098. # just failure after unscoped info
  4099. not ok {test-number} - explicitly with 1 message: 'previous unscoped info SHOULD not be seen'
  4100. # long long
  4101. ok {test-number} - l == std::numeric_limits<long long>::max() for: 9223372036854775807 (0x<hex digits>) == 9223372036854775807 (0x<hex digits>)
  4102. # looped SECTION tests
  4103. not ok {test-number} - b > a for: 0 > 1
  4104. # looped SECTION tests
  4105. not ok {test-number} - b > a for: 1 > 1
  4106. # looped SECTION tests
  4107. ok {test-number} - b > a for: 2 > 1
  4108. # looped SECTION tests
  4109. ok {test-number} - b > a for: 3 > 1
  4110. # looped SECTION tests
  4111. ok {test-number} - b > a for: 4 > 1
  4112. # looped SECTION tests
  4113. ok {test-number} - b > a for: 5 > 1
  4114. # looped SECTION tests
  4115. ok {test-number} - b > a for: 6 > 1
  4116. # looped SECTION tests
  4117. ok {test-number} - b > a for: 7 > 1
  4118. # looped SECTION tests
  4119. ok {test-number} - b > a for: 8 > 1
  4120. # looped SECTION tests
  4121. ok {test-number} - b > a for: 9 > 1
  4122. # looped tests
  4123. not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[0] (1) is even'
  4124. # looped tests
  4125. not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[1] (1) is even'
  4126. # looped tests
  4127. ok {test-number} - ( fib[i] % 2 ) == 0 for: 0 == 0 with 1 message: 'Testing if fib[2] (2) is even'
  4128. # looped tests
  4129. not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[3] (3) is even'
  4130. # looped tests
  4131. not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[4] (5) is even'
  4132. # looped tests
  4133. ok {test-number} - ( fib[i] % 2 ) == 0 for: 0 == 0 with 1 message: 'Testing if fib[5] (8) is even'
  4134. # looped tests
  4135. not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[6] (13) is even'
  4136. # looped tests
  4137. not ok {test-number} - ( fib[i] % 2 ) == 0 for: 1 == 0 with 1 message: 'Testing if fib[7] (21) is even'
  4138. # makeStream recognizes %debug stream name
  4139. ok {test-number} - Catch::makeStream( "%debug" )
  4140. # make_unique reimplementation
  4141. ok {test-number} - !(lval.has_moved) for: !false
  4142. # make_unique reimplementation
  4143. ok {test-number} - rval.has_moved for: true
  4144. # make_unique reimplementation
  4145. ok {test-number} - *ptr == std::tuple<int, double, int>{1, 2., 3} for: {?} == {?}
  4146. # mean
  4147. ok {test-number} - m == 19. for: 19.0 == 19.0
  4148. # measure
  4149. ok {test-number} - x == 17 for: 17 == 17
  4150. # measure
  4151. ok {test-number} - x == 23 for: 23 == 23
  4152. # measure
  4153. ok {test-number} - r.elapsed.count() == 42 for: 42 == 42
  4154. # measure
  4155. ok {test-number} - r.result == 23 for: 23 == 23
  4156. # measure
  4157. ok {test-number} - r.iterations == 1 for: 1 == 1
  4158. # measure
  4159. ok {test-number} - s.elapsed.count() == 69 for: 69 == 69
  4160. # measure
  4161. ok {test-number} - s.result == 17 for: 17 == 17
  4162. # measure
  4163. ok {test-number} - s.iterations == 1 for: 1 == 1
  4164. # mix info, unscoped info and warning
  4165. warning {test-number} - 'info' with 2 messages: 'unscoped info' and 'and warn may mix'
  4166. # mix info, unscoped info and warning
  4167. warning {test-number} - 'info' with 2 messages: 'unscoped info' and 'they are not cleared after warnings'
  4168. # more nested SECTION tests
  4169. not ok {test-number} - a == b for: 1 == 2
  4170. # more nested SECTION tests
  4171. ok {test-number} - a != b for: 1 != 2
  4172. # more nested SECTION tests
  4173. ok {test-number} - a < b for: 1 < 2
  4174. # nested SECTION tests
  4175. ok {test-number} - a != b for: 1 != 2
  4176. # nested SECTION tests
  4177. ok {test-number} - b != a for: 2 != 1
  4178. # nested SECTION tests
  4179. ok {test-number} - a != b for: 1 != 2
  4180. # non streamable - with conv. op
  4181. ok {test-number} - s == "7" for: "7" == "7"
  4182. # non-copyable objects
  4183. ok {test-number} - ti == typeid(int) for: {?} == {?}
  4184. # normal_cdf
  4185. ok {test-number} - normal_cdf(0.000000) == Approx(0.50000000000000000) for: 0.5 == Approx( 0.5 )
  4186. # normal_cdf
  4187. ok {test-number} - normal_cdf(1.000000) == Approx(0.84134474606854293) for: 0.8413447461 == Approx( 0.8413447461 )
  4188. # normal_cdf
  4189. ok {test-number} - normal_cdf(-1.000000) == Approx(0.15865525393145705) for: 0.1586552539 == Approx( 0.1586552539 )
  4190. # normal_cdf
  4191. ok {test-number} - normal_cdf(2.809729) == Approx(0.99752083845315409) for: 0.9975208385 == Approx( 0.9975208385 )
  4192. # normal_cdf
  4193. ok {test-number} - normal_cdf(-1.352570) == Approx(0.08809652095066035) for: 0.088096521 == Approx( 0.088096521 )
  4194. # normal_quantile
  4195. ok {test-number} - normal_quantile(0.551780) == Approx(0.13015979861484198) for: 0.1301597986 == Approx( 0.1301597986 )
  4196. # normal_quantile
  4197. ok {test-number} - normal_quantile(0.533700) == Approx(0.08457408802851875) for: 0.084574088 == Approx( 0.084574088 )
  4198. # normal_quantile
  4199. ok {test-number} - normal_quantile(0.025000) == Approx(-1.95996398454005449) for: -1.9599639845 == Approx( -1.9599639845 )
  4200. # not allowed
  4201. ok {test-number} -
  4202. # not prints unscoped info from previous failures
  4203. ok {test-number} - true with 1 message: 'this MAY be seen only for the FIRST assertion IF info is printed for passing assertions'
  4204. # not prints unscoped info from previous failures
  4205. ok {test-number} - true with 1 message: 'this MAY be seen only for the SECOND assertion IF info is printed for passing assertions'
  4206. # not prints unscoped info from previous failures
  4207. not ok {test-number} - false with 1 message: 'this SHOULD be seen'
  4208. # null strings
  4209. ok {test-number} - makeString( false ) != static_cast<char*>(0) for: "valid string" != {null string}
  4210. # null strings
  4211. ok {test-number} - makeString( true ) == static_cast<char*>(0) for: {null string} == {null string}
  4212. # null_ptr
  4213. ok {test-number} - ptr.get() == 0 for: 0 == 0
  4214. # pair<pair<int,const char *,pair<std::string,int> > -> toString
  4215. ok {test-number} - ::Catch::Detail::stringify( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" for: "{ { 42, "Arthur" }, { "Ford", 24 } }" == "{ { 42, "Arthur" }, { "Ford", 24 } }"
  4216. # parseEnums
  4217. ok {test-number} - parseEnums( "" ), Equals( std::vector<Catch::StringRef>{} ) for: { } Equals: { }
  4218. # parseEnums
  4219. ok {test-number} - parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
  4220. # parseEnums
  4221. ok {test-number} - parseEnums( "Value1" ), Equals( std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
  4222. # parseEnums
  4223. ok {test-number} - parseEnums( "EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
  4224. # parseEnums
  4225. ok {test-number} - parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2"} ) for: { Value1, Value2 } Equals: { Value1, Value2 }
  4226. # parseEnums
  4227. ok {test-number} - parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
  4228. # parseEnums
  4229. ok {test-number} - parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
  4230. # pointer to class
  4231. ok {test-number} - p == 0 for: 0 == 0
  4232. # print unscoped info if passing unscoped info is printed
  4233. ok {test-number} - true with 1 message: 'this MAY be seen IF info is printed for passing assertions'
  4234. # prints unscoped info on failure
  4235. not ok {test-number} - false with 2 messages: 'this SHOULD be seen' and 'this SHOULD also be seen'
  4236. # prints unscoped info only for the first assertion
  4237. not ok {test-number} - false with 1 message: 'this SHOULD be seen only ONCE'
  4238. # prints unscoped info only for the first assertion
  4239. ok {test-number} - true
  4240. # prints unscoped info only for the first assertion
  4241. ok {test-number} - true with 1 message: 'this MAY also be seen only ONCE IF info is printed for passing assertions'
  4242. # prints unscoped info only for the first assertion
  4243. ok {test-number} - true
  4244. # random SECTION tests
  4245. ok {test-number} - a != b for: 1 != 2
  4246. # random SECTION tests
  4247. ok {test-number} - b != a for: 2 != 1
  4248. # random SECTION tests
  4249. ok {test-number} - a != b for: 1 != 2
  4250. # replaceInPlace
  4251. ok {test-number} - Catch::replaceInPlace(letters, "b", "z") for: true
  4252. # replaceInPlace
  4253. ok {test-number} - letters == "azcdefcg" for: "azcdefcg" == "azcdefcg"
  4254. # replaceInPlace
  4255. ok {test-number} - Catch::replaceInPlace(letters, "c", "z") for: true
  4256. # replaceInPlace
  4257. ok {test-number} - letters == "abzdefzg" for: "abzdefzg" == "abzdefzg"
  4258. # replaceInPlace
  4259. ok {test-number} - Catch::replaceInPlace(letters, "a", "z") for: true
  4260. # replaceInPlace
  4261. ok {test-number} - letters == "zbcdefcg" for: "zbcdefcg" == "zbcdefcg"
  4262. # replaceInPlace
  4263. ok {test-number} - Catch::replaceInPlace(letters, "g", "z") for: true
  4264. # replaceInPlace
  4265. ok {test-number} - letters == "abcdefcz" for: "abcdefcz" == "abcdefcz"
  4266. # replaceInPlace
  4267. ok {test-number} - Catch::replaceInPlace(letters, letters, "replaced") for: true
  4268. # replaceInPlace
  4269. ok {test-number} - letters == "replaced" for: "replaced" == "replaced"
  4270. # replaceInPlace
  4271. ok {test-number} - !(Catch::replaceInPlace(letters, "x", "z")) for: !false
  4272. # replaceInPlace
  4273. ok {test-number} - letters == letters for: "abcdefcg" == "abcdefcg"
  4274. # replaceInPlace
  4275. ok {test-number} - Catch::replaceInPlace(s, "'", "|'") for: true
  4276. # replaceInPlace
  4277. ok {test-number} - s == "didn|'t" for: "didn|'t" == "didn|'t"
  4278. # request an unknown %-starting stream fails
  4279. ok {test-number} - Catch::makeStream( "%somestream" )
  4280. # resolution
  4281. ok {test-number} - res.size() == count for: 10 == 10
  4282. # resolution
  4283. ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x<hex digits>)
  4284. # resolution
  4285. ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x<hex digits>)
  4286. # resolution
  4287. ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x<hex digits>)
  4288. # resolution
  4289. ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x<hex digits>)
  4290. # resolution
  4291. ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x<hex digits>)
  4292. # resolution
  4293. ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x<hex digits>)
  4294. # resolution
  4295. ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x<hex digits>)
  4296. # resolution
  4297. ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x<hex digits>)
  4298. # resolution
  4299. ok {test-number} - res[i] == rate for: 1000.0 == 1000 (0x<hex digits>)
  4300. # run_for_at_least, chronometer
  4301. ok {test-number} - meter.runs() >= old_runs for: 1 >= 1
  4302. # run_for_at_least, chronometer
  4303. ok {test-number} - meter.runs() >= old_runs for: 2 >= 1
  4304. # run_for_at_least, chronometer
  4305. ok {test-number} - meter.runs() >= old_runs for: 4 >= 2
  4306. # run_for_at_least, chronometer
  4307. ok {test-number} - meter.runs() >= old_runs for: 8 >= 4
  4308. # run_for_at_least, chronometer
  4309. ok {test-number} - meter.runs() >= old_runs for: 16 >= 8
  4310. # run_for_at_least, chronometer
  4311. ok {test-number} - meter.runs() >= old_runs for: 32 >= 16
  4312. # run_for_at_least, chronometer
  4313. ok {test-number} - meter.runs() >= old_runs for: 64 >= 32
  4314. # run_for_at_least, chronometer
  4315. ok {test-number} - meter.runs() >= old_runs for: 128 >= 64
  4316. # run_for_at_least, chronometer
  4317. ok {test-number} - Timing.elapsed >= time for: 128 ns >= 100 ns
  4318. # run_for_at_least, chronometer
  4319. ok {test-number} - Timing.result == Timing.iterations + 17 for: 145 == 145
  4320. # run_for_at_least, chronometer
  4321. ok {test-number} - Timing.iterations >= time.count() for: 128 >= 100
  4322. # run_for_at_least, int
  4323. ok {test-number} - x >= old_x for: 1 >= 1
  4324. # run_for_at_least, int
  4325. ok {test-number} - x >= old_x for: 2 >= 1
  4326. # run_for_at_least, int
  4327. ok {test-number} - x >= old_x for: 4 >= 2
  4328. # run_for_at_least, int
  4329. ok {test-number} - x >= old_x for: 8 >= 4
  4330. # run_for_at_least, int
  4331. ok {test-number} - x >= old_x for: 16 >= 8
  4332. # run_for_at_least, int
  4333. ok {test-number} - x >= old_x for: 32 >= 16
  4334. # run_for_at_least, int
  4335. ok {test-number} - x >= old_x for: 64 >= 32
  4336. # run_for_at_least, int
  4337. ok {test-number} - x >= old_x for: 128 >= 64
  4338. # run_for_at_least, int
  4339. ok {test-number} - Timing.elapsed >= time for: 128 ns >= 100 ns
  4340. # run_for_at_least, int
  4341. ok {test-number} - Timing.result == Timing.iterations + 17 for: 145 == 145
  4342. # run_for_at_least, int
  4343. ok {test-number} - Timing.iterations >= time.count() for: 128 >= 100
  4344. # send a single char to INFO
  4345. not ok {test-number} - false with 1 message: '3'
  4346. # sends information to INFO
  4347. not ok {test-number} - false with 2 messages: 'hi' and 'i := 7'
  4348. # shortened hide tags are split apart
  4349. ok {test-number} - testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
  4350. # splitString
  4351. ok {test-number} - splitStringRef("", ','), Equals(std::vector<StringRef>()) for: { } Equals: { }
  4352. # splitString
  4353. ok {test-number} - splitStringRef("abc", ','), Equals(std::vector<StringRef>{"abc"}) for: { abc } Equals: { abc }
  4354. # splitString
  4355. ok {test-number} - splitStringRef("abc,def", ','), Equals(std::vector<StringRef>{"abc", "def"}) for: { abc, def } Equals: { abc, def }
  4356. # stacks unscoped info in loops
  4357. not ok {test-number} - false with 4 messages: 'Count 1 to 3...' and '1' and '2' and '3'
  4358. # stacks unscoped info in loops
  4359. not ok {test-number} - false with 4 messages: 'Count 4 to 6...' and '4' and '5' and '6'
  4360. # startsWith
  4361. ok {test-number} - !(startsWith("", 'c')) for: !false
  4362. # startsWith
  4363. ok {test-number} - startsWith(std::string("abc"), 'a') for: true
  4364. # startsWith
  4365. ok {test-number} - startsWith("def"_catch_sr, 'd') for: true
  4366. # std::map is convertible string
  4367. ok {test-number} - Catch::Detail::stringify( emptyMap ) == "{ }" for: "{ }" == "{ }"
  4368. # std::map is convertible string
  4369. ok {test-number} - Catch::Detail::stringify( map ) == "{ { \"one\", 1 } }" for: "{ { "one", 1 } }" == "{ { "one", 1 } }"
  4370. # std::map is convertible string
  4371. ok {test-number} - Catch::Detail::stringify( map ) == "{ { \"abc\", 1 }, { \"def\", 2 }, { \"ghi\", 3 } }" for: "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" == "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }"
  4372. # std::pair<int,const std::string> -> toString
  4373. ok {test-number} - ::Catch::Detail::stringify(value) == "{ 34, \"xyzzy\" }" for: "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }"
  4374. # std::pair<int,std::string> -> toString
  4375. ok {test-number} - ::Catch::Detail::stringify( value ) == "{ 34, \"xyzzy\" }" for: "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }"
  4376. # std::set is convertible string
  4377. ok {test-number} - Catch::Detail::stringify( emptySet ) == "{ }" for: "{ }" == "{ }"
  4378. # std::set is convertible string
  4379. ok {test-number} - Catch::Detail::stringify( set ) == "{ \"one\" }" for: "{ "one" }" == "{ "one" }"
  4380. # std::set is convertible string
  4381. ok {test-number} - Catch::Detail::stringify( set ) == "{ \"abc\", \"def\", \"ghi\" }" for: "{ "abc", "def", "ghi" }" == "{ "abc", "def", "ghi" }"
  4382. # std::vector<std::pair<std::string,int> > -> toString
  4383. ok {test-number} - ::Catch::Detail::stringify( pr ) == "{ { \"green\", 55 } }" for: "{ { "green", 55 } }" == "{ { "green", 55 } }"
  4384. # stdout and stderr streams have %-starting name
  4385. ok {test-number} - Catch::makeStream( "%stderr" )->isConsole() for: true
  4386. # stdout and stderr streams have %-starting name
  4387. ok {test-number} - Catch::makeStream( "%stdout" )->isConsole() for: true
  4388. # stringify ranges
  4389. ok {test-number} - ::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)" for: "op<<(streamable_range)" == "op<<(streamable_range)"
  4390. # stringify ranges
  4391. ok {test-number} - ::Catch::Detail::stringify(stringmaker_range{}) == "stringmaker(streamable_range)" for: "stringmaker(streamable_range)" == "stringmaker(streamable_range)"
  4392. # stringify ranges
  4393. ok {test-number} - ::Catch::Detail::stringify(just_range{}) == "{ 1, 2, 3, 4 }" for: "{ 1, 2, 3, 4 }" == "{ 1, 2, 3, 4 }"
  4394. # stringify ranges
  4395. ok {test-number} - ::Catch::Detail::stringify(disabled_range{}) == "{?}" for: "{?}" == "{?}"
  4396. # stringify( has_maker )
  4397. ok {test-number} - ::Catch::Detail::stringify( item ) == "StringMaker<has_maker>" for: "StringMaker<has_maker>" == "StringMaker<has_maker>"
  4398. # stringify( has_maker_and_operator )
  4399. ok {test-number} - ::Catch::Detail::stringify( item ) == "StringMaker<has_maker_and_operator>" for: "StringMaker<has_maker_and_operator>" == "StringMaker<has_maker_and_operator>"
  4400. # stringify( has_neither )
  4401. ok {test-number} - ::Catch::Detail::stringify(item) == "{?}" for: "{?}" == "{?}"
  4402. # stringify( has_operator )
  4403. ok {test-number} - ::Catch::Detail::stringify( item ) == "operator<<( has_operator )" for: "operator<<( has_operator )" == "operator<<( has_operator )"
  4404. # stringify( has_template_operator )
  4405. ok {test-number} - ::Catch::Detail::stringify( item ) == "operator<<( has_template_operator )" for: "operator<<( has_template_operator )" == "operator<<( has_template_operator )"
  4406. # stringify( vectors<has_maker> )
  4407. ok {test-number} - ::Catch::Detail::stringify( v ) == "{ StringMaker<has_maker> }" for: "{ StringMaker<has_maker> }" == "{ StringMaker<has_maker> }"
  4408. # stringify( vectors<has_maker_and_operator> )
  4409. ok {test-number} - ::Catch::Detail::stringify( v ) == "{ StringMaker<has_maker_and_operator> }" for: "{ StringMaker<has_maker_and_operator> }" == "{ StringMaker<has_maker_and_operator> }"
  4410. # stringify( vectors<has_operator> )
  4411. ok {test-number} - ::Catch::Detail::stringify( v ) == "{ operator<<( has_operator ) }" for: "{ operator<<( has_operator ) }" == "{ operator<<( has_operator ) }"
  4412. # strlen3
  4413. ok {test-number} - data.str.size() == data.len for: 3 == 3
  4414. # strlen3
  4415. ok {test-number} - data.str.size() == data.len for: 3 == 3
  4416. # strlen3
  4417. ok {test-number} - data.str.size() == data.len for: 5 == 5
  4418. # strlen3
  4419. ok {test-number} - data.str.size() == data.len for: 4 == 4
  4420. # tables
  4421. ok {test-number} - strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) for: 5 == 5
  4422. # tables
  4423. ok {test-number} - strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) for: 6 == 6
  4424. # tables
  4425. ok {test-number} - strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) for: 5 == 5
  4426. # tables
  4427. ok {test-number} - strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) for: 6 == 6
  4428. # tags with dots in later positions are not parsed as hidden
  4429. ok {test-number} - testcase.tags.size() == 1 for: 1 == 1
  4430. # tags with dots in later positions are not parsed as hidden
  4431. ok {test-number} - testcase.tags[0].original == "magic.tag"_catch_sr for: magic.tag == magic.tag
  4432. # thrown std::strings are translated
  4433. not ok {test-number} - unexpected exception with message: 'Why would you throw a std::string?'
  4434. # toString on const wchar_t const pointer returns the string contents
  4435. ok {test-number} - result == "\"wide load\"" for: ""wide load"" == ""wide load""
  4436. # toString on const wchar_t pointer returns the string contents
  4437. ok {test-number} - result == "\"wide load\"" for: ""wide load"" == ""wide load""
  4438. # toString on wchar_t const pointer returns the string contents
  4439. ok {test-number} - result == "\"wide load\"" for: ""wide load"" == ""wide load""
  4440. # toString on wchar_t returns the string contents
  4441. ok {test-number} - result == "\"wide load\"" for: ""wide load"" == ""wide load""
  4442. # toString(enum class w/operator<<)
  4443. ok {test-number} - ::Catch::Detail::stringify(e0) == "E2/V0" for: "E2/V0" == "E2/V0"
  4444. # toString(enum class w/operator<<)
  4445. ok {test-number} - ::Catch::Detail::stringify(e1) == "E2/V1" for: "E2/V1" == "E2/V1"
  4446. # toString(enum class w/operator<<)
  4447. ok {test-number} - ::Catch::Detail::stringify(e3) == "Unknown enum value 10" for: "Unknown enum value 10" == "Unknown enum value 10"
  4448. # toString(enum class)
  4449. ok {test-number} - ::Catch::Detail::stringify(e0) == "0" for: "0" == "0"
  4450. # toString(enum class)
  4451. ok {test-number} - ::Catch::Detail::stringify(e1) == "1" for: "1" == "1"
  4452. # toString(enum w/operator<<)
  4453. ok {test-number} - ::Catch::Detail::stringify(e0) == "E2{0}" for: "E2{0}" == "E2{0}"
  4454. # toString(enum w/operator<<)
  4455. ok {test-number} - ::Catch::Detail::stringify(e1) == "E2{1}" for: "E2{1}" == "E2{1}"
  4456. # toString(enum)
  4457. ok {test-number} - ::Catch::Detail::stringify(e0) == "0" for: "0" == "0"
  4458. # toString(enum)
  4459. ok {test-number} - ::Catch::Detail::stringify(e1) == "1" for: "1" == "1"
  4460. # tuple<>
  4461. ok {test-number} - "{ }" == ::Catch::Detail::stringify(type{}) for: "{ }" == "{ }"
  4462. # tuple<>
  4463. ok {test-number} - "{ }" == ::Catch::Detail::stringify(value) for: "{ }" == "{ }"
  4464. # tuple<float,int>
  4465. ok {test-number} - "1.2f" == ::Catch::Detail::stringify(float(1.2)) for: "1.2f" == "1.2f"
  4466. # tuple<float,int>
  4467. ok {test-number} - "{ 1.2f, 0 }" == ::Catch::Detail::stringify(type{1.2f,0}) for: "{ 1.2f, 0 }" == "{ 1.2f, 0 }"
  4468. # tuple<int>
  4469. ok {test-number} - "{ 0 }" == ::Catch::Detail::stringify(type{0}) for: "{ 0 }" == "{ 0 }"
  4470. # tuple<string,string>
  4471. ok {test-number} - "{ \"hello\", \"world\" }" == ::Catch::Detail::stringify(type{"hello","world"}) for: "{ "hello", "world" }" == "{ "hello", "world" }"
  4472. # tuple<tuple<int>,tuple<>,float>
  4473. ok {test-number} - "{ { 42 }, { }, 1.2f }" == ::Catch::Detail::stringify(value) for: "{ { 42 }, { }, 1.2f }" == "{ { 42 }, { }, 1.2f }"
  4474. # uniform samples
  4475. ok {test-number} - e.point == 23 for: 23.0 == 23
  4476. # uniform samples
  4477. ok {test-number} - e.upper_bound == 23 for: 23.0 == 23
  4478. # uniform samples
  4479. ok {test-number} - e.lower_bound == 23 for: 23.0 == 23
  4480. # uniform samples
  4481. ok {test-number} - e.confidence_interval == 0.95 for: 0.95 == 0.95
  4482. # unique_ptr reimplementation: basic functionality
  4483. ok {test-number} - !(ptr) for: !{?}
  4484. # unique_ptr reimplementation: basic functionality
  4485. ok {test-number} - ptr.get() == 0 for: 0 == 0
  4486. # unique_ptr reimplementation: basic functionality
  4487. ok {test-number} - ptr for: {?}
  4488. # unique_ptr reimplementation: basic functionality
  4489. ok {test-number} - *ptr == 0 for: 0 == 0
  4490. # unique_ptr reimplementation: basic functionality
  4491. ok {test-number} - ptr.get() == naked_ptr for: 0x<hex digits> == 0x<hex digits>
  4492. # unique_ptr reimplementation: basic functionality
  4493. ok {test-number} - !(ptr) for: !{?}
  4494. # unique_ptr reimplementation: basic functionality
  4495. ok {test-number} - ptr.get() == 0 for: 0 == 0
  4496. # unique_ptr reimplementation: basic functionality
  4497. ok {test-number} - ptr for: {?}
  4498. # unique_ptr reimplementation: basic functionality
  4499. ok {test-number} - *ptr == 0 for: 0 == 0
  4500. # unique_ptr reimplementation: basic functionality
  4501. ok {test-number} - ptr.get() == naked_ptr for: 0x<hex digits> == 0x<hex digits>
  4502. # unique_ptr reimplementation: basic functionality
  4503. ok {test-number} - ptr for: {?}
  4504. # unique_ptr reimplementation: basic functionality
  4505. ok {test-number} - ptr.get() != 0 for: 0x<hex digits> != 0
  4506. # unique_ptr reimplementation: basic functionality
  4507. ok {test-number} - *ptr == 2 for: 2 == 2
  4508. # unique_ptr reimplementation: basic functionality
  4509. ok {test-number} - !(ptr) for: !{?}
  4510. # unique_ptr reimplementation: basic functionality
  4511. ok {test-number} - ptr.get() == 0 for: 0 == 0
  4512. # unique_ptr reimplementation: basic functionality
  4513. ok {test-number} - !(ptr1) for: !{?}
  4514. # unique_ptr reimplementation: basic functionality
  4515. ok {test-number} - ptr2 for: {?}
  4516. # unique_ptr reimplementation: basic functionality
  4517. ok {test-number} - *ptr2 == 1 for: 1 == 1
  4518. # unique_ptr reimplementation: basic functionality
  4519. ok {test-number} - !(ptr2) for: !{?}
  4520. # unique_ptr reimplementation: basic functionality
  4521. ok {test-number} - ptr1 for: {?}
  4522. # unique_ptr reimplementation: basic functionality
  4523. ok {test-number} - *ptr1 == 2 for: 2 == 2
  4524. # unique_ptr reimplementation: basic functionality
  4525. ok {test-number} - *ptr1 == 2 for: 2 == 2
  4526. # unique_ptr reimplementation: basic functionality
  4527. ok {test-number} - *ptr2 == 1 for: 1 == 1
  4528. # vec<vec<string,alloc>> -> toString
  4529. ok {test-number} - ::Catch::Detail::stringify(v) == "{ }" for: "{ }" == "{ }"
  4530. # vec<vec<string,alloc>> -> toString
  4531. ok {test-number} - ::Catch::Detail::stringify(v) == "{ { \"hello\" }, { \"world\" } }" for: "{ { "hello" }, { "world" } }" == "{ { "hello" }, { "world" } }"
  4532. # vector<bool> -> toString
  4533. ok {test-number} - ::Catch::Detail::stringify(bools) == "{ }" for: "{ }" == "{ }"
  4534. # vector<bool> -> toString
  4535. ok {test-number} - ::Catch::Detail::stringify(bools) == "{ true }" for: "{ true }" == "{ true }"
  4536. # vector<bool> -> toString
  4537. ok {test-number} - ::Catch::Detail::stringify(bools) == "{ true, false }" for: "{ true, false }" == "{ true, false }"
  4538. # vector<int,allocator> -> toString
  4539. ok {test-number} - ::Catch::Detail::stringify(vv) == "{ }" for: "{ }" == "{ }"
  4540. # vector<int,allocator> -> toString
  4541. ok {test-number} - ::Catch::Detail::stringify(vv) == "{ 42 }" for: "{ 42 }" == "{ 42 }"
  4542. # vector<int,allocator> -> toString
  4543. ok {test-number} - ::Catch::Detail::stringify(vv) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }"
  4544. # vector<int> -> toString
  4545. ok {test-number} - ::Catch::Detail::stringify(vv) == "{ }" for: "{ }" == "{ }"
  4546. # vector<int> -> toString
  4547. ok {test-number} - ::Catch::Detail::stringify(vv) == "{ 42 }" for: "{ 42 }" == "{ 42 }"
  4548. # vector<int> -> toString
  4549. ok {test-number} - ::Catch::Detail::stringify(vv) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }"
  4550. # vector<string> -> toString
  4551. ok {test-number} - ::Catch::Detail::stringify(vv) == "{ }" for: "{ }" == "{ }"
  4552. # vector<string> -> toString
  4553. ok {test-number} - ::Catch::Detail::stringify(vv) == "{ \"hello\" }" for: "{ "hello" }" == "{ "hello" }"
  4554. # vector<string> -> toString
  4555. ok {test-number} - ::Catch::Detail::stringify(vv) == "{ \"hello\", \"world\" }" for: "{ "hello", "world" }" == "{ "hello", "world" }"
  4556. # vectors can be sized and resized
  4557. ok {test-number} - v.size() == 5 for: 5 == 5
  4558. # vectors can be sized and resized
  4559. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  4560. # vectors can be sized and resized
  4561. ok {test-number} - v.size() == 10 for: 10 == 10
  4562. # vectors can be sized and resized
  4563. ok {test-number} - v.capacity() >= 10 for: 10 >= 10
  4564. # vectors can be sized and resized
  4565. ok {test-number} - v.size() == 5 for: 5 == 5
  4566. # vectors can be sized and resized
  4567. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  4568. # vectors can be sized and resized
  4569. ok {test-number} - v.size() == 0 for: 0 == 0
  4570. # vectors can be sized and resized
  4571. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  4572. # vectors can be sized and resized
  4573. ok {test-number} - v.capacity() == 0 for: 0 == 0
  4574. # vectors can be sized and resized
  4575. ok {test-number} - v.size() == 5 for: 5 == 5
  4576. # vectors can be sized and resized
  4577. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  4578. # vectors can be sized and resized
  4579. ok {test-number} - v.size() == 5 for: 5 == 5
  4580. # vectors can be sized and resized
  4581. ok {test-number} - v.capacity() >= 10 for: 10 >= 10
  4582. # vectors can be sized and resized
  4583. ok {test-number} - v.size() == 5 for: 5 == 5
  4584. # vectors can be sized and resized
  4585. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  4586. # vectors can be sized and resized
  4587. ok {test-number} - v.size() == 5 for: 5 == 5
  4588. # vectors can be sized and resized
  4589. ok {test-number} - v.capacity() >= 5 for: 5 >= 5
  4590. # warmup
  4591. ok {test-number} - (iterations * rate) > Catch::Benchmark::Detail::warmup_time.count() for: 160000000 (0x<hex digits>) > 100
  4592. # warmup
  4593. ok {test-number} - (end - start) > Catch::Benchmark::Detail::warmup_time for: 310016000 ns > 100 ms
  4594. # weighted_average_quantile
  4595. ok {test-number} - q1 == 14.5 for: 14.5 == 14.5
  4596. # weighted_average_quantile
  4597. ok {test-number} - med == 18. for: 18.0 == 18.0
  4598. # weighted_average_quantile
  4599. ok {test-number} - q3 == 23. for: 23.0 == 23.0
  4600. # xmlentitycheck
  4601. ok {test-number} -
  4602. # xmlentitycheck
  4603. ok {test-number} -
  4604. 1..2299