Simplify test case
authorSiraaj Khandkar <siraaj@khandkar.net>
Thu, 19 Nov 2020 02:53:21 +0000 (21:53 -0500)
committerSiraaj Khandkar <siraaj@khandkar.net>
Thu, 19 Nov 2020 02:53:21 +0000 (21:53 -0500)
tt.rkt

diff --git a/tt.rkt b/tt.rkt
index 986ade1..d37788d 100644 (file)
--- a/tt.rkt
+++ b/tt.rkt
   results)
 
 (module+ test
-         (define n-workers 10)
-         (define given (list
-                         (λ (x) (if (even? x) x #f))
-                         (range 11)))
-         (check-equal?
-           (sort (apply concurrent-filter-map (cons n-workers given)) <)
-           (sort (apply            filter-map                 given ) <)))
+         (let* ([f        (λ (x) (if (even? x) x #f))]
+                [xs       (range 11)]
+                [actual   (sort (concurrent-filter-map 10 f xs) <)]
+                [expected (sort (           filter-map    f xs) <)])
+               (check-equal? actual expected "concurrent-filter-map")))
 
 (define (msg-print out-format odd msg)
   (printf
This page took 0.029618 seconds and 4 git commands to generate.