tap.sw.multi.approved.txt 247 KB

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