|
173 | 173 | # =end |
174 | 174 | # @author https://github.com/SuperFola |
175 | 175 | ($ test:expect (_cond ..._desc) { |
176 | | - (if (!= true ($paste _cond)) |
177 | | - (testing:_report_error true ($paste _cond) "true" ($repr _cond) _desc) |
| 176 | + (if (!= true ($as-is _cond)) |
| 177 | + (testing:_report_error true ($as-is _cond) "true" ($repr _cond) _desc) |
178 | 178 | (testing:_report_success)) }) |
179 | 179 |
|
180 | 180 | # @brief Compare two values that should be equal and generate a test case |
|
188 | 188 | # =end |
189 | 189 | # @author https://github.com/SuperFola |
190 | 190 | ($ test:eq (_expected _expr ..._desc) { |
191 | | - (if (= ($paste _expected) ($paste _expr)) |
| 191 | + (if (= ($as-is _expected) ($as-is _expr)) |
192 | 192 | (testing:_report_success) |
193 | | - (testing:_report_error ($paste _expected) ($paste _expr) ($repr _expected) ($repr _expr) _desc)) }) |
| 193 | + (testing:_report_error ($as-is _expected) ($as-is _expr) ($repr _expected) ($repr _expr) _desc)) }) |
194 | 194 |
|
195 | 195 | # @brief Compare two values that should **not** be equal and generate a test case |
196 | 196 | # @param _unexpected the value we don't want |
|
202 | 202 | # =end |
203 | 203 | # @author https://github.com/SuperFola |
204 | 204 | ($ test:neq (_unexpected _value ..._desc) { |
205 | | - (if (!= ($paste _unexpected) ($paste _value)) |
| 205 | + (if (!= ($as-is _unexpected) ($as-is _value)) |
206 | 206 | (testing:_report_success) |
207 | | - (testing:_report_error ($paste _unexpected) ($paste _value) ($repr _unexpected) ($repr _value) _desc)) }) |
| 207 | + (testing:_report_error ($as-is _unexpected) ($as-is _value) ($repr _unexpected) ($repr _value) _desc)) }) |
208 | 208 |
|
209 | 209 | # @brief Generate the code for a test suite |
210 | 210 | # @details Create two variables: _name-output (a list: [successes, failures]) and _name-status (boolean, true on success) |
|
222 | 222 |
|
223 | 223 | (let ($symcat _name "-output") (testing:_runner |
224 | 224 | ($repr _name) |
225 | | - (fun () ($paste |
| 225 | + (fun () ($as-is |
226 | 226 | { |
227 | 227 | _body })))) |
228 | 228 | (let ($symcat _name "-status") (= 0 (@ ($symcat _name "-output") 1))) }) |
0 commit comments