onqtam | 2c100d6 | 2017-04-16 22:47:28 +0300 | [diff] [blame] | 1 | [doctest] run with "--help" for options |
onqtam | 35c14cd | 2017-04-24 12:54:03 +0300 | [diff] [blame] | 2 | =============================================================================== |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 3 | stringification.cpp(0): |
Salvage | 6545bdc | 2022-01-13 00:14:21 +0100 | [diff] [blame] | 4 | TEST CASE: no headers |
| 5 | |
| 6 | stringification.cpp(0): MESSAGE: 1as |
| 7 | |
| 8 | stringification.cpp(0): ERROR: CHECK( chs1 == nullptr ) is NOT correct! |
| 9 | values: CHECK( 1as == NULL ) |
| 10 | |
Salvage | 7be3b87 | 2022-01-13 05:08:34 +0100 | [diff] [blame^] | 11 | stringification.cpp(0): MESSAGE: 0x31 |
Salvage | 6545bdc | 2022-01-13 00:14:21 +0100 | [diff] [blame] | 12 | |
| 13 | stringification.cpp(0): ERROR: CHECK( chs2 == nullptr ) is NOT correct! |
Salvage | 7be3b87 | 2022-01-13 05:08:34 +0100 | [diff] [blame^] | 14 | values: CHECK( 0x31 == NULL ) |
Salvage | 6545bdc | 2022-01-13 00:14:21 +0100 | [diff] [blame] | 15 | |
| 16 | stringification.cpp(0): MESSAGE: 1as |
| 17 | |
| 18 | stringification.cpp(0): ERROR: CHECK( "1as" == nullptr ) is NOT correct! |
| 19 | values: CHECK( 1as == NULL ) |
| 20 | |
| 21 | stringification.cpp(0): MESSAGE: [0, 1, 1, 2, 3, 5, 8, 13] |
| 22 | |
| 23 | stringification.cpp(0): ERROR: CHECK( ints == nullptr ) is NOT correct! |
| 24 | values: CHECK( [0, 1, 1, 2, 3, 5, 8, 13] == NULL ) |
| 25 | |
Salvage | 7be3b87 | 2022-01-13 05:08:34 +0100 | [diff] [blame^] | 26 | stringification.cpp(0): ERROR: CHECK( cptr == nullptr ) is NOT correct! |
| 27 | values: CHECK( 0x03 == NULL ) |
| 28 | |
| 29 | stringification.cpp(0): MESSAGE: 0 |
| 30 | |
| 31 | stringification.cpp(0): ERROR: CHECK( A == C ) is NOT correct! |
| 32 | values: CHECK( 0 == 100 ) |
| 33 | |
Salvage | 6545bdc | 2022-01-13 00:14:21 +0100 | [diff] [blame] | 34 | =============================================================================== |
| 35 | stringification.cpp(0): |
onqtam | 35c14cd | 2017-04-24 12:54:03 +0300 | [diff] [blame] | 36 | TEST CASE: all asserts should fail and show how the objects get stringified |
onqtam | 2c100d6 | 2017-04-16 22:47:28 +0300 | [diff] [blame] | 37 | |
Salvage | 6545bdc | 2022-01-13 00:14:21 +0100 | [diff] [blame] | 38 | stringification.cpp(0): MESSAGE: Foo{} |
| 39 | |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 40 | stringification.cpp(0): ERROR: CHECK( f1 == f2 ) is NOT correct! |
| 41 | values: CHECK( Foo{} == Foo{} ) |
onqtam | 2c100d6 | 2017-04-16 22:47:28 +0300 | [diff] [blame] | 42 | |
Salvage | 6545bdc | 2022-01-13 00:14:21 +0100 | [diff] [blame] | 43 | stringification.cpp(0): MESSAGE: omg |
| 44 | |
onqtam | 367098b | 2021-12-15 15:15:06 +0200 | [diff] [blame] | 45 | stringification.cpp(0): ERROR: CHECK( dummy == "tralala" ) is NOT correct! |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 46 | values: CHECK( omg == tralala ) |
onqtam | 2c100d6 | 2017-04-16 22:47:28 +0300 | [diff] [blame] | 47 | |
onqtam | 367098b | 2021-12-15 15:15:06 +0200 | [diff] [blame] | 48 | stringification.cpp(0): ERROR: CHECK( "tralala" == dummy ) is NOT correct! |
| 49 | values: CHECK( tralala == omg ) |
| 50 | |
Salvage | 6545bdc | 2022-01-13 00:14:21 +0100 | [diff] [blame] | 51 | stringification.cpp(0): MESSAGE: [1, 2, 3] |
| 52 | |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 53 | stringification.cpp(0): ERROR: CHECK( vec1 == vec2 ) is NOT correct! |
| 54 | values: CHECK( [1, 2, 3] == [1, 2, 4] ) |
onqtam | 2c100d6 | 2017-04-16 22:47:28 +0300 | [diff] [blame] | 55 | |
Salvage | 6545bdc | 2022-01-13 00:14:21 +0100 | [diff] [blame] | 56 | stringification.cpp(0): MESSAGE: [1, 42, 3] |
| 57 | |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 58 | stringification.cpp(0): ERROR: CHECK( lst_1 == lst_2 ) is NOT correct! |
Salvage | 6545bdc | 2022-01-13 00:14:21 +0100 | [diff] [blame] | 59 | values: CHECK( [1, 42, 3] == [1, 2, 666] ) |
onqtam | 2c100d6 | 2017-04-16 22:47:28 +0300 | [diff] [blame] | 60 | |
Viktor Kirilov | 17d984c | 2020-12-04 15:13:33 +0200 | [diff] [blame] | 61 | stringification.cpp(0): ERROR: CHECK( s1 == s2 ) is NOT correct! |
Viktor Kirilov | 81fe2e8 | 2020-12-04 18:59:26 +0200 | [diff] [blame] | 62 | values: CHECK( MyOtherType: 42 == MyOtherType: 666 ) |
| 63 | logged: s1=MyOtherType: 42 s2=MyOtherType: 666 |
Viktor Kirilov | 17d984c | 2020-12-04 15:13:33 +0200 | [diff] [blame] | 64 | |
| 65 | stringification.cpp(0): ERROR: CHECK( s1 == s2 ) is NOT correct! |
Viktor Kirilov | 81fe2e8 | 2020-12-04 18:59:26 +0200 | [diff] [blame] | 66 | values: CHECK( MyOtherType: 42 == MyOtherType: 666 ) |
| 67 | logged: s1=MyOtherType: 42 s2=MyOtherType: 666 |
| 68 | MyOtherType: 42 is not really MyOtherType: 666 |
Viktor Kirilov | 17d984c | 2020-12-04 15:13:33 +0200 | [diff] [blame] | 69 | |
Salvage | 4ddb793 | 2022-01-12 16:17:39 +0100 | [diff] [blame] | 70 | stringification.cpp(0): ERROR: CHECK( doctest::IsNaN<double>(0.5) ) is NOT correct! |
Salvage | 245d4b2 | 2022-01-12 16:04:16 +0100 | [diff] [blame] | 71 | values: CHECK( 0.5 ) |
| 72 | |
Salvage | 4ddb793 | 2022-01-12 16:17:39 +0100 | [diff] [blame] | 73 | stringification.cpp(0): ERROR: CHECK( doctest::IsNaN<float>(std::numeric_limits<float>::infinity()) ) is NOT correct! |
Salvage | 245d4b2 | 2022-01-12 16:04:16 +0100 | [diff] [blame] | 74 | values: CHECK( inf ) |
| 75 | |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 76 | stringification.cpp(0): ERROR: test case THREW exception: MyTypeInherited<int>(5, 4) |
onqtam | 2c100d6 | 2017-04-16 22:47:28 +0300 | [diff] [blame] | 77 | |
onqtam | 35c14cd | 2017-04-24 12:54:03 +0300 | [diff] [blame] | 78 | =============================================================================== |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 79 | stringification.cpp(0): |
onqtam | 35c14cd | 2017-04-24 12:54:03 +0300 | [diff] [blame] | 80 | TEST CASE: a test case that registers an exception translator for int and then throws one |
onqtam | 27079bc | 2017-04-16 23:21:13 +0300 | [diff] [blame] | 81 | |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 82 | stringification.cpp(0): ERROR: test case THREW exception: 5 |
onqtam | 27079bc | 2017-04-16 23:21:13 +0300 | [diff] [blame] | 83 | |
onqtam | 2c100d6 | 2017-04-16 22:47:28 +0300 | [diff] [blame] | 84 | =============================================================================== |
Salvage | 6545bdc | 2022-01-13 00:14:21 +0100 | [diff] [blame] | 85 | [doctest] test cases: 3 | 0 passed | 3 failed | |
Salvage | 7be3b87 | 2022-01-13 05:08:34 +0100 | [diff] [blame^] | 86 | [doctest] assertions: 15 | 0 passed | 15 failed | |
onqtam | 754f402 | 2017-05-06 20:07:49 +0300 | [diff] [blame] | 87 | [doctest] Status: FAILURE! |
onqtam | 2c100d6 | 2017-04-16 22:47:28 +0300 | [diff] [blame] | 88 | Program code. |