mirror of
https://github.com/mgcaret/of816.git
synced 2025-04-06 15:42:59 +00:00
move some tests to the correct suite
This commit is contained in:
parent
b1e0972431
commit
110187f808
@ -11,22 +11,6 @@ t{ parse-word test swap 0> -> 4 true }t
|
||||
t{ source 0> swap 0> -> true true }t
|
||||
t{ bl word test count swap 0> -> 4 true }t
|
||||
|
||||
\ IEEE 1275-1994 number input
|
||||
|
||||
\ first make sure >number (ANS word) works
|
||||
t{ 0 s>d s" 123" >number nip -> 123 0 0 }t
|
||||
t{ 0 s>d s" 123?456" >number nip -> 123 0 4 }t
|
||||
|
||||
t{ 1,234,567 -> 1234567 }t
|
||||
t{ 1.234.567 -> 1234567 }t
|
||||
t{ 1234567. -> 1234567 s>d }t
|
||||
t{ -1234567. -> -1234567 s>d }t
|
||||
|
||||
\ Things that should fail
|
||||
t{ s" 123," ' eval catch >r clear r> -> -d }t
|
||||
t{ s" ,123" ' eval catch >r clear r> -> -d }t
|
||||
t{ s" .123" ' eval catch >r clear r> -> -d }t
|
||||
|
||||
testing 7.3.4.2 Console input
|
||||
|
||||
\ covers: \
|
||||
|
@ -9,6 +9,23 @@ testing 7.3.5.2 Numeric input
|
||||
|
||||
hex
|
||||
|
||||
\ IEEE 1275-1994 number input
|
||||
|
||||
\ first make sure >number (ANS word) works
|
||||
t{ 0 s>d s" 123" >number nip -> 123 0 0 }t
|
||||
t{ 0 s>d s" 123?456" >number nip -> 123 0 4 }t
|
||||
|
||||
t{ 1,234,567 -> 1234567 }t
|
||||
t{ 1.234.567 -> 1234567 }t
|
||||
t{ 1234567. -> 1234567 s>d }t
|
||||
t{ -1234567. -> -1234567 s>d }t
|
||||
|
||||
\ Things that should fail
|
||||
t{ s" 123," ' eval catch >r clear r> -> -d }t
|
||||
t{ s" ,123" ' eval catch >r clear r> -> -d }t
|
||||
t{ s" .123" ' eval catch >r clear r> -> -d }t
|
||||
|
||||
|
||||
t{ s" 123" $number -> 123 false }t
|
||||
t{ s" $xyz" $number -> true }t
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user