mirror of
https://github.com/janet-lang/janet
synced 2025-11-03 09:03:02 +00:00
Add errorParent to threads.
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
# Define assert
|
||||
(do
|
||||
(: assert (fn [x e] (if x x (do (print e) (exit 1)))))
|
||||
|
||||
# Basic Math
|
||||
(assert (= 10 (+ 1 2 3 4), "addition")
|
||||
(assert (= -8 (- 1 2 3 4), "subtraction")
|
||||
(assert (= 24 (* 1 2 3 4), "multiplication")
|
||||
(assert (= 0.1 (/ 1 10), "division")
|
||||
|
||||
# All good
|
||||
(assert (= 10 (+ 1 2 3 4)) "addition")
|
||||
(assert (= -8 (- 1 2 3 4)) "subtraction")
|
||||
(assert (= 24 (* 1 2 3 4)) "multiplication")
|
||||
(assert (= 0.1 (/ 1.0 10)) "division")
|
||||
(exit 0)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user