Skip to content

Commit

Permalink
Add test for RUN-TASK function.
Browse files Browse the repository at this point in the history
  • Loading branch information
takagi committed Sep 19, 2016
1 parent ead63c0 commit 0da482c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion t/lake.lisp
Expand Up @@ -842,7 +842,22 @@
"invalid tasks."))

(subtest "run-task"
)

(let ((tasks nil)
(task1 (lake::make-task "a" nil '("b" "c" "d" "e") nil #'noop))
(task2 (lake::make-task "b" nil nil nil #'noop))
(task3 (lake::make-task "c" nil nil nil #'noop))
(task4 (lake::make-task "d" nil nil nil #'noop))
(task5 (lake::make-task "e" nil nil nil #'noop)))
(lake::register-task task1 tasks)
(lake::register-task task2 tasks)
(lake::register-task task3 tasks)
(lake::register-task task4 tasks)
(lake::register-task task5 tasks)
;; Test serial execution.
(ok (null (lake::run-task "a" tasks 1)))
;; Test concurrent execution.
(ok (null (lake::run-task "a" tasks 2)))))


;;
Expand Down

0 comments on commit 0da482c

Please sign in to comment.