Skip to content

Commit

Permalink
Fix hierarchy in reported test failure
Browse files Browse the repository at this point in the history
The hierarchy, that is the "address" of the failing test, was being
shown out of order. This fixes it so that it reflects the actual order
of nesting of test suites.
  • Loading branch information
countvajhula committed Dec 7, 2023
1 parent fb96819 commit 5652039
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rackunit-lib/rackunit/private/format.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
(define (combine-names test-name suite-names)
(define any-names? (or test-name (not (empty? suite-names))))
(and any-names?
(string-join (snoc (or test-name "Unnamed test") suite-names) " > ")))
(string-join (snoc (or test-name "Unnamed test")
(reverse suite-names))
" > ")))

(define (snoc v vs) (append vs (list v)))

Expand Down

0 comments on commit 5652039

Please sign in to comment.