Skip to content

Commit e131c0d

Browse files
committed
chore: reorder arguments inside testing macros, so that the tested value is first, and the (un)expected one is second
1 parent ffda0f1 commit e131c0d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Testing.ark

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,30 +203,30 @@
203203
(testing:_report_success)) })
204204

205205
# @brief Compare two values that should be equal and generate a test case
206-
# @param _expected expected value
207206
# @param _expr computed value to test
207+
# @param _expected expected value
208208
# @param _desc an optional description (string) for the test
209209
# =begin
210210
# (test:suite name {
211211
# (test:eq 6 (my_function 1 2 3))
212212
# (test:eq 5 (foo) "foo should return 5")})
213213
# =end
214214
# @author https://github.com/SuperFola
215-
(macro test:eq (_expected _expr ..._desc) {
215+
(macro test:eq (_expr _expected ..._desc) {
216216
(if (= ($as-is _expected) ($as-is _expr))
217217
(testing:_report_success)
218218
(testing:_report_error ($as-is _expected) ($as-is _expr) ($repr _expected) ($repr _expr) _desc)) })
219219

220220
# @brief Compare two values that should **not** be equal and generate a test case
221-
# @param _unexpected the value we don't want
222221
# @param _value tested value
222+
# @param _unexpected the value we don't want
223223
# @param _desc an optional description (string) for the test
224224
# =begin
225225
# (test:suite name {
226226
# (test:neq 0 (my_function 1 2 3))})
227227
# =end
228228
# @author https://github.com/SuperFola
229-
(macro test:neq (_unexpected _value ..._desc) {
229+
(macro test:neq (_value _unexpected ..._desc) {
230230
(if (!= ($as-is _unexpected) ($as-is _value))
231231
(testing:_report_success)
232232
(testing:_report_error ($as-is _unexpected) ($as-is _value) ($repr _unexpected) ($repr _value) _desc)) })

0 commit comments

Comments
 (0)