mirror of
https://github.com/louisrubet/rpn
synced 2024-12-28 09:58:52 +01:00
#3: general and real tests
This commit is contained in:
parent
a74eb3914c
commit
a01c5b50bc
2 changed files with 42 additions and 38 deletions
|
@ -1,47 +1,11 @@
|
|||
## GENERAL
|
||||
|
||||
# std
|
||||
erase
|
||||
1
|
||||
10 std
|
||||
-> stack should be 1
|
||||
|
||||
3 /
|
||||
-> stack should be 0.3333333333
|
||||
|
||||
3 std
|
||||
-> stack should be 0.333
|
||||
|
||||
# fix
|
||||
drop
|
||||
10 fix
|
||||
1
|
||||
-> stack should be 1.0000000000
|
||||
|
||||
4 fix
|
||||
-> stack should be 1.0000
|
||||
|
||||
# sci
|
||||
12 sci
|
||||
-> stack should be 1.000000000000e+00
|
||||
|
||||
2 sci
|
||||
-> stack should be 1.00e+00
|
||||
drop
|
||||
|
||||
# version
|
||||
version
|
||||
->stack size should be 1
|
||||
-> stack size should be 1
|
||||
|
||||
uname
|
||||
->stack size should be 2
|
||||
erase
|
||||
|
||||
# default
|
||||
1
|
||||
-> stack should be 1.00e+00
|
||||
default
|
||||
-> stack should be 1
|
||||
-> stack size should be 2
|
||||
erase
|
||||
|
||||
# type
|
||||
|
@ -59,3 +23,11 @@ erase
|
|||
type
|
||||
-> stack should be << -> n << n >> >>, 'program'
|
||||
erase
|
||||
|
||||
# default
|
||||
2 sci
|
||||
1
|
||||
-> stack should be 1.00e+00
|
||||
default
|
||||
-> stack should be 1
|
||||
erase
|
||||
|
|
32
test/real-representation.txt
Normal file
32
test/real-representation.txt
Normal file
|
@ -0,0 +1,32 @@
|
|||
## REAL representation
|
||||
|
||||
# std
|
||||
erase
|
||||
1
|
||||
10 std
|
||||
-> stack should be 1
|
||||
|
||||
3 /
|
||||
-> stack should be 0.3333333333
|
||||
|
||||
3 std
|
||||
-> stack should be 0.333
|
||||
|
||||
# fix
|
||||
drop
|
||||
10 fix
|
||||
1
|
||||
-> stack should be 1.0000000000
|
||||
|
||||
4 fix
|
||||
-> stack should be 1.0000
|
||||
|
||||
# sci
|
||||
12 sci
|
||||
-> stack should be 1.000000000000e+00
|
||||
|
||||
2 sci
|
||||
-> stack should be 1.00e+00
|
||||
drop
|
||||
|
||||
default
|
Loading…
Reference in a new issue