all repos — min @ 6570dc0b3eee7f89194d405d680da6e7647997a5

A small but practical concatenative programming language.

test(num) Added tests for num module.
h3rald h3rald@h3rald.com
Sun, 29 May 2016 20:38:35 +0200
commit

6570dc0b3eee7f89194d405d680da6e7647997a5

parent

53bafb4271e43dc7435827082af6419865882b53

2 files changed, 33 insertions(+), 0 deletions(-)

jump to
M tests/all.mintests/all.min

@@ -1,3 +1,4 @@

@io @lang @logic +@num
A tests/num.min

@@ -0,0 +1,32 @@

+@test +#test + +"num" describe + + (2 2 + 4 ==) assert + (1 3.0 + 4 ==) assert + (3.1 3.9 + 7 ==) assert + (3 -2.1 + 0.8999999999999999 ==) assert + + (3 3 - 0 ==) assert + (-5 -4 - -1 ==) assert + (-4 3.7 - -7.7 ==) assert + + (-2 4 * -8 ==) assert + (-2.5 -2 * 5 ==) assert + (3 3 * 9 ==) assert + + (5 2 / 2.5 ==) assert + (1 3 / 0.3333333333333333 ==) assert + (-3 2 / -1.5 ==) assert + + (5 2 div 2 ==) assert + (1 3 div 0 ==) assert + (-3 2 div -1 ==) assert + + (5 2 mod 1 ==) assert + (4 2 mod 0 ==) assert + (-3 2 mod -1 ==) assert + + report + clear