Initial commit
This commit is contained in:
commit
2f39c58d6c
27 changed files with 2969 additions and 0 deletions
18
tests/resource-pool.scm
Normal file
18
tests/resource-pool.scm
Normal file
|
@ -0,0 +1,18 @@
|
|||
(use-modules (tests)
|
||||
(fibers)
|
||||
(unit-test)
|
||||
(knots resource-pool))
|
||||
|
||||
(run-fibers-for-tests
|
||||
(lambda ()
|
||||
(let ((resource-pool (make-resource-pool
|
||||
(lambda ()
|
||||
2)
|
||||
1)))
|
||||
(assert-equal
|
||||
(with-resource-from-pool resource-pool
|
||||
res
|
||||
res)
|
||||
2))))
|
||||
|
||||
(display "resource-pool test finished successfully\n")
|
Loading…
Add table
Add a link
Reference in a new issue