half-floats: Add some more unit tests

db4
Slava Pestov 2009-07-02 17:52:53 -05:00
parent 10f3b4fb18
commit 9404a7d0e3
2 changed files with 8 additions and 0 deletions

View File

@ -238,6 +238,13 @@ IN: compiler.tests.intrinsics
[ t ] [ f [ f eq? ] compile-call ] unit-test
cell 8 = [
[ HEX: 40400000 ] [
HEX: 4200 [ HEX: 7fff fixnum-bitand 13 fixnum-shift-fast 112 23 fixnum-shift-fast fixnum+fast ]
compile-call
] unit-test
] when
! regression
[ 3 ] [
100001 f <array> 3 100000 pick set-nth

View File

@ -25,6 +25,7 @@ IN: half-floats.tests
[ -1.5 ] [ HEX: be00 bits>half ] unit-test
[ 1/0. ] [ HEX: 7c00 bits>half ] unit-test
[ -1/0. ] [ HEX: fc00 bits>half ] unit-test
[ 3.0 ] [ HEX: 4200 bits>half ] unit-test
[ t ] [ HEX: 7e00 bits>half fp-nan? ] unit-test
C-STRUCT: halves