mirror of
https://github.com/louisrubet/rpn
synced 2025-01-05 11:01:52 +01:00
94 lines
1 KiB
Text
94 lines
1 KiB
Text
|
## 2 ## TEST
|
||
|
# and (1)
|
||
|
and
|
||
|
-> error should be 2
|
||
|
1 and
|
||
|
-> error should be 2
|
||
|
drop
|
||
|
|
||
|
# and (2)
|
||
|
0 0 and
|
||
|
-> stack size should be 1
|
||
|
-> stack should be 0
|
||
|
drop
|
||
|
|
||
|
# and (3)
|
||
|
1 0 and
|
||
|
-> stack size should be 1
|
||
|
-> stack should be 0
|
||
|
drop
|
||
|
|
||
|
# and (4)
|
||
|
0 1 and
|
||
|
-> stack size should be 1
|
||
|
-> stack should be 0
|
||
|
drop
|
||
|
|
||
|
# and (5)
|
||
|
1 1 and
|
||
|
-> stack size should be 1
|
||
|
-> stack should be 1
|
||
|
drop
|
||
|
|
||
|
# or (1)
|
||
|
or
|
||
|
-> error should be 2
|
||
|
1 or
|
||
|
-> error should be 2
|
||
|
drop
|
||
|
|
||
|
# or (2)
|
||
|
0 0 or
|
||
|
-> stack size should be 1
|
||
|
-> stack should be 0
|
||
|
drop
|
||
|
|
||
|
# or (3)
|
||
|
0 1 or
|
||
|
-> stack size should be 1
|
||
|
-> stack should be 1
|
||
|
drop
|
||
|
|
||
|
# or (4)
|
||
|
1 0 or
|
||
|
-> stack size should be 1
|
||
|
-> stack should be 1
|
||
|
drop
|
||
|
|
||
|
# or (5)
|
||
|
1 1 or
|
||
|
-> stack size should be 1
|
||
|
-> stack should be 1
|
||
|
drop
|
||
|
|
||
|
# xor (1)
|
||
|
xor
|
||
|
-> error should be 2
|
||
|
1 xor
|
||
|
-> error should be 2
|
||
|
drop
|
||
|
|
||
|
# xor (2)
|
||
|
0 0 xor
|
||
|
-> stack size should be 1
|
||
|
-> stack should be 0
|
||
|
drop
|
||
|
|
||
|
# xor (3)
|
||
|
0 1 xor
|
||
|
-> stack size should be 1
|
||
|
-> stack should be 1
|
||
|
drop
|
||
|
|
||
|
# xor (4)
|
||
|
1 0 xor
|
||
|
-> stack size should be 1
|
||
|
-> stack should be 1
|
||
|
drop
|
||
|
|
||
|
# xor (5)
|
||
|
1 1 xor
|
||
|
-> stack size should be 1
|
||
|
-> stack should be 0
|
||
|
drop
|