blob: 701acaea99a11d7dd6e77d6ba9144dc2b906b4f1 [file] [log] [blame]
onqtam2c100d62017-04-16 22:47:28 +03001[doctest] run with "--help" for options
onqtam27079bc2017-04-16 23:21:13 +03002
3root
41
51.1
6
7root
82
92.1
10
11root
122
onqtam35c14cd2017-04-24 12:54:03 +030013===============================================================================
onqtam1655b242018-05-10 15:29:21 +030014subcases.cpp(0):
onqtam35c14cd2017-04-24 12:54:03 +030015TEST CASE: lots of nested subcases
onqtam27079bc2017-04-16 23:21:13 +030016
onqtam1655b242018-05-10 15:29:21 +030017subcases.cpp(0): FATAL ERROR:
onqtam27079bc2017-04-16 23:21:13 +030018
onqtam35c14cd2017-04-24 12:54:03 +030019===============================================================================
onqtam1655b242018-05-10 15:29:21 +030020subcases.cpp(0):
onqtam35c14cd2017-04-24 12:54:03 +030021TEST CASE: subcases can be used in a separate function as well
onqtam5dbcb1e2017-05-02 23:07:56 +030022 from function...
23
onqtam1655b242018-05-10 15:29:21 +030024subcases.cpp(0): MESSAGE: print me twice
onqtam5dbcb1e2017-05-02 23:07:56 +030025
26===============================================================================
onqtam1655b242018-05-10 15:29:21 +030027subcases.cpp(0):
onqtam5dbcb1e2017-05-02 23:07:56 +030028TEST CASE: subcases can be used in a separate function as well
29 from function...
onqtam378d6702017-04-19 11:30:03 +030030 sc1
31
onqtam1655b242018-05-10 15:29:21 +030032subcases.cpp(0): MESSAGE: hello! from sc1
onqtam378d6702017-04-19 11:30:03 +030033
onqtam35c14cd2017-04-24 12:54:03 +030034===============================================================================
onqtam1655b242018-05-10 15:29:21 +030035subcases.cpp(0):
onqtam35c14cd2017-04-24 12:54:03 +030036TEST CASE: subcases can be used in a separate function as well
onqtama82c1e42017-05-07 17:36:41 +030037
onqtam72bf24e2020-05-17 20:19:54 +030038DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE):
39 from function...
40 sc1
41
onqtam1655b242018-05-10 15:29:21 +030042subcases.cpp(0): MESSAGE: lala
onqtama82c1e42017-05-07 17:36:41 +030043
44===============================================================================
onqtam1655b242018-05-10 15:29:21 +030045subcases.cpp(0):
onqtama82c1e42017-05-07 17:36:41 +030046TEST CASE: subcases can be used in a separate function as well
onqtam5dbcb1e2017-05-02 23:07:56 +030047 from function...
48
onqtam1655b242018-05-10 15:29:21 +030049subcases.cpp(0): MESSAGE: print me twice
onqtam5dbcb1e2017-05-02 23:07:56 +030050
51===============================================================================
onqtam1655b242018-05-10 15:29:21 +030052subcases.cpp(0):
onqtam5dbcb1e2017-05-02 23:07:56 +030053TEST CASE: subcases can be used in a separate function as well
54 from function...
onqtam378d6702017-04-19 11:30:03 +030055 sc2
56
onqtam1655b242018-05-10 15:29:21 +030057subcases.cpp(0): MESSAGE: hello! from sc2
onqtam378d6702017-04-19 11:30:03 +030058
onqtam35c14cd2017-04-24 12:54:03 +030059===============================================================================
onqtam1655b242018-05-10 15:29:21 +030060subcases.cpp(0):
onqtama82c1e42017-05-07 17:36:41 +030061TEST CASE: subcases can be used in a separate function as well
62
onqtam72bf24e2020-05-17 20:19:54 +030063DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE):
64 from function...
65 sc2
66
onqtam1655b242018-05-10 15:29:21 +030067subcases.cpp(0): MESSAGE: lala
onqtama82c1e42017-05-07 17:36:41 +030068
69===============================================================================
onqtam1655b242018-05-10 15:29:21 +030070subcases.cpp(0):
onqtam2c100d62017-04-16 22:47:28 +030071 Scenario: vectors can be sized and resized
72 Given: A vector with some items
73 When: the size is increased
74 Then: the size and capacity change
75
onqtam1655b242018-05-10 15:29:21 +030076subcases.cpp(0): ERROR: CHECK( v.size() == 20 ) is NOT correct!
77 values: CHECK( 10 == 20 )
onqtam2c100d62017-04-16 22:47:28 +030078
onqtam35c14cd2017-04-24 12:54:03 +030079===============================================================================
onqtam1655b242018-05-10 15:29:21 +030080subcases.cpp(0):
onqtam2c100d62017-04-16 22:47:28 +030081 Scenario: vectors can be sized and resized
82 Given: A vector with some items
83 When: less capacity is reserved
84 Then: neither size nor capacity are changed
85
onqtam1655b242018-05-10 15:29:21 +030086subcases.cpp(0): ERROR: CHECK( v.size() == 10 ) is NOT correct!
87 values: CHECK( 5 == 10 )
onqtam2c100d62017-04-16 22:47:28 +030088
onqtam2c100d62017-04-16 22:47:28 +030089===============================================================================
onqtamdc011982018-10-24 16:57:10 +030090subcases.cpp(0):
91TEST CASE: test case should fail even though the last subcase passes
92 one
93
94subcases.cpp(0): ERROR: CHECK( false ) is NOT correct!
95 values: CHECK( false )
96
97===============================================================================
onqtamb656d602019-03-18 18:33:00 +020098subcases.cpp(0):
99TEST CASE: fails from an exception but gets re-entered to traverse all subcases
100 level zero
101 one
102
103subcases.cpp(0): ERROR: CHECK( false ) is NOT correct!
104 values: CHECK( false )
105
106===============================================================================
107subcases.cpp(0):
108TEST CASE: fails from an exception but gets re-entered to traverse all subcases
onqtam2e137ae2019-09-22 21:06:02 +0300109 level zero
110
onqtam72bf24e2020-05-17 20:19:54 +0300111DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE):
112 level zero
113 one
114
onqtam2e137ae2019-09-22 21:06:02 +0300115subcases.cpp(0): ERROR: test case THREW exception: exception thrown in subcase - will translate later when the whole test case has been exited (cannot translate while there is an active exception)
116
117===============================================================================
118subcases.cpp(0):
119TEST CASE: fails from an exception but gets re-entered to traverse all subcases
onqtamb656d602019-03-18 18:33:00 +0200120
onqtam72bf24e2020-05-17 20:19:54 +0300121DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE):
122 level zero
123 one
124
onqtamb656d602019-03-18 18:33:00 +0200125subcases.cpp(0): ERROR: test case THREW exception: failure... but the show must go on!
126
127===============================================================================
128subcases.cpp(0):
129TEST CASE: fails from an exception but gets re-entered to traverse all subcases
130 level zero
131 two
132
133subcases.cpp(0): ERROR: CHECK( false ) is NOT correct!
134 values: CHECK( false )
135
136===============================================================================
137subcases.cpp(0):
138TEST CASE: fails from an exception but gets re-entered to traverse all subcases
onqtam2e137ae2019-09-22 21:06:02 +0300139 level zero
140
onqtam72bf24e2020-05-17 20:19:54 +0300141DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE):
142 level zero
143 two
144
onqtam2e137ae2019-09-22 21:06:02 +0300145subcases.cpp(0): ERROR: test case THREW exception: exception thrown in subcase - will translate later when the whole test case has been exited (cannot translate while there is an active exception)
146
147===============================================================================
148subcases.cpp(0):
149TEST CASE: fails from an exception but gets re-entered to traverse all subcases
onqtamb656d602019-03-18 18:33:00 +0200150
onqtam72bf24e2020-05-17 20:19:54 +0300151DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE):
152 level zero
153 two
154
onqtamb656d602019-03-18 18:33:00 +0200155subcases.cpp(0): ERROR: test case THREW exception: failure... but the show must go on!
156
157===============================================================================
onqtam33752222020-02-24 18:35:42 +0200158subcases.cpp(0):
159TEST CASE: subcases with changing names
160 outer 0
161 inner 0
162
163subcases.cpp(0): MESSAGE: msg!
164
165===============================================================================
166subcases.cpp(0):
167TEST CASE: subcases with changing names
168 outer 0
169 inner 1
170
171subcases.cpp(0): MESSAGE: msg!
172
173===============================================================================
174subcases.cpp(0):
175TEST CASE: subcases with changing names
176 outer 1
177 inner 0
178
179subcases.cpp(0): MESSAGE: msg!
180
181===============================================================================
182subcases.cpp(0):
183TEST CASE: subcases with changing names
184 outer 1
185 inner 1
186
187subcases.cpp(0): MESSAGE: msg!
188
189===============================================================================
190subcases.cpp(0):
191TEST CASE: subcases with changing names
192 separate
193
194subcases.cpp(0): MESSAGE: separate msg!
195
196===============================================================================
Nick Black74b8ac42020-09-06 13:01:26 -0400197[doctest] test cases: 7 | 3 passed | 4 failed |
198[doctest] assertions: 25 | 19 passed | 6 failed |
onqtam754f4022017-05-06 20:07:49 +0300199[doctest] Status: FAILURE!
onqtam2c100d62017-04-16 22:47:28 +0300200Program code.