|
139 | 139 | # =end
|
140 | 140 | # @author https://github.com/SuperFola
|
141 | 141 | ($ test:expect (_cond ..._desc) {
|
142 |
| - (if (!= true _cond) |
143 |
| - (_report_error true _cond "true" ($repr _cond) _desc) |
| 142 | + (if (!= true ($paste _cond)) |
| 143 | + (_report_error true ($paste _cond) "true" ($repr _cond) _desc) |
144 | 144 | (_report_success))})
|
145 | 145 |
|
146 | 146 | # @brief Compare two values that should be equal and generate a test case
|
|
154 | 154 | # =end
|
155 | 155 | # @author https://github.com/SuperFola
|
156 | 156 | ($ test:eq (_expected _expr ..._desc) {
|
157 |
| - (if (= _expected _expr) |
| 157 | + (if (= ($paste _expected) ($paste _expr)) |
158 | 158 | (_report_success)
|
159 |
| - (_report_error _expected _expr ($repr _expected) ($repr _expr) _desc))}) |
| 159 | + (_report_error ($paste _expected) ($paste _expr) ($repr _expected) ($repr _expr) _desc))}) |
160 | 160 |
|
161 | 161 | # @brief Compare two values that should **not** be equal and generate a test case
|
162 | 162 | # @param _unexpected the value we don't want
|
|
168 | 168 | # =end
|
169 | 169 | # @author https://github.com/SuperFola
|
170 | 170 | ($ test:neq (_unexpected _value ..._desc) {
|
171 |
| - (if (!= _unexpected _value) |
| 171 | + (if (!= ($paste _unexpected) ($paste _value)) |
172 | 172 | (_report_success)
|
173 |
| - (_report_error _unexpected _value ($repr _unexpected) ($repr _value) _desc))}) |
| 173 | + (_report_error ($paste _unexpected) ($paste _value) ($repr _unexpected) ($repr _value) _desc))}) |
174 | 174 |
|
175 | 175 | # @brief Generate the code for a test suite
|
176 | 176 | # @details Create two variables: _name-output (a list: [successes, failures]) and _name-status (boolean, true on success)
|
|
184 | 184 | # =end
|
185 | 185 | # @author https://github.com/SuperFola
|
186 | 186 | ($ test:suite (_name _body) {
|
187 |
| - (let (symcat _name "-output") (_runner ($repr _name) (fun () {_body}))) |
| 187 | + (let (symcat _name "-output") (_runner ($repr _name) (fun () ($paste {_body})))) |
188 | 188 | (let (symcat _name "-status") (= 0 (@ (symcat _name "-output") 1)))})
|
0 commit comments