mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-18 21:29:18 +02:00
Issue #279 - Add unit tests
This commit is contained in:
parent
b39c8a0622
commit
ed799e4bbb
2 changed files with 24 additions and 1 deletions
3
Makefile
3
Makefile
|
@ -37,7 +37,8 @@ TEST_SRC = $(TEST_DIR)/unit-tests.scm \
|
|||
$(TEST_DIR)/srfi-60-tests.scm \
|
||||
$(TEST_DIR)/srfi-121-tests.scm \
|
||||
$(TEST_DIR)/srfi-128-162-tests.scm \
|
||||
$(TEST_DIR)/srfi-143-tests.scm
|
||||
$(TEST_DIR)/srfi-143-tests.scm \
|
||||
$(TEST_DIR)/threading.scm
|
||||
TESTS = $(basename $(TEST_SRC))
|
||||
|
||||
# Primary rules (of interest to an end user)
|
||||
|
|
22
tests/threading.scm
Normal file
22
tests/threading.scm
Normal file
|
@ -0,0 +1,22 @@
|
|||
;;;; Cyclone Scheme
|
||||
;;;; https://github.com/justinethier/cyclone
|
||||
;;;;
|
||||
;;;; Copyright (c) 2014-2021, Justin Ethier
|
||||
;;;; All rights reserved.
|
||||
;;;;
|
||||
;;;; This module contains unit tests for threading / SRFI 18.
|
||||
;;;;
|
||||
|
||||
(import
|
||||
(scheme base)
|
||||
(srfi 18)
|
||||
(cyclone test))
|
||||
|
||||
|
||||
(test-group
|
||||
"thread-join!"
|
||||
(let ((t (thread-start! (make-thread (lambda () (expt 2 100))))))
|
||||
(test (expt 2 100) (thread-join! t)))
|
||||
)
|
||||
|
||||
(test-exit)
|
Loading…
Add table
Reference in a new issue