blob: a6c43ddbe93efda11cebdbb817022d47d485c15d [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
Salvageec2adbd2022-01-18 02:57:06 +01006stringification.cpp(0): MESSAGE: 1as
Salvage6545bdc2022-01-13 00:14:21 +01007
Salvage4bc7a752022-01-18 05:35:57 +01008stringification.cpp(0): ERROR: CHECK( chs == nullptr ) is NOT correct!
9 values: CHECK( 1as == nullptr )
Salvage6545bdc2022-01-13 00:14:21 +010010
11stringification.cpp(0): MESSAGE: 1as
12
13stringification.cpp(0): ERROR: CHECK( "1as" == nullptr ) is NOT correct!
Salvage4bc7a752022-01-18 05:35:57 +010014 values: CHECK( 1as == nullptr )
Salvage6545bdc2022-01-13 00:14:21 +010015
Salvage4bc7a752022-01-18 05:35:57 +010016stringification.cpp(0): MESSAGE: [0, 1, 1, 2, 3, 5, 8, 13]
Salvage6545bdc2022-01-13 00:14:21 +010017
18stringification.cpp(0): ERROR: CHECK( ints == nullptr ) is NOT correct!
Salvage4bc7a752022-01-18 05:35:57 +010019 values: CHECK( [0, 1, 1, 2, 3, 5, 8, 13] == nullptr )
Salvage7be3b872022-01-13 05:08:34 +010020
Salvage996ef322022-01-18 05:45:52 +010021stringification.cpp(0): MESSAGE: nullptr
22
23stringification.cpp(0): ERROR: CHECK( cnptr != nullptr ) is NOT correct!
24 values: CHECK( nullptr != nullptr )
25
Salvage7be3b872022-01-13 05:08:34 +010026stringification.cpp(0): MESSAGE: 0
27
28stringification.cpp(0): ERROR: CHECK( A == C ) is NOT correct!
29 values: CHECK( 0 == 100 )
30
Salvage6545bdc2022-01-13 00:14:21 +010031===============================================================================
32stringification.cpp(0):
onqtam35c14cd2017-04-24 12:54:03 +030033TEST CASE: all asserts should fail and show how the objects get stringified
onqtam2c100d62017-04-16 22:47:28 +030034
Salvage6545bdc2022-01-13 00:14:21 +010035stringification.cpp(0): MESSAGE: Foo{}
36
onqtam1655b242018-05-10 15:29:21 +030037stringification.cpp(0): ERROR: CHECK( f1 == f2 ) is NOT correct!
38 values: CHECK( Foo{} == Foo{} )
onqtam2c100d62017-04-16 22:47:28 +030039
Salvage6545bdc2022-01-13 00:14:21 +010040stringification.cpp(0): MESSAGE: omg
41
onqtam367098b2021-12-15 15:15:06 +020042stringification.cpp(0): ERROR: CHECK( dummy == "tralala" ) is NOT correct!
onqtam1655b242018-05-10 15:29:21 +030043 values: CHECK( omg == tralala )
onqtam2c100d62017-04-16 22:47:28 +030044
onqtam367098b2021-12-15 15:15:06 +020045stringification.cpp(0): ERROR: CHECK( "tralala" == dummy ) is NOT correct!
46 values: CHECK( tralala == omg )
47
Salvage6545bdc2022-01-13 00:14:21 +010048stringification.cpp(0): MESSAGE: [1, 2, 3]
49
onqtam1655b242018-05-10 15:29:21 +030050stringification.cpp(0): ERROR: CHECK( vec1 == vec2 ) is NOT correct!
51 values: CHECK( [1, 2, 3] == [1, 2, 4] )
onqtam2c100d62017-04-16 22:47:28 +030052
Salvage6545bdc2022-01-13 00:14:21 +010053stringification.cpp(0): MESSAGE: [1, 42, 3]
54
onqtam1655b242018-05-10 15:29:21 +030055stringification.cpp(0): ERROR: CHECK( lst_1 == lst_2 ) is NOT correct!
Salvage6545bdc2022-01-13 00:14:21 +010056 values: CHECK( [1, 42, 3] == [1, 2, 666] )
onqtam2c100d62017-04-16 22:47:28 +030057
Viktor Kirilov17d984c2020-12-04 15:13:33 +020058stringification.cpp(0): ERROR: CHECK( s1 == s2 ) is NOT correct!
Salvage4bc7a752022-01-18 05:35:57 +010059 values: CHECK( MyOtherType: 42 == MyOtherType: 666 )
Viktor Kirilov81fe2e82020-12-04 18:59:26 +020060 logged: s1=MyOtherType: 42 s2=MyOtherType: 666
Viktor Kirilov17d984c2020-12-04 15:13:33 +020061
62stringification.cpp(0): ERROR: CHECK( s1 == s2 ) is NOT correct!
Salvage4bc7a752022-01-18 05:35:57 +010063 values: CHECK( MyOtherType: 42 == MyOtherType: 666 )
Viktor Kirilov81fe2e82020-12-04 18:59:26 +020064 logged: s1=MyOtherType: 42 s2=MyOtherType: 666
65 MyOtherType: 42 is not really MyOtherType: 666
Viktor Kirilov17d984c2020-12-04 15:13:33 +020066
Salvage4ddb7932022-01-12 16:17:39 +010067stringification.cpp(0): ERROR: CHECK( doctest::IsNaN<double>(0.5) ) is NOT correct!
Salvage4bc7a752022-01-18 05:35:57 +010068 values: CHECK( IsNaN( 0.5 ) )
Salvage245d4b22022-01-12 16:04:16 +010069
Salvage4ddb7932022-01-12 16:17:39 +010070stringification.cpp(0): ERROR: CHECK( doctest::IsNaN<float>(std::numeric_limits<float>::infinity()) ) is NOT correct!
Salvage4bc7a752022-01-18 05:35:57 +010071 values: CHECK( IsNaN( inff ) )
Salvage245d4b22022-01-12 16:04:16 +010072
onqtam1655b242018-05-10 15:29:21 +030073stringification.cpp(0): ERROR: test case THREW exception: MyTypeInherited<int>(5, 4)
onqtam2c100d62017-04-16 22:47:28 +030074
onqtam35c14cd2017-04-24 12:54:03 +030075===============================================================================
onqtam1655b242018-05-10 15:29:21 +030076stringification.cpp(0):
onqtam35c14cd2017-04-24 12:54:03 +030077TEST CASE: a test case that registers an exception translator for int and then throws one
onqtam27079bc2017-04-16 23:21:13 +030078
onqtam1655b242018-05-10 15:29:21 +030079stringification.cpp(0): ERROR: test case THREW exception: 5
onqtam27079bc2017-04-16 23:21:13 +030080
onqtam2c100d62017-04-16 22:47:28 +030081===============================================================================
Salvage6545bdc2022-01-13 00:14:21 +010082[doctest] test cases: 3 | 0 passed | 3 failed |
Salvagee992f762022-01-18 06:23:45 +010083[doctest] assertions: 16 | 2 passed | 14 failed |
onqtam754f4022017-05-06 20:07:49 +030084[doctest] Status: FAILURE!
onqtam2c100d62017-04-16 22:47:28 +030085Program code.