New file for quicksort algorithm

This commit is contained in:
2024-06-23 21:23:01 +01:00
parent 6d21bce57b
commit 894f79581f
2 changed files with 107 additions and 7 deletions

View File

@@ -27,13 +27,13 @@
;; Print success of test (i.e. (equality expected got)) and return a
;; boolean representing if it worked.
(printf "[TEST ~a]: " name)
(if (equality expected got)
(begin
(displayln "Success")
#t)
(begin
(printf "Failure (expected=~a, got=~a)~n" expected got)
#f)))
(cond
[(equality expected got)
(displayln "Success")
#t]
[else
(printf "Failure (expected=~a, got=~a)~n" expected got)
#f]))
(define-syntax (perform-tests stx)
(with-syntax