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:
parent
f2f421a0a2
commit
2f3b4c8bfb
@ -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)
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user