release 0.1.0
This commit is contained in:
commit
30d94536a9
90 changed files with 7722 additions and 0 deletions
40
modules/core/tests/math.owa
Normal file
40
modules/core/tests/math.owa
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
(namespace tests.math
|
||||
(test.case "math.add"
|
||||
(assert.eq! (+ 1 2) 3)
|
||||
(assert.eq! (+ 0 0) 0)
|
||||
)
|
||||
|
||||
(test.case "math.sub"
|
||||
(assert.eq! (- 5 3) 2)
|
||||
(assert.eq! (- 1 1) 0)
|
||||
)
|
||||
|
||||
(test.case "math.mul"
|
||||
(assert.eq! (* 3 4) 12)
|
||||
(assert.eq! (* 0 5) 0)
|
||||
)
|
||||
|
||||
(test.case "math.div"
|
||||
(assert.eq! (/ 10 2) 5)
|
||||
)
|
||||
|
||||
(test.case "math.mod"
|
||||
(assert.eq! (% 10 3) 1)
|
||||
(assert.eq! (% 5 5) 0)
|
||||
)
|
||||
|
||||
(test.case "math.pow"
|
||||
(assert.eq! (** 2 3) 8)
|
||||
(assert.eq! (** 5 2) 25)
|
||||
)
|
||||
|
||||
(test.case "math.++"
|
||||
(assert.eq! (++ 5) 6)
|
||||
(assert.eq! (++ 0) 1)
|
||||
)
|
||||
|
||||
(test.case "math.--"
|
||||
(assert.eq! (-- 5) 4)
|
||||
(assert.eq! (-- 0) -1)
|
||||
)
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue