Commit d458fcb
Fix order in ExUnit results when listing pinned variables (#14723)
The pinned variables were returned in a random order (often reversed):
test/ex_unit_pinned_variables_order_test.exs:23
match (=) failed
The following variables were pinned:
var_d = "four"
var_c = "three"
var_b = "two"
var_a = "one"
code: assert %{a: ^var_d, b: ^var_c, c: ^var_b, d: ^var_a} = build(var_a, var_b, var_c, var_d)
left: %{a: ^var_d, b: ^var_c, c: ^var_b, d: ^var_a}
right: %{a: "one", b: "two", c: "three", d: "four"}
stacktrace:
test/ex_unit_pinned_variables_order_test.exs:29: (test)
This fix sorts them alphabetically.
This bug was introduced in 884e933 when the pinned vars were now accumulated in a map (instead
of a list).
A repo replicating the issue can be found here:
- https://github.com/eksperimental-debug/elixir_debug/tree/ex-unit-pinned-variables-order
- https://github.com/eksperimental-debug/elixir_debug/blob/ex-unit-pinned-variables-order/ex_unit_pinned_variables_order/test/ex_unit_pinned_variables_order_test.exs1 parent d507502 commit d458fcb
File tree
2 files changed
+2
-2
lines changed- lib/ex_unit
- lib/ex_unit
- test/ex_unit
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
627 | | - | |
| 627 | + | |
628 | 628 | | |
629 | 629 | | |
630 | 630 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
527 | | - | |
528 | 527 | | |
| 528 | + | |
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
| |||
0 commit comments