From ac51237853c3e6d7bf1d0b15ec2a8aefc00a7b89 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Sat, 17 Oct 2009 00:07:08 -0500 Subject: [PATCH] add unit test that doubles stored in single-precision float arrays round to nearest --- basis/specialized-arrays/specialized-arrays-tests.factor | 3 +++ 1 file changed, 3 insertions(+) diff --git a/basis/specialized-arrays/specialized-arrays-tests.factor b/basis/specialized-arrays/specialized-arrays-tests.factor index 07a457db5c..1ee8776085 100755 --- a/basis/specialized-arrays/specialized-arrays-tests.factor +++ b/basis/specialized-arrays/specialized-arrays-tests.factor @@ -36,6 +36,9 @@ SPECIALIZED-ARRAYS: bool ushort char uint float ulonglong ; int-array{ 3 1 3 3 7 } malloc-byte-array 5 >array ] unit-test +[ float-array{ HEX: 1.222,222 HEX: 1.111,112 } ] +[ float-array{ HEX: 1.222,222,2 HEX: 1.111,111,1 } ] unit-test + [ f ] [ float-array{ 4 3 2 1 } dup clone [ underlying>> ] bi@ eq? ] unit-test [ f ] [ [ float-array{ 4 3 2 1 } dup clone [ underlying>> ] bi@ eq? ] compile-call ] unit-test