blob: 9933810670de4f53bfaa3fb111bcca4aa06863dd [file] [log] [blame]
onqtam2c100d62017-04-16 22:47:28 +03001[doctest] run with "--help" for options
onqtam35c14cd2017-04-24 12:54:03 +03002===============================================================================
onqtam1655b242018-05-10 15:29:21 +03003stringification.cpp(0):
Salvage6545bdc2022-01-13 00:14:21 +01004TEST CASE: no headers
5
6stringification.cpp(0): MESSAGE: 1as
7
8stringification.cpp(0): ERROR: CHECK( chs1 == nullptr ) is NOT correct!
9 values: CHECK( 1as == NULL )
10
Salvage7be3b872022-01-13 05:08:34 +010011stringification.cpp(0): MESSAGE: 0x31
Salvage6545bdc2022-01-13 00:14:21 +010012
13stringification.cpp(0): ERROR: CHECK( chs2 == nullptr ) is NOT correct!
Salvage7be3b872022-01-13 05:08:34 +010014 values: CHECK( 0x31 == NULL )
Salvage6545bdc2022-01-13 00:14:21 +010015
16stringification.cpp(0): MESSAGE: 1as
17
18stringification.cpp(0): ERROR: CHECK( "1as" == nullptr ) is NOT correct!
19 values: CHECK( 1as == NULL )
20
21stringification.cpp(0): MESSAGE: [0, 1, 1, 2, 3, 5, 8, 13]
22
23stringification.cpp(0): ERROR: CHECK( ints == nullptr ) is NOT correct!
24 values: CHECK( [0, 1, 1, 2, 3, 5, 8, 13] == NULL )
25
Salvage7be3b872022-01-13 05:08:34 +010026stringification.cpp(0): ERROR: CHECK( cptr == nullptr ) is NOT correct!
27 values: CHECK( 0x03 == NULL )
28
29stringification.cpp(0): MESSAGE: 0
30
31stringification.cpp(0): ERROR: CHECK( A == C ) is NOT correct!
32 values: CHECK( 0 == 100 )
33
Salvage6545bdc2022-01-13 00:14:21 +010034===============================================================================
35stringification.cpp(0):
onqtam35c14cd2017-04-24 12:54:03 +030036TEST CASE: all asserts should fail and show how the objects get stringified
onqtam2c100d62017-04-16 22:47:28 +030037
Salvage6545bdc2022-01-13 00:14:21 +010038stringification.cpp(0): MESSAGE: Foo{}
39
onqtam1655b242018-05-10 15:29:21 +030040stringification.cpp(0): ERROR: CHECK( f1 == f2 ) is NOT correct!
41 values: CHECK( Foo{} == Foo{} )
onqtam2c100d62017-04-16 22:47:28 +030042
Salvage6545bdc2022-01-13 00:14:21 +010043stringification.cpp(0): MESSAGE: omg
44
onqtam367098b2021-12-15 15:15:06 +020045stringification.cpp(0): ERROR: CHECK( dummy == "tralala" ) is NOT correct!
onqtam1655b242018-05-10 15:29:21 +030046 values: CHECK( omg == tralala )
onqtam2c100d62017-04-16 22:47:28 +030047
onqtam367098b2021-12-15 15:15:06 +020048stringification.cpp(0): ERROR: CHECK( "tralala" == dummy ) is NOT correct!
49 values: CHECK( tralala == omg )
50
Salvage6545bdc2022-01-13 00:14:21 +010051stringification.cpp(0): MESSAGE: [1, 2, 3]
52
onqtam1655b242018-05-10 15:29:21 +030053stringification.cpp(0): ERROR: CHECK( vec1 == vec2 ) is NOT correct!
54 values: CHECK( [1, 2, 3] == [1, 2, 4] )
onqtam2c100d62017-04-16 22:47:28 +030055
Salvage6545bdc2022-01-13 00:14:21 +010056stringification.cpp(0): MESSAGE: [1, 42, 3]
57
onqtam1655b242018-05-10 15:29:21 +030058stringification.cpp(0): ERROR: CHECK( lst_1 == lst_2 ) is NOT correct!
Salvage6545bdc2022-01-13 00:14:21 +010059 values: CHECK( [1, 42, 3] == [1, 2, 666] )
onqtam2c100d62017-04-16 22:47:28 +030060
Viktor Kirilov17d984c2020-12-04 15:13:33 +020061stringification.cpp(0): ERROR: CHECK( s1 == s2 ) is NOT correct!
Viktor Kirilov81fe2e82020-12-04 18:59:26 +020062 values: CHECK( MyOtherType: 42 == MyOtherType: 666 )
63 logged: s1=MyOtherType: 42 s2=MyOtherType: 666
Viktor Kirilov17d984c2020-12-04 15:13:33 +020064
65stringification.cpp(0): ERROR: CHECK( s1 == s2 ) is NOT correct!
Viktor Kirilov81fe2e82020-12-04 18:59:26 +020066 values: CHECK( MyOtherType: 42 == MyOtherType: 666 )
67 logged: s1=MyOtherType: 42 s2=MyOtherType: 666
68 MyOtherType: 42 is not really MyOtherType: 666
Viktor Kirilov17d984c2020-12-04 15:13:33 +020069
Salvage4ddb7932022-01-12 16:17:39 +010070stringification.cpp(0): ERROR: CHECK( doctest::IsNaN<double>(0.5) ) is NOT correct!
Salvage245d4b22022-01-12 16:04:16 +010071 values: CHECK( 0.5 )
72
Salvage4ddb7932022-01-12 16:17:39 +010073stringification.cpp(0): ERROR: CHECK( doctest::IsNaN<float>(std::numeric_limits<float>::infinity()) ) is NOT correct!
Salvage245d4b22022-01-12 16:04:16 +010074 values: CHECK( inf )
75
onqtam1655b242018-05-10 15:29:21 +030076stringification.cpp(0): ERROR: test case THREW exception: MyTypeInherited<int>(5, 4)
onqtam2c100d62017-04-16 22:47:28 +030077
onqtam35c14cd2017-04-24 12:54:03 +030078===============================================================================
onqtam1655b242018-05-10 15:29:21 +030079stringification.cpp(0):
onqtam35c14cd2017-04-24 12:54:03 +030080TEST CASE: a test case that registers an exception translator for int and then throws one
onqtam27079bc2017-04-16 23:21:13 +030081
onqtam1655b242018-05-10 15:29:21 +030082stringification.cpp(0): ERROR: test case THREW exception: 5
onqtam27079bc2017-04-16 23:21:13 +030083
onqtam2c100d62017-04-16 22:47:28 +030084===============================================================================
Salvage6545bdc2022-01-13 00:14:21 +010085[doctest] test cases: 3 | 0 passed | 3 failed |
Salvage7be3b872022-01-13 05:08:34 +010086[doctest] assertions: 15 | 0 passed | 15 failed |
onqtam754f4022017-05-06 20:07:49 +030087[doctest] Status: FAILURE!
onqtam2c100d62017-04-16 22:47:28 +030088Program code.