From 4e791aff6814e38da8b431b8ddb8444a32e34fe6 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 27 Dec 2024 22:14:51 +0000 Subject: Fix a bug in fibers-batch-map (and related procedures) And add more tests. --- tests/parallelism.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests') diff --git a/tests/parallelism.scm b/tests/parallelism.scm index 0901b3c..7d8dea7 100644 --- a/tests/parallelism.scm +++ b/tests/parallelism.scm @@ -24,6 +24,16 @@ 100 (iota 34)))))) +;; Test fibers-map with an empty list +(run-fibers-for-tests + (lambda () + (fibers-map identity '()))) + +;; Test fibers-map with an empty vector +(run-fibers-for-tests + (lambda () + (fibers-map identity #()))) + ;; Test fibers-map with vectors (run-fibers-for-tests (lambda () @@ -43,4 +53,11 @@ (* 2 i)) (iota 34)))) +;; Test fibers-map-with-progress with an empty list +(run-fibers-for-tests + (lambda () + (fibers-map-with-progress + identity + '(())))) + (display "parallelism test finished successfully\n") -- cgit v1.2.3