1
0
mirror of https://github.com/janet-lang/janet synced 2025-06-08 01:24:12 +00:00

Consolidate related tests

This commit is contained in:
Michael Camilleri 2022-01-21 12:58:22 +09:00
parent f2f421a0a2
commit 2f3b4c8bfb
No known key found for this signature in database
GPG Key ID: 7EB218A48DF8B572
2 changed files with 14 additions and 13 deletions

View File

@ -266,4 +266,13 @@
(ev/rselect c2) (ev/rselect c2)
(assert (= (slice arr) (slice (range 100))) "ev/chan-close 3") (assert (= (slice arr) (slice (range 100))) "ev/chan-close 3")
# threaded channels
(def ch (ev/thread-chan 2))
(def att (ev/thread-chan 109))
(assert att "`att` was nil after creation")
(ev/give ch att)
(ev/do-thread
(assert (ev/take ch) "channel packing bug for threaded abstracts on threaded channels."))
(end-suite) (end-suite)

View File

@ -21,18 +21,10 @@
(import ./helper :prefix "" :exit true) (import ./helper :prefix "" :exit true)
(start-suite 11) (start-suite 11)
(assert (< 11899423.08 (math/gamma 11.5) 11899423.085) # math gamma
"math/gamma")
(assert (< 2605.1158 (math/log-gamma 500) 2605.1159) (assert (< 11899423.08 (math/gamma 11.5) 11899423.085) "math/gamma")
"math/log-gamma") (assert (< 2605.1158 (math/log-gamma 500) 2605.1159) "math/log-gamma")
(def ch (ev/thread-chan 2))
(def att (ev/thread-chan 109))
(assert att "`att` was nil after creation")
(ev/give ch att)
(ev/do-thread
(assert (ev/take ch) "channel packing bug for threaded abstracts on threaded channels."))
(end-suite) (end-suite)