move some tests to the correct suite

This commit is contained in:
mgcaret 2020-03-13 22:24:56 -07:00
parent b1e0972431
commit 110187f808
2 changed files with 17 additions and 16 deletions

View File

@ -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: \

View File

@ -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