Issue #279 - Add unit tests

This commit is contained in:
Justin Ethier 2021-07-26 13:27:22 -04:00
parent b39c8a0622
commit ed799e4bbb
2 changed files with 24 additions and 1 deletions

View file

@ -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
View 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)