Debian Codegraph @

src/external/catch2/tests/SelfTest/Baselines/console.std.approved.txt

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