console.std.approved.txt
1 Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] 2 Randomness seeded to: 1 3 4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5 <exe-name> is a Catch2 v<version> host application. 6 Run with -? for options 7 8 ------------------------------------------------------------------------------- 9 #1455 - INFO and WARN can start with a linebreak 10 ------------------------------------------------------------------------------- 11 Message.tests.cpp:<line number> 12 ............................................................................... 13 14 Message.tests.cpp:<line number>: warning: 15 16 This warning message starts with a linebreak 17 18 This would not be caught previously 19 Nor would this 20 ------------------------------------------------------------------------------- 21 #1514: stderr/stdout is not captured in tests aborted by an exception 22 ------------------------------------------------------------------------------- 23 Tricky.tests.cpp:<line number> 24 ............................................................................... 25 26 Tricky.tests.cpp:<line number>: FAILED: 27 explicitly with message: 28 1514 29 30 ------------------------------------------------------------------------------- 31 #2615 - Throwing in constructor generator fails test case but does not abort 32 ------------------------------------------------------------------------------- 33 Generators.tests.cpp:<line number> 34 ............................................................................... 35 36 Generators.tests.cpp:<line number>: FAILED: 37 due to unexpected exception with message: 38 failure to init 39 40 ------------------------------------------------------------------------------- 41 #748 - captures with unexpected exceptions 42 outside assertions 43 ------------------------------------------------------------------------------- 44 Exception.tests.cpp:<line number> 45 ............................................................................... 46 47 Exception.tests.cpp:<line number>: FAILED: 48 due to unexpected exception with messages: 49 answer := 42 50 expected exception 51 52 ------------------------------------------------------------------------------- 53 #748 - captures with unexpected exceptions 54 inside REQUIRE_NOTHROW 55 ------------------------------------------------------------------------------- 56 Exception.tests.cpp:<line number> 57 ............................................................................... 58 59 Exception.tests.cpp:<line number>: FAILED: 60 REQUIRE_NOTHROW( thisThrows() ) 61 due to unexpected exception with messages: 62 answer := 42 63 expected exception 64 65 ------------------------------------------------------------------------------- 66 #835 -- errno should not be touched by Catch2 67 ------------------------------------------------------------------------------- 68 Misc.tests.cpp:<line number> 69 ............................................................................... 70 71 Misc.tests.cpp:<line number>: FAILED: 72 CHECK( f() == 0 ) 73 with expansion: 74 1 == 0 75 76 ------------------------------------------------------------------------------- 77 'Not' checks that should fail 78 ------------------------------------------------------------------------------- 79 Condition.tests.cpp:<line number> 80 ............................................................................... 81 82 Condition.tests.cpp:<line number>: FAILED: 83 CHECK( false != false ) 84 85 Condition.tests.cpp:<line number>: FAILED: 86 CHECK( true != true ) 87 88 Condition.tests.cpp:<line number>: FAILED: 89 CHECK( !true ) 90 with expansion: 91 false 92 93 Condition.tests.cpp:<line number>: FAILED: 94 CHECK_FALSE( true ) 95 with expansion: 96 !true 97 98 Condition.tests.cpp:<line number>: FAILED: 99 CHECK( !trueValue ) 100 with expansion: 101 false 102 103 Condition.tests.cpp:<line number>: FAILED: 104 CHECK_FALSE( trueValue ) 105 with expansion: 106 !true 107 108 Condition.tests.cpp:<line number>: FAILED: 109 CHECK( !(1 == 1) ) 110 with expansion: 111 false 112 113 Condition.tests.cpp:<line number>: FAILED: 114 CHECK_FALSE( 1 == 1 ) 115 116 ------------------------------------------------------------------------------- 117 A METHOD_AS_TEST_CASE based test run that fails 118 ------------------------------------------------------------------------------- 119 Class.tests.cpp:<line number> 120 ............................................................................... 121 122 Class.tests.cpp:<line number>: FAILED: 123 REQUIRE( s == "world" ) 124 with expansion: 125 "hello" == "world" 126 127 ------------------------------------------------------------------------------- 128 A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo 129 <float> 130 ------------------------------------------------------------------------------- 131 Class.tests.cpp:<line number> 132 ............................................................................... 133 134 Class.tests.cpp:<line number>: FAILED: 135 REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) 136 with expansion: 137 0 == 1 138 139 ------------------------------------------------------------------------------- 140 A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo 141 <int> 142 ------------------------------------------------------------------------------- 143 Class.tests.cpp:<line number> 144 ............................................................................... 145 146 Class.tests.cpp:<line number>: FAILED: 147 REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) 148 with expansion: 149 0 == 1 150 151 ------------------------------------------------------------------------------- 152 A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector 153 <float> 154 ------------------------------------------------------------------------------- 155 Class.tests.cpp:<line number> 156 ............................................................................... 157 158 Class.tests.cpp:<line number>: FAILED: 159 REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) 160 with expansion: 161 0 == 1 162 163 ------------------------------------------------------------------------------- 164 A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector 165 <int> 166 ------------------------------------------------------------------------------- 167 Class.tests.cpp:<line number> 168 ............................................................................... 169 170 Class.tests.cpp:<line number>: FAILED: 171 REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) 172 with expansion: 173 0 == 1 174 175 ------------------------------------------------------------------------------- 176 A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - 177 Template_Foo_2<float, 6> 178 ------------------------------------------------------------------------------- 179 Class.tests.cpp:<line number> 180 ............................................................................... 181 182 Class.tests.cpp:<line number>: FAILED: 183 REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) 184 with expansion: 185 6 < 2 186 187 ------------------------------------------------------------------------------- 188 A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - 189 Template_Foo_2<int, 2> 190 ------------------------------------------------------------------------------- 191 Class.tests.cpp:<line number> 192 ............................................................................... 193 194 Class.tests.cpp:<line number>: FAILED: 195 REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) 196 with expansion: 197 2 < 2 198 199 ------------------------------------------------------------------------------- 200 A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array 201 <float, 6> 202 ------------------------------------------------------------------------------- 203 Class.tests.cpp:<line number> 204 ............................................................................... 205 206 Class.tests.cpp:<line number>: FAILED: 207 REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) 208 with expansion: 209 6 < 2 210 211 ------------------------------------------------------------------------------- 212 A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array 213 <int, 2> 214 ------------------------------------------------------------------------------- 215 Class.tests.cpp:<line number> 216 ............................................................................... 217 218 Class.tests.cpp:<line number>: FAILED: 219 REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) 220 with expansion: 221 2 < 2 222 223 ------------------------------------------------------------------------------- 224 A TEMPLATE_TEST_CASE_METHOD based test run that fails - double 225 ------------------------------------------------------------------------------- 226 Class.tests.cpp:<line number> 227 ............................................................................... 228 229 Class.tests.cpp:<line number>: FAILED: 230 REQUIRE( Template_Fixture<TestType>::m_a == 2 ) 231 with expansion: 232 1.0 == 2 233 234 ------------------------------------------------------------------------------- 235 A TEMPLATE_TEST_CASE_METHOD based test run that fails - float 236 ------------------------------------------------------------------------------- 237 Class.tests.cpp:<line number> 238 ............................................................................... 239 240 Class.tests.cpp:<line number>: FAILED: 241 REQUIRE( Template_Fixture<TestType>::m_a == 2 ) 242 with expansion: 243 1.0f == 2 244 245 ------------------------------------------------------------------------------- 246 A TEMPLATE_TEST_CASE_METHOD based test run that fails - int 247 ------------------------------------------------------------------------------- 248 Class.tests.cpp:<line number> 249 ............................................................................... 250 251 Class.tests.cpp:<line number>: FAILED: 252 REQUIRE( Template_Fixture<TestType>::m_a == 2 ) 253 with expansion: 254 1 == 2 255 256 ------------------------------------------------------------------------------- 257 A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1 258 ------------------------------------------------------------------------------- 259 Class.tests.cpp:<line number> 260 ............................................................................... 261 262 Class.tests.cpp:<line number>: FAILED: 263 REQUIRE( Nttp_Fixture<V>::value == 0 ) 264 with expansion: 265 1 == 0 266 267 ------------------------------------------------------------------------------- 268 A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3 269 ------------------------------------------------------------------------------- 270 Class.tests.cpp:<line number> 271 ............................................................................... 272 273 Class.tests.cpp:<line number>: FAILED: 274 REQUIRE( Nttp_Fixture<V>::value == 0 ) 275 with expansion: 276 3 == 0 277 278 ------------------------------------------------------------------------------- 279 A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6 280 ------------------------------------------------------------------------------- 281 Class.tests.cpp:<line number> 282 ............................................................................... 283 284 Class.tests.cpp:<line number>: FAILED: 285 REQUIRE( Nttp_Fixture<V>::value == 0 ) 286 with expansion: 287 6 == 0 288 289 ------------------------------------------------------------------------------- 290 A TEST_CASE_METHOD based test run that fails 291 ------------------------------------------------------------------------------- 292 Class.tests.cpp:<line number> 293 ............................................................................... 294 295 Class.tests.cpp:<line number>: FAILED: 296 REQUIRE( m_a == 2 ) 297 with expansion: 298 1 == 2 299 300 ------------------------------------------------------------------------------- 301 A couple of nested sections followed by a failure 302 ------------------------------------------------------------------------------- 303 Misc.tests.cpp:<line number> 304 ............................................................................... 305 306 Misc.tests.cpp:<line number>: FAILED: 307 explicitly with message: 308 to infinity and beyond 309 310 ------------------------------------------------------------------------------- 311 A failing expression with a non streamable type is still captured 312 ------------------------------------------------------------------------------- 313 Tricky.tests.cpp:<line number> 314 ............................................................................... 315 316 Tricky.tests.cpp:<line number>: FAILED: 317 CHECK( &o1 == &o2 ) 318 with expansion: 319 0x<hex digits> == 0x<hex digits> 320 321 Tricky.tests.cpp:<line number>: FAILED: 322 CHECK( o1 == o2 ) 323 with expansion: 324 {?} == {?} 325 326 ------------------------------------------------------------------------------- 327 An unchecked exception reports the line of the last assertion 328 ------------------------------------------------------------------------------- 329 Exception.tests.cpp:<line number> 330 ............................................................................... 331 332 Exception.tests.cpp:<line number>: FAILED: 333 {Unknown expression after the reported line} 334 due to unexpected exception with message: 335 unexpected exception 336 337 ------------------------------------------------------------------------------- 338 Contains string matcher 339 ------------------------------------------------------------------------------- 340 Matchers.tests.cpp:<line number> 341 ............................................................................... 342 343 Matchers.tests.cpp:<line number>: FAILED: 344 CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) ) 345 with expansion: 346 "this string contains 'abc' as a substring" contains: "not there" (case 347 insensitive) 348 349 Matchers.tests.cpp:<line number>: FAILED: 350 CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) ) 351 with expansion: 352 "this string contains 'abc' as a substring" contains: "STRING" 353 354 ------------------------------------------------------------------------------- 355 Custom exceptions can be translated when testing for nothrow 356 ------------------------------------------------------------------------------- 357 Exception.tests.cpp:<line number> 358 ............................................................................... 359 360 Exception.tests.cpp:<line number>: FAILED: 361 REQUIRE_NOTHROW( throwCustom() ) 362 due to unexpected exception with message: 363 custom exception - not std 364 365 ------------------------------------------------------------------------------- 366 Custom exceptions can be translated when testing for throwing as something else 367 ------------------------------------------------------------------------------- 368 Exception.tests.cpp:<line number> 369 ............................................................................... 370 371 Exception.tests.cpp:<line number>: FAILED: 372 REQUIRE_THROWS_AS( throwCustom(), std::exception ) 373 due to unexpected exception with message: 374 custom exception - not std 375 376 ------------------------------------------------------------------------------- 377 Custom std-exceptions can be custom translated 378 ------------------------------------------------------------------------------- 379 Exception.tests.cpp:<line number> 380 ............................................................................... 381 382 Exception.tests.cpp:<line number>: FAILED: 383 due to unexpected exception with message: 384 custom std exception 385 386 ------------------------------------------------------------------------------- 387 Empty generators can SKIP in constructor 388 ------------------------------------------------------------------------------- 389 Skip.tests.cpp:<line number> 390 ............................................................................... 391 392 Skip.tests.cpp:<line number>: SKIPPED: 393 explicitly with message: 394 This generator is empty 395 396 ------------------------------------------------------------------------------- 397 EndsWith string matcher 398 ------------------------------------------------------------------------------- 399 Matchers.tests.cpp:<line number> 400 ............................................................................... 401 402 Matchers.tests.cpp:<line number>: FAILED: 403 CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) ) 404 with expansion: 405 "this string contains 'abc' as a substring" ends with: "Substring" 406 407 Matchers.tests.cpp:<line number>: FAILED: 408 CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) ) 409 with expansion: 410 "this string contains 'abc' as a substring" ends with: "this" (case 411 insensitive) 412 413 ------------------------------------------------------------------------------- 414 Equality checks that should fail 415 ------------------------------------------------------------------------------- 416 Condition.tests.cpp:<line number> 417 ............................................................................... 418 419 Condition.tests.cpp:<line number>: FAILED: 420 CHECK( data.int_seven == 6 ) 421 with expansion: 422 7 == 6 423 424 Condition.tests.cpp:<line number>: FAILED: 425 CHECK( data.int_seven == 8 ) 426 with expansion: 427 7 == 8 428 429 Condition.tests.cpp:<line number>: FAILED: 430 CHECK( data.int_seven == 0 ) 431 with expansion: 432 7 == 0 433 434 Condition.tests.cpp:<line number>: FAILED: 435 CHECK( data.float_nine_point_one == Approx( 9.11f ) ) 436 with expansion: 437 9.1f == Approx( 9.1099996567 ) 438 439 Condition.tests.cpp:<line number>: FAILED: 440 CHECK( data.float_nine_point_one == Approx( 9.0f ) ) 441 with expansion: 442 9.1f == Approx( 9.0 ) 443 444 Condition.tests.cpp:<line number>: FAILED: 445 CHECK( data.float_nine_point_one == Approx( 1 ) ) 446 with expansion: 447 9.1f == Approx( 1.0 ) 448 449 Condition.tests.cpp:<line number>: FAILED: 450 CHECK( data.float_nine_point_one == Approx( 0 ) ) 451 with expansion: 452 9.1f == Approx( 0.0 ) 453 454 Condition.tests.cpp:<line number>: FAILED: 455 CHECK( data.double_pi == Approx( 3.1415 ) ) 456 with expansion: 457 3.1415926535 == Approx( 3.1415 ) 458 459 Condition.tests.cpp:<line number>: FAILED: 460 CHECK( data.str_hello == "goodbye" ) 461 with expansion: 462 "hello" == "goodbye" 463 464 Condition.tests.cpp:<line number>: FAILED: 465 CHECK( data.str_hello == "hell" ) 466 with expansion: 467 "hello" == "hell" 468 469 Condition.tests.cpp:<line number>: FAILED: 470 CHECK( data.str_hello == "hello1" ) 471 with expansion: 472 "hello" == "hello1" 473 474 Condition.tests.cpp:<line number>: FAILED: 475 CHECK( data.str_hello.size() == 6 ) 476 with expansion: 477 5 == 6 478 479 Condition.tests.cpp:<line number>: FAILED: 480 CHECK( x == Approx( 1.301 ) ) 481 with expansion: 482 1.3 == Approx( 1.301 ) 483 484 ------------------------------------------------------------------------------- 485 Equals string matcher 486 ------------------------------------------------------------------------------- 487 Matchers.tests.cpp:<line number> 488 ............................................................................... 489 490 Matchers.tests.cpp:<line number>: FAILED: 491 CHECK_THAT( testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) ) 492 with expansion: 493 "this string contains 'abc' as a substring" equals: "this string contains 494 'ABC' as a substring" 495 496 Matchers.tests.cpp:<line number>: FAILED: 497 CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) ) 498 with expansion: 499 "this string contains 'abc' as a substring" equals: "something else" (case 500 insensitive) 501 502 ------------------------------------------------------------------------------- 503 Exception matchers that fail 504 No exception 505 ------------------------------------------------------------------------------- 506 Matchers.tests.cpp:<line number> 507 ............................................................................... 508 509 Matchers.tests.cpp:<line number>: FAILED: 510 CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) 511 because no exception was thrown where one was expected: 512 513 Matchers.tests.cpp:<line number>: FAILED: 514 REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) 515 because no exception was thrown where one was expected: 516 517 ------------------------------------------------------------------------------- 518 Exception matchers that fail 519 Type mismatch 520 ------------------------------------------------------------------------------- 521 Matchers.tests.cpp:<line number> 522 ............................................................................... 523 524 Matchers.tests.cpp:<line number>: FAILED: 525 CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) 526 due to unexpected exception with message: 527 Unknown exception 528 529 Matchers.tests.cpp:<line number>: FAILED: 530 REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) 531 due to unexpected exception with message: 532 Unknown exception 533 534 ------------------------------------------------------------------------------- 535 Exception matchers that fail 536 Contents are wrong 537 ------------------------------------------------------------------------------- 538 Matchers.tests.cpp:<line number> 539 ............................................................................... 540 541 Matchers.tests.cpp:<line number>: FAILED: 542 CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } ) 543 with expansion: 544 SpecialException::what special exception has value of 1 545 546 Matchers.tests.cpp:<line number>: FAILED: 547 REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } ) 548 with expansion: 549 SpecialException::what special exception has value of 1 550 551 ------------------------------------------------------------------------------- 552 Expected exceptions that don't throw or unexpected exceptions fail the test 553 ------------------------------------------------------------------------------- 554 Exception.tests.cpp:<line number> 555 ............................................................................... 556 557 Exception.tests.cpp:<line number>: FAILED: 558 CHECK_THROWS_AS( thisThrows(), std::string ) 559 due to unexpected exception with message: 560 expected exception 561 562 Exception.tests.cpp:<line number>: FAILED: 563 CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) 564 because no exception was thrown where one was expected: 565 566 Exception.tests.cpp:<line number>: FAILED: 567 CHECK_NOTHROW( thisThrows() ) 568 due to unexpected exception with message: 569 expected exception 570 571 ------------------------------------------------------------------------------- 572 FAIL aborts the test 573 ------------------------------------------------------------------------------- 574 Message.tests.cpp:<line number> 575 ............................................................................... 576 577 Message.tests.cpp:<line number>: FAILED: 578 explicitly with message: 579 This is a failure 580 581 ------------------------------------------------------------------------------- 582 FAIL does not require an argument 583 ------------------------------------------------------------------------------- 584 Message.tests.cpp:<line number> 585 ............................................................................... 586 587 Message.tests.cpp:<line number>: FAILED: 588 589 ------------------------------------------------------------------------------- 590 FAIL_CHECK does not abort the test 591 ------------------------------------------------------------------------------- 592 Message.tests.cpp:<line number> 593 ............................................................................... 594 595 Message.tests.cpp:<line number>: FAILED: 596 explicitly with message: 597 This is a failure 598 599 Message.tests.cpp:<line number>: warning: 600 This message appears in the output 601 602 ------------------------------------------------------------------------------- 603 INFO and UNSCOPED_INFO can stream multiple arguments 604 ------------------------------------------------------------------------------- 605 Message.tests.cpp:<line number> 606 ............................................................................... 607 608 Message.tests.cpp:<line number>: FAILED: 609 explicitly with messages: 610 This info has multiple parts. 611 This unscoped info has multiple parts. 612 Show infos! 613 614 ------------------------------------------------------------------------------- 615 INFO and WARN do not abort tests 616 ------------------------------------------------------------------------------- 617 Message.tests.cpp:<line number> 618 ............................................................................... 619 620 Message.tests.cpp:<line number>: warning: 621 this is a warning 622 623 ------------------------------------------------------------------------------- 624 INFO gets logged on failure 625 ------------------------------------------------------------------------------- 626 Message.tests.cpp:<line number> 627 ............................................................................... 628 629 Message.tests.cpp:<line number>: FAILED: 630 REQUIRE( a == 1 ) 631 with expansion: 632 2 == 1 633 with messages: 634 this message should be logged 635 so should this 636 637 ------------------------------------------------------------------------------- 638 INFO gets logged on failure, even if captured before successful assertions 639 ------------------------------------------------------------------------------- 640 Message.tests.cpp:<line number> 641 ............................................................................... 642 643 Message.tests.cpp:<line number>: FAILED: 644 CHECK( a == 1 ) 645 with expansion: 646 2 == 1 647 with messages: 648 this message may be logged later 649 this message should be logged 650 651 Message.tests.cpp:<line number>: FAILED: 652 CHECK( a == 0 ) 653 with expansion: 654 2 == 0 655 with messages: 656 this message may be logged later 657 this message should be logged 658 and this, but later 659 660 ------------------------------------------------------------------------------- 661 INFO is reset for each loop 662 ------------------------------------------------------------------------------- 663 Message.tests.cpp:<line number> 664 ............................................................................... 665 666 Message.tests.cpp:<line number>: FAILED: 667 REQUIRE( i < 10 ) 668 with expansion: 669 10 < 10 670 with messages: 671 current counter 10 672 i := 10 673 674 ------------------------------------------------------------------------------- 675 Incomplete AssertionHandler 676 ------------------------------------------------------------------------------- 677 AssertionHandler.tests.cpp:<line number> 678 ............................................................................... 679 680 AssertionHandler.tests.cpp:<line number>: FAILED: 681 REQUIRE( Dummy ) 682 due to unexpected exception with message: 683 Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE 684 685 ------------------------------------------------------------------------------- 686 Inequality checks that should fail 687 ------------------------------------------------------------------------------- 688 Condition.tests.cpp:<line number> 689 ............................................................................... 690 691 Condition.tests.cpp:<line number>: FAILED: 692 CHECK( data.int_seven != 7 ) 693 with expansion: 694 7 != 7 695 696 Condition.tests.cpp:<line number>: FAILED: 697 CHECK( data.float_nine_point_one != Approx( 9.1f ) ) 698 with expansion: 699 9.1f != Approx( 9.1000003815 ) 700 701 Condition.tests.cpp:<line number>: FAILED: 702 CHECK( data.double_pi != Approx( 3.1415926535 ) ) 703 with expansion: 704 3.1415926535 != Approx( 3.1415926535 ) 705 706 Condition.tests.cpp:<line number>: FAILED: 707 CHECK( data.str_hello != "hello" ) 708 with expansion: 709 "hello" != "hello" 710 711 Condition.tests.cpp:<line number>: FAILED: 712 CHECK( data.str_hello.size() != 5 ) 713 with expansion: 714 5 != 5 715 716 ------------------------------------------------------------------------------- 717 Matchers can be composed with both && and || - failing 718 ------------------------------------------------------------------------------- 719 Matchers.tests.cpp:<line number> 720 ............................................................................... 721 722 Matchers.tests.cpp:<line number>: FAILED: 723 CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) ) 724 with expansion: 725 "this string contains 'abc' as a substring" ( ( contains: "string" or 726 contains: "different" ) and contains: "random" ) 727 728 ------------------------------------------------------------------------------- 729 Matchers can be negated (Not) with the ! operator - failing 730 ------------------------------------------------------------------------------- 731 Matchers.tests.cpp:<line number> 732 ............................................................................... 733 734 Matchers.tests.cpp:<line number>: FAILED: 735 CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) ) 736 with expansion: 737 "this string contains 'abc' as a substring" not contains: "substring" 738 739 ------------------------------------------------------------------------------- 740 Mayfail test case with nested sections 741 A 742 1 743 ------------------------------------------------------------------------------- 744 Condition.tests.cpp:<line number> 745 ............................................................................... 746 747 Condition.tests.cpp:<line number>: FAILED: 748 749 ------------------------------------------------------------------------------- 750 Mayfail test case with nested sections 751 A 752 2 753 ------------------------------------------------------------------------------- 754 Condition.tests.cpp:<line number> 755 ............................................................................... 756 757 Condition.tests.cpp:<line number>: FAILED: 758 759 ------------------------------------------------------------------------------- 760 Mayfail test case with nested sections 761 B 762 1 763 ------------------------------------------------------------------------------- 764 Condition.tests.cpp:<line number> 765 ............................................................................... 766 767 Condition.tests.cpp:<line number>: FAILED: 768 769 ------------------------------------------------------------------------------- 770 Mayfail test case with nested sections 771 B 772 2 773 ------------------------------------------------------------------------------- 774 Condition.tests.cpp:<line number> 775 ............................................................................... 776 777 Condition.tests.cpp:<line number>: FAILED: 778 779 ------------------------------------------------------------------------------- 780 Mismatching exception messages failing the test 781 ------------------------------------------------------------------------------- 782 Exception.tests.cpp:<line number> 783 ............................................................................... 784 785 Exception.tests.cpp:<line number>: FAILED: 786 REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) 787 with expansion: 788 "expected exception" equals: "should fail" 789 790 ------------------------------------------------------------------------------- 791 Nice descriptive name 792 ------------------------------------------------------------------------------- 793 Misc.tests.cpp:<line number> 794 ............................................................................... 795 796 Misc.tests.cpp:<line number>: warning: 797 This one ran 798 799 ------------------------------------------------------------------------------- 800 Non-std exceptions can be translated 801 ------------------------------------------------------------------------------- 802 Exception.tests.cpp:<line number> 803 ............................................................................... 804 805 Exception.tests.cpp:<line number>: FAILED: 806 due to unexpected exception with message: 807 custom exception 808 809 ------------------------------------------------------------------------------- 810 Ordering comparison checks that should fail 811 ------------------------------------------------------------------------------- 812 Condition.tests.cpp:<line number> 813 ............................................................................... 814 815 Condition.tests.cpp:<line number>: FAILED: 816 CHECK( data.int_seven > 7 ) 817 with expansion: 818 7 > 7 819 820 Condition.tests.cpp:<line number>: FAILED: 821 CHECK( data.int_seven < 7 ) 822 with expansion: 823 7 < 7 824 825 Condition.tests.cpp:<line number>: FAILED: 826 CHECK( data.int_seven > 8 ) 827 with expansion: 828 7 > 8 829 830 Condition.tests.cpp:<line number>: FAILED: 831 CHECK( data.int_seven < 6 ) 832 with expansion: 833 7 < 6 834 835 Condition.tests.cpp:<line number>: FAILED: 836 CHECK( data.int_seven < 0 ) 837 with expansion: 838 7 < 0 839 840 Condition.tests.cpp:<line number>: FAILED: 841 CHECK( data.int_seven < -1 ) 842 with expansion: 843 7 < -1 844 845 Condition.tests.cpp:<line number>: FAILED: 846 CHECK( data.int_seven >= 8 ) 847 with expansion: 848 7 >= 8 849 850 Condition.tests.cpp:<line number>: FAILED: 851 CHECK( data.int_seven <= 6 ) 852 with expansion: 853 7 <= 6 854 855 Condition.tests.cpp:<line number>: FAILED: 856 CHECK( data.float_nine_point_one < 9 ) 857 with expansion: 858 9.1f < 9 859 860 Condition.tests.cpp:<line number>: FAILED: 861 CHECK( data.float_nine_point_one > 10 ) 862 with expansion: 863 9.1f > 10 864 865 Condition.tests.cpp:<line number>: FAILED: 866 CHECK( data.float_nine_point_one > 9.2 ) 867 with expansion: 868 9.1f > 9.2 869 870 Condition.tests.cpp:<line number>: FAILED: 871 CHECK( data.str_hello > "hello" ) 872 with expansion: 873 "hello" > "hello" 874 875 Condition.tests.cpp:<line number>: FAILED: 876 CHECK( data.str_hello < "hello" ) 877 with expansion: 878 "hello" < "hello" 879 880 Condition.tests.cpp:<line number>: FAILED: 881 CHECK( data.str_hello > "hellp" ) 882 with expansion: 883 "hello" > "hellp" 884 885 Condition.tests.cpp:<line number>: FAILED: 886 CHECK( data.str_hello > "z" ) 887 with expansion: 888 "hello" > "z" 889 890 Condition.tests.cpp:<line number>: FAILED: 891 CHECK( data.str_hello < "hellm" ) 892 with expansion: 893 "hello" < "hellm" 894 895 Condition.tests.cpp:<line number>: FAILED: 896 CHECK( data.str_hello < "a" ) 897 with expansion: 898 "hello" < "a" 899 900 Condition.tests.cpp:<line number>: FAILED: 901 CHECK( data.str_hello >= "z" ) 902 with expansion: 903 "hello" >= "z" 904 905 Condition.tests.cpp:<line number>: FAILED: 906 CHECK( data.str_hello <= "a" ) 907 with expansion: 908 "hello" <= "a" 909 910 ------------------------------------------------------------------------------- 911 Output from all sections is reported 912 one 913 ------------------------------------------------------------------------------- 914 Message.tests.cpp:<line number> 915 ............................................................................... 916 917 Message.tests.cpp:<line number>: FAILED: 918 explicitly with message: 919 Message from section one 920 921 ------------------------------------------------------------------------------- 922 Output from all sections is reported 923 two 924 ------------------------------------------------------------------------------- 925 Message.tests.cpp:<line number> 926 ............................................................................... 927 928 Message.tests.cpp:<line number>: FAILED: 929 explicitly with message: 930 Message from section two 931 932 ------------------------------------------------------------------------------- 933 Reconstruction should be based on stringification: #914 934 ------------------------------------------------------------------------------- 935 Decomposition.tests.cpp:<line number> 936 ............................................................................... 937 938 Decomposition.tests.cpp:<line number>: FAILED: 939 CHECK( truthy(false) ) 940 with expansion: 941 Hey, its truthy! 942 943 ------------------------------------------------------------------------------- 944 Regex string matcher 945 ------------------------------------------------------------------------------- 946 Matchers.tests.cpp:<line number> 947 ............................................................................... 948 949 Matchers.tests.cpp:<line number>: FAILED: 950 CHECK_THAT( testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) ) 951 with expansion: 952 "this string contains 'abc' as a substring" matches "this STRING contains 953 'abc' as a substring" case sensitively 954 955 Matchers.tests.cpp:<line number>: FAILED: 956 CHECK_THAT( testStringForMatching(), Matches( "contains 'abc' as a substring" ) ) 957 with expansion: 958 "this string contains 'abc' as a substring" matches "contains 'abc' as a 959 substring" case sensitively 960 961 Matchers.tests.cpp:<line number>: FAILED: 962 CHECK_THAT( testStringForMatching(), Matches( "this string contains 'abc' as a" ) ) 963 with expansion: 964 "this string contains 'abc' as a substring" matches "this string contains 965 'abc' as a" case sensitively 966 967 A string sent directly to stdout 968 A string sent directly to stderr 969 A string sent to stderr via clog 970 Message from section one 971 Message from section two 972 ------------------------------------------------------------------------------- 973 StartsWith string matcher 974 ------------------------------------------------------------------------------- 975 Matchers.tests.cpp:<line number> 976 ............................................................................... 977 978 Matchers.tests.cpp:<line number>: FAILED: 979 CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) ) 980 with expansion: 981 "this string contains 'abc' as a substring" starts with: "This String" 982 983 Matchers.tests.cpp:<line number>: FAILED: 984 CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) ) 985 with expansion: 986 "this string contains 'abc' as a substring" starts with: "string" (case 987 insensitive) 988 989 ------------------------------------------------------------------------------- 990 Tabs and newlines show in output 991 ------------------------------------------------------------------------------- 992 Misc.tests.cpp:<line number> 993 ............................................................................... 994 995 Misc.tests.cpp:<line number>: FAILED: 996 CHECK( s1 == s2 ) 997 with expansion: 998 "if ($b == 10) { 999 $a = 20; 1000 }" 1001 == 1002 "if ($b == 10) { 1003 $a = 20; 1004 } 1005 " 1006 1007 ------------------------------------------------------------------------------- 1008 Testing checked-if 2 1009 ------------------------------------------------------------------------------- 1010 Misc.tests.cpp:<line number> 1011 ............................................................................... 1012 1013 Misc.tests.cpp:<line number>: FAILED: 1014 1015 ------------------------------------------------------------------------------- 1016 Testing checked-if 3 1017 ------------------------------------------------------------------------------- 1018 Misc.tests.cpp:<line number> 1019 ............................................................................... 1020 1021 Misc.tests.cpp:<line number>: FAILED: 1022 1023 ------------------------------------------------------------------------------- 1024 Testing checked-if 4 1025 ------------------------------------------------------------------------------- 1026 Misc.tests.cpp:<line number> 1027 ............................................................................... 1028 1029 Misc.tests.cpp:<line number>: FAILED: 1030 {Unknown expression after the reported line} 1031 due to unexpected exception with message: 1032 Uncaught exception should fail! 1033 1034 ------------------------------------------------------------------------------- 1035 Testing checked-if 5 1036 ------------------------------------------------------------------------------- 1037 Misc.tests.cpp:<line number> 1038 ............................................................................... 1039 1040 Misc.tests.cpp:<line number>: FAILED: 1041 {Unknown expression after the reported line} 1042 due to unexpected exception with message: 1043 Uncaught exception should fail! 1044 1045 ------------------------------------------------------------------------------- 1046 Thrown string literals are translated 1047 ------------------------------------------------------------------------------- 1048 Exception.tests.cpp:<line number> 1049 ............................................................................... 1050 1051 Exception.tests.cpp:<line number>: FAILED: 1052 due to unexpected exception with message: 1053 For some reason someone is throwing a string literal! 1054 1055 ------------------------------------------------------------------------------- 1056 Unexpected exceptions can be translated 1057 ------------------------------------------------------------------------------- 1058 Exception.tests.cpp:<line number> 1059 ............................................................................... 1060 1061 Exception.tests.cpp:<line number>: FAILED: 1062 due to unexpected exception with message: 1063 3.14 1064 1065 ------------------------------------------------------------------------------- 1066 Vector Approx matcher -- failing 1067 Empty and non empty vectors are not approx equal 1068 ------------------------------------------------------------------------------- 1069 Matchers.tests.cpp:<line number> 1070 ............................................................................... 1071 1072 Matchers.tests.cpp:<line number>: FAILED: 1073 CHECK_THAT( empty, Approx( t1 ) ) 1074 with expansion: 1075 { } is approx: { 1.0, 2.0 } 1076 1077 ------------------------------------------------------------------------------- 1078 Vector Approx matcher -- failing 1079 Just different vectors 1080 ------------------------------------------------------------------------------- 1081 Matchers.tests.cpp:<line number> 1082 ............................................................................... 1083 1084 Matchers.tests.cpp:<line number>: FAILED: 1085 CHECK_THAT( v1, Approx( v2 ) ) 1086 with expansion: 1087 { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } 1088 1089 ------------------------------------------------------------------------------- 1090 Vector matchers that fail 1091 Contains (element) 1092 ------------------------------------------------------------------------------- 1093 Matchers.tests.cpp:<line number> 1094 ............................................................................... 1095 1096 Matchers.tests.cpp:<line number>: FAILED: 1097 CHECK_THAT( v, VectorContains( -1 ) ) 1098 with expansion: 1099 { 1, 2, 3 } Contains: -1 1100 1101 Matchers.tests.cpp:<line number>: FAILED: 1102 CHECK_THAT( empty, VectorContains( 1 ) ) 1103 with expansion: 1104 { } Contains: 1 1105 1106 ------------------------------------------------------------------------------- 1107 Vector matchers that fail 1108 Contains (vector) 1109 ------------------------------------------------------------------------------- 1110 Matchers.tests.cpp:<line number> 1111 ............................................................................... 1112 1113 Matchers.tests.cpp:<line number>: FAILED: 1114 CHECK_THAT( empty, Contains( v ) ) 1115 with expansion: 1116 { } Contains: { 1, 2, 3 } 1117 1118 Matchers.tests.cpp:<line number>: FAILED: 1119 CHECK_THAT( v, Contains( v2 ) ) 1120 with expansion: 1121 { 1, 2, 3 } Contains: { 1, 2, 4 } 1122 1123 ------------------------------------------------------------------------------- 1124 Vector matchers that fail 1125 Equals 1126 ------------------------------------------------------------------------------- 1127 Matchers.tests.cpp:<line number> 1128 ............................................................................... 1129 1130 Matchers.tests.cpp:<line number>: FAILED: 1131 CHECK_THAT( v, Equals( v2 ) ) 1132 with expansion: 1133 { 1, 2, 3 } Equals: { 1, 2 } 1134 1135 Matchers.tests.cpp:<line number>: FAILED: 1136 CHECK_THAT( v2, Equals( v ) ) 1137 with expansion: 1138 { 1, 2 } Equals: { 1, 2, 3 } 1139 1140 Matchers.tests.cpp:<line number>: FAILED: 1141 CHECK_THAT( empty, Equals( v ) ) 1142 with expansion: 1143 { } Equals: { 1, 2, 3 } 1144 1145 Matchers.tests.cpp:<line number>: FAILED: 1146 CHECK_THAT( v, Equals( empty ) ) 1147 with expansion: 1148 { 1, 2, 3 } Equals: { } 1149 1150 ------------------------------------------------------------------------------- 1151 Vector matchers that fail 1152 UnorderedEquals 1153 ------------------------------------------------------------------------------- 1154 Matchers.tests.cpp:<line number> 1155 ............................................................................... 1156 1157 Matchers.tests.cpp:<line number>: FAILED: 1158 CHECK_THAT( v, UnorderedEquals( empty ) ) 1159 with expansion: 1160 { 1, 2, 3 } UnorderedEquals: { } 1161 1162 Matchers.tests.cpp:<line number>: FAILED: 1163 CHECK_THAT( empty, UnorderedEquals( v ) ) 1164 with expansion: 1165 { } UnorderedEquals: { 1, 2, 3 } 1166 1167 Matchers.tests.cpp:<line number>: FAILED: 1168 CHECK_THAT( permuted, UnorderedEquals( v ) ) 1169 with expansion: 1170 { 1, 3 } UnorderedEquals: { 1, 2, 3 } 1171 1172 Matchers.tests.cpp:<line number>: FAILED: 1173 CHECK_THAT( permuted, UnorderedEquals( v ) ) 1174 with expansion: 1175 { 3, 1 } UnorderedEquals: { 1, 2, 3 } 1176 1177 ------------------------------------------------------------------------------- 1178 When unchecked exceptions are thrown directly they are always failures 1179 ------------------------------------------------------------------------------- 1180 Exception.tests.cpp:<line number> 1181 ............................................................................... 1182 1183 Exception.tests.cpp:<line number>: FAILED: 1184 due to unexpected exception with message: 1185 unexpected exception 1186 1187 ------------------------------------------------------------------------------- 1188 When unchecked exceptions are thrown during a CHECK the test should continue 1189 ------------------------------------------------------------------------------- 1190 Exception.tests.cpp:<line number> 1191 ............................................................................... 1192 1193 Exception.tests.cpp:<line number>: FAILED: 1194 CHECK( thisThrows() == 0 ) 1195 due to unexpected exception with message: 1196 expected exception 1197 1198 ------------------------------------------------------------------------------- 1199 When unchecked exceptions are thrown during a REQUIRE the test should abort 1200 fail 1201 ------------------------------------------------------------------------------- 1202 Exception.tests.cpp:<line number> 1203 ............................................................................... 1204 1205 Exception.tests.cpp:<line number>: FAILED: 1206 REQUIRE( thisThrows() == 0 ) 1207 due to unexpected exception with message: 1208 expected exception 1209 1210 ------------------------------------------------------------------------------- 1211 When unchecked exceptions are thrown from functions they are always failures 1212 ------------------------------------------------------------------------------- 1213 Exception.tests.cpp:<line number> 1214 ............................................................................... 1215 1216 Exception.tests.cpp:<line number>: FAILED: 1217 CHECK( thisThrows() == 0 ) 1218 due to unexpected exception with message: 1219 expected exception 1220 1221 ------------------------------------------------------------------------------- 1222 When unchecked exceptions are thrown from sections they are always failures 1223 section name 1224 ------------------------------------------------------------------------------- 1225 Exception.tests.cpp:<line number> 1226 ............................................................................... 1227 1228 Exception.tests.cpp:<line number>: FAILED: 1229 due to unexpected exception with message: 1230 unexpected exception 1231 1232 ------------------------------------------------------------------------------- 1233 a succeeding test can still be skipped 1234 ------------------------------------------------------------------------------- 1235 Skip.tests.cpp:<line number> 1236 ............................................................................... 1237 1238 Skip.tests.cpp:<line number>: SKIPPED: 1239 1240 ------------------------------------------------------------------------------- 1241 checkedElse, failing 1242 ------------------------------------------------------------------------------- 1243 Misc.tests.cpp:<line number> 1244 ............................................................................... 1245 1246 Misc.tests.cpp:<line number>: FAILED: 1247 REQUIRE( testCheckedElse( false ) ) 1248 with expansion: 1249 false 1250 1251 ------------------------------------------------------------------------------- 1252 checkedIf, failing 1253 ------------------------------------------------------------------------------- 1254 Misc.tests.cpp:<line number> 1255 ............................................................................... 1256 1257 Misc.tests.cpp:<line number>: FAILED: 1258 REQUIRE( testCheckedIf( false ) ) 1259 with expansion: 1260 false 1261 1262 ------------------------------------------------------------------------------- 1263 dynamic skipping works with generators 1264 ------------------------------------------------------------------------------- 1265 Skip.tests.cpp:<line number> 1266 ............................................................................... 1267 1268 Skip.tests.cpp:<line number>: SKIPPED: 1269 explicitly with message: 1270 skipping because answer = 41 1271 1272 ------------------------------------------------------------------------------- 1273 dynamic skipping works with generators 1274 ------------------------------------------------------------------------------- 1275 Skip.tests.cpp:<line number> 1276 ............................................................................... 1277 1278 Skip.tests.cpp:<line number>: SKIPPED: 1279 explicitly with message: 1280 skipping because answer = 43 1281 1282 ------------------------------------------------------------------------------- 1283 failed assertions before SKIP cause test case to fail 1284 ------------------------------------------------------------------------------- 1285 Skip.tests.cpp:<line number> 1286 ............................................................................... 1287 1288 Skip.tests.cpp:<line number>: FAILED: 1289 CHECK( 3 == 4 ) 1290 1291 Skip.tests.cpp:<line number>: SKIPPED: 1292 1293 ------------------------------------------------------------------------------- 1294 failing for some generator values causes entire test case to fail 1295 ------------------------------------------------------------------------------- 1296 Skip.tests.cpp:<line number> 1297 ............................................................................... 1298 1299 Skip.tests.cpp:<line number>: FAILED: 1300 1301 ------------------------------------------------------------------------------- 1302 failing for some generator values causes entire test case to fail 1303 ------------------------------------------------------------------------------- 1304 Skip.tests.cpp:<line number> 1305 ............................................................................... 1306 1307 Skip.tests.cpp:<line number>: SKIPPED: 1308 1309 ------------------------------------------------------------------------------- 1310 failing for some generator values causes entire test case to fail 1311 ------------------------------------------------------------------------------- 1312 Skip.tests.cpp:<line number> 1313 ............................................................................... 1314 1315 Skip.tests.cpp:<line number>: FAILED: 1316 1317 ------------------------------------------------------------------------------- 1318 failing for some generator values causes entire test case to fail 1319 ------------------------------------------------------------------------------- 1320 Skip.tests.cpp:<line number> 1321 ............................................................................... 1322 1323 Skip.tests.cpp:<line number>: SKIPPED: 1324 1325 ------------------------------------------------------------------------------- 1326 failing in some unskipped sections causes entire test case to fail 1327 skipped 1328 ------------------------------------------------------------------------------- 1329 Skip.tests.cpp:<line number> 1330 ............................................................................... 1331 1332 Skip.tests.cpp:<line number>: SKIPPED: 1333 1334 ------------------------------------------------------------------------------- 1335 failing in some unskipped sections causes entire test case to fail 1336 not skipped 1337 ------------------------------------------------------------------------------- 1338 Skip.tests.cpp:<line number> 1339 ............................................................................... 1340 1341 Skip.tests.cpp:<line number>: FAILED: 1342 1343 loose text artifact 1344 ------------------------------------------------------------------------------- 1345 just failure 1346 ------------------------------------------------------------------------------- 1347 Message.tests.cpp:<line number> 1348 ............................................................................... 1349 1350 Message.tests.cpp:<line number>: FAILED: 1351 explicitly with message: 1352 Previous info should not be seen 1353 1354 ------------------------------------------------------------------------------- 1355 just failure after unscoped info 1356 ------------------------------------------------------------------------------- 1357 Message.tests.cpp:<line number> 1358 ............................................................................... 1359 1360 Message.tests.cpp:<line number>: FAILED: 1361 explicitly with message: 1362 previous unscoped info SHOULD not be seen 1363 1364 ------------------------------------------------------------------------------- 1365 looped SECTION tests 1366 b is currently: 0 1367 ------------------------------------------------------------------------------- 1368 Misc.tests.cpp:<line number> 1369 ............................................................................... 1370 1371 Misc.tests.cpp:<line number>: FAILED: 1372 CHECK( b > a ) 1373 with expansion: 1374 0 > 1 1375 1376 ------------------------------------------------------------------------------- 1377 looped SECTION tests 1378 b is currently: 1 1379 ------------------------------------------------------------------------------- 1380 Misc.tests.cpp:<line number> 1381 ............................................................................... 1382 1383 Misc.tests.cpp:<line number>: FAILED: 1384 CHECK( b > a ) 1385 with expansion: 1386 1 > 1 1387 1388 ------------------------------------------------------------------------------- 1389 looped tests 1390 ------------------------------------------------------------------------------- 1391 Misc.tests.cpp:<line number> 1392 ............................................................................... 1393 1394 Misc.tests.cpp:<line number>: FAILED: 1395 CHECK( ( fib[i] % 2 ) == 0 ) 1396 with expansion: 1397 1 == 0 1398 with message: 1399 Testing if fib[0] (1) is even 1400 1401 Misc.tests.cpp:<line number>: FAILED: 1402 CHECK( ( fib[i] % 2 ) == 0 ) 1403 with expansion: 1404 1 == 0 1405 with message: 1406 Testing if fib[1] (1) is even 1407 1408 Misc.tests.cpp:<line number>: FAILED: 1409 CHECK( ( fib[i] % 2 ) == 0 ) 1410 with expansion: 1411 1 == 0 1412 with message: 1413 Testing if fib[3] (3) is even 1414 1415 Misc.tests.cpp:<line number>: FAILED: 1416 CHECK( ( fib[i] % 2 ) == 0 ) 1417 with expansion: 1418 1 == 0 1419 with message: 1420 Testing if fib[4] (5) is even 1421 1422 Misc.tests.cpp:<line number>: FAILED: 1423 CHECK( ( fib[i] % 2 ) == 0 ) 1424 with expansion: 1425 1 == 0 1426 with message: 1427 Testing if fib[6] (13) is even 1428 1429 Misc.tests.cpp:<line number>: FAILED: 1430 CHECK( ( fib[i] % 2 ) == 0 ) 1431 with expansion: 1432 1 == 0 1433 with message: 1434 Testing if fib[7] (21) is even 1435 1436 ------------------------------------------------------------------------------- 1437 mix info, unscoped info and warning 1438 ------------------------------------------------------------------------------- 1439 Message.tests.cpp:<line number> 1440 ............................................................................... 1441 1442 Message.tests.cpp:<line number>: warning: 1443 and warn may mix 1444 1445 Message.tests.cpp:<line number>: warning: 1446 they are not cleared after warnings 1447 1448 ------------------------------------------------------------------------------- 1449 more nested SECTION tests 1450 doesn't equal 1451 equal 1452 ------------------------------------------------------------------------------- 1453 Misc.tests.cpp:<line number> 1454 ............................................................................... 1455 1456 Misc.tests.cpp:<line number>: FAILED: 1457 REQUIRE( a == b ) 1458 with expansion: 1459 1 == 2 1460 1461 a! 1462 b1! 1463 ------------------------------------------------------------------------------- 1464 nested sections can be skipped dynamically at runtime 1465 B 1466 B2 1467 ------------------------------------------------------------------------------- 1468 Skip.tests.cpp:<line number> 1469 ............................................................................... 1470 1471 Skip.tests.cpp:<line number>: SKIPPED: 1472 1473 ! 1474 ------------------------------------------------------------------------------- 1475 not prints unscoped info from previous failures 1476 ------------------------------------------------------------------------------- 1477 Message.tests.cpp:<line number> 1478 ............................................................................... 1479 1480 Message.tests.cpp:<line number>: FAILED: 1481 REQUIRE( false ) 1482 with message: 1483 this SHOULD be seen 1484 1485 ------------------------------------------------------------------------------- 1486 prints unscoped info on failure 1487 ------------------------------------------------------------------------------- 1488 Message.tests.cpp:<line number> 1489 ............................................................................... 1490 1491 Message.tests.cpp:<line number>: FAILED: 1492 REQUIRE( false ) 1493 with messages: 1494 this SHOULD be seen 1495 this SHOULD also be seen 1496 1497 ------------------------------------------------------------------------------- 1498 prints unscoped info only for the first assertion 1499 ------------------------------------------------------------------------------- 1500 Message.tests.cpp:<line number> 1501 ............................................................................... 1502 1503 Message.tests.cpp:<line number>: FAILED: 1504 CHECK( false ) 1505 with message: 1506 this SHOULD be seen only ONCE 1507 1508 ------------------------------------------------------------------------------- 1509 sections can be skipped dynamically at runtime 1510 skipped 1511 ------------------------------------------------------------------------------- 1512 Skip.tests.cpp:<line number> 1513 ............................................................................... 1514 1515 Skip.tests.cpp:<line number>: SKIPPED: 1516 1517 ------------------------------------------------------------------------------- 1518 send a single char to INFO 1519 ------------------------------------------------------------------------------- 1520 Misc.tests.cpp:<line number> 1521 ............................................................................... 1522 1523 Misc.tests.cpp:<line number>: FAILED: 1524 REQUIRE( false ) 1525 with message: 1526 3 1527 1528 ------------------------------------------------------------------------------- 1529 sends information to INFO 1530 ------------------------------------------------------------------------------- 1531 Message.tests.cpp:<line number> 1532 ............................................................................... 1533 1534 Message.tests.cpp:<line number>: FAILED: 1535 REQUIRE( false ) 1536 with messages: 1537 hi 1538 i := 7 1539 1540 ------------------------------------------------------------------------------- 1541 skipped tests can optionally provide a reason 1542 ------------------------------------------------------------------------------- 1543 Skip.tests.cpp:<line number> 1544 ............................................................................... 1545 1546 Skip.tests.cpp:<line number>: SKIPPED: 1547 explicitly with message: 1548 skipping because answer = 43 1549 1550 ------------------------------------------------------------------------------- 1551 stacks unscoped info in loops 1552 ------------------------------------------------------------------------------- 1553 Message.tests.cpp:<line number> 1554 ............................................................................... 1555 1556 Message.tests.cpp:<line number>: FAILED: 1557 CHECK( false ) 1558 with messages: 1559 Count 1 to 3... 1560 1 1561 2 1562 3 1563 1564 Message.tests.cpp:<line number>: FAILED: 1565 CHECK( false ) 1566 with messages: 1567 Count 4 to 6... 1568 4 1569 5 1570 6 1571 1572 ------------------------------------------------------------------------------- 1573 tests can be skipped dynamically at runtime 1574 ------------------------------------------------------------------------------- 1575 Skip.tests.cpp:<line number> 1576 ............................................................................... 1577 1578 Skip.tests.cpp:<line number>: SKIPPED: 1579 1580 ------------------------------------------------------------------------------- 1581 thrown std::strings are translated 1582 ------------------------------------------------------------------------------- 1583 Exception.tests.cpp:<line number> 1584 ............................................................................... 1585 1586 Exception.tests.cpp:<line number>: FAILED: 1587 due to unexpected exception with message: 1588 Why would you throw a std::string? 1589 1590 =============================================================================== 1591 test cases: 417 | 326 passed | 70 failed | 7 skipped | 14 failed as expected 1592 assertions: 2243 | 2079 passed | 129 failed | 35 failed as expected 1593