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