Skip to content

Commit 48b0802

Browse files
committed
test: swap parameters in test assertion (NFC)
Swap the parameters in `assertEqual` to improve diagnostics on failure. This now prints as: ``` stdout>>> expected: -431 (of type Swift.int) stdout>>> actual: -11 (of type Swift.int) ```
1 parent 2b62570 commit 48b0802

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/stdlib/Dispatch.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ DispatchAPI.test("DispatchTime.SchedulerTimeType.Stridable") {
278278
let time1 = DispatchQueue.SchedulerTimeType(.init(uptimeNanoseconds: 10000))
279279
let time2 = DispatchQueue.SchedulerTimeType(.init(uptimeNanoseconds: 10431))
280280
let addedTime = time2.distance(to: time1)
281-
expectEqual(addedTime.magnitude, (10000 - 10431))
281+
expectEqual((10000 - 10431), addedTime.magnitude)
282282
}
283283
}
284284

285-
#endif
285+
#endif

0 commit comments

Comments
 (0)