onqtam | 2c100d6 | 2017-04-16 22:47:28 +0300 | [diff] [blame] | 1 | [doctest] run with "--help" for options |
onqtam | 27079bc | 2017-04-16 23:21:13 +0300 | [diff] [blame] | 2 | |
| 3 | root |
| 4 | 1 |
| 5 | 1.1 |
| 6 | |
| 7 | root |
| 8 | 2 |
| 9 | 2.1 |
| 10 | |
| 11 | root |
| 12 | 2 |
onqtam | 35c14cd | 2017-04-24 12:54:03 +0300 | [diff] [blame] | 13 | =============================================================================== |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 14 | subcases.cpp(0): |
onqtam | 35c14cd | 2017-04-24 12:54:03 +0300 | [diff] [blame] | 15 | TEST CASE: lots of nested subcases |
onqtam | 27079bc | 2017-04-16 23:21:13 +0300 | [diff] [blame] | 16 | |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 17 | subcases.cpp(0): FATAL ERROR: |
onqtam | 27079bc | 2017-04-16 23:21:13 +0300 | [diff] [blame] | 18 | |
onqtam | 35c14cd | 2017-04-24 12:54:03 +0300 | [diff] [blame] | 19 | =============================================================================== |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 20 | subcases.cpp(0): |
onqtam | 35c14cd | 2017-04-24 12:54:03 +0300 | [diff] [blame] | 21 | TEST CASE: subcases can be used in a separate function as well |
onqtam | 5dbcb1e | 2017-05-02 23:07:56 +0300 | [diff] [blame] | 22 | from function... |
| 23 | |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 24 | subcases.cpp(0): MESSAGE: print me twice |
onqtam | 5dbcb1e | 2017-05-02 23:07:56 +0300 | [diff] [blame] | 25 | |
| 26 | =============================================================================== |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 27 | subcases.cpp(0): |
onqtam | 5dbcb1e | 2017-05-02 23:07:56 +0300 | [diff] [blame] | 28 | TEST CASE: subcases can be used in a separate function as well |
| 29 | from function... |
onqtam | 378d670 | 2017-04-19 11:30:03 +0300 | [diff] [blame] | 30 | sc1 |
| 31 | |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 32 | subcases.cpp(0): MESSAGE: hello! from sc1 |
onqtam | 378d670 | 2017-04-19 11:30:03 +0300 | [diff] [blame] | 33 | |
onqtam | 35c14cd | 2017-04-24 12:54:03 +0300 | [diff] [blame] | 34 | =============================================================================== |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 35 | subcases.cpp(0): |
onqtam | 35c14cd | 2017-04-24 12:54:03 +0300 | [diff] [blame] | 36 | TEST CASE: subcases can be used in a separate function as well |
onqtam | a82c1e4 | 2017-05-07 17:36:41 +0300 | [diff] [blame] | 37 | |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 38 | subcases.cpp(0): MESSAGE: lala |
onqtam | a82c1e4 | 2017-05-07 17:36:41 +0300 | [diff] [blame] | 39 | |
| 40 | =============================================================================== |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 41 | subcases.cpp(0): |
onqtam | a82c1e4 | 2017-05-07 17:36:41 +0300 | [diff] [blame] | 42 | TEST CASE: subcases can be used in a separate function as well |
onqtam | 5dbcb1e | 2017-05-02 23:07:56 +0300 | [diff] [blame] | 43 | from function... |
| 44 | |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 45 | subcases.cpp(0): MESSAGE: print me twice |
onqtam | 5dbcb1e | 2017-05-02 23:07:56 +0300 | [diff] [blame] | 46 | |
| 47 | =============================================================================== |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 48 | subcases.cpp(0): |
onqtam | 5dbcb1e | 2017-05-02 23:07:56 +0300 | [diff] [blame] | 49 | TEST CASE: subcases can be used in a separate function as well |
| 50 | from function... |
onqtam | 378d670 | 2017-04-19 11:30:03 +0300 | [diff] [blame] | 51 | sc2 |
| 52 | |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 53 | subcases.cpp(0): MESSAGE: hello! from sc2 |
onqtam | 378d670 | 2017-04-19 11:30:03 +0300 | [diff] [blame] | 54 | |
onqtam | 35c14cd | 2017-04-24 12:54:03 +0300 | [diff] [blame] | 55 | =============================================================================== |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 56 | subcases.cpp(0): |
onqtam | a82c1e4 | 2017-05-07 17:36:41 +0300 | [diff] [blame] | 57 | TEST CASE: subcases can be used in a separate function as well |
| 58 | |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 59 | subcases.cpp(0): MESSAGE: lala |
onqtam | a82c1e4 | 2017-05-07 17:36:41 +0300 | [diff] [blame] | 60 | |
| 61 | =============================================================================== |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 62 | subcases.cpp(0): |
onqtam | 2c100d6 | 2017-04-16 22:47:28 +0300 | [diff] [blame] | 63 | Scenario: vectors can be sized and resized |
| 64 | Given: A vector with some items |
| 65 | When: the size is increased |
| 66 | Then: the size and capacity change |
| 67 | |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 68 | subcases.cpp(0): ERROR: CHECK( v.size() == 20 ) is NOT correct! |
| 69 | values: CHECK( 10 == 20 ) |
onqtam | 2c100d6 | 2017-04-16 22:47:28 +0300 | [diff] [blame] | 70 | |
onqtam | 35c14cd | 2017-04-24 12:54:03 +0300 | [diff] [blame] | 71 | =============================================================================== |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 72 | subcases.cpp(0): |
onqtam | 2c100d6 | 2017-04-16 22:47:28 +0300 | [diff] [blame] | 73 | Scenario: vectors can be sized and resized |
| 74 | Given: A vector with some items |
| 75 | When: less capacity is reserved |
| 76 | Then: neither size nor capacity are changed |
| 77 | |
onqtam | 1655b24 | 2018-05-10 15:29:21 +0300 | [diff] [blame] | 78 | subcases.cpp(0): ERROR: CHECK( v.size() == 10 ) is NOT correct! |
| 79 | values: CHECK( 5 == 10 ) |
onqtam | 2c100d6 | 2017-04-16 22:47:28 +0300 | [diff] [blame] | 80 | |
onqtam | 2c100d6 | 2017-04-16 22:47:28 +0300 | [diff] [blame] | 81 | =============================================================================== |
onqtam | 68d0f1d | 2017-05-07 20:45:09 +0300 | [diff] [blame] | 82 | [doctest] test cases: 3 | 1 passed | 2 failed | |
| 83 | [doctest] assertions: 17 | 14 passed | 3 failed | |
onqtam | 754f402 | 2017-05-06 20:07:49 +0300 | [diff] [blame] | 84 | [doctest] Status: FAILURE! |
onqtam | 2c100d6 | 2017-04-16 22:47:28 +0300 | [diff] [blame] | 85 | Program code. |