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