mirror of
https://github.com/louisrubet/rpn
synced 2025-01-30 20:34:30 +01:00
#137: test on ip fp ceil floor
This commit is contained in:
parent
0786d3c9f9
commit
78b2357322
1 changed files with 40 additions and 0 deletions
|
@ -429,4 +429,44 @@ max
|
||||||
-> error should be 2
|
-> error should be 2
|
||||||
erase
|
erase
|
||||||
|
|
||||||
|
# ip (1)
|
||||||
|
1.22 ip
|
||||||
|
-> stack should be 1
|
||||||
|
erase
|
||||||
|
|
||||||
|
# ip (2)
|
||||||
|
-1.22 ip
|
||||||
|
-> stack should be -1
|
||||||
|
erase
|
||||||
|
|
||||||
|
# fp (1)
|
||||||
|
1.22 fp
|
||||||
|
-> stack should be 0.22
|
||||||
|
erase
|
||||||
|
|
||||||
|
# fp (2)
|
||||||
|
-1.22 fp
|
||||||
|
-> stack should be -0.22
|
||||||
|
erase
|
||||||
|
|
||||||
|
# floor (1)
|
||||||
|
1.22 floor
|
||||||
|
-> stack should be 1
|
||||||
|
erase
|
||||||
|
|
||||||
|
# floor (2)
|
||||||
|
-1.22 floor
|
||||||
|
-> stack should be -2
|
||||||
|
erase
|
||||||
|
|
||||||
|
# ceil (1)
|
||||||
|
1.22 ceil
|
||||||
|
-> stack should be 2
|
||||||
|
erase
|
||||||
|
|
||||||
|
# ceil (2)
|
||||||
|
-1.22 ceil
|
||||||
|
-> stack should be -1
|
||||||
|
erase
|
||||||
|
|
||||||
default
|
default
|
||||||
|
|
Loading…
Add table
Reference in a new issue