std_headers.txt (32187B)
1 [doctest] run with "--help" for options 2 =============================================================================== 3 subcases.cpp(0): 4 Scenario: vectors can be sized and resized 5 Given: A vector with some items 6 When: the size is increased 7 Then: the size and capacity change 8 9 subcases.cpp(0): ERROR: CHECK( v.size() == 20 ) is NOT correct! 10 values: CHECK( 10 == 20 ) 11 12 =============================================================================== 13 subcases.cpp(0): 14 Scenario: vectors can be sized and resized 15 Given: A vector with some items 16 When: less capacity is reserved 17 Then: neither size nor capacity are changed 18 19 subcases.cpp(0): ERROR: CHECK( v.size() == 10 ) is NOT correct! 20 values: CHECK( 5 == 10 ) 21 22 =============================================================================== 23 assertion_macros.cpp(0): 24 TEST CASE: CHECK level of asserts fail the test case but don't abort it 25 26 assertion_macros.cpp(0): ERROR: CHECK( 0 ) is NOT correct! 27 values: CHECK( 0 ) 28 29 assertion_macros.cpp(0): ERROR: CHECK_FALSE( 1 ) is NOT correct! 30 values: CHECK_FALSE( 1 ) 31 32 assertion_macros.cpp(0): ERROR: CHECK_THROWS( throw_if(false, 0) ) did NOT throw at all! 33 34 assertion_macros.cpp(0): ERROR: CHECK_THROWS_AS( throw_if(false, 0), bool ) did NOT throw at all! 35 36 assertion_macros.cpp(0): ERROR: CHECK_THROWS_AS( throw_if(true, 0), bool ) threw a DIFFERENT exception: "0" 37 38 assertion_macros.cpp(0): ERROR: CHECK_THROWS_WITH( throw_if(true, 0), "unrecognized" ) threw a DIFFERENT exception: "0" 39 40 assertion_macros.cpp(0): ERROR: CHECK_THROWS_WITH_AS( throw_if(true, 0), "unrecognized", int ) threw a DIFFERENT exception! (contents: "0") 41 42 assertion_macros.cpp(0): ERROR: CHECK_NOTHROW( throw_if(true, 0) ) THREW exception: "0" 43 44 assertion_macros.cpp(0): ERROR: CHECK_EQ( 1, 0 ) is NOT correct! 45 values: CHECK_EQ( 1, 0 ) 46 47 assertion_macros.cpp(0): ERROR: CHECK_UNARY( 0 ) is NOT correct! 48 values: CHECK_UNARY( 0 ) 49 50 assertion_macros.cpp(0): ERROR: CHECK_UNARY_FALSE( 1 ) is NOT correct! 51 values: CHECK_UNARY_FALSE( 1 ) 52 53 assertion_macros.cpp(0): MESSAGE: reached! 54 55 =============================================================================== 56 decomposition.cpp(0): 57 TEST CASE: Move Only Type 58 59 decomposition.cpp(0): ERROR: CHECK( genType(false) ) is NOT correct! 60 values: CHECK( {?} ) 61 62 decomposition.cpp(0): ERROR: CHECK( a ) is NOT correct! 63 values: CHECK( {?} ) 64 65 =============================================================================== 66 assertion_macros.cpp(0): 67 TEST CASE: REQUIRE level of asserts fail and abort the test case - 1 68 69 assertion_macros.cpp(0): FATAL ERROR: REQUIRE( 0 ) is NOT correct! 70 values: REQUIRE( 0 ) 71 72 =============================================================================== 73 assertion_macros.cpp(0): 74 TEST CASE: REQUIRE level of asserts fail and abort the test case - 10 75 76 assertion_macros.cpp(0): FATAL ERROR: REQUIRE_NOTHROW( throw_if(true, 0) ) THREW exception: "0" 77 78 =============================================================================== 79 assertion_macros.cpp(0): 80 TEST CASE: REQUIRE level of asserts fail and abort the test case - 11 81 82 assertion_macros.cpp(0): FATAL ERROR: REQUIRE_EQ( 1, 0 ) is NOT correct! 83 values: REQUIRE_EQ( 1, 0 ) 84 85 =============================================================================== 86 assertion_macros.cpp(0): 87 TEST CASE: REQUIRE level of asserts fail and abort the test case - 12 88 89 assertion_macros.cpp(0): FATAL ERROR: REQUIRE_UNARY( 0 ) is NOT correct! 90 values: REQUIRE_UNARY( 0 ) 91 92 =============================================================================== 93 assertion_macros.cpp(0): 94 TEST CASE: REQUIRE level of asserts fail and abort the test case - 13 95 96 assertion_macros.cpp(0): FATAL ERROR: REQUIRE_UNARY_FALSE( 1 ) is NOT correct! 97 values: REQUIRE_UNARY_FALSE( 1 ) 98 99 =============================================================================== 100 assertion_macros.cpp(0): 101 TEST CASE: REQUIRE level of asserts fail and abort the test case - 2 102 103 assertion_macros.cpp(0): FATAL ERROR: REQUIRE_FALSE( 1 ) is NOT correct! 104 values: REQUIRE_FALSE( 1 ) 105 106 =============================================================================== 107 assertion_macros.cpp(0): 108 TEST CASE: REQUIRE level of asserts fail and abort the test case - 3 109 110 assertion_macros.cpp(0): FATAL ERROR: REQUIRE_THROWS( throw_if(false, 0) ) did NOT throw at all! 111 112 =============================================================================== 113 assertion_macros.cpp(0): 114 TEST CASE: REQUIRE level of asserts fail and abort the test case - 4 115 116 assertion_macros.cpp(0): FATAL ERROR: REQUIRE_THROWS_AS( throw_if(false, 0), bool ) did NOT throw at all! 117 118 =============================================================================== 119 assertion_macros.cpp(0): 120 TEST CASE: REQUIRE level of asserts fail and abort the test case - 5 121 122 assertion_macros.cpp(0): FATAL ERROR: REQUIRE_THROWS_AS( throw_if(true, 0), bool ) threw a DIFFERENT exception: "0" 123 124 =============================================================================== 125 assertion_macros.cpp(0): 126 TEST CASE: REQUIRE level of asserts fail and abort the test case - 6 127 128 assertion_macros.cpp(0): FATAL ERROR: REQUIRE_THROWS_WITH( throw_if(false, ""), "whops!" ) did NOT throw at all! 129 130 =============================================================================== 131 assertion_macros.cpp(0): 132 TEST CASE: REQUIRE level of asserts fail and abort the test case - 7 133 134 assertion_macros.cpp(0): FATAL ERROR: REQUIRE_THROWS_WITH( throw_if(true, ""), "whops!" ) threw a DIFFERENT exception: 135 136 =============================================================================== 137 assertion_macros.cpp(0): 138 TEST CASE: REQUIRE level of asserts fail and abort the test case - 8 139 140 assertion_macros.cpp(0): FATAL ERROR: REQUIRE_THROWS_WITH_AS( throw_if(false, ""), "whops!", bool ) did NOT throw at all! 141 142 =============================================================================== 143 assertion_macros.cpp(0): 144 TEST CASE: REQUIRE level of asserts fail and abort the test case - 9 145 146 assertion_macros.cpp(0): FATAL ERROR: REQUIRE_THROWS_WITH_AS( throw_if(true, ""), "whops!", bool ) threw a DIFFERENT exception! (contents: ) 147 148 =============================================================================== 149 assertion_macros.cpp(0): 150 TEST CASE: WARN level of asserts don't fail the test case 151 152 assertion_macros.cpp(0): WARNING: WARN( 0 ) is NOT correct! 153 values: WARN( 0 ) 154 155 assertion_macros.cpp(0): WARNING: WARN_FALSE( 1 ) is NOT correct! 156 values: WARN_FALSE( 1 ) 157 158 assertion_macros.cpp(0): WARNING: WARN_THROWS( throw_if(false, 0) ) did NOT throw at all! 159 160 assertion_macros.cpp(0): WARNING: WARN_THROWS_WITH( throw_if(true, ""), "whops!" ) threw a DIFFERENT exception: 161 162 assertion_macros.cpp(0): WARNING: WARN_THROWS_WITH( throw_if(false, ""), "whops!" ) did NOT throw at all! 163 164 assertion_macros.cpp(0): WARNING: WARN_THROWS_AS( throw_if(false, 0), bool ) did NOT throw at all! 165 166 assertion_macros.cpp(0): WARNING: WARN_THROWS_AS( throw_if(true, 0), bool ) threw a DIFFERENT exception: "0" 167 168 assertion_macros.cpp(0): WARNING: WARN_THROWS_WITH_AS( throw_if(false, ""), "whops!", int ) did NOT throw at all! 169 170 assertion_macros.cpp(0): WARNING: WARN_THROWS_WITH_AS( throw_if(true, ""), "whops!", int ) threw a DIFFERENT exception! (contents: ) 171 172 assertion_macros.cpp(0): WARNING: WARN_NOTHROW( throw_if(true, 0) ) THREW exception: "0" 173 174 assertion_macros.cpp(0): WARNING: WARN_EQ( 1, 0 ) is NOT correct! 175 values: WARN_EQ( 1, 0 ) 176 177 assertion_macros.cpp(0): WARNING: WARN_UNARY( 0 ) is NOT correct! 178 values: WARN_UNARY( 0 ) 179 180 assertion_macros.cpp(0): WARNING: WARN_UNARY_FALSE( 1 ) is NOT correct! 181 values: WARN_UNARY_FALSE( 1 ) 182 183 =============================================================================== 184 stringification.cpp(0): 185 TEST CASE: a test case that registers an exception translator for int and then throws one 186 187 stringification.cpp(0): ERROR: test case THREW exception: 5 188 189 =============================================================================== 190 logging.cpp(0): 191 TEST CASE: a test case that will end from an exception 192 193 logging.cpp(0): ERROR: forcing the many captures to be stringified 194 logged: lots of captures: 42 42 42; 195 old way of capturing - using the streaming operator: 42 42 196 197 logging.cpp(0): ERROR: CHECK( some_var == 666 ) is NOT correct! 198 values: CHECK( 42 == 666 ) 199 logged: someTests() returned: 42 200 this should be printed if an exception is thrown even if no assert has failed: 42 201 in a nested scope this should be printed as well: 42 202 why is this not 666 ?! 203 204 logging.cpp(0): ERROR: test case THREW exception: 0 205 logged: someTests() returned: 42 206 this should be printed if an exception is thrown even if no assert has failed: 42 207 in a nested scope this should be printed as well: 42 208 209 =============================================================================== 210 logging.cpp(0): 211 TEST CASE: a test case that will end from an exception and should print the unprinted context 212 213 logging.cpp(0): ERROR: test case THREW exception: 0 214 logged: should be printed even if an exception is thrown and no assert fails before that 215 216 =============================================================================== 217 stringification.cpp(0): 218 TEST CASE: all asserts should fail and show how the objects get stringified 219 220 stringification.cpp(0): MESSAGE: Foo{} 221 222 stringification.cpp(0): ERROR: CHECK( f1 == f2 ) is NOT correct! 223 values: CHECK( Foo{} == Foo{} ) 224 225 stringification.cpp(0): MESSAGE: omg 226 227 stringification.cpp(0): ERROR: CHECK( dummy == "tralala" ) is NOT correct! 228 values: CHECK( omg == tralala ) 229 230 stringification.cpp(0): ERROR: CHECK( "tralala" == dummy ) is NOT correct! 231 values: CHECK( tralala == omg ) 232 233 stringification.cpp(0): MESSAGE: [1, 2, 3] 234 235 stringification.cpp(0): ERROR: CHECK( vec1 == vec2 ) is NOT correct! 236 values: CHECK( [1, 2, 3] == [1, 2, 4] ) 237 238 stringification.cpp(0): MESSAGE: [1, 42, 3] 239 240 stringification.cpp(0): ERROR: CHECK( lst_1 == lst_2 ) is NOT correct! 241 values: CHECK( [1, 42, 3] == [1, 2, 666] ) 242 243 stringification.cpp(0): ERROR: CHECK( s1 == s2 ) is NOT correct! 244 values: CHECK( MyOtherType: 42 == MyOtherType: 666 ) 245 logged: s1=MyOtherType: 42 s2=MyOtherType: 666 246 247 stringification.cpp(0): ERROR: CHECK( s1 == s2 ) is NOT correct! 248 values: CHECK( MyOtherType: 42 == MyOtherType: 666 ) 249 logged: s1=MyOtherType: 42 s2=MyOtherType: 666 250 MyOtherType: 42 is not really MyOtherType: 666 251 252 stringification.cpp(0): ERROR: CHECK( "a" == doctest::Contains("aaa") ) is NOT correct! 253 values: CHECK( a == Contains( aaa ) ) 254 255 stringification.cpp(0): ERROR: test case THREW exception: MyTypeInherited<int>(5, 4) 256 257 =============================================================================== 258 templated_test_cases.cpp(0): 259 TEST CASE: bad stringification of type pair<int_pair> 260 261 templated_test_cases.cpp(0): ERROR: CHECK( t2 != T2() ) is NOT correct! 262 values: CHECK( 0 != 0 ) 263 264 =============================================================================== 265 assertion_macros.cpp(0): 266 TEST CASE: check return values 267 268 assertion_macros.cpp(0): MESSAGE: :D 269 270 assertion_macros.cpp(0): MESSAGE: :D 271 272 assertion_macros.cpp(0): MESSAGE: :D 273 274 assertion_macros.cpp(0): MESSAGE: :D 275 276 assertion_macros.cpp(0): MESSAGE: :D 277 278 assertion_macros.cpp(0): MESSAGE: :D 279 280 assertion_macros.cpp(0): MESSAGE: :D 281 282 assertion_macros.cpp(0): MESSAGE: :D 283 284 assertion_macros.cpp(0): MESSAGE: :D 285 286 =============================================================================== 287 assertion_macros.cpp(0): 288 TEST CASE: check return values no print 289 290 assertion_macros.cpp(0): ERROR: CHECK( a == b ) is NOT correct! 291 values: CHECK( 4 == 2 ) 292 293 assertion_macros.cpp(0): ERROR: CHECK_FALSE( a != b ) is NOT correct! 294 values: CHECK_FALSE( 4 != 2 ) 295 296 assertion_macros.cpp(0): ERROR: CHECK_EQ( a, b ) is NOT correct! 297 values: CHECK_EQ( 4, 2 ) 298 299 assertion_macros.cpp(0): ERROR: CHECK_UNARY( a == b ) is NOT correct! 300 values: CHECK_UNARY( false ) 301 302 assertion_macros.cpp(0): ERROR: CHECK_UNARY_FALSE( a != b ) is NOT correct! 303 values: CHECK_UNARY_FALSE( true ) 304 305 assertion_macros.cpp(0): ERROR: CHECK_THROWS( throw_if(false, false) ) did NOT throw at all! 306 307 assertion_macros.cpp(0): ERROR: CHECK_THROWS_AS( throw_if(true, 2), doctest::Approx ) threw a DIFFERENT exception: "2" 308 309 assertion_macros.cpp(0): ERROR: CHECK_NOTHROW( throw_if(true, 2) ) THREW exception: "2" 310 311 assertion_macros.cpp(0): ERROR: CHECK_THROWS_WITH( throw_if(true, 2), "1" ) threw a DIFFERENT exception: "2" 312 313 =============================================================================== 314 test_cases_and_suites.cpp(0): 315 DESCRIPTION: regarding failures 316 TEST SUITE: test suite with a description 317 TEST CASE: doesn't fail but it should have 318 319 Should have failed but didn't! Marking it as failed! 320 =============================================================================== 321 enums.cpp(0): 322 TEST CASE: enum 2 323 324 enums.cpp(0): ERROR: CHECK_EQ( castToUnderlying(Zero), 1 ) is NOT correct! 325 values: CHECK_EQ( 0, 1 ) 326 327 enums.cpp(0): ERROR: CHECK_EQ( castToUnderlying(One), 2 ) is NOT correct! 328 values: CHECK_EQ( 1, 2 ) 329 330 enums.cpp(0): ERROR: CHECK_EQ( castToUnderlying(Two), 3 ) is NOT correct! 331 values: CHECK_EQ( 2, 3 ) 332 333 enums.cpp(0): ERROR: CHECK_EQ( castToUnderlying(TypedZero), 1 ) is NOT correct! 334 values: CHECK_EQ( 0, 1 ) 335 336 enums.cpp(0): ERROR: CHECK_EQ( castToUnderlying(TypedOne), 2 ) is NOT correct! 337 values: CHECK_EQ( 1, 2 ) 338 339 enums.cpp(0): ERROR: CHECK_EQ( castToUnderlying(TypedTwo), 3 ) is NOT correct! 340 values: CHECK_EQ( 2, 3 ) 341 342 enums.cpp(0): ERROR: CHECK_EQ( EnumClassC::Zero, EnumClassC::One ) is NOT correct! 343 values: CHECK_EQ( 48, 49 ) 344 345 enums.cpp(0): ERROR: CHECK_EQ( EnumClassC::One, EnumClassC::Two ) is NOT correct! 346 values: CHECK_EQ( 49, 50 ) 347 348 enums.cpp(0): ERROR: CHECK_EQ( EnumClassC::Two, EnumClassC::Zero ) is NOT correct! 349 values: CHECK_EQ( 50, 48 ) 350 351 enums.cpp(0): ERROR: CHECK_EQ( EnumClassSC::Zero, EnumClassSC::One ) is NOT correct! 352 values: CHECK_EQ( 48, 49 ) 353 354 enums.cpp(0): ERROR: CHECK_EQ( EnumClassSC::One, EnumClassSC::Two ) is NOT correct! 355 values: CHECK_EQ( 49, 50 ) 356 357 enums.cpp(0): ERROR: CHECK_EQ( EnumClassSC::Two, EnumClassSC::Zero ) is NOT correct! 358 values: CHECK_EQ( 50, 48 ) 359 360 enums.cpp(0): ERROR: CHECK_EQ( EnumClassUC::Zero, EnumClassUC::One ) is NOT correct! 361 values: CHECK_EQ( 48, 49 ) 362 363 enums.cpp(0): ERROR: CHECK_EQ( EnumClassUC::One, EnumClassUC::Two ) is NOT correct! 364 values: CHECK_EQ( 49, 50 ) 365 366 enums.cpp(0): ERROR: CHECK_EQ( EnumClassUC::Two, EnumClassUC::Zero ) is NOT correct! 367 values: CHECK_EQ( 50, 48 ) 368 369 enums.cpp(0): ERROR: CHECK_EQ( EnumClassU8::Zero, EnumClassU8::One ) is NOT correct! 370 values: CHECK_EQ( 0, 1 ) 371 372 enums.cpp(0): ERROR: CHECK_EQ( EnumClassU8::One, EnumClassU8::Two ) is NOT correct! 373 values: CHECK_EQ( 1, 2 ) 374 375 enums.cpp(0): ERROR: CHECK_EQ( EnumClassU8::Two, EnumClassU8::Zero ) is NOT correct! 376 values: CHECK_EQ( 2, 0 ) 377 378 Failed as expected so marking it as not failed 379 =============================================================================== 380 assertion_macros.cpp(0): 381 TEST CASE: exceptions-related macros 382 383 assertion_macros.cpp(0): ERROR: CHECK_THROWS( throw_if(false, 0) ) did NOT throw at all! 384 385 assertion_macros.cpp(0): ERROR: CHECK_THROWS_AS( throw_if(true, 0), char ) threw a DIFFERENT exception: "0" 386 387 assertion_macros.cpp(0): ERROR: CHECK_THROWS_AS( throw_if(false, 0), int ) did NOT throw at all! 388 389 assertion_macros.cpp(0): ERROR: CHECK_THROWS_WITH( throw_if(true, "whops!"), "whops! no match!" ) threw a DIFFERENT exception: "whops!" 390 391 assertion_macros.cpp(0): ERROR: CHECK_THROWS_WITH( throw_if(true, "whops! does it match?"), "whops! no match!" ) threw a DIFFERENT exception: "whops! does it match?" 392 393 assertion_macros.cpp(0): ERROR: CHECK_THROWS_WITH_AS( throw_if(true, "whops!"), "whops! no match!", bool ) threw a DIFFERENT exception! (contents: "whops!") 394 395 assertion_macros.cpp(0): ERROR: CHECK_THROWS_WITH_AS( throw_if(true, "whops!"), "whops!", int ) threw a DIFFERENT exception! (contents: "whops!") 396 397 assertion_macros.cpp(0): ERROR: CHECK_THROWS_WITH_AS( throw_if(true, "whops! does it match?"), "whops! no match!", int ) threw a DIFFERENT exception! (contents: "whops! does it match?") 398 399 assertion_macros.cpp(0): ERROR: CHECK_NOTHROW( throw_if(true, 0) ) THREW exception: "0" 400 401 =============================================================================== 402 assertion_macros.cpp(0): 403 TEST CASE: exceptions-related macros for std::exception 404 405 assertion_macros.cpp(0): ERROR: CHECK_THROWS( throw_if(false, 0) ) did NOT throw at all! 406 407 assertion_macros.cpp(0): ERROR: CHECK_THROWS_AS( throw_if(false, std::runtime_error("whops!")), std::exception ) did NOT throw at all! 408 409 assertion_macros.cpp(0): ERROR: CHECK_THROWS_AS( throw_if(true, std::runtime_error("whops!")), int ) threw a DIFFERENT exception: "whops!" 410 411 assertion_macros.cpp(0): ERROR: CHECK_THROWS_WITH( throw_if(false, ""), "whops!" ) did NOT throw at all! 412 413 assertion_macros.cpp(0): FATAL ERROR: REQUIRE_NOTHROW( throw_if(true, std::runtime_error("whops!")) ) THREW exception: "whops!" 414 415 =============================================================================== 416 logging.cpp(0): 417 TEST CASE: explicit failures 1 418 419 logging.cpp(0): ERROR: this should not end the test case, but mark it as failing 420 421 logging.cpp(0): MESSAGE: reached! 422 423 =============================================================================== 424 logging.cpp(0): 425 TEST CASE: explicit failures 2 426 427 logging.cpp(0): FATAL ERROR: fail the test case and also end it 428 429 =============================================================================== 430 test_cases_and_suites.cpp(0): 431 DESCRIPTION: regarding failures 432 TEST SUITE: test suite with a description 433 TEST CASE: fails - and its allowed 434 435 test_cases_and_suites.cpp(0): FATAL ERROR: 436 437 Allowed to fail so marking it as not failed 438 =============================================================================== 439 test_cases_and_suites.cpp(0): 440 DESCRIPTION: regarding failures 441 TEST SUITE: test suite with a description 442 TEST CASE: fails 1 time as it should 443 444 test_cases_and_suites.cpp(0): FATAL ERROR: 445 446 Failed exactly 1 times as expected so marking it as not failed! 447 =============================================================================== 448 test_cases_and_suites.cpp(0): 449 DESCRIPTION: regarding failures 450 TEST SUITE: test suite with a description 451 TEST CASE: fails as it should 452 453 test_cases_and_suites.cpp(0): FATAL ERROR: 454 455 Failed as expected so marking it as not failed 456 =============================================================================== 457 subcases.cpp(0): 458 TEST CASE: fails from an exception but gets re-entered to traverse all subcases 459 level zero 460 one 461 462 subcases.cpp(0): ERROR: CHECK( false ) is NOT correct! 463 values: CHECK( false ) 464 465 =============================================================================== 466 subcases.cpp(0): 467 TEST CASE: fails from an exception but gets re-entered to traverse all subcases 468 level zero 469 470 DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE): 471 level zero 472 one 473 474 subcases.cpp(0): ERROR: test case THREW exception: exception thrown in subcase - will translate later when the whole test case has been exited (cannot translate while there is an active exception) 475 476 =============================================================================== 477 subcases.cpp(0): 478 TEST CASE: fails from an exception but gets re-entered to traverse all subcases 479 480 DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE): 481 level zero 482 one 483 484 subcases.cpp(0): ERROR: test case THREW exception: failure... but the show must go on! 485 486 =============================================================================== 487 subcases.cpp(0): 488 TEST CASE: fails from an exception but gets re-entered to traverse all subcases 489 level zero 490 two 491 492 subcases.cpp(0): ERROR: CHECK( false ) is NOT correct! 493 values: CHECK( false ) 494 495 =============================================================================== 496 subcases.cpp(0): 497 TEST CASE: fails from an exception but gets re-entered to traverse all subcases 498 level zero 499 500 DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE): 501 level zero 502 two 503 504 subcases.cpp(0): ERROR: test case THREW exception: exception thrown in subcase - will translate later when the whole test case has been exited (cannot translate while there is an active exception) 505 506 =============================================================================== 507 subcases.cpp(0): 508 TEST CASE: fails from an exception but gets re-entered to traverse all subcases 509 510 DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE): 511 level zero 512 two 513 514 subcases.cpp(0): ERROR: test case THREW exception: failure... but the show must go on! 515 516 =============================================================================== 517 test_cases_and_suites.cpp(0): 518 DESCRIPTION: regarding failures 519 TEST SUITE: test suite with a description 520 TEST CASE: fails more times than it should 521 522 test_cases_and_suites.cpp(0): ERROR: 523 524 test_cases_and_suites.cpp(0): ERROR: 525 526 Didn't fail exactly 1 times so marking it as failed! 527 =============================================================================== 528 test_cases_and_suites.cpp(0): 529 TEST CASE: fixtured test - not part of a test suite 530 531 test_cases_and_suites.cpp(0): ERROR: CHECK( data == 85 ) is NOT correct! 532 values: CHECK( 21 == 85 ) 533 534 =============================================================================== 535 header.h(0): 536 TEST SUITE: some TS 537 TEST CASE: in TS 538 539 header.h(0): FATAL ERROR: 540 541 =============================================================================== 542 logging.cpp(0): 543 TEST CASE: logging the counter of a loop 544 545 logging.cpp(0): ERROR: CHECK( vec[i] != (1 << i) ) is NOT correct! 546 values: CHECK( 1 != 1 ) 547 logged: current iteration of loop: 548 i := 0 549 550 logging.cpp(0): ERROR: CHECK( vec[i] != (1 << i) ) is NOT correct! 551 values: CHECK( 2 != 2 ) 552 logged: current iteration of loop: 553 i := 1 554 555 logging.cpp(0): ERROR: CHECK( vec[i] != (1 << i) ) is NOT correct! 556 values: CHECK( 4 != 4 ) 557 logged: current iteration of loop: 558 i := 2 559 560 logging.cpp(0): ERROR: CHECK( vec[i] != (1 << i) ) is NOT correct! 561 values: CHECK( 8 != 8 ) 562 logged: current iteration of loop: 563 i := 3 564 565 logging.cpp(0): ERROR: CHECK( vec[i] != (1 << i) ) is NOT correct! 566 values: CHECK( 16 != 16 ) 567 logged: current iteration of loop: 568 i := 4 569 570 571 root 572 1 573 1.1 574 575 root 576 2 577 2.1 578 579 root 580 2 581 =============================================================================== 582 subcases.cpp(0): 583 TEST CASE: lots of nested subcases 584 585 subcases.cpp(0): FATAL ERROR: 586 587 =============================================================================== 588 templated_test_cases.cpp(0): 589 TEST CASE: multiple types<Custom name test> 590 591 templated_test_cases.cpp(0): ERROR: CHECK( t2 != T2() ) is NOT correct! 592 values: CHECK( 0 != 0 ) 593 594 =============================================================================== 595 templated_test_cases.cpp(0): 596 TEST CASE: multiple types<Other custom name> 597 598 templated_test_cases.cpp(0): ERROR: CHECK( t2 != T2() ) is NOT correct! 599 values: CHECK( 0 != 0 ) 600 601 =============================================================================== 602 templated_test_cases.cpp(0): 603 TEST CASE: multiple types<TypePair<bool, int>> 604 605 templated_test_cases.cpp(0): ERROR: CHECK( t2 != T2() ) is NOT correct! 606 values: CHECK( 0 != 0 ) 607 608 =============================================================================== 609 stringification.cpp(0): 610 TEST CASE: no headers 611 612 stringification.cpp(0): MESSAGE: 1as 613 614 stringification.cpp(0): ERROR: CHECK( chs == nullptr ) is NOT correct! 615 values: CHECK( 1as == nullptr ) 616 617 stringification.cpp(0): MESSAGE: 1as 618 619 stringification.cpp(0): ERROR: CHECK( "1as" == nullptr ) is NOT correct! 620 values: CHECK( 1as == nullptr ) 621 622 stringification.cpp(0): MESSAGE: [0, 1, 1, 2, 3, 5, 8, 13] 623 624 stringification.cpp(0): ERROR: CHECK( ints == nullptr ) is NOT correct! 625 values: CHECK( [0, 1, 1, 2, 3, 5, 8, 13] == nullptr ) 626 627 stringification.cpp(0): MESSAGE: [0, 1, 1, 2, 3, 5, 8, 13] 628 629 stringification.cpp(0): MESSAGE: nullptr 630 631 stringification.cpp(0): ERROR: CHECK( cnptr != nullptr ) is NOT correct! 632 values: CHECK( nullptr != nullptr ) 633 634 stringification.cpp(0): MESSAGE: 0 635 636 stringification.cpp(0): ERROR: CHECK( A == C ) is NOT correct! 637 values: CHECK( 0 == 100 ) 638 639 stringification.cpp(0): MESSAGE: int 640 641 =============================================================================== 642 assertion_macros.cpp(0): 643 TEST CASE: normal macros 644 645 assertion_macros.cpp(0): ERROR: CHECK( throw_if(true, std::runtime_error("whops!")) == 42 ) THREW exception: "whops!" 646 647 assertion_macros.cpp(0): ERROR: CHECK( doctest::Approx(0.502) == 0.501 ) is NOT correct! 648 values: CHECK( Approx( 0.502 ) == 0.501 ) 649 650 =============================================================================== 651 test_cases_and_suites.cpp(0): 652 TEST SUITE: ts1 653 TEST CASE: normal test in a test suite from a decorator 654 655 test_cases_and_suites.cpp(0): MESSAGE: failing because of the timeout decorator! 656 657 Test case exceeded time limit of 0.000001! 658 =============================================================================== 659 stringification.cpp(0): 660 TEST CASE: operator<< 661 662 stringification.cpp(0): MESSAGE: A 663 664 stringification.cpp(0): MESSAGE: B 665 666 stringification.cpp(0): MESSAGE: C 667 668 =============================================================================== 669 test_cases_and_suites.cpp(0): 670 TEST SUITE: scoped test suite 671 TEST CASE: part of scoped 672 673 test_cases_and_suites.cpp(0): FATAL ERROR: 674 675 =============================================================================== 676 test_cases_and_suites.cpp(0): 677 TEST SUITE: scoped test suite 678 TEST CASE: part of scoped 2 679 680 test_cases_and_suites.cpp(0): FATAL ERROR: 681 682 =============================================================================== 683 test_cases_and_suites.cpp(0): 684 TEST SUITE: some TS 685 TEST CASE: part of some TS 686 687 test_cases_and_suites.cpp(0): FATAL ERROR: 688 689 690 root 691 outside of subcase 692 inside subcase 0 693 outside of subcase 694 inside subcase 1 695 outside of subcase 696 inside subcase 2 697 698 root 699 outside of subcase 700 also inside 0 701 outside of subcase 702 also inside 1 703 outside of subcase 704 also inside 2 705 706 root 707 outside of subcase 708 fail inside 0 709 outside of subcase 710 =============================================================================== 711 subcases.cpp(0): 712 TEST CASE: reentering subcase via regular control flow 713 714 DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE): 715 716 subcases.cpp(0): FATAL ERROR: 1 717 718 719 root 720 outside of subcase 721 inside outside 722 nested twice 0, 0 723 nested twice 0, 1 724 nested twice 0, 2 725 outside of subcase 726 inside outside 727 nested twice 1, 0 728 nested twice 1, 1 729 nested twice 1, 2 730 outside of subcase 731 inside outside 732 nested twice 2, 0 733 nested twice 2, 1 734 nested twice 2, 2 735 736 root 737 outside of subcase 738 inside outside 739 also twice 0, 0 740 also twice 0, 1 741 also twice 0, 2 742 outside of subcase 743 inside outside 744 also twice 1, 0 745 also twice 1, 1 746 also twice 1, 2 747 outside of subcase 748 inside outside 749 also twice 2, 0 750 also twice 2, 1 751 also twice 2, 2 752 =============================================================================== 753 test_cases_and_suites.cpp(0): 754 TEST CASE: should fail because of an exception 755 756 test_cases_and_suites.cpp(0): ERROR: test case THREW exception: 0 757 758 =============================================================================== 759 assertion_macros.cpp(0): 760 TEST CASE: some asserts used in a function called by a test case 761 762 assertion_macros.cpp(0): ERROR: CHECK_THROWS_WITH_AS( throw_if(true, false), "unknown exception", int ) threw a DIFFERENT exception! (contents: "unknown exception") 763 764 =============================================================================== 765 subcases.cpp(0): 766 TEST CASE: subcases can be used in a separate function as well 767 from function... 768 769 subcases.cpp(0): MESSAGE: print me twice 770 771 =============================================================================== 772 subcases.cpp(0): 773 TEST CASE: subcases can be used in a separate function as well 774 from function... 775 sc1 776 777 subcases.cpp(0): MESSAGE: hello! from sc1 778 779 =============================================================================== 780 subcases.cpp(0): 781 TEST CASE: subcases can be used in a separate function as well 782 783 DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE): 784 from function... 785 sc1 786 787 subcases.cpp(0): MESSAGE: lala 788 789 =============================================================================== 790 subcases.cpp(0): 791 TEST CASE: subcases can be used in a separate function as well 792 from function... 793 794 subcases.cpp(0): MESSAGE: print me twice 795 796 =============================================================================== 797 subcases.cpp(0): 798 TEST CASE: subcases can be used in a separate function as well 799 from function... 800 sc2 801 802 subcases.cpp(0): MESSAGE: hello! from sc2 803 804 =============================================================================== 805 subcases.cpp(0): 806 TEST CASE: subcases can be used in a separate function as well 807 808 DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE): 809 from function... 810 sc2 811 812 subcases.cpp(0): MESSAGE: lala 813 814 =============================================================================== 815 subcases.cpp(0): 816 TEST CASE: subcases with changing names 817 outer 0 818 inner 0 819 820 subcases.cpp(0): MESSAGE: msg! 821 822 =============================================================================== 823 subcases.cpp(0): 824 TEST CASE: subcases with changing names 825 outer 0 826 inner 1 827 828 subcases.cpp(0): MESSAGE: msg! 829 830 =============================================================================== 831 subcases.cpp(0): 832 TEST CASE: subcases with changing names 833 outer 1 834 inner 0 835 836 subcases.cpp(0): MESSAGE: msg! 837 838 =============================================================================== 839 subcases.cpp(0): 840 TEST CASE: subcases with changing names 841 outer 1 842 inner 1 843 844 subcases.cpp(0): MESSAGE: msg! 845 846 =============================================================================== 847 subcases.cpp(0): 848 TEST CASE: subcases with changing names 849 separate 850 851 subcases.cpp(0): MESSAGE: separate msg! 852 853 =============================================================================== 854 header.h(0): 855 TEST CASE: template 1<char> 856 857 header.h(0): FATAL ERROR: 858 859 =============================================================================== 860 header.h(0): 861 TEST CASE: template 2<doctest::String> 862 863 header.h(0): FATAL ERROR: 864 865 =============================================================================== 866 subcases.cpp(0): 867 TEST CASE: test case should fail even though the last subcase passes 868 one 869 870 subcases.cpp(0): ERROR: CHECK( false ) is NOT correct! 871 values: CHECK( false ) 872 873 =============================================================================== 874 logging.cpp(0): 875 TEST CASE: third party asserts can report failures to doctest 876 877 logging.cpp(0): ERROR: MY_ASSERT(false) 878 879 logging.cpp(0): FATAL ERROR: MY_ASSERT_FATAL(false) 880 881 =============================================================================== 882 test_cases_and_suites.cpp(0): 883 DESCRIPTION: this test has overridden its skip decorator 884 TEST SUITE: skipped test cases 885 TEST CASE: unskipped 886 887 test_cases_and_suites.cpp(0): FATAL ERROR: 888 889 =============================================================================== 890 templated_test_cases.cpp(0): 891 TEST CASE: vector stuff<std::vector<int>> 892 893 templated_test_cases.cpp(0): ERROR: CHECK( vec.size() == 20 ) is NOT correct! 894 values: CHECK( 10 == 20 ) 895 896 =============================================================================== 897 subcases.cpp(0): 898 TEST SUITE: with a funny name, 899 TEST CASE: with a funnier name\: 900 with the funniest name\, 901 902 subcases.cpp(0): MESSAGE: Yes! 903 904 =============================================================================== 905 subcases.cpp(0): 906 TEST SUITE: with a funny name, 907 TEST CASE: with a funnier name\: 908 with a slightly funny name : 909 910 subcases.cpp(0): MESSAGE: Yep! 911 912 =============================================================================== 913 subcases.cpp(0): 914 TEST SUITE: with a funny name, 915 TEST CASE: with a funnier name\: 916 without a funny name 917 918 subcases.cpp(0): MESSAGE: NO! 919 920 =============================================================================== 921 subcases.cpp(0): 922 TEST SUITE: with a funny name, 923 TEST CASE: without a funny name: 924 925 subcases.cpp(0): MESSAGE: Nooo 926 927 =============================================================================== 928 [doctest] test cases: 84 | 33 passed | 51 failed | 929 [doctest] assertions: 230 | 110 passed | 120 failed | 930 [doctest] Status: FAILURE! 931 Program code.