mirror of
https://github.com/louisrubet/rpn
synced 2025-01-19 10:26:22 +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
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue