|
203 | 203 | (testing:_report_success)) }) |
204 | 204 |
|
205 | 205 | # @brief Compare two values that should be equal and generate a test case |
206 | | -# @param _expected expected value |
207 | 206 | # @param _expr computed value to test |
| 207 | +# @param _expected expected value |
208 | 208 | # @param _desc an optional description (string) for the test |
209 | 209 | # =begin |
210 | 210 | # (test:suite name { |
211 | 211 | # (test:eq 6 (my_function 1 2 3)) |
212 | 212 | # (test:eq 5 (foo) "foo should return 5")}) |
213 | 213 | # =end |
214 | 214 | # @author https://github.com/SuperFola |
215 | | -(macro test:eq (_expected _expr ..._desc) { |
| 215 | +(macro test:eq (_expr _expected ..._desc) { |
216 | 216 | (if (= ($as-is _expected) ($as-is _expr)) |
217 | 217 | (testing:_report_success) |
218 | 218 | (testing:_report_error ($as-is _expected) ($as-is _expr) ($repr _expected) ($repr _expr) _desc)) }) |
219 | 219 |
|
220 | 220 | # @brief Compare two values that should **not** be equal and generate a test case |
221 | | -# @param _unexpected the value we don't want |
222 | 221 | # @param _value tested value |
| 222 | +# @param _unexpected the value we don't want |
223 | 223 | # @param _desc an optional description (string) for the test |
224 | 224 | # =begin |
225 | 225 | # (test:suite name { |
226 | 226 | # (test:neq 0 (my_function 1 2 3))}) |
227 | 227 | # =end |
228 | 228 | # @author https://github.com/SuperFola |
229 | | -(macro test:neq (_unexpected _value ..._desc) { |
| 229 | +(macro test:neq (_value _unexpected ..._desc) { |
230 | 230 | (if (!= ($as-is _unexpected) ($as-is _value)) |
231 | 231 | (testing:_report_success) |
232 | 232 | (testing:_report_error ($as-is _unexpected) ($as-is _value) ($repr _unexpected) ($repr _value) _desc)) }) |
|
0 commit comments