blob: 18f8bca8f005b8f03e672095f7e0962fee39a4a7 [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
11stringification.cpp(0): MESSAGE: 1as
12
13stringification.cpp(0): ERROR: CHECK( chs2 == nullptr ) is NOT correct!
14 values: CHECK( 1as == NULL )
15
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
26===============================================================================
27stringification.cpp(0):
onqtam35c14cd2017-04-24 12:54:03 +030028TEST CASE: all asserts should fail and show how the objects get stringified
onqtam2c100d62017-04-16 22:47:28 +030029
Salvage6545bdc2022-01-13 00:14:21 +010030stringification.cpp(0): MESSAGE: Foo{}
31
onqtam1655b242018-05-10 15:29:21 +030032stringification.cpp(0): ERROR: CHECK( f1 == f2 ) is NOT correct!
33 values: CHECK( Foo{} == Foo{} )
onqtam2c100d62017-04-16 22:47:28 +030034
Salvage6545bdc2022-01-13 00:14:21 +010035stringification.cpp(0): MESSAGE: omg
36
onqtam367098b2021-12-15 15:15:06 +020037stringification.cpp(0): ERROR: CHECK( dummy == "tralala" ) is NOT correct!
onqtam1655b242018-05-10 15:29:21 +030038 values: CHECK( omg == tralala )
onqtam2c100d62017-04-16 22:47:28 +030039
onqtam367098b2021-12-15 15:15:06 +020040stringification.cpp(0): ERROR: CHECK( "tralala" == dummy ) is NOT correct!
41 values: CHECK( tralala == omg )
42
Salvage6545bdc2022-01-13 00:14:21 +010043stringification.cpp(0): MESSAGE: [1, 2, 3]
44
onqtam1655b242018-05-10 15:29:21 +030045stringification.cpp(0): ERROR: CHECK( vec1 == vec2 ) is NOT correct!
46 values: CHECK( [1, 2, 3] == [1, 2, 4] )
onqtam2c100d62017-04-16 22:47:28 +030047
Salvage6545bdc2022-01-13 00:14:21 +010048stringification.cpp(0): MESSAGE: [1, 42, 3]
49
onqtam1655b242018-05-10 15:29:21 +030050stringification.cpp(0): ERROR: CHECK( lst_1 == lst_2 ) is NOT correct!
Salvage6545bdc2022-01-13 00:14:21 +010051 values: CHECK( [1, 42, 3] == [1, 2, 666] )
onqtam2c100d62017-04-16 22:47:28 +030052
Viktor Kirilov17d984c2020-12-04 15:13:33 +020053stringification.cpp(0): ERROR: CHECK( s1 == s2 ) is NOT correct!
Viktor Kirilov81fe2e82020-12-04 18:59:26 +020054 values: CHECK( MyOtherType: 42 == MyOtherType: 666 )
55 logged: s1=MyOtherType: 42 s2=MyOtherType: 666
Viktor Kirilov17d984c2020-12-04 15:13:33 +020056
57stringification.cpp(0): ERROR: CHECK( s1 == s2 ) is NOT correct!
Viktor Kirilov81fe2e82020-12-04 18:59:26 +020058 values: CHECK( MyOtherType: 42 == MyOtherType: 666 )
59 logged: s1=MyOtherType: 42 s2=MyOtherType: 666
60 MyOtherType: 42 is not really MyOtherType: 666
Viktor Kirilov17d984c2020-12-04 15:13:33 +020061
Salvage4ddb7932022-01-12 16:17:39 +010062stringification.cpp(0): ERROR: CHECK( doctest::IsNaN<double>(0.5) ) is NOT correct!
Salvage245d4b22022-01-12 16:04:16 +010063 values: CHECK( 0.5 )
64
Salvage4ddb7932022-01-12 16:17:39 +010065stringification.cpp(0): ERROR: CHECK( doctest::IsNaN<float>(std::numeric_limits<float>::infinity()) ) is NOT correct!
Salvage245d4b22022-01-12 16:04:16 +010066 values: CHECK( inf )
67
onqtam1655b242018-05-10 15:29:21 +030068stringification.cpp(0): ERROR: test case THREW exception: MyTypeInherited<int>(5, 4)
onqtam2c100d62017-04-16 22:47:28 +030069
onqtam35c14cd2017-04-24 12:54:03 +030070===============================================================================
onqtam1655b242018-05-10 15:29:21 +030071stringification.cpp(0):
onqtam35c14cd2017-04-24 12:54:03 +030072TEST CASE: a test case that registers an exception translator for int and then throws one
onqtam27079bc2017-04-16 23:21:13 +030073
onqtam1655b242018-05-10 15:29:21 +030074stringification.cpp(0): ERROR: test case THREW exception: 5
onqtam27079bc2017-04-16 23:21:13 +030075
onqtam2c100d62017-04-16 22:47:28 +030076===============================================================================
Salvage6545bdc2022-01-13 00:14:21 +010077[doctest] test cases: 3 | 0 passed | 3 failed |
78[doctest] assertions: 13 | 0 passed | 13 failed |
onqtam754f4022017-05-06 20:07:49 +030079[doctest] Status: FAILURE!
onqtam2c100d62017-04-16 22:47:28 +030080Program code.